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中加上上面的约束即可
iOS:App Extension Keyboard自定义高度
最新推荐文章于 2024-06-18 09:45:49 发布