草庐IT

SELECTOR

全部标签

ios - 更新 FacobookLogin Pod,出现错误 : No known class method for selector 'objectForJSONString:error:'

最近我更新了在我的应用程序中实现的FacebookLogin按钮的下面提到的podpod'FacebookCore'pod'FacebookLogin'两个pod的版本都是0.7.0我已经使用命令更新了podpodupdate更新完我建项目的时候路径有错Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.m:163:60:Noknownclassmethodforselector'objectForJSONString:error:'这两个错误都发生在同一个类的两个地方Nokno

ios - 更新 FacobookLogin Pod,出现错误 : No known class method for selector 'objectForJSONString:error:'

最近我更新了在我的应用程序中实现的FacebookLogin按钮的下面提到的podpod'FacebookCore'pod'FacebookLogin'两个pod的版本都是0.7.0我已经使用命令更新了podpodupdate更新完我建项目的时候路径有错Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginManagerLogger.m:163:60:Noknownclassmethodforselector'objectForJSONString:error:'这两个错误都发生在同一个类的两个地方Nokno

swift - 将选择器(函数名称)传递给 swift 函数

我想将一个函数的选择器传递给另一个函数。现在我只是传递字符串并执行几个if语句。如果我可以将实际的函数选择器传递给函数,我就可以消除所有的if语句。我当前的功能:funcgetBtn(i:String,f:String)->UIBarButtonItem{letbtn:UIButton=UIButton();btn.frame=CGRectMake(0,0,30,30)btn.setBackgroundImage(UIImage(named:i),forState:UIControlState.Normal)iff=="funcOne"{btn.addTarget(self,actio

swift - 将选择器(函数名称)传递给 swift 函数

我想将一个函数的选择器传递给另一个函数。现在我只是传递字符串并执行几个if语句。如果我可以将实际的函数选择器传递给函数,我就可以消除所有的if语句。我当前的功能:funcgetBtn(i:String,f:String)->UIBarButtonItem{letbtn:UIButton=UIButton();btn.frame=CGRectMake(0,0,30,30)btn.setBackgroundImage(UIImage(named:i),forState:UIControlState.Normal)iff=="funcOne"{btn.addTarget(self,actio

ios - -[_SwiftValue encodeWithCoder :]: unrecognized selector sent to instance

尝试使用NSCoder时出现错误Player.swift:classPlayer:NSObject,NSCoding{privatevar_playerName:String!privatevar_playerScore:Int!privatevar_playerColor:PlayerColor!//PlayerColorisanenumvarplayerName:String{get{return_playerName}set{_playerName=newValue}}varplayerScore:Int{get{return_playerScore}set{_playerSco

ios - -[_SwiftValue encodeWithCoder :]: unrecognized selector sent to instance

尝试使用NSCoder时出现错误Player.swift:classPlayer:NSObject,NSCoding{privatevar_playerName:String!privatevar_playerScore:Int!privatevar_playerColor:PlayerColor!//PlayerColorisanenumvarplayerName:String{get{return_playerName}set{_playerName=newValue}}varplayerScore:Int{get{return_playerScore}set{_playerSco

ios - [LAContext biometryType] : unrecognized selector on iOS 11. 0.0

我在fabric中看到了数十次崩溃FatalException:NSInvalidArgumentException-[LAContextbiometryType]:unrecognizedselectorsenttoinstance0x1c066aa00这很奇怪,因为我只在iOS11+的LAContext上调用了biometryType。代码:privatestaticvarbiometryType:BiometryType?{letcontext=LAContext()guardcontext.canEvaluatePolicy(.deviceOwnerAuthentication

ios - [LAContext biometryType] : unrecognized selector on iOS 11. 0.0

我在fabric中看到了数十次崩溃FatalException:NSInvalidArgumentException-[LAContextbiometryType]:unrecognizedselectorsenttoinstance0x1c066aa00这很奇怪,因为我只在iOS11+的LAContext上调用了biometryType。代码:privatestaticvarbiometryType:BiometryType?{letcontext=LAContext()guardcontext.canEvaluatePolicy(.deviceOwnerAuthentication

ios - 无法从 Swift 继承 NSInputStream(initWithData : unrecognizer selector)

我似乎无法弄清楚我做错了什么会产生以下错误:2015-02-0212:48:17.029InputStreams[14816:221224]-[InputStreams.CustomStreaminitWithData:]:unrecognizedselectorsenttoinstance0x7fda2e1aac30这是我的CustomStream子类。importFoundationclassCustomStream:NSInputStream{letstreamName="MyCustomStream"overrideinit(data:NSData){super.init(da

ios - 无法从 Swift 继承 NSInputStream(initWithData : unrecognizer selector)

我似乎无法弄清楚我做错了什么会产生以下错误:2015-02-0212:48:17.029InputStreams[14816:221224]-[InputStreams.CustomStreaminitWithData:]:unrecognizedselectorsenttoinstance0x7fda2e1aac30这是我的CustomStream子类。importFoundationclassCustomStream:NSInputStream{letstreamName="MyCustomStream"overrideinit(data:NSData){super.init(da