草庐IT

ACTION_SET_ALARM

全部标签

ios - "Launch screens may not set custom class names"

我正在尝试将初始ViewController设置为自定义类。在以前的版本中这是可行的,但出于某种原因我现在不能这样做。我有一个UIViewController类(IntroVC)。在Storyboard中,我创建了一个新的ViewController对象并设置它的类(IdentityInspector->CustomClass->Class)到IntroVC。IntroVC是一个.swift文件,包含IntroVC类的viewDidLoad()和didReceiveMemoryWarning()函数:UIViewController.XCode截图如下错误介绍VCStoryboard有

ios - 当用户快速点击一个单元格时触发一个 Action

我正在使用Swift创建一个应用程序。我有一个UITableView,我用数据库中的一些数据填充了它。当用户点击一个单元格时,我想触发一个Action。我做了什么:vararray:[String]=["example"]functableView(tableView:UITableView,numberOfRowsInSectionsection:Int)->Int{returnarray.count}functableView(tableView:UITableView,cellForRowAtIndexPathindexPath:NSIndexPath)->UITableView

ios - 当用户快速点击一个单元格时触发一个 Action

我正在使用Swift创建一个应用程序。我有一个UITableView,我用数据库中的一些数据填充了它。当用户点击一个单元格时,我想触发一个Action。我做了什么:vararray:[String]=["example"]functableView(tableView:UITableView,numberOfRowsInSectionsection:Int)->Int{returnarray.count}functableView(tableView:UITableView,cellForRowAtIndexPathindexPath:NSIndexPath)->UITableView

swift - 'Set' <NSObject> 没有名为 'anyObject' 的成员

这个问题在这里已经有了答案:'Set'doesnothaveamembernamed'anyObject."-Xcode6.3(2个答案)关闭7年前。今天我用Swift1.2更新了xcode我的代码在Swift1.1上运行良好但是当我更新时我得到了这个错误:'Set'doesnothaveamembernamed'anyObject'这是我的代码:overridepublicfunctouchesMoved(touches:Set,withEventevent:UIEvent){letlocation:CGPoint?=touches.anyObject()?.locationInVi

swift - 'Set' <NSObject> 没有名为 'anyObject' 的成员

这个问题在这里已经有了答案:'Set'doesnothaveamembernamed'anyObject."-Xcode6.3(2个答案)关闭7年前。今天我用Swift1.2更新了xcode我的代码在Swift1.1上运行良好但是当我更新时我得到了这个错误:'Set'doesnothaveamembernamed'anyObject'这是我的代码:overridepublicfunctouchesMoved(touches:Set,withEventevent:UIEvent){letlocation:CGPoint?=touches.anyObject()?.locationInVi

ios - 选择器与 Action Swift 4

Swift新手。我在下面有两个片段:NotificationCenter.default.addObserver(self,selector:#selector(ViewController.notificationReceived),name:Notification.Name(rawValue:name),object:nil)@objcfuncnotificationReceived(notification:Notification){letx=notification.userInfo!print("\(x["name"]!)")}最后letx:UITapGestureRec

ios - 选择器与 Action Swift 4

Swift新手。我在下面有两个片段:NotificationCenter.default.addObserver(self,selector:#selector(ViewController.notificationReceived),name:Notification.Name(rawValue:name),object:nil)@objcfuncnotificationReceived(notification:Notification){letx=notification.userInfo!print("\(x["name"]!)")}最后letx:UITapGestureRec

ios - Swift 和 CoreData,关系问题 (NSSet) - [NSSet intersectsSet :]: set argument is not an NSSet

我一直在尝试使用CoreData和Swift在关系中添加对象。我很茫然,我不明白为什么我的代码不起作用。我正在尝试向“团队”添加“事件”。我找不到已接受的答案(应该有效)和我的代码(无效)之间的区别。Teams.swift:importFoundationimportCoreDataclassTeams:NSManagedObject{@NSManagedvarteamName:String@NSManagedvarmatches:NSSet}extensionTeams{funcaddEventToTeam(event:Event){//self.mutableSetValueFor

ios - Swift 和 CoreData,关系问题 (NSSet) - [NSSet intersectsSet :]: set argument is not an NSSet

我一直在尝试使用CoreData和Swift在关系中添加对象。我很茫然,我不明白为什么我的代码不起作用。我正在尝试向“团队”添加“事件”。我找不到已接受的答案(应该有效)和我的代码(无效)之间的区别。Teams.swift:importFoundationimportCoreDataclassTeams:NSManagedObject{@NSManagedvarteamName:String@NSManagedvarmatches:NSSet}extensionTeams{funcaddEventToTeam(event:Event){//self.mutableSetValueFor

带有 pickerView 按钮 Action 的快速 UIAlertController 熬夜

我是swift的新手,我正在尝试使用PickerView制作UIAlertContoller但我的按钮有问题,这里有照片我正在尝试更改按钮的约束以保持向上。我在这里阅读了很多答案,但我没有找到任何解决方案这是我的代码:funcdistance(){leteditRadiusAlert=UIAlertController(title:"Choosedistance",message:"",preferredStyle:UIAlertControllerStyle.alert)letpickeViewFrame:CGRect=CGRect(x:0,y:0,width:250,height: