草庐IT

instance_methods

全部标签

ios - NS无效参数异常 : "Unrecognized selector sent to instance"

我遇到了一个我并不真正理解原因的问题。异常没有给我理解问题的线索。我想根据myArray中给定的数据修改我界面中UILabel的内容。但是,正如我在函数“cellForRowAtIndexPath”中指定的行,程序会触发异常。这个问题是什么原因造成的?@property(strong,nonatomic)NSMutableArray*myArray;//-(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheview.[myArrayaddObject:@{@"field1":@"myfiel

ios - NS无效参数异常 : "Unrecognized selector sent to instance"

我遇到了一个我并不真正理解原因的问题。异常没有给我理解问题的线索。我想根据myArray中给定的数据修改我界面中UILabel的内容。但是,正如我在函数“cellForRowAtIndexPath”中指定的行,程序会触发异常。这个问题是什么原因造成的?@property(strong,nonatomic)NSMutableArray*myArray;//-(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheview.[myArrayaddObject:@{@"field1":@"myfiel

ios - Xcode 6.1 : Multiple methods named 'count' found with mismatched result, 参数类型或属性

我在构建应用程序时发现多个名为“count”的方法具有不匹配的结果、参数类型或属性错误。该应用程序在32位中运行良好。我已根据Appleguideline将其更改为64位.我已经提到了这个Link但没有得到任何帮助。我已经在模拟器上的多个设备上测试了应用程序。在32位上运行良好,但在64位上提示错误。为什么会这样?-(void)serviceSuccessFulForPatientSelect:(id)response{[selfhideOverlay];if([responseisKindOfClass:[NSArrayclass]]){if([responsecount]>0){i

ios - Xcode 6.1 : Multiple methods named 'count' found with mismatched result, 参数类型或属性

我在构建应用程序时发现多个名为“count”的方法具有不匹配的结果、参数类型或属性错误。该应用程序在32位中运行良好。我已根据Appleguideline将其更改为64位.我已经提到了这个Link但没有得到任何帮助。我已经在模拟器上的多个设备上测试了应用程序。在32位上运行良好,但在64位上提示错误。为什么会这样?-(void)serviceSuccessFulForPatientSelect:(id)response{[selfhideOverlay];if([responseisKindOfClass:[NSArrayclass]]){if([responsecount]>0){i

objective-c - App Store - Method Swizzling 合法性

关闭。这个问题不符合StackOverflowguidelines。它目前不接受答案。这个问题似乎与helpcenter中定义的范围内的编程无关。关闭5年前。Improvethisquestion是否有关于AppStore中方法调配是否合法/非法的最新信息?我能找到的唯一数据点是前一段时间的Three20frameworkshakeup,它是从这个通知开始的:Yourapplication,xxx,currentlypostedtotheAppStoreisusingmethod_exchangeImplementationstoexchangetheimplementationofA

objective-c - App Store - Method Swizzling 合法性

关闭。这个问题不符合StackOverflowguidelines。它目前不接受答案。这个问题似乎与helpcenter中定义的范围内的编程无关。关闭5年前。Improvethisquestion是否有关于AppStore中方法调配是否合法/非法的最新信息?我能找到的唯一数据点是前一段时间的Three20frameworkshakeup,它是从这个通知开始的:Yourapplication,xxx,currentlypostedtotheAppStoreisusingmethod_exchangeImplementationstoexchangetheimplementationofA

iphone - [__NSCFNumber 长度] : unrecognized selector sent to instance 0x6d21350

这个错误意味着什么?[__NSCFNumberlength]:unrecognizedselectorsenttoinstance0x6d21350这是我的代码:NSString*urlString=@"http://api.twitter.com/1/statuses/update.json";NSURL*url=[NSURLURLWithString:urlString];NSMutableDictionary*params=[[NSMutableDictionaryalloc]init];[paramssetObject:statusforKey:@"status"];[para

iphone - [__NSCFNumber 长度] : unrecognized selector sent to instance 0x6d21350

这个错误意味着什么?[__NSCFNumberlength]:unrecognizedselectorsenttoinstance0x6d21350这是我的代码:NSString*urlString=@"http://api.twitter.com/1/statuses/update.json";NSURL*url=[NSURLURLWithString:urlString];NSMutableDictionary*params=[[NSMutableDictionaryalloc]init];[paramssetObject:statusforKey:@"status"];[para

ios - 在 UIView 的 -drawRect : method 中绘制彩色文本

我正在尝试在我的UIView子类中绘制彩色文本。现在我正在使用单View应用程序模板(用于测试)。除了drawRect:方法外没有任何修改。文本已绘制,但无论我将颜色设置为什么,它始终为黑色。-(void)drawRect:(CGRect)rect{UIFont*font=[UIFontfontWithName:@"Arial"size:72];UIColor*textColor=[UIColorredColor];NSDictionary*stringAttrs=@{UITextAttributeFont:font,UITextAttributeTextColor:textColor

ios - 在 UIView 的 -drawRect : method 中绘制彩色文本

我正在尝试在我的UIView子类中绘制彩色文本。现在我正在使用单View应用程序模板(用于测试)。除了drawRect:方法外没有任何修改。文本已绘制,但无论我将颜色设置为什么,它始终为黑色。-(void)drawRect:(CGRect)rect{UIFont*font=[UIFontfontWithName:@"Arial"size:72];UIColor*textColor=[UIColorredColor];NSDictionary*stringAttrs=@{UITextAttributeFont:font,UITextAttributeTextColor:textColor