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 8528397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:47:34+00:00 2026-06-11T08:47:34+00:00

Currently I am trying to make my app available for iOS4, to increase the

  • 0

Currently I am trying to make my app available for iOS4, to increase the number of people we can reach.

We have moved away from StoryBoard and are now using .xib files instead.

Right now, the only thing that is stopping this is this error:

2012-09-14 18:32:42.705 CrunchCalculator[7037:11303] -[CategoryViewController presentViewController:animated:completion:]: unrecognized selector sent to instance 0x6b42230
2012-09-14 18:32:42.707 CrunchCalculator[7037:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CategoryViewController presentViewController:animated:completion:]: unrecognized selector sent to instance 0x6b42230'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x013625a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00ef1313 objc_exception_throw + 44
    2   CoreFoundation                      0x013640bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x012d3966 ___forwarding___ + 966
    4   CoreFoundation                      0x012d3522 _CF_forwarding_prep_0 + 50
    5   CrunchCalculator                    0x0002e560 +[OpenCalcViewController openCalcView:fromViewController:] + 8256
    6   CrunchCalculator                    0x0002fe0a -[CategoryViewController openCalc:] + 106
    7   UIKit                               0x002554fd -[UIApplication sendAction:to:from:forEvent:] + 119
    8   UIKit                               0x002e5799 -[UIControl sendAction:to:forEvent:] + 67
    9   UIKit                               0x002e7c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
    10  UIKit                               0x002e67d8 -[UIControl touchesEnded:withEvent:] + 458
    11  UIKit                               0x004e84de _UIGestureRecognizerSortAndSendDelayedTouches + 3609
    12  UIKit                               0x004e8c53 _UIGestureRecognizerUpdateObserver + 927
    13  CoreFoundation                      0x0134389b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
    14  CoreFoundation                      0x012d86e7 __CFRunLoopDoObservers + 295
    15  CoreFoundation                      0x012a11d7 __CFRunLoopRun + 1575
    16  CoreFoundation                      0x012a0840 CFRunLoopRunSpecific + 208
    17  CoreFoundation                      0x012a0761 CFRunLoopRunInMode + 97
    18  GraphicsServices                    0x014b61c4 GSEventRunModal + 217
    19  GraphicsServices                    0x014b6289 GSEventRun + 115
    20  UIKit                               0x00263c93 UIApplicationMain + 1160
    21  CrunchCalculator                    0x0000276a main + 170
    22  CrunchCalculator                    0x000026b5 start + 53
)
terminate called throwing an exception(lldb) 

Usually I use this to open another view:

    UIViewController *controller;
    controller = [[CategoryViewController alloc]initWithNibName:@"CategoryViewController" bundle:nil];
    controller.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    [self presentModalViewController:controller animated:YES];
    [controller release];

But in this case I call a function from a different file (for efficiency) using this code:

#import "AllofTheFiles.h"

+ (void)openCalcView: (NSString *)nameOfView fromViewController:(UIViewController *)controller {

    NSUserDefaults *saveSpot = [NSUserDefaults standardUserDefaults];

    UIViewController *modalController;

    if ([nameOfView isEqualToString:@"Tax"]) {

        modalController= [[TAXViewController alloc]initWithNibName:@"TAXViewController" bundle:nil];

    }else if ([nameOfView isEqualToString:@"Rent"]){

        modalController= [[RENTViewController alloc]initWithNibName:@"RENTViewController" bundle:nil];

    }  //... cut other else if's to save space

modalController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[controller presentViewController:modalController animated:YES completion:nil];
[modalController release]; 

}

How can I fix this? Thanks in advance!

  • 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-06-11T08:47:35+00:00Added an answer on June 11, 2026 at 8:47 am

    presentViewController:animated:completion: is available on iOS5 and above only, hence you get that crash.

    Change the last part to:

    modalController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    //do we support the new way of presenting a modal viewController?
    if ([controller respondsToSelector:@selector(presentViewController:animated:completion:)])
    {   //yes->so do it!
        [controller presentViewController:modalController animated:YES completion:NULL];
    }
    else
    {   //nope->we seem to be running on something prior to iOS5, do it the old way!
        [controller presentModalViewController:modalController animated:YES];
    }
    [modalController release]; 
    

    This will first check if the new way of presenting a viewController is supported. For making sure that this works fine in the future, as presentModalViewController: is marked as being deprecated, we only use that option if the new way is not available.

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

Sidebar

Related Questions

i'm currently trying to make a asp.net mvc3 app. in the sample application which
I'm trying to make a drawing app and currently working on the line tool
I am currently trying to make a dropbox-esque application from a tutorial and I
I'm working on a Zappa app, and I'm currently trying to make a little
I'm trying to make and android app with some dynamically drawn views. Currently, the
I have been trying to make a layout for an Android app that functions
I am trying to make a redirection from a python app to another site.
I'm currently trying to set up an iPad web app. I have my home
I am currently trying to make a speed dial app for various numbers the
I'm currently trying to make a little Web App to be used along with

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.