我尝试使用Apple的文档增加自定义键盘的高度,但它不起作用。这是我的代码:
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
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];
[super updateViewConstraints];
}