Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6916859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:39:26+00:00 2026-05-27T09:39:26+00:00

I try to make a PickerView with ActionSheet.The code is ok in X-code, but

  • 0

I try to make a PickerView with ActionSheet.The code is ok in X-code, but crash will occur when I run it and press the “Button”, please help to check what have I missed?

Thank you.

Here is the .h file

#import <UIKit/UIKit.h>

@interface UIPickerView_ActionSheetViewController : UIViewController <UIActionSheetDelegate, UIPickerViewDelegate>
{
    IBOutlet UIButton *button;
}

@property (nonatomic, retain) UIButton *button;

- (IBAction)buttonPressed;

@end

Here is the .m file

#import "UIPickerView_ActionSheetViewController.h"

@implementation UIPickerView_ActionSheetViewController

@synthesize button;

- (IBAction)buttonPressed
{
    UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle:@"currentData"
                                                  delegate:self 
                                         cancelButtonTitle:@"Done"
                                    destructiveButtonTitle:@"Cancel" 
                                         otherButtonTitles:nil];


    UIPickerView *pickerView = [[UIPickerView alloc]initWithFrame:CGRectMake(0,40,480,200)];

    pickerView.delegate = self; 
    pickerView.showsSelectionIndicator = YES;     

    [menu addSubview:pickerView]; 
    [menu showInView:self.view]; 
    [menu setBounds:CGRectMake(0,0,480, 320)];

    [pickerView release]; 
    [menu release];
}

- (void)dealloc
{
    [button release];
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload
{
    self.button=nil;
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end

Crash on int retVal = UIApplicationMain(argc, argv, nil, nil);

#import <UIKit/UIKit.h>

int main(int argc, char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;
}

Crash Info

#0  0x9631817a in __kill ()
#1  0x9631816c in kill$UNIX2003 ()
#2  0x963aa879 in raise ()
#3  0x963c09b8 in abort ()
#4  0x9619dfda in __gnu_cxx::__verbose_terminate_handler ()
#5  0x00f1c23b in _objc_terminate ()
#6  0x9619c17a in __cxxabiv1::__terminate ()
#7  0x9619c1ba in std::terminate ()
#8  0x9619c2b8 in __cxa_throw ()
#9  0x00f1c416 in objc_exception_throw ()
#10 0x00dca0bb in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#11 0x00d39966 in ___forwarding___ ()
#12 0x00d39522 in __forwarding_prep_0___ ()
#13 0x0001a4fd in -[UIApplication sendAction:to:from:forEvent:] ()
#14 0x000aa799 in -[UIControl sendAction:to:forEvent:] ()
#15 0x000acc2b in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
#16 0x000ab7d8 in -[UIControl touchesEnded:withEvent:] ()
#17 0x0003eded in -[UIWindow _sendTouchesForEvent:] ()
#18 0x0001fc37 in -[UIApplication sendEvent:] ()
#19 0x00024f2e in _UIApplicationHandleEvent ()
#20 0x01001992 in PurpleEventCallback ()
#21 0x00da9944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#22 0x00d09cf7 in __CFRunLoopDoSource1 ()
#23 0x00d06f83 in __CFRunLoopRun ()
#24 0x00d06840 in CFRunLoopRunSpecific ()
#25 0x00d06761 in CFRunLoopRunInMode ()
#26 0x010001c4 in GSEventRunModal ()
#27 0x01000289 in GSEventRun ()
#28 0x00028c93 in UIApplicationMain ()
#29 0x00001c09 in main (argc=1, argv=0xbfffef8c) at main.m:14

Maybe this can help more

Attaching to process 606.
2011-12-10 06:37:08.456 UIPickerView_ActionSheet[606:207] -[UIPickerView_ActionSheetViewController DatePickerView]: unrecognized selector sent to instance 0x602dfb0
2011-12-10 06:37:08.458 UIPickerView_ActionSheet[606:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIPickerView_ActionSheetViewController DatePickerView]: unrecognized selector sent to instance 0x602dfb0'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x00dc85a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00f1c313 objc_exception_throw + 44
    2   CoreFoundation                      0x00dca0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x00d39966 ___forwarding___ + 966
    4   CoreFoundation                      0x00d39522 _CF_forwarding_prep_0 + 50
    5   UIKit                               0x0001a4fd -[UIApplication sendAction:to:from:forEvent:] + 119
    6   UIKit                               0x000aa799 -[UIControl sendAction:to:forEvent:] + 67
    7   UIKit                               0x000acc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
    8   UIKit                               0x000ab7d8 -[UIControl touchesEnded:withEvent:] + 458
    9   UIKit                               0x0003eded -[UIWindow _sendTouchesForEvent:] + 567
    10  UIKit                               0x0001fc37 -[UIApplication sendEvent:] + 447
    11  UIKit                               0x00024f2e _UIApplicationHandleEvent + 7576
    12  GraphicsServices                    0x01001992 PurpleEventCallback + 1550
    13  CoreFoundation                      0x00da9944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    14  CoreFoundation                      0x00d09cf7 __CFRunLoopDoSource1 + 215
    15  CoreFoundation                      0x00d06f83 __CFRunLoopRun + 979
    16  CoreFoundation                      0x00d06840 CFRunLoopRunSpecific + 208
    17  CoreFoundation                      0x00d06761 CFRunLoopRunInMode + 97
    18  GraphicsServices                    0x010001c4 GSEventRunModal + 217
    19  GraphicsServices                    0x01000289 GSEventRun + 115
    20  UIKit                               0x00028c93 UIApplicationMain + 1160
    21  UIPickerView_ActionSheet            0x00001cf9 main + 121
    22  UIPickerView_ActionSheet            0x00001c75 start + 53
)
terminate called after throwing an instance of 'NSException'
Current language:  auto; currently objective-c
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:39:26+00:00Added an answer on May 27, 2026 at 9:39 am
    [UIPickerView_ActionSheetViewController DatePickerView]: unrecognized selector sent to instance 0x602dfb0
    

    What this tells you is that somewhere you are sending the message DatePickerView to your view controller instance, and it doesn’t recognise it.

    I can’t see such a call anywhere in the code above so it is either in a different file in your project, or you have an old or renamed outlet connection in interface builder. If you have copied this code or some of the resources from somewhere else then you will need to update them to match your actual requirements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will try to make this as clear as I can, but if you
What will be the code when I try to make a combo box read
I'm fairly new to C# but I will try to make this quick! ;)
I try to make my evoque templates color-code a bit, but the html I
I try to make a registration form. When user post the fields, i check
I try to make a slider but have trouble, with placing all my div
Try this: Make a new XCode4 Applescript project. In the delegate, paste this code:
I try to make in app purchase on my app. But I have not
i try to make a solution with MonoDevelop, but i have some problems. I
I try to make a little program that sorts an array using threads but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.