我有一个 UIActionSheet,一旦我的 iPhone 应用程序中的初始视图加载,如果有可以同步回 Web 服务的数据,它就会弹出。问题是 UIActionSheet 弹出得太高 - 恰好一半的选项卡栏暴露在操作表下方。我不知道这是由样式引起的吗?谁能提供解释/解决方案来防止这种情况发生?!
提前感谢您的任何建议,我的代码出现在下面...
- (void)viewDidLoad {
//...preset a few values here, unrelated to the view...
//...
// Add an actionsheet to prompt for a DB sync
if ([myDatabase isSyncPossible] == true) {
UIActionSheet *actionsheet = [[UIActionSheet alloc]
initWithTitle: @"You have information that hasn't been uploaded, would you like to sync now?"
delegate: self
cancelButtonTitle: @"No thanks, maybe later"
destructiveButtonTitle: @"Yes, upload now"
otherButtonTitles: nil];
actionsheet.tag = 2;
[actionsheet showInView:self.view];
[actionsheet release];
}
}