增加自定义键盘iOS 8的高度不起作用

时间:2014-10-01 08:04:05

标签: ios xcode ios8

我尝试使用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];

}

0 个答案:

没有答案