您的位置:首页 > 产品设计 > UI/UE

选中输入框上弹视图

2016-02-22 18:21 295 查看
//用于避免键盘遮住输入框,将视图弹上去
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
    [UIView
beginAnimations:@"animationID1"
context:nil];
    [UIView
setAnimationDuration:.3f];//设置持续时间
    _addAddressTableView.frame =
CGRectMake(0, -30*(textField.tag-100),
ScreenWidth, self.view.frame.size.height);
    [UIView
commitAnimations];//用于显示动画生效
    return
YES;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  uitextfield iOS