标签:
本文在不使用UIAlertController的情况下,用最简单的方法让UIAlertView、UIActionSheet兼容iOS8.
//title置为@""兼容iOS8 UIAlertView *delAlert = [[[UIAlertView alloc] initWithTitle:@"" message:@"删除联系人?" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认", nil] autorelease]; [delAlert show];
UIActionSheet *actionSheet = [[[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) destructiveButtonTitle:[NSString stringWithFormat:NSLocalizedString(@"call", nil),self.phoneNumber] otherButtonTitles:NSLocalizedString(@"add to contact", nil),nil] autorelease]; actionSheet.tag = 1; [actionSheet showInView:self.view];
版权声明:本文博客原创文章,博客,未经同意,不得转载。
UIAlertView、UIActionSheet兼容iOS8
标签:
原文地址:http://www.cnblogs.com/lcchuguo/p/4685553.html