ipad - View Transition stammering when KeyBoard comes up iOS -
here transition code have showing viewb viewa
cgpoint c = thepoint; cgfloat tx = c.x - floorf(theview.center.x) + 10; cgfloat ty = c.y - floorf(theview.center.y) + 100; [uiview animatewithduration:0.5 delay:0.0 options:uiviewanimationoptioncurveeaseout animations:^{ // transforms cgaffinetransform t = cgaffinetransformmaketranslation(tx, ty); t = cgaffinetransformscale(t, 0.1, 0.1); theview.transform = t; theview.layer.maskstobounds = yes; [theview settransform:cgaffinetransformidentity]; } completion:^(bool finished) { }];
now transition went smooth without issues.
when in viewb, had text box default focus. (in viewdidappear
)
-(void)viewdidappear:(bool)animated { [super viewdidappear:no]; [self performselector:@selector(focuscommenttext) withobject:nil afterdelay:0.5]; } - (void) focuscommenttext { [self focustextbox:commenttext]; } - (void) focustextbox : (uitextview *) textview{ @try { [ textview becomefirstresponder]; } @catch (nsexception *exception) { } }
the transition , keyboard coming up.. happens @ same time.. , awkward now. can 1 me out here please?
what not call [textview becomefirstresponder]
until after transition has completed.
Comments
Post a Comment