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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -