我有一個自定義的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