iphone - Hide keyboard on ViewWillAppear -
i have screen having navigation controller , text field. when move next , come want keyboard should hidden in first screen. hiding keyboard on textfield event.
- (bool)textfieldshouldreturn:(uitextfield *)textfield { [textfield resignfirstresponder]; return no; }
but how in view related events whenever view appears keyboard hidden.. pls guide/help. in adv.
i think way remove keyboard in ios app
if uitextview
or uitextfield
not connected through iboutlet
.
if want hide keyboard uiviewcontroller
lifecycle events viewwillappear
or etc. follow
-(void)viewwillappear:(bool)animated { [super viewwillappear:animated]; [[self view] endediting:yes]; }
otherwise if object connected using iboutlet
code work fine describe too.
[yourtextfield resignfirstresponder];
Comments
Post a Comment