objective c - UITextField editing issue - iPhone SDK -


i having issue uitextfields in iphone app hoping here may have seen before.

i have few uitextfield's on screen, , when tapped , keyboard appears covered. overcome this, animated view move with:

-(void)moveviewupfromvalue:(float)fromoldvalue tonewvalue:(float)tonewvalue keep:(bool)keep {      cabasicanimation *theanimation;      theanimation=[cabasicanimation animationwithkeypath:@"transform.translation.y"];      theanimation.duration=0.25;      theanimation.repeatcount=1;      if(keep) {         [theanimation setremovedoncompletion:no];         [theanimation setfillmode:kcafillmodeforwards];     }     theanimation.fromvalue=[nsnumber numberwithfloat:fromoldvalue];      theanimation.tovalue=[nsnumber numberwithfloat:tonewvalue];      [self.view.layer addanimation:theanimation forkey:@"animatelayer"];   } 

this, visually, works great, however, when go edit (hold screen down magnifying glass), doesn't appear. interaction retained in position before moves.

any ideas going on here?

many thanks, brett

this interesting way animate such thing, not common one.

you're animating transformation of view - not actual position of view. appearantly magnifying glass doesn't obey transformation (quite logical, sheer, stretch , skew view otherwise).

so rather animate position, i.e. self.view.frame or self.view.center (which boils down same thing). furthermore use [uiview beginanimations...] etc if approach works, it's fine.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -