gpt4 book ai didi

ios - 更新约束值不起作用IOS 9 Beta

转载 作者:行者123 更新时间:2023-12-01 16:30:33 24 4
gpt4 key购买 nike

- (void)viewDidLoad {
[super viewDidLoad];
self.sendMessageButton.layer.cornerRadius = 3;
self.messageText.layer.cornerRadius = 3;
self.imageView.layer.cornerRadius = 3;
self.messageText.delegate = self;
self.objectImage.hidden = YES;
self.sendImageButton.hidden = NO;
self.imageView.hidden= NO;
[self updateViewsHeight];

}

-(void)updateViewsHeight{
NSLog(@"--------------------- %f -----------------------", self.view.frame.size.height);

if (self.view.frame.size.height == 568.0){ //5s & 5
self.textViewHeight.constant = 500.f;
self.ImageViewHeight.constant = 10.f;
[super updateViewConstraints];}
}

这不会更新约束。她达到了原始高度,但我确定可以读取if内的代码,因为当我在应用程序中进行一个中断时,它就会中断它。

这是我的属性:
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageViewHeight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *textViewHeight;

最佳答案

显然发生的是IOS 9 Beta中的错误。当您删除常量并删除设备应用程序时,代码便起作用了。色调

关于ios - 更新约束值不起作用IOS 9 Beta,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31840328/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com