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

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

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

asp.net mvc - breakpoint on javascript in CSHTML? -