objective c - Unable to change value of string from @property -


i have variable multiple methods need access , change.

i have declared as:

@property (nonatomic, retain) nsstring *curdate; 

i synthesise in code well.

however, when trying change it's value so:

curdate = "02-07-2012"; 

the app crashes.

why this? how should change value?

you need use @ symbol when using nsstring literal syntax.

like this:

curdate = @"02-07-2012";

read usage of @ symbol in objective-c here.


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -