UITable cellForRowAtIndexPath - iphone

New in iOS, here is Question:
I am using xcode 4.0.2 iso-4.3.2.
Here I have a table and I am creating one mutable array like
mainarray=[[NSMutableArray alloc]initWithObjects:#"Hi",#"Hello"nil];
and sending that value to.Table delegate method like
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
here value is coming but once I am sending dynamically value to the mainarray like
mainarray=[[NSMutableArray alloc]initWithObjects:[dataarray valueForKey:#"first_name"],nil]; or
[mainarray addobject:[dataarray valueForKey:#"first_name"]]
and sending that mainarray value to cell.textlabel.text then my program is terminating and sending this error message.
2011-05-11 10:29:10.346 picture:vide[742:207] -[__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0x4e85200
2011-05-11 10:29:10.348 picture:vide[742:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0x4e85200'
*** Call stack at first throw:
(
0 CoreFoundation 0x00ddb5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f2f313 objc_exception_throw + 44
2 CoreFoundation 0x00ddd0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00d4c966 ___forwarding___ + 966
4 CoreFoundation 0x00d4c522 _CF_forwarding_prep_0 + 50
5 UIKit 0x003ecafc -[UILabel setText:] + 72
6 picture:vide 0x000050c9 -[VideoChatController1 tableView:cellForRowAtIndexPath:] + 376
7 UIKit 0x00340b98 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
8 UIKit 0x003364cc -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
9 UIKit 0x0034b8cc -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
10 UIKit 0x0034390c -[UITableView layoutSubviews] + 242
11 QuartzCore 0x01d7ba5a -[CALayer layoutSublayers] + 181
12 QuartzCore 0x01d7dddc CALayerLayoutIfNeeded + 220
13 QuartzCore 0x01d230b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
14 QuartzCore 0x01d24294 _ZN2CA11Transaction6commitEv + 292
15 QuartzCore 0x01d2446d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
16 CoreFoundation 0x00dbc89b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
17 CoreFoundation 0x00d516e7 __CFRunLoopDoObservers + 295
18 CoreFoundation 0x00d1a1d7 __CFRunLoopRun + 1575
19 CoreFoundation 0x00d19840 CFRunLoopRunSpecific + 208
20 CoreFoundation 0x00d19761 CFRunLoopRunInMode + 97
21 GraphicsServices 0x017321c4 GSEventRunModal + 217
22 GraphicsServices 0x01732289 GSEventRun + 115
23 UIKit 0x002d9c93 UIApplicationMain + 1160
24 picture:vide 0x00002910 main + 102
25 picture:vide 0x000028a1 start + 53
)
Please, help.

Here you are getting this terminating log because
dataArray is an NSArray you can't call [dataarray valueForKey:#"first_name"] this
because this unreconised for NSArray
rether than this you may use some thing like this
[[dataarray objectAtIndex:index] valueForKey:#"first_name"]

[__NSArrayI isEqualToString:]: is the issue. You are using the isEqualToString: for an array somewhere. Check that. Its a method of NSString

Initialization of array was wrong.
Following line
mainarray=[[NSMutableArray alloc]initWithObjects:#"Hi",#"Hello"nil];
should be corrected as
mainarray=[[NSMutableArray alloc]initWithObjects:#"Hi",#"Hello" , nil];
Please note the new comma between #"Hello" and nil

Related

"Drink Mixer" Example Head First iPhone & iPad Development

i'm kinda new to Objective-C so i have been learning with the Head First iPhone & iPad Development book. In this book, at the Chapter 4-5 you suppose to design an app for a bartender, that basically is a table view of a list of drinks with the details list (it suppose to have the ingredients and directions for the drink selected). The data comes from two property lists, one has a list of strings with the names of the drinks, and the other is a Dictionary that has the name, directions and ingredients of the drinks.
I have followed the tutorial and the app crashes, re-checked it and still crashes. I'm using an Xcode Version of 4.0.1 and MAC OS X 10.6.8.
Here is the exception, i hope that you guys can check out what happens at this simple application.
2012-07-19 21:43:39.757 DrinkMixer[846:207] -[NSCFString objectForKey:]: unrecognized selector sent to instance 0x4b31220
2012-07-19 21:43:39.761 DrinkMixer[846:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString objectForKey:]: unrecognized selector sent to instance 0x4b31220'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc25a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f16313 objc_exception_throw + 44
2 CoreFoundation 0x00dc40bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00d33966 ___forwarding___ + 966
4 CoreFoundation 0x00d33522 _CF_forwarding_prep_0 + 50
5 DrinkMixer 0x00002495 -[RootViewController tableView:cellForRowAtIndexPath:] + 325
6 UIKit 0x00089b98 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
7 UIKit 0x0007f4cc -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
8 UIKit 0x000948cc -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
9 UIKit 0x0008c90c -[UITableView layoutSubviews] + 242
10 QuartzCore 0x016aca5a -[CALayer layoutSublayers] + 181
11 QuartzCore 0x016aeddc CALayerLayoutIfNeeded + 220
12 QuartzCore 0x016540b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
13 QuartzCore 0x01655294 _ZN2CA11Transaction6commitEv + 292
14 UIKit 0x000169c9 -[UIApplication _reportAppLaunchFinished] + 39
15 UIKit 0x00016e83 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 690
16 UIKit 0x00021617 -[UIApplication handleEvent:withNewEvent:] + 1533
17 UIKit 0x00019abf -[UIApplication sendEvent:] + 71
18 UIKit 0x0001ef2e _UIApplicationHandleEvent + 7576
19 GraphicsServices 0x00ffb992 PurpleEventCallback + 1550
20 CoreFoundation 0x00da3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
21 CoreFoundation 0x00d03cf7 __CFRunLoopDoSource1 + 215
22 CoreFoundation 0x00d00f83 __CFRunLoopRun + 979
23 CoreFoundation 0x00d00840 CFRunLoopRunSpecific + 208
24 CoreFoundation 0x00d00761 CFRunLoopRunInMode + 97
25 UIKit 0x000167d2 -[UIApplication _run] + 623
26 UIKit 0x00022c93 UIApplicationMain + 1160
27 DrinkMixer 0x00001c89 main + 121
28 DrinkMixer 0x00001c05 start + 53
)
terminate called after throwing an instance of 'NSException'
sharedlibrary apply-load-rules all
(gdb)
And here is exactly when the app crashes, at the objectForKey:#"name"
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.text = [[self.drinks objectAtIndex:indexPath.row] objectForKey:#"name"];
return cell;
}
the clue in the first line of the error is that you have initialized the contents of self.drinks at the index that corresponds to indexPath.row to be an NSString. when that objectAtIndex: is retrieved, it is then passed the message objectForKey: as though it is an NSArray.
look at the code where you've initialized self.drinks and make certain you've made it an appropriate array containing appropriate contents. in your case, it would be an array of NSDictionary* for objectForKey: to work).
Debug your code and check drinks is an array of NSDictonary.

Unrecognized selector sent to instance (self.navigationController.toolbar)

I've been banging my head against the wall for the past 2 days with it - and I need help.
In my controller, I have this code:
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationController.toolbar.barStyle = UIBarStyleBlack;
[self.navigationController setToolbarHidden:NO];
... // the rest of initialisation goes here
}
This controller presents details of one item selected from the list. Controller displaying a list of items does pushViewControllerAnimated on this controller to display details of the item selected by the user.
This works fine on the first execution, however when the user presses back button - and then selects another (or even the same) item from the list, line [self.navigationController setToolbarHidden:NO] causes SIGABRT with this stack trace:
2011-11-04 10:24:21.423 OOKL[32026:10403] -[NSCFNumber view]: unrecognized selector sent to instance 0x69db0e0
2011-11-04 10:24:21.426 OOKL[32026:10403] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFNumber view]: unrecognized selector sent to instance 0x69db0e0'
*** Call stack at first throw:
(
0 CoreFoundation 0x019875a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01adb313 objc_exception_throw + 44
2 CoreFoundation 0x019890bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x018f8966 ___forwarding___ + 966
4 CoreFoundation 0x018f8522 _CF_forwarding_prep_0 + 50
5 UIKit 0x0063223e -[UIToolbar setItems:animated:] + 1554
6 UIKit 0x005f8ccb -[UIViewController(UINavigationControllerContextualToolbar) setToolbarItems:] + 49
7 OOKL 0x0003df87 -[OOExplorerObjectDetailController setUpToolbarForExplore] + 1335
8 OOKL 0x0003eb2b -[OOExplorerObjectDetailController viewDidLoad] + 2043
9 UIKit 0x005fd089 -[UIViewController view] + 179
10 UIKit 0x005fb482 -[UIViewController contentScrollView] + 42
11 UIKit 0x0060bf25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
12 UIKit 0x0060a555 -[UINavigationController _layoutViewController:] + 43
13 UIKit 0x0060b870 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
14 UIKit 0x0060632a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
15 UIKit 0x0060d562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
16 UIKit 0x006061c4 -[UINavigationController pushViewController:animated:] + 62
17 OOKL 0x0002ed8b -[OOExploreController showObjectDetailControllerWithObject:] + 571
18 OOKL 0x0002da1c -[OOExploreController parserDidFinish:] + 316
19 OOKL 0x00021c13 -[OOXMLParser parserDidEndDocument:] + 99
20 Foundation 0x00385717 _endDocument + 95
21 libxml2.2.dylib 0x02ad4215 xmlParseChunk + 7380
22 Foundation 0x0038615a -[NSXMLParser parse] + 321
23 OOKL 0x00021893 -[OOXMLParser parseString:] + 339
24 OOKL 0x0002d8d5 -[OOExploreController parseXml:] + 165
25 OOKL 0x0002d81f -[OOExploreController requestDidFinishLoading:] + 79
26 OOKL 0x00011cba -[OOSharedSeverController connectionDidFinishLoading:] + 298
27 Foundation 0x002ef112 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] + 108
28 Foundation 0x002ef06b _NSURLConnectionDidFinishLoading + 133
29 CFNetwork 0x013cd48e _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 220
30 CFNetwork 0x014986e1 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 293
31 CFNetwork 0x013c3c80 _ZN19URLConnectionClient13processEventsEv + 100
32 CFNetwork 0x013c3acf _ZN17MultiplexerSource7performEv + 251
33 CoreFoundation 0x019688ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
34 CoreFoundation 0x018c688b __CFRunLoopDoSources0 + 571
35 CoreFoundation 0x018c5d86 __CFRunLoopRun + 470
36 CoreFoundation 0x018c5840 CFRunLoopRunSpecific + 208
37 CoreFoundation 0x018c5761 CFRunLoopRunInMode + 97
38 GraphicsServices 0x01e601c4 GSEventRunModal + 217
39 GraphicsServices 0x01e60289 GSEventRun + 115
40 UIKit 0x0055bc93 UIApplicationMain + 1160
41 OOKL 0x00002d09 main + 121
42 OOKL 0x00002c85 start + 53
)
I thought, maybe, I should setup self.toolbarItems first before making the toolbar visible - but then I get this same error when I do
self.toolbarItems = [NSArray ...]
I'm desperate now - any help is appreciated.
Edit: Now for some reason I'm getting EXC_BAD_ACCESS instead of SIGABRT - in the same place - and no stack trace is produced at all.
As the stack trace tells:
-[NSCFNumber view]: unrecognized selector sent to instance 0x69db0e0
You are accidentally overreleasing something that is leading to this message sent to some dangling pointer (reference to some junk).
Check if you are releasing your navigationController, ViewController or anything where your workflow begins.

iphone updating tableview after searching issue

When I search on TableView through TextDidChange which calls handleSearchTerm subroutine, it perfectly works. However, I removed TextDidChange and use SearchButtonClicked to update tableView (use same subroutine),it doesn't update TableView properly and crash when scroll(out of bound index in cellForRowAtIndex) even though datasource has been changed in subroutine. Any idea?
[78515:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFArray objectAtIndex:]: index (8) beyond bounds (8)'
*** Call stack at first throw:
(
0 CoreFoundation 0x00db8be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f0d5c2 objc_exception_throw + 47
2 CoreFoundation 0x00d71628 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00d7159a +[NSException raise:format:] + 58
4 CoreFoundation 0x00dae8c9 _NSArrayRaiseBoundException + 121
5 CoreFoundation 0x00db0027 -[__NSCFArray objectAtIndex:] + 87
6 DrinkGuide_v1.0 0x00005d6c -[AllDrinkTableViewController tableView:cellForRowAtIndexPath:] + 371
7 UIKit 0x003357fa -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
8 UIKit 0x0032b77f -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
9 UIKit 0x00340450 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
10 UIKit 0x00338538 -[UITableView layoutSubviews] + 242
11 QuartzCore 0x01c76451 -[CALayer layoutSublayers] + 181
12 QuartzCore 0x01c7617c CALayerLayoutIfNeeded + 220
13 QuartzCore 0x01c6f37c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
14 QuartzCore 0x01c6f0d0 _ZN2CA11Transaction6commitEv + 292
15 QuartzCore 0x01c9f7d5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
16 CoreFoundation 0x00d99fbb __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
17 CoreFoundation 0x00d2f0e7 __CFRunLoopDoObservers + 295
18 CoreFoundation 0x00cf7bd7 __CFRunLoopRun + 1575
19 CoreFoundation 0x00cf7240 CFRunLoopRunSpecific + 208
20 CoreFoundation 0x00cf7161 CFRunLoopRunInMode + 97
21 GraphicsServices 0x016ed268 GSEventRunModal + 217
22 GraphicsServices 0x016ed32d GSEventRun + 115
23 UIKit 0x002d042e UIApplicationMain + 1160
24 DrinkGuide_v1.0 0x0000298c main + 102
25 DrinkGuide_v1.0 0x0000291d start + 53
)
terminate called after throwing an instance of 'NSException'
I think crash is caused by cellForRowAtIndexPath, can you please post code for following methods :
cellForRowAtIndexPath
SearchButtonClicked
yourSubroutine you are calling
also mention your array or collection from which you are loading your table.
Thanks,
as per your crash log it seems you are retuning wrong no of cells in you noOfcellsInsection method. You are getting array out of bounds error.When you are doing search make a flag true and according to that flag return no of rows for the table view using your filtered array's count.

Unrecognized Selector with OHGridView

I downloaded the OHGridView hoping that it was the answer to all my problems.
https://github.com/AliSoftware/OHGridView
I did all that it said to do (add the class files, add the code, and change a few other things).
I went to build it and it crashed. I realized the lines of code why it was crashing:
((OHGridView *)self.view).rowHeight = 100;
((OHGridView *)self.view).columnsCount = 2;
Error from Console:
`-[UIView setRowHeight:]: unrecognized selector sent to instance 0x4b55110
2011-02-20 09:01:16.906 TableView[14358:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setRowHeight:]: unrecognized selector sent to instance 0x4b55110'
*** Call stack at first throw:
(
0 CoreFoundation 0x00e4dbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00fa25c2 objc_exception_throw + 47
2 CoreFoundation 0x00e4f6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00dbf366 ___forwarding___ + 966
4 CoreFoundation 0x00dbef22 _CF_forwarding_prep_0 + 50
5 TableView 0x00004232 -[DetailViewController viewDidLoad] + 831
6 UIKit 0x0037165e -[UIViewController view] + 179
7 UIKit 0x0036fa57 -[UIViewController contentScrollView] + 42
8 UIKit 0x00380201 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
9 UIKit 0x0037e831 -[UINavigationController _layoutViewController:] + 43
10 UIKit 0x0037fa86 -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
11 UIKit 0x0037a606 -[UINavigationController _startDeferredTransitionIfNeeded] + 266
12 UIKit 0x0038183e -[UINavigationController pushViewController:transition:forceImmediate:] + 932
13 UIKit 0x0037a4a0 -[UINavigationController pushViewController:animated:] + 62
14 TableView 0x00002e4f -[RootViewController tableView:didSelectRowAtIndexPath:] + 681
15 UIKit 0x00339794 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
16 UIKit 0x0032fd50 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
17 Foundation 0x000427f6 __NSFireDelayedPerform + 441
18 CoreFoundation 0x00e2efe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
19 CoreFoundation 0x00e30594 __CFRunLoopDoTimer + 1220
20 CoreFoundation 0x00d8ccc9 __CFRunLoopRun + 1817
21 CoreFoundation 0x00d8c240 CFRunLoopRunSpecific + 208
22 CoreFoundation 0x00d8c161 CFRunLoopRunInMode + 97
23 GraphicsServices 0x016ef268 GSEventRunModal + 217
24 GraphicsServices 0x016ef32d GSEventRun + 115
25 UIKit 0x002d242e UIApplicationMain + 1160
26 TableView 0x00001abc main + 102
27 TableView 0x00001a4d start + 53
)
terminate called after throwing an instance of 'NSException`
I removed them and it loaded fine but I didn't see any content.
Please help,
thanks.
I did a clone of the repository just now and then did a build and run of his example project without making any changes to the code. It ran without any warnings or errors.
You'll need to check your code wherever you made changes.
update after your comment
Unrecognized Selector often means that you have a capitalization error or that your code isn't the kind of object that you think it is.
For example: I can get almost the same error that you get if I try to call the setRowHeight: directly against a OHGridView object instead of the view property of the object, like this
((OHGridView*)self).rowHeight = 100;
((OHGridView*)self).columnsCount = 2;
So, I would check your code to make sure that your object is an OHGridView and that you are setting the rowHeight property of the view of the OHGridView.

CustomCell Crash

I am using CustomCell tableview, download data and binding it.When i tap multiple time am getting this error.
[NSCFString numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x1bd170
Sat Jan 22 12:03:26 unknown Fridge[535] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x1bd170'
*** Call stack at first throw:
(
0 CoreFoundation 0x314d0987 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x319a149d objc_exception_throw + 24
2 CoreFoundation 0x314d2133 -[NSObject(NSObject) doesNotRecognizeSelector:] + 102
3 CoreFoundation 0x31479aa9 ___forwarding___ + 508
4 CoreFoundation 0x31479860 _CF_forwarding_prep_0 + 48
5 UIKit 0x339023fb -[UITableViewRowData(UITableViewRowDataPrivate) _updateNumSections] + 66
6 UIKit 0x3390235b -[UITableViewRowData invalidateAllSections] + 50
7 UIKit 0x33902111 -[UITableView(_UITableViewPrivate) _updateRowData] + 64
8 UIKit 0x33902069 -[UITableView noteNumberOfRowsChanged] + 64
9 UIKit 0x33901bff -[UITableView reloadData] + 582
10 UIKit 0x33904a0b -[UITableView _reloadDataIfNeeded] + 50
11 UIKit 0x33904e63 -[UITableView layoutSubviews] + 18
12 UIKit 0x338b10cf -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 26
13 CoreFoundation 0x3146ebbf -[NSObject(NSObject) performSelector:withObject:] + 22
14 QuartzCore 0x30a6c685 -[CALayer layoutSublayers] + 120
15 QuartzCore 0x30a6c43d CALayerLayoutIfNeeded + 184
16 QuartzCore 0x30a6656d _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 212
17 QuartzCore 0x30a66383 _ZN2CA11Transaction6commitEv + 190
18 QuartzCore 0x30a89f9d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 52
19 CoreFoundation 0x31460c59 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
20 CoreFoundation 0x31460acd __CFRunLoopDoObservers + 412
21 CoreFoundation 0x314580cb __CFRunLoopRun + 854
22 CoreFoundation 0x31457c87 CFRunLoopRunSpecific + 230
23 CoreFoundation 0x31457b8f CFRunLoopRunInMode + 58
24 GraphicsServices 0x35d664ab GSEventRunModal + 114
25 GraphicsServices 0x35d66557 GSEventRun + 62
26 UIKit 0x338d5329 -[UIApplication _run] + 412
27 UIKit 0x338d2e93 UIApplicationMain + 670
28 Fridge 0x00002a7f main + 70
29 Fridge 0x00002a34 start + 40
)
Sat Jan 22 12:03:26 unknown UIKitApplication:com.sdi.Fridge[0xa6da][535] <Notice>: terminate called after throwing an instance of 'NSException'
**Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x184250'**
Thanks
Thanks for the detail view of your problem but the only important part is this
-[NSCFString numberOfSectionsInTableView:]: unrecognized selector
It tells that you are calling the method numberOfSectionsInTableView: on a NSCFString
which is seem to be wrong
so check where is that method called in your code
And also the rest is not require in your case.
Edit:
did you release your custom cell in the delegate method tableview. if yes than use autorelease instead.