草庐IT

NSInvalidArgumentException

全部标签

swift - NSInvalidArgumentException 与 FBSDKGraphRequest

我收到以下异常:Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'-[__NSCFDictionaryimagePathForPictureMode:size:]:unrecognizedselectorsenttoinstance0x7ff9f8d25d10'使用此代码:PFFacebookUtils.logInInBackgroundWithReadPermissions(permissions,block:{(user:PFUser?,error:NSError?)->Voidinif

iphone - 由于未捕获的异常 'NSInvalidArgumentException' 而终止应用程序,原因 : 'Receiver () has no segue with identifier ' pizzaSegue'

我是快速编程的新手,当它被按下到ViewController提供有关该单元格的详细信息时,我从tableview单元格执行segue时遇到错误。我得到的错误是:Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'Receiver()hasnoseguewithidentifier'pizzaSegue''我已经尝试过以下方法:1)尝试重命名Storyboard并确保在项目设置和info.plist文件中设置主Storyboard(关键是“主Storyboard文件基名”)。我目前的Storyb

uitableview - 'NSInvalidArgumentException',原因 : '-[UIImageView _isResizable] Exception with custom tableview cell

我在执行自定义单元格时收到NSInvalidArgumentException。调试器错误日志:2014-12-2521:39:11.397Codebuddies[24159:11353215]***由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[UIImageView_isResizable]:无法识别的选择器发送到实例0x7fa5f580b6a0”`相关的swift代码块:让cell=tableView.dequeueReusableCellWithIdentifier("Cell",forIndexPath:indexPath)

ios - 为什么我的 segue 导致 "unrecognized selector sent to instance"NSInvalidArgumentException?

尝试使用segue从我的第一个ViewController移动到我的第二个ViewController(都使用相同的Storyboard)。我的第一个ViewController有两个按钮,一个表示“男性”,一个表示“女性”(我知道,不是每个人都与这两个中的一个相关联),我希望其中一个按钮在单击后移动到第二个ViewController。我将按钮拖/放到我的代码中以获得以下内容:@IBActionfuncfemaleButton(_sender:AnyObject){Globals.onboardingList.append("girl")print("it'sagirl!")perf

ios - 通过 NSDate 在 Realm 中过滤查询抛出 NSInvalidArgumentException

我到处都看了,甚至访问了一些可疑的网站,这些网站的病毒警告消息永远不会消失,但我无法弄清楚这一点。我只是想过滤Results按日期对象:letmessages=realm.objects(RMChatMessage).filter("timestamp>\(date))AND(timestamp每当运行此行时,它都会引发以下内容:***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'Unabletoparsetheformatstring"timestamp>1970-01-0100:00

objective-c - NSInvalidArgumentException',原因 : '-[__NSCFString isFileURL]: unrecognized selector sent to instance 0x712e450'

我是iPhone应用程序开发的新手。当我运行一个示例项目时,我解析了一个xml提要并在表格View中显示内容和图像,我得到了这个错误-"NSInvalidArgumentException',reason:'-[__NSCFStringisFileURL]:unrecognizedselectorsenttoinstance0x712e450'"它仅在我尝试在UITableViewCell中显示图像时发生。我用于从url获取图像的代码是-if([elementNameisEqualToString:IMAGE]){NSURL*imageUrl=[attributeDictobjectF

objective-c - NSInvalidArgumentException',原因 : '-[__NSCFString isFileURL]: unrecognized selector sent to instance 0x712e450'

我是iPhone应用程序开发的新手。当我运行一个示例项目时,我解析了一个xml提要并在表格View中显示内容和图像,我得到了这个错误-"NSInvalidArgumentException',reason:'-[__NSCFStringisFileURL]:unrecognizedselectorsenttoinstance0x712e450'"它仅在我尝试在UITableViewCell中显示图像时发生。我用于从url获取图像的代码是-if([elementNameisEqualToString:IMAGE]){NSURL*imageUrl=[attributeDictobjectF

ios - 什么是错误 : "NSInvalidArgumentException reason: Application tried to present modal view controller on itself

当我尝试运行该应用程序时,它使我崩溃这是我收到的消息:2014-07-2514:40:28.116X[13023:60b](null)2014-07-2514:40:29.113X[13023:60b]***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'Applicationtriedtopresentmodalviewcontrolleronitself.Presentingcontrolleris.'***Firstthrowcallstack:(0CoreFoundation0x0

ios - 什么是错误 : "NSInvalidArgumentException reason: Application tried to present modal view controller on itself

当我尝试运行该应用程序时,它使我崩溃这是我收到的消息:2014-07-2514:40:28.116X[13023:60b](null)2014-07-2514:40:29.113X[13023:60b]***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'Applicationtriedtopresentmodalviewcontrolleronitself.Presentingcontrolleris.'***Firstthrowcallstack:(0CoreFoundation0x0

iphone - NSInvalidArgumentException,原因 : 'Invalid type in JSON write (__NSDate)'

当我尝试对NSDate对象进行JSON编码时出现此异常。我认为NSDate与JSON编码不兼容。但我必须对日期进行编码。有什么解决办法吗?***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'InvalidtypeinJSONwrite(__NSDate)' 最佳答案 首先将您的数据存储在NSString中。然后将您的字符串转换为NSDate。你可以引用SO:ConvertingNSStringtoNSDate(andbackagain