uitextfield - Multiple textfields in iOS Application -


i have many textfields in particular view of ios application. textfields have popover controller while others have textfields can typed.

the problem face when touch textfields. before end editing of particular textfield, if touch popovercontroller, both popovercontroller , textfields appear on ui.

how avoid this?

sorry being vague. here image. want texteditor go off when textfield being touched.

enter image description here

tried doing this:

- (bool)textfieldshouldbeginediting:(uitextfield *)textfield {     nsarray *subviews = [self.view subviews];     (id objects in subviews) {         if ([objects iskindofclass:[uitextfield class]]) {             uitextfield *thetextfield = objects;             if ([objects isfirstresponder]) {                 [thetextfield resignfirstresponder];             }         }     }     return yes; } 

not working either... need guidance on this...

tried well:

-(void)touchesbegan:(nsset *)touches withevent:(uievent *)event{       nsarray *subviews = [self.view subviews];         (id objects in subviews) {             if ([objects iskindofclass:[uitextfield class]]) {                 uitextfield *thetextfield = objects;                 if ([objects isfirstresponder]) {                     [thetextfield resignfirstresponder];                 }             }         }         return yes; } 

try this:

[self.view endediting:yes]; 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -