iphone - iPad Keyboard Covers UITextField in table view -


i have problem have 15 text fields in table view.when entering text last text field covering key board.any 1 please give me solution this.

my textfields in detail view controleer of split view in ipad,

thanks in advance solution

you can add these lines of coding:

//method move view up/down whenever keyboard shown/dismissed -(void)setviewmovedup:(bool)movedup {     [uiview beginanimations:nil context:null];    [uiview setanimationduration:0.3]; // if want slide view  cgrect rect = self.view.frame; if (movedup) {     nslog(@"move-up");     // 1. move view's origin text field hidden come above keyboard     // 2. increase size of view area behind keyboard covered up.     rect.origin.y -= koffset_for_keyboard;     // rect.size.height += koffset_for_keyboard; } else {     nslog(@"move-down");     // revert normal state.     rect.origin.y += koffset_for_keyboard;     // rect.size.height -= koffset_for_keyboard; } self.view.frame = rect;  [uiview commitanimations]; }  -(void)keyboardwillshow {    // animate current view out of way    if (self.view.frame.origin.y >= 0)    {        [self setviewmovedup:yes];    }    else if (self.view.frame.origin.y < 0)    {       [self setviewmovedup:no];    }  }    -(void)keyboardwillhide  {     if (self.view.frame.origin.y >= 0)     {        [self setviewmovedup:yes];     }     else if (self.view.frame.origin.y < 0)     {        [self setviewmovedup:no];     }  } 

and in viewdidappear:

 -(void)viewdidappear:(bool)animated  {       [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(keyboardwillshow) name:uikeyboardwillshownotification object:nil];      [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(keyboardwillhide) name:uikeyboardwillhidenotification object:nil];   } 

you have define #define koffset_for_keyboard 100.0//as want


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -