我有一个自定义 uiview,我正在尝试更新帧大小。一旦点击它,我就会在一个方法中这样做。该方法被调用,并且帧值发生了变化,但是在屏幕上没有任何反应!
if (!touched) {
GameBox *box = (GameBox *)[self.view viewWithTag:40];
[box setFrame:CGRectMake(20, 20, 100, 73)];
NSLog(@"%f", box.frame.origin.x);
markButton.enabled = NO;
guessButton.enabled = NO;
[self.view reloadInputViews];
NSLog(@"The action bar should now be hidden");
}
else if (touched) {
guessButton.enabled = YES;
markButton.enabled = YES;
[self.view reloadInputViews];
NSLog(@"The action bar should now be visible");
}