Sunday 15 April 2012

ios8 - UITextField becomeFirstResponder block animation -



ios8 - UITextField becomeFirstResponder block animation -

i want show view, contain uitextfield, , show automatically keyboard message becomefirstresponder. ios 7, there isn't problem. since ios8, doesn't work. i'm configuring view :

- (void)showviewaddscore{ if(!self.viewpopover){ //a l'initialisation de la vue, on design le contour self.viewpopover = [self.view viewwithtag:100]; self.viewpopover.layer.cornerradius = 8; self.viewpopover.layer.maskstobounds = yes; self.viewpopover.layer.borderwidth = 1; self.viewpopover.layer.bordercolor = [[uicolor colorwithred:8.0/255 green:65.0/255 blue:32.0/255 alpha:1] cgcolor]; } //deplacement de la vue cgpoint point; point.x = self.viewpopover.frame.origin.x; point.y = 300; [self manageviewpopover:self.viewpopover withcgpoint:point]; [self.textfieldaddscore becomefirstresponder];

}

and method show view animation:

- (void)manageviewpopover:(uiview *)view withcgpoint:(cgpoint)point { [uiview animatewithduration:0.3 delay:0.1 options:uiviewanimationoptioncurvelinear animations:^{ cgrect frame = view.frame; frame.origin.y = point.y; frame.origin.x = point.x; view.frame = frame; } completion:nil];

}

the problem : when phone call method showviewaddscorefor first time, keyboard showing not view. when phone call method sec time, view showing. , when delete line [self.textfieldaddscore becomefirstresponder];, view showing when phone call method first time. so, there problem [self.textfieldaddscore becomefirstresponder];and animation. i've tried move line after animation, problem persist.

thank help.

uitextfield ios8 uiviewanimation becomefirstresponder

No comments:

Post a Comment