objective c - why cant I change button title in ios -



objective c - why cant I change button title in ios -

i new ios, , trying alter simple button text implementation side in action. have tried 2 of these: while 1 of them works, other 1 doesnt !

self.btn_analyse.titlelabel.text = @"stop anlaysing"; // didnt work

and...

[self.btn_analyse settitle:@"deneme" forstate:uicontrolstatenormal]; //worked

why doesnt first 1 work? ps: have connected button iboutlet

why telling worked?

if worked there isn't problem.

anyway, reason first 1 didn't work because button not label. has various states , each state can have different properties.

you set image state. set title state. etc...

then different states can have different properties.

ios objective-c

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -