ios - how to move view upside while entering any text in input field -


i have app want when user enters data view should slide up. writing code code works fine in app not working in app.i following same way.

-(void)showanimationback{      nslog(@"back animation working");       [uiview animatewithduration:0.5                       animations:^{                          self.subviewland.frame = cgrectmake(0,-10,1024,768);                        }];  }   -(void) showanimationpests{       nslog(@" animation working");       [uiview animatewithduration:0.5                       animations:^{                          self.subviewland.frame = cgrectmake(0,-200,1024,768);                        }];   } 

- (void)textfielddidbeginediting:(uitextfield *)textfield {     [uiview beginanimations:nil context:null];     [uiview setanimationduration:0.5];     self.subviewland.frame  = cgrectmake(0,-200,1024,768); // or self.view.frame  = cgrectmake(0,-200,1024,768);     [uiview commitanimations]; }  - (void)textfielddidendediting:(uitextfield *)textfield{         [uiview beginanimations:nil context:null];         [uiview setanimationduration:0.5];         self.subviewland.frame = cgrectmake(0,-200,1024,768); // or self.view.frame  = cgrectmake(0,-200,1024,768);         [uiview commitanimations]; }  

this code work


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -