Define screen size constant in Obj-c [closed] - 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.

Related

What does #end do in Objective C? [closed]

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.

Is double assignment valid in objective-c? [closed]

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.

Objective-C - How to send a multiple parts message? [closed]

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];

Error in stringWithXMLTag [closed]

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.

Init 2d array during runtime? [closed]

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.
So when I create a reference to an 2d array i have to specify its size? But during runtime I need to decide its size, or change its size? How do I do that?
Instead of NSArray use NSMutableArray.
With that type you can change the size afterwards and add more objects later during runtime.