草庐IT

bucket_selector

全部标签

iOS 6.1/7 - Cordova 3.1.0 + AngularJS - 单击/滚动到具有 [NSCFSet opacity] : unrecognized selector sent to instance 的 HTML/CSS View 时应用程序崩溃

我们看到了这个奇怪的错误,我在网上找不到任何东西。只有一个帖子没有答案或解决方法:https://groups.google.com/forum/#!topic/phonegap/7pRzASZpnQc我们使用Angular、Underscore、angular-route、angular-touch、angular-animate、CSSFlex布局和Cordova3.1.0构建了一个应用程序,并且在Android4.0++上一切都运行得很好。当我们将iOS转移到Mac上并添加iOS平台时,我们在XCode5中编译,当我们在6.1和7的iPhone模拟器中单击或尝试滚动时,应用程序在

iOS - 从 NSUserDefaults :Attempted to dereference an invalid ObjC Object or send it an unrecognized selector 获取 NSDictionary

我尝试从已保存的NSUserDefaults中检索NSMutableArray。我存储NSMutableArray:NSUserDefaults*defaults=[NSUserDefaultsstandardUserDefaults];NSMutableArray*mySavedTremps=[[defaultsobjectForKey:UD_MY_TREMPS]mutableCopy];if(!mySavedTremps)mySavedTremps=[[NSMutableArrayalloc]init];NSMutableDictionary*trempDict=NSMutable

ios - 什么是 objc_selector 实现?

这个问题在这里已经有了答案:HowdoSELand@selectorwork?[duplicate](2个答案)关闭7年前。我发现SEL类型有下一个定义:typedefstructobjc_selector*SEL;但是我找不到objc_selector是如何实现的。好的,如果我们有下一段代码#importintmain(intargc,constchar*argv[]){SELmySelector=NSSelectorFromString(@"mySelector");return0;},那么mySelector只是一个指针。在它包含的地址之后,我们看到了C字符串,它可以呈现如下:c

ios - NSInvalidArgumentException "Unrecognized selector sent to instance"(使用 MPMoviePlayerController)

好吧,我在RootViewController和DetailViewController中有一个TableView,用于显示单条记录的信息。根据本指南,在详细信息页面中,我必须播放多媒体文件并且我正在使用框架MediaPlayer:http://www.techotopia.com/index.php/Video_Playback_from_within_an_iOS_4_iPhone_Application看起来一切正常,但是当我点击播放按钮时出现这个错误:-[DetailsViewControllerplaymovie]:unrecognizedselectorsenttoinst

ios - 如何定位 "unrecognized selector sent to instance"的错误在哪里?

有时我的应用程序会因为这个错误日志而崩溃:-[NSNullfloatValue]:unrecognizedselectorsenttoinstance0x3befd090我没有调用任何“floatValue”,那么我如何才能找到使应用程序崩溃的确切行?要重现崩溃需要一些我无法控制的网站的特定数据,那么有什么办法可以解决这个问题吗?谢谢。 最佳答案 最简单的方法是添加异常断点。转到后点Pane,然后单击左上角的opde+。在弹出窗口中选择AddExceptionBreakpoint。只需单击弹出窗口中的Done,您就可以在调试器抛出的

ios - 用直接代码替换@selector

这个问题在这里已经有了答案:关闭10年前。PossibleDuplicate:CanIpassablockasa@selectorwithObjective-C?我有这个代码:[myButtonaddTarget:selfaction:@selector(doSomething:)forControlEvents:UIControlEventTouchUpInside];但由于doSomething包含的代码很少,我想知道是否可以将代码直接放在这里而不是让它运行doSomething。我已经试过了:[myButtonaddTarget:selfaction:^{/*codehere*/

ios - Objective-C:将字符串参数传递给 taggesture @selector

我想要实现的是:当我点击一个特定的UIImageView时,UITapGesture会将一个字符串传递给tap方法。我的代码如下:假设我已经有一个UIImageView对象,当我点击这个图像时,它会调用电话,UITapGestureRecognizer*tapFirstGuy=[[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(makeCallToThisPerson:@"1234567")];[imageViewOneaddGestureRecognizer:tapFirstGuy];-(void)mak

ios - [NSCFString timeIntervalSinceReferenceDate] : unrecognized selector sent to instance

我想比较两个日期之间的差异,但是使用下面的代码我得到了错误“[NSCFStringtimeIntervalSinceReferenceDate]:无法识别的选择器发送到实例。”代码有什么问题?NSDate*dateAdded=[eventDictionaryobjectForKey:@"dateAdded"];NSDate*validUntilDate=[eventDictionaryobjectForKey:@"validUntilDate"];NSDateComponents*sometimeAgo=[[NSCalendarcurrentCalendar]components:(N

ios - UICollectionView : Unrecognized selector sent to instance

我遇到了这个错误。***由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[UICollectionViewCell标签]:无法识别的选择器发送到实例0x1eead660”我正在使用nib文件作为我的单元格并尝试显示细胞正确。我猜我没有正确返回单元格,但我不太确定。任何帮助将不胜感激。-(UICollectionViewCell*)collectionView:(UICollectionView*)collectionViewcellForItemAtIndexPath:(NSIndexPath*)indexPath{staticNSSt

ios - -[UIImage长度] : unrecognized selector sent to instance error with a NSMutableArray with Images

我有一个Storyboard应用程序,它有一个UIViewController和一个UICollectionViewController。在ViewController中,用户从iPhone的照片库中选择多张照片(由于iOS中没有用于多选的API,因此我使用ELCImagePickerController来实现)。它会转到CollectionViewController,其中所选照片应显示在小ImageView中。图像库出现,我可以选择多张照片。但是当它转到CollectionViewController时,它会在CollectionView的cellForItemAtIndexPat