iOS:App Extension Keyboard自定义高度

来源:互联网 发布:生物竞赛题库软件 编辑:程序博客网 时间:2024/06/05 04:47
CGFloat _expandedHeight = 500;        NSLayoutConstraint *_heightConstraint = [NSLayoutConstraint                                             constraintWithItem:self.view                                             attribute:NSLayoutAttributeHeight                                             relatedBy:NSLayoutRelationEqual                                             toItem:nil                                             attribute:NSLayoutAttributeNotAnAttribute                                             multiplier:0.0                                             constant: _expandedHeight];        [self.view addConstraint: _heightConstraint];
在viewDidAppear或者WillAppear中加上上面的约束即可
0 0
原创粉丝点击