下午在做一个iPad的项目,需要用到一个 UIActionSheet。
点击popView中的“sort”按钮,触发出一个ActionSheet。
self.action = [[[UIActionSheetalloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:s1, s2, s3, s4, nil] autorelease];
self.action.tag = ActionSheetSort;
若是这样写:
[self.actionshowFromRect:CGRectMake(1000, 380, 10, 10) inView:self.viewanimated:YES];
则 效果为
若
[self.actionshowFromRect:CGRectMake(1000, 380, 10, 10)
inView:((AppDelegate *)[UIApplicationsharedApplication].delegate).window.rootViewController.view
animated:YES];
则 效果为