草庐IT

UIActionsheet

全部标签

iphone - 取消时删除 UITableView 单元格的 UIActionSheet 一直显示按下的删除按钮

在TableView中删除一行时,我想在某些情况下显示一个操作表,要求确认。当操作表回答"is"(破坏性操作)时,我删除了表格行,一切都很好。但是当按下Cancel时,我仍然看到Delete按钮处于按下状态。删除时我在tableView:commitEditingStyle中做的是这样的:BlockBasedActionSheet*askSheet=[[BlockBasedActionSheetalloc]initWithTitle:@"Deleteentry?"cancelButtonTitle:@"No"destructiveButtonTitle:@"Yes,deletechil

iphone - 点击 UITextField 时在 UIActionSheet 中显示 UIDatePicker

我正在创建闹钟应用。我想在点击UITextField时在UIActionSheet中显示UIDatePicker。 最佳答案 为此,您需要实现UIActionShetDelegate和UITextFieldDelegate在textFieldDidBeginEditing中,您需要显示如下操作表:-(void)textFieldDidBeginEditing:(UITextField*)sender{[selfshowAction];}-(void)showAction{UIActionSheet*asheet=[[UIAction

ios - 更改 UIAlertview 和 UIActionsheet 按钮的色调

我正在尝试针对iOS7调整我的应用程序。我遇到的问题是我无法更改某些控件的色调。我确实添加了self.window=[[[UIWindowalloc]initWithFrame:[[UIScreenmainScreen]bounds]]autorelease];if(IOS7_OR_LATER)self.window.tintColor=[selfgreenTintColor];给我的应用委托(delegate)-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionar

ios - 如何使用 Swift 将 JSON 数组数据加载到 UIActionSheet 按钮标题中

我在array中有JSON数据。我需要将此数组数据加载到UIActionSheet按钮title中。在这里,我尝试创建一个带有单个button的通用UIActionSheet。基于数组字符串,我需要将数据加载为按钮标题。我敢肯定,我从来没有从JSON中获得超过4个数组索引,所以我想将它加载到操作表中并基于点击获取id值。我不知道如何加载它,作为按钮标题。我的JSONCodable//MARK:-WelcomestructWelcome:Codable{letstatus:Boolletdata:DataClass}//MARK:-DataClassstructDataClass:Cod

ipad - Swift UIActionSheet 在 iPad 上崩溃?

我目前遇到了完全的挫折,因为我找不到任何错误,但我的ActionSheet在iPad上崩溃但在iPhone上运行良好这里是操作代码if(view.annotation.titleasString!)=="SanFrancisco"{currentLat=37.615223currentLong=-122.389977url="www.google.de"letaction:UIActionSheet=UIActionSheet(title:"ChangeMapType",delegate:self,cancelButtonTitle:"Back",destructiveButtonTi

ios - UIActionsheet 不显示运行 iOS7 的 iPad 上的所有按钮

UIActionSheet实例无法在运行iOS7的iPad上正确显示。出于某种原因,他们显示取消按钮并离开最后一个按钮。相同的代码在iOS8上运行良好。您可能希望忽略取消按钮,因为点击屏幕上的其他地方将关闭操作表。有谁知道为什么会这样?两种情况下使用完全相同的代码://CreateUIActionSheetletmapOptions=UIActionSheet(title:"Selectmaptype",delegate:self,cancelButtonTitle:"Cancel",destructiveButtonTitle:nil,otherButtonTitles:"Stand

ios - 如何在 iOS 中创建类似 UIActionSheet 背景 View 的 View ?

我想要一个带有自定义UIAlertAction的UIActionSheet但似乎自定义UIAlertAction是不合法的。TheUIAlertControllerclassisintendedtobeusedas-isanddoesnotsupportsubclassing.Theviewhierarchyforthisclassisprivateandmustnotbemodified.所以我正在尝试创建一个看起来与UIActionSheet完全一样的View。通过使用DebugViewHierarchy,我可以知道Apple如何为UIActionSheet应用层次结构、约束和颜色

ios - iOS7 中 UIActionSheet 旁边的奇怪工件

我的iOS7应用程序在UIActionSheet中有一个奇怪的视觉错误。它如下所示。有什么想法吗?代码:UIActionSheet*actionSheet=[[UIActionSheetalloc]initWithTitle:nildelegate:selfcancelButtonTitle:@"Done"destructiveButtonTitle:nilotherButtonTitles:nil];[actionSheetshowInView:self.view]; 最佳答案 对我来说,在绘制按钮层时看起来像是一个iOS7错误,

iOS 8 只有内存泄漏与 UIAlertController 或 UIActionSheet

当我使用UIActionSheet或UIAlertController执行以下操作时,我在模拟器中的iOS8中看到内存泄漏。UIActionSheet在IOS8中使用UIAlertController,因此问题是相关的。按下按钮时调用showCameraAction。我已经从委托(delegate)方法中删除了所有内容,但仍然会在下面显示的情况下泄漏。我是否以某种不应该的方式使用了UIActionSheet?对于解决此问题的任何帮助,我将不胜感激。相同的代码在IOS7中没有泄漏(在模拟器中)。-(IBAction)showCameraAction:(id)sender{UIAction

iphone - 在 UIActionSheet 中添加 UIPickerView 时,iOS 7 上出现无效上下文错误?

我在UIActionSheet中有一个UIPickerView,并按照许多其他人在SO中建议的方式完成了该操作:AddUIPickerView&aButtoninActionsheet-How?howtoaddUIPickerViewinUIActionSheet直到现在,当我在iOS7上测试我的应用程序时,这些解决方案都运行良好。它仍然可以运行,但我在Xcode运行时收到了很多“无效上下文0x0”警告。Theerrorsarecomingwithanicemessagetoo:CGContextSetFillColorWithColor:invalidcontext0x0.Thisi