UIButton in UITableViewCell crashes when clicked - iphone

This should be simple, but I can't figure out what's wrong. I'm creating a tableview and I want a button that I can click to switch between checked and unchecked:
UITableViewCell *cell;
cell = [tableView dequeueReusableCellWithIdentifier:DiaperCellIdentifier];
if (cell == nil)
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:DiaperCellIdentifier] autorelease];
wetButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
image = [UIImage imageNamed:#"unchecked_large.png"];
CGRect frame = CGRectMake(150.0, 5.0, image.size.width, image.size.height);
wetButton.frame = frame;
[wetButton setBackgroundImage:image forState:UIControlStateNormal];
[wetButton addTarget:self action:#selector(wetClicked:) forControlEvents:UIControlEventTouchUpInside];
[cell.contentView addSubview:wetButton];
Now when I click this button, I get a stack trace....[NSCFString scale]: unrecognized selector sent to instance.... thanks for any help.
- (void) wetClicked:(id)sender{
if (isWet) {
isWet = NO;
[wetButton setBackgroundImage:#"unchecked_large.png" forState:UIControlStateNormal];
} else {
isWet = YES;
[wetButton setBackgroundImage:#"checked_large.png" forState:UIControlStateNormal];
}
}
and here's the trace:
2011-03-09 10:19:57.124 InfantCare[64064:207] -[NSCFString scale]: unrecognized selector sent to instance 0x33be0
2011-03-09 10:19:57.240 InfantCare[64064:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString scale]: unrecognized selector sent to instance 0x33be0'
* Call stack at first throw:
(
0 CoreFoundation 0x00f2dbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x010825c2 objc_exception_throw + 47
2 CoreFoundation 0x00f2f6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00e9f366 ___forwarding___ + 966
4 CoreFoundation 0x00e9ef22 _CF_forwarding_prep_0 + 50
5 UIKit 0x003d1e7b -[UIImageView setImage:] + 250
6 UIKit 0x004ea353 -[UIButton layoutSubviews] + 273
7 QuartzCore 0x01d58451 -[CALayer layoutSublayers] + 181
8 QuartzCore 0x01d5817c CALayerLayoutIfNeeded + 220
9 QuartzCore 0x01d5137c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
10 QuartzCore 0x01d510d0 _ZN2CA11Transaction6commitEv + 292
11 QuartzCore 0x01d817d5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
12 CoreFoundation 0x00f0efbb __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
13 CoreFoundation 0x00ea40e7 __CFRunLoopDoObservers + 295
14 CoreFoundation 0x00e6cbd7 __CFRunLoopRun + 1575
15 CoreFoundation 0x00e6c240 CFRunLoopRunSpecific + 208
16 CoreFoundation 0x00e6c161 CFRunLoopRunInMode + 97
17 GraphicsServices 0x017cf268 GSEventRunModal + 217
18 GraphicsServices 0x017cf32d GSEventRun + 115
19 UIKit 0x0031642e UIApplicationMain + 1160
20 InfantCare 0x00002228 main + 102
21 InfantCare 0x000021b9 start + 53
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.

I think you need to use an UIImage instance as a parameter when you call the function setBackgroundImage:
[wetButton setBackgroundImage:#"unchecked_large.png" forState:UIControlStateNormal];
use instead:
[wetButton setBackgroundImage:[UIImage imageNamed:#"unchecked_large.png"] forState:UIControlStateNormal];

The code you have posted is fine. The problem is most likely in your wetClicked: method, you are calling the scale method on an NSString.
Now that you've posted wetClicked: and the trace, I see the problem: You're passing a string instead of an image to setBackgroundImage:forState:. Try this instead:
- (void) wetClicked:(id)sender{
if (isWet) {
isWet = NO;
[wetButton setBackgroundImage:[UIImage imageNamed:#"unchecked_large.png"] forState:UIControlStateNormal];
} else {
isWet = YES;
[wetButton setBackgroundImage:[UIImage imageNamed:#"checked_large.png"] forState:UIControlStateNormal];
}
}

Related

webcore crash in UIWebView's init method

I have run into some kind of crash, here is the crash stack:
WebCore 0x353c81b4 WebCore::PageCache::markPagesForFullStyleRecalc(WebCore::Page*) + 20
WebKit 0x36a6a45f -[WebView(WebPrivate) _initWithFrame:frameName:groupName:usesDocumentViews:] + 139
WebKit 0x36a6a3cd -[WebView initWithFrame:frameName:groupName:] + 53
WebKit 0x36a6a393 -[WebView initWithFrame:] + 47
UIKit 0x37251bfb -[UIWebDocumentView initWithWebView:frame:] + 287
UIKit 0x372828d1 -[UIWebBrowserView initWithWebView:frame:] + 57
UIKit 0x37282891 -[UIWebDocumentView initWithFrame:] + 41
UIKit 0x37282809 -[UIWebBrowserView initWithFrame:] + 49
UIKit 0x37437d73 -[UIWebView _webViewCommonInitWithWebView:scalesPageToFit:shouldEnableReachability:] + 235
UIKit 0x374385a9 -[UIWebView initWithFrame:] + 81
SeMob 0x001c216d -[SeMobWebInternalView initWithFrame:] (SeMobWebInternalView.m:64)
SeMob 0x001e7761 -[SeMobWebReader prepareReaderInWebView:] (SeMobWebReader.m:102)
SeMob 0x000eeb0d -[SeMobWebView webViewDidFinishLoad:] (SeMobWebView.m:1475)
CoreFoundation 0x346979c4 __invoking___ + 68
CoreFoundation 0x345eefeb -[NSInvocation invoke] + 287
CoreFoundation 0x345eeb43 -[NSInvocation invokeWithTarget:] + 51
WebKit 0x36a6189b -[_WebSafeForwarder forwardInvocation:] + 375
CoreFoundation 0x3469661b ___forwarding___ + 627
CoreFoundation 0x345edf68 __forwarding_prep_0___ + 24
CoreFoundation 0x346979c4 __invoking___ + 68
CoreFoundation 0x345eefeb -[NSInvocation invoke] + 287
WebCore 0x354197eb _ZL11SendMessageP12NSInvocation + 27
WebCore 0x35456fa5 _ZL20HandleDelegateSourcePv + 81
CoreFoundation 0x34669683 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
CoreFoundation 0x34668ee9 __CFRunLoopDoSources0 + 213
CoreFoundation 0x34667cb7 __CFRunLoopRun + 647
CoreFoundation 0x345daebd CFRunLoopRunSpecific + 357
CoreFoundation 0x345dad49 CFRunLoopRunInMode + 105
GraphicsServices 0x353432eb GSEventRunModal + 75
UIKit 0x37220301 UIApplicationMain + 1121
SeMob 0x000d48a7 main (main.m:12)
and two pieces of code:
- (void)prepareReaderInWebView:(UIWebView *)webView
{
// ...omit some code here
if ([readableContent length]) {
self.innerWebView = [[[SeMobWebInternalView alloc] initWithFrame:webView.bounds] autorelease];
innerWebView.scalesPageToFit = NO;
innerWebView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
innerWebView.scrollView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3];
innerWebView.scrollView.scrollsToTop = YES;
innerWebView.delegate = self;
...
}
#interface SeMobWebInternalView : UIWebView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
UIMenuItem *flag =
[[UIMenuItem alloc] initWithTitle:#"search" action:#selector(search:)];
...
}
the crash always occers in the super's init method. Why it always crash? Plz help me !
Apple documentation says that UIWebView should not be subclassed:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-DontLinkElementID_2
Check subclassing notes.
As #cosmin stated your not meant to subclass UIWebView, from your code it looks like your trying to customize the appearance. try this code instead:
webView.backgroundColor = [UIColor clearColor]; // changes to clear colour
webView.opaque = NO;
for(UIView *innerView in [[[webView subviews] objectAtIndex:0] subviews]) { // Hide images that make shadow
if ([innerView isKindOfClass:[UIImageView class]]) {
innerView.hidden = YES;
}
}

SIGABRT received due to this code... Why?

I am trying to implement a tab bar controller, navigation controller and tableview into an application I'm working on but I am getting a SIGABRT error each time I try to run it and I don't know why and it is rather puzzling me. Below is the code that the console is referencing to (I believe):
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = #"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
// Set up the cell...
NSString *cellValue = [listOfCoffees objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
return cell;
}
...and below is the console:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString tableView:cellForRowAtIndexPath:]: unrecognized selector sent to instance 0x6a17c00'
*** Call stack at first throw:
(
0 CoreFoundation 0x00dca5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f1e313 objc_exception_throw + 44
2 CoreFoundation 0x00dcc0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00d3b966 ___forwarding___ + 966
4 CoreFoundation 0x00d3b522 _CF_forwarding_prep_0 + 50
5 UIKit 0x00091b98 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634
6 UIKit 0x000874cc -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
7 UIKit 0x0009c8cc -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
8 UIKit 0x0009490c -[UITableView layoutSubviews] + 242
9 QuartzCore 0x016b4a5a -[CALayer layoutSublayers] + 181
10 QuartzCore 0x016b6ddc CALayerLayoutIfNeeded + 220
11 QuartzCore 0x0165c0b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
12 QuartzCore 0x0165d294 _ZN2CA11Transaction6commitEv + 292
13 QuartzCore 0x0165d46d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
14 CoreFoundation 0x00dab89b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
15 CoreFoundation 0x00d406e7 __CFRunLoopDoObservers + 295
16 CoreFoundation 0x00d091d7 __CFRunLoopRun + 1575
17 CoreFoundation 0x00d08840 CFRunLoopRunSpecific + 208
18 CoreFoundation 0x00d08761 CFRunLoopRunInMode + 97
19 GraphicsServices 0x010021c4 GSEventRunModal + 217
20 GraphicsServices 0x01002289 GSEventRun + 115
21 UIKit 0x0002ac93 UIApplicationMain + 1160
22 Affogato 0x00002259 main + 121
23 Affogato 0x000021d5 start + 53
24 ??? 0x00000001 0x0 + 1
)
terminate called throwing an exception
Any help would be greatly appreciated.
I'm quite sure the actual problem is somewhere else in the code, my guess would be you are using some string variable (possibly selectedCoffee ?) in place of the tableView's delegate.
The error is in the tableview delegate/datasource. CellForRowAtIndexPath is called by the tableview to query it's UITableViewCell object. Check your delegate/datasource connection.
Set a breakpoint and look where the app crash. Then we could help more.

How call customview on action of button?

I have create a demo project in which i have add button. On button action i am calling a custom view. On that custom view i have add a picker view, a toolbar and bar button. On action of button i am calling that custom view. I have used this code...
-(IBAction)Picker{
mpv_object = [[MyPickerView alloc] initWithNibName:#"MyPickerView" bundle:nil];
[self.view addSubview:mpv_object];
[mpv_object release];
}
But i give error which i given below...
2011-09-26 09:49:00.236 Web[440:207] -[MyPickerView initWithNibName:bundle:]: unrecognized selector sent to instance 0x4b4dcb0
2011-09-26 09:49:00.287 Web[440:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyPickerView initWithNibName:bundle:]: unrecognized selector sent to instance 0x4b4dcb0'
* Call stack at first throw:
(
0 CoreFoundation 0x00daebe9 exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f035c2 objc_exception_throw + 47
2 CoreFoundation 0x00db06fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x00d20366 __forwarding + 966
4 CoreFoundation 0x00d1ff22 _CF_forwarding_prep_0 + 50
5 Web 0x0000223a -[WebViewController Picker] + 102
6 UIKit 0x002b7a6e -[UIApplication sendAction:to:from:forEvent:] + 119
7 UIKit 0x003461b5 -[UIControl sendAction:to:forEvent:] + 67
8 UIKit 0x00348647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
9 UIKit 0x003471f4 -[UIControl touchesEnded:withEvent:] + 458
10 UIKit 0x002dc0d1 -[UIWindow _sendTouchesForEvent:] + 567
11 UIKit 0x002bd37a -[UIApplication sendEvent:] + 447
12 UIKit 0x002c2732 _UIApplicationHandleEvent + 7576
13 GraphicsServices 0x016e4a36 PurpleEventCallback + 1550
14 CoreFoundation 0x00d90064 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52
15 CoreFoundation 0x00cf06f7 __CFRunLoopDoSource1 + 215
16 CoreFoundation 0x00ced983 __CFRunLoopRun + 979
17 CoreFoundation 0x00ced240 CFRunLoopRunSpecific + 208
18 CoreFoundation 0x00ced161 CFRunLoopRunInMode + 97
19 GraphicsServices 0x016e3268 GSEventRunModal + 217
20 GraphicsServices 0x016e332d GSEventRun + 115
21 UIKit 0x002c642e UIApplicationMain + 1160
22 Web 0x00001f80 main + 102
23 Web 0x00001f11 start + 53
)
terminate called after throwing an instance of 'NSException'
What is error in this?
It sounds like MyPickerView is a UIView subclass. initWithNibName:bundle is not a method that exists on UIView subclasses. It is a method that exists on UIViewController subclasses. That is what the error message means.
unrecognized selector sent to instance suggests that MyPickerView's superclass doesn't know what initWithNibName:bundle is, which is because UIView doesn't know that method (it exists in UIViewController).
Right way to do this would be something like this
UIView *dpView;
NSArray *nibViews;
nibViews = [[NSBundle mainBundle] loadNibNamed:#"DatePickerSliderViewNew" owner:self options:nil];
dpView = [ nibViews objectAtIndex: 0];
int outside = CGRectGetMaxY(self.view.bounds);
dpView.frame = CGRectMake(0, outside, 320, 260);
[self.view addSubview:dpView];
[UIView beginAnimations:nil context:nil];
dpView.frame = CGRectMake(0, outside - 260, 320, 260);
[UIView commitAnimations];

NSObject's 'description' method giving parentheses as output?

So, I'm debugging an app I'm building and using the description method to help me find the problem. But instead of giving me the app as a string it is printing out parentheses instead. Please help!
Here's the code:
- (void)viewDidLoad {
[super viewDidLoad];
reminders = [[NSMutableArray alloc] init];
currentTitle = [[NSMutableString alloc] init];
currentDate = [[NSMutableString alloc] init];
currentSummary = [[
NSMutableString alloc] init];
currentLink = [[NSMutableString alloc] init];
NSLog(#"IT'S HERE %#", [reminders description]);}
...
and the error:
[Session started at 2010-10-04 22:15:16 -0400.]
2010-10-04 22:15:17.434 Reminders[5824:207] ******* Accessibility Status Changed: On
2010-10-04 22:15:17.464 Reminders[5824:207] ********** Loading AX for: com.yourcompany.Reminders ************
2010-10-04 22:15:17.506 Reminders[5824:207] IT'S HERE (
)
2010-10-04 22:15:17.510 Reminders[5824:207] Hello
2010-10-04 22:15:17.512 Reminders[5824:207] (
)
2010-10-04 22:15:17.514 Reminders[5824:207] PVC: <UITableView: 0x602d600; frame = (0 20; 320 460); clipsToBounds = YES; opaque = NO; autoresize = W+H; layer = <CALayer: 0x5f3f3b0>; contentOffset: {0, 0}>
2010-10-04 22:15:17.514 Reminders[5824:207] It's here
2010-10-04 22:15:17.515 Reminders[5824:207] Loaded
2010-10-04 22:15:17.520 Reminders[5824:207] -[__NSCFArray name]: unrecognized selector sent to instance 0x6a4b640
2010-10-04 22:15:17.523 Reminders[5824:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFArray name]: unrecognized selector sent to instance 0x6a4b640'
*** Call stack at first throw:
(
0 CoreFoundation 0x0248bb99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x025db40e objc_exception_throw + 47
2 CoreFoundation 0x0248d6ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x023fd2b6 ___forwarding___ + 966
4 CoreFoundation 0x023fce72 _CF_forwarding_prep_0 + 50
5 Reminders 0x00003aa9 -[RootViewController tableView:cellForRowAtIndexPath:] + 300
6 UIKit 0x00090d6f -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 619
7 UIKit 0x00086e02 -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75
8 UIKit 0x0009b774 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561
9 UIKit 0x000937ec -[UITableView layoutSubviews] + 242
10 QuartzCore 0x03f60481 -[CALayer layoutSublayers] + 177
11 QuartzCore 0x03f601b1 CALayerLayoutIfNeeded + 220
12 QuartzCore 0x03f592e0 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 302
13 QuartzCore 0x03f59040 _ZN2CA11Transaction6commitEv + 292
14 UIKit 0x0002204e -[UIApplication _reportAppLaunchFinished] + 39
15 UIKit 0x00022477 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 545
16 UIKit 0x0002c3ec -[UIApplication handleEvent:withNewEvent:] + 1958
17 UIKit 0x00024b3c -[UIApplication sendEvent:] + 71
18 UIKit 0x000299bf _UIApplicationHandleEvent + 7672
19 GraphicsServices 0x026fa822 PurpleEventCallback + 1550
20 CoreFoundation 0x0246cff4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
21 CoreFoundation 0x023cd807 __CFRunLoopDoSource1 + 215
22 CoreFoundation 0x023caa93 __CFRunLoopRun + 979
23 CoreFoundation 0x023ca350 CFRunLoopRunSpecific + 208
24 CoreFoundation 0x023ca271 CFRunLoopRunInMode + 97
25 UIKit 0x00021c6d -[UIApplication _run] + 625
26 UIKit 0x0002daf2 UIApplicationMain + 1160
27 Reminders 0x00002078 main + 102
28 Reminders 0x00002009 start + 53
)
terminate called after throwing an instance of 'NSException'
Here's the method that you asked for fluchtpunkt
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = #"cell";
cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell.
Reminder *theReminder = [reminders objectAtIndex:indexPath.row];
cell.textLabel.text = theReminder.name;
return cell;
}
those parentheses are the output I would expect if I NSLog an empty array.
This is absolutely correct.
the exception is raised because you try to call a name method on an NS(Mutable)Array. And arrays don't respond to name.
To find the cause of this Exception post the code of this method in your RootViewController
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

UIButton created in UItableview cell crashes when tapped

I created a custom UItableviewcell
added a button into its initWithStyle area:
favoriteButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
favoriteButton.backgroundColor = [UIColor clearColor];
[favoriteButton setTitle:#"Play" forState:UIControlStateNormal];
[favoriteButton addTarget:self action:#selector(favoriteClick:) forControlEvents:UIControlEventTouchUpInside];
favoriteButton.center = self.center;
set its frame and layout in:
- (void)layoutSubviews {
[super layoutSubviews];
CGRect contentRect = self.contentView.bounds;
CGFloat boundsX = contentRect.origin.x;
CGRect frame;
frame = CGRectMake(boundsX+200, 44, 40, 40);
favoriteButton.frame = frame;
}
and then in my tableviewcontroller.m file I use that tableviewcell and have the user click tap to go to the action within that tableviewcontroller.m code
-(void)favoriteClick:(id)sender// forEvent:(UIEvent*)event
{
NSLog(#"click");
}
however when i tap the button I get an unhandled exception:
2010-07-24 16:06:02.197 Film Fest[10342:40b] -[ProgramGuideCell favoriteClick:]: unrecognized selector sent to instance 0x6e63ff0
2010-07-24 16:06:02.200 Film Fest[10342:40b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ProgramGuideCell favoriteClick:]: unrecognized selector sent to instance 0x6e63ff0'
*** Call stack at first throw:
(
0 CoreFoundation 0x02a56919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x02ba45de objc_exception_throw + 47
2 CoreFoundation 0x02a5842b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x029c8116 ___forwarding___ + 966
4 CoreFoundation 0x029c7cd2 _CF_forwarding_prep_0 + 50
5 UIKit 0x00301e14 -[UIApplication sendAction:to:from:forEvent:] + 119
6 UIKit 0x0038b6c8 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x0038db4a -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
8 UIKit 0x0038c6f7 -[UIControl touchesEnded:withEvent:] + 458
9 UIKit 0x00579070 _UIGestureRecognizerUpdateObserver + 3687
10 CoreFoundation 0x02a37d1b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
11 CoreFoundation 0x029cc987 __CFRunLoopDoObservers + 295
12 CoreFoundation 0x02995c17 __CFRunLoopRun + 1575
13 CoreFoundation 0x02995280 CFRunLoopRunSpecific + 208
14 CoreFoundation 0x029951a1 CFRunLoopRunInMode + 97
15 GraphicsServices 0x030b42c8 GSEventRunModal + 217
16 GraphicsServices 0x030b438d GSEventRun + 115
17 UIKit 0x0030fb58 UIApplicationMain + 1160
18 Film Fest 0x00002170 main + 102
19 Film Fest 0x00002101 start + 53
)
terminate called after throwing an instance of 'NSException'
I dont see what Im doing wrong here...
Try returning IBAction instead of void on your selector, and put the selector in the ProgramGuideCell instead of tableviewcontroller.
-(IBAction)favoriteClick:(id)sender// forEvent:(UIEvent*)event
{
NSLog(#"click");
}