我有一个自定义的uiview,我试图更新帧大小。一旦点击它,我会在方法中这样做。该方法被调用,并且帧值发生了变化,但屏幕上没有任何反应!无法更改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");
}
请询问您想do..so我能明白.. – Nit
我想:一)调整uisubview框的CGRect框架,和b)禁用/重新启用猜测按钮和标记按钮 – michaela