unrecognized-selector

Strange crash when I try to access to uibutton's titleLabel property (xcode 4.5 and IOS sdk 6.0)

孤者浪人 提交于 2019-12-25 15:25:00
问题 I found another annoying bug with xcode 4.5 and sdk 6.0 : when I run the following code : UIColor *newcolor = [UIColor colorWithCIColor:[CIColor colorWithString:@"1 1 1 1"]]; [button setTitleColor:newcolor forState:UIControlStateNormal]; UILabel *lbl = selectedbutton.titleLabel; It always fail with the error : -[UICIColor colorSpaceName]: unrecognized selector sent to instance 0xa9864f0 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICIColor

Strange crash when I try to access to uibutton's titleLabel property (xcode 4.5 and IOS sdk 6.0)

感情迁移 提交于 2019-12-25 15:24:41
问题 I found another annoying bug with xcode 4.5 and sdk 6.0 : when I run the following code : UIColor *newcolor = [UIColor colorWithCIColor:[CIColor colorWithString:@"1 1 1 1"]]; [button setTitleColor:newcolor forState:UIControlStateNormal]; UILabel *lbl = selectedbutton.titleLabel; It always fail with the error : -[UICIColor colorSpaceName]: unrecognized selector sent to instance 0xa9864f0 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICIColor

UISearchBar in a UIViewController crashing

£可爱£侵袭症+ 提交于 2019-12-25 08:52:34
问题 I am having a weird crash when using UISearchBar. I have a view controller on a storyboard and everything works fine but as soon as a drag a UISearchBar in the view controller and then run the app, I get the following crash: * thread #1: tid = 0x6d83b, 0x0462169e libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT frame #0: 0x0462169e libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x045ef2c5 libsystem_pthread.dylib`pthread_kill + 101

JSON parsing unrecognized selector sent to instance 0x8f3ab10

牧云@^-^@ 提交于 2019-12-25 02:56:08
问题 I'm trying to parse a some very basic json data, i doing the exact same whey i always do but i getting the following error: -[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x8e7d570 2014-04-30 15:04:33.699 Mensagens 2[7530:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x8e7d570' this is the GET.JSON file: { "version":"6" } This is the code in my app

Apple rejected app due to a crash which is not reproducing

空扰寡人 提交于 2019-12-24 23:25:24
问题 Apple provided the crash logs which explains the encountered exception and reason as below: Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000, 0x00000000 Crashed Thread: 0 Application Specific Information: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFData dataUsingEncoding:]: unrecognized selector sent to instance 0x1b4c20' Here are the lines of code highlighted as the reason of crash after symbolicting the crash logs NSXMLParser

Why is my segue causing an “unrecognized selector sent to instance” NSInvalidArgumentException?

限于喜欢 提交于 2019-12-23 20:56:03
问题 Trying to move from my first ViewController to my second ViewController (both using same storyboard), using a segue. My first ViewController has two buttons, one that says "Male", one that says "Female" (I know, not everyone associates with one of these two), and I want either, once clicked, to move to the second ViewController. I drag/dropped the button into my code to get the following: @IBAction func femaleButton(_ sender: AnyObject) { Globals.onboardingList.append("girl") print("it's a

-[__NSCFString boundingRectWithSize:options:attributes:context:]: unrecognized selector sent to instance

半腔热情 提交于 2019-12-23 12:42:21
问题 @interface PromotionsListViewController : UITableViewController - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"PromotionCell"; PromotionCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[PromotionCell alloc] init]; } // Configure the cell... Promotion *promotion = [self.promotionList objectAtIndex:indexPath.row]; [cell.imgView setImageWithURL:[NSURL

NSInvalidArgumentException “Unrecognized selector sent to instance” (using MPMoviePlayerController)

给你一囗甜甜゛ 提交于 2019-12-23 12:26:13
问题 Well, I have a TableView in a RootViewController with a DetailViewController for the display of the information of the single record. In the Detail page i have to play a multimedia file and i'm using the framework MediaPlayer, according to this guide: http://www.techotopia.com/index.php/Video_Playback_from_within_an_iOS_4_iPhone_Application it seems all ok, but when i click on the play button i have this error: -[DetailsViewController playmovie]: unrecognized selector sent to instance

NSURLSession dataTaskForRequest:completion: unrecognized selector sent to instance

若如初见. 提交于 2019-12-22 01:46:50
问题 When trying to create my own session object NSURLSession() and request an url I get an unrecognized selector exception but when I use the shared session NSURLSession.sharedSession() everything works fine. How come? var url = NSURL(string: "http:/www.google.com") if url != nil { //throws unrecognized selector when dataTaskWithURL is called let session=NSURLSession() session.dataTaskWithURL(url!) //works let sharedSession=NSURLSession.sharedSession() sharedSession.dataTaskWithURL(url!) } 回答1:

Unrecognized selector with UITapGestureRecognizer

那年仲夏 提交于 2019-12-20 07:32:04
问题 I'm trying to add in my app the possibility to dismiss the keyboard when the user taps somewhere else out of the text fields. I'm implementing this functionality using UITapGestureRecognizer. I create a new UITapGestureRecognizer object using the Unrecognized selector with UITapGestureRecognizer(target: Any?, action: Selector?) and set the action parameter to a function that resigns the first responder of both the text fields I'm using in this view. I set everything properly adding the