【发布时间】:2016-09-19 18:12:26
【问题描述】:
对尚未渲染的视图进行快照会导致快照为空。当我在 ios 中单击按钮时使用 UIActionsheet 时,确保您的视图在快照或屏幕更新后的快照之前至少渲染一次?为什么?
- (IBAction)btnAboutUsActions:(UIButton *)sender
{
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle: nil
delegate:self
cancelButtonTitle: nil
destructiveButtonTitle: nil
otherButtonTitles: @"Achievment",
@"Brown Story", nil];
actionSheet.tag = 100;
[actionSheet showFromRect: sender.frame inView: sender.superview animated: YES];
}
【问题讨论】:
标签: objective-c