ios - My view is not responding to setFrame if it is hidden -
ios - My view is not responding to setFrame if it is hidden -
i had submit button set hiding. when seek adjust frame of it, can't seem move? (the reason create assumption because keyboard covers bottom half of screen , seek automatically adjust button if keyboard up)
so hacky prepare have code running in keyboard listener:
if (self.submitbutton.ishidden) { self.submitbutton.hidden = no; self.submitbutton.frame = cgrectsety(self.submitbutton.frame, cgrectgetheight(self.view.frame) - button_full_height); self.submitbutton.hidden = yes; } else { self.submitbutton.frame = cgrectsety(self.submitbutton.frame, cgrectgetheight(self.view.frame) - button_full_height); }
is correct?
you should register receive uikeyboardwillshownotification
notifications. these notifications contain frame of keyboard on userinfo
using key uikeyboardframeenduserinfokey
. here, can move submitbutton
avoid keyboard.
ios
Comments
Post a Comment