iO用のxcodeでアプリケーションをプログラミングしています。私はこのようなコードを持っています:
- (void)buttonAction:(UIButton*)sender{
UIView *figure = (UIView *) [figures objectAtIndex:sender.tag];
[figure.layer setBorderWidth:2.0f];
[figure.layer setBorderColor: [UIColor greenColor].CGColor];
sleep(1);
[self cleanScreen];
}
- (void) cleanScreen {
//Some code to hide all view objects
}
ボーダーの色と幅の変更は、cleanScreen関数でアイテムが削除される1秒前に画面に反映されることを願っています。しかし、これらの変更が反映されず、1 秒を費やした要素が削除されることがあります。
cleanScreen が呼び出される前に画面を更新したい。
望む効果を得るには?
前もって感謝します!