ios - UIButton modifying titlelabel seems to change its frame -


something strange happening. basically, trying recreate messaging app. when trying send button change grey blue when user has typed in @ least 1 character.

the problem comes when trying change titlelabel, button disappear. later found out reverts old position (when keyboard not shown).

why this? if not modify titlelabel works usual. however, if do, uibutton goes original location. if need sample code let me know, not sure put on here it's [self.button.titlelabel settextcolor: [uicolor bluecolor]; in uitextviewdidchange it's acting strange.

thanks! alan

you might fighting against auto-layout. saw similar behavior, , answered question here: why uibutton resize when access titlelabel property?. basically, suggested forego auto-layout or only use auto-layout (never set frames programmatically).


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -