It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I always see it when I'm browsing through code and I have absolutely no idea what it does.
It finishes a declaration.
For example, when you implement an interface, you do:
#interface MyInterface
/* functions and stuff here */
#end
It marks the end of an implementation of a class or interface.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Is the following line in objective-c compiles like in C?
a=b=1;
Yes, it works the same as in C.
Objective-C is a superset of C, so everything that works in C works in Objective-C.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Is there a way I could initialize some constant in a method like -(void) viewDidLoad for my screen variables (retina, not retina etc) ?
Thx
In C and Objective-C, constants cannot be assigned at runtime because they are constant. If you are asking how to assign to an instance variable, or make that variable accessible to other classes, please update your question.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Here's more explanation.
- (NSArray *)shipsAtPoint:(CGPoint)bomblocation withDamage:(BOOL)damaged;
How to send that?
You'll want to read The Objective-C Programming Language, which you'll find in the Xcode docs.
[objectIWantToSendTheMessageTo shipsAtPont:somePoint withDamage:YES];
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
My app crashes on the line:
NSString *test=[NSString stringWithXMLTag:#"name" andValue:#"NameTest"];
It's likely that you aren't including the NSString+stringWithXMLTag.h file. Consequently, your app will not recognize the stringWithXMLTag:andValue selector.
Add this to the top of your file that receives the crash:
#import "NSString+stringWithXMLTag.h"
This, of course, assumes you have that file in your project (and any of its dependencies).
This error is saying that the NSString class does not have a selector (method) named stringWithXMLTag:andValue.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
I want to call functions inline in Objective-C. How can I do this? I'm on iOS.
Since Objective-C is based on C, you can:
inline void myf() {int a; a=1;}
Objective-C does not support "inline" methods a la C++.