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

  • Home
  • SEARCH
  • 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 8132955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:28:17+00:00 2026-06-06T09:28:17+00:00

I am already trying it through the delegate method clickedButtonAtIndex: but I need to

  • 0

I am already trying it through the delegate method clickedButtonAtIndex: but I need to push a view through navigation controller as soon as the user presses “ok”…

I can’t allocate the view inside the method, Xcode doesn’t recognize the view controller’s name in the code. Any idea what I’m coin wrong?

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { 
    switch(buttonIndex) {
        case 0:


             ReminderCompleted *view = [[ReminderCompleted alloc]initWithNibName:@"ReminderCompleted" bundle:nil];

             [view.navigationController pushViewController:view animated:NO];



            break;
        case 1:
            //cancel
            break;
        default:
            break;
    }

I get some errors

  • 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-06T09:28:19+00:00Added an answer on June 6, 2026 at 9:28 am

    You cannot push a view, you can only push view controllers. You should be able to structure the code in a similar fashion, but instantiate a view controller (which can also use a nib) instead, and pass that to the navigation controller’s push method.

    Edit: Your variable name confused me, and you are indeed using a view controller. My suspect now is declaring a new variable inside of a switch, which Objective-C does not like. Try the same code, but declare the variable before the switch (you can leave it uninitialized until the right case happens).

    ReminderCompleted *reminderVC;
    switch(buttonIndex) {
      case 0:
        reminderVC = [[ReminderCompleted alloc]initWithNibName:@"ReminderCompleted" bundle:nil];
        [view.navigationController pushViewController:view animated:NO];
        break;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I trying authenticate user in Spring Security application via oAuth. I'm already received token
I'm trying to do some simple stuff, I've already looked at the examples through
I have a problem with php header redirect. I already spent hours trying to
I'm trying to find out if anyone knows about an already existing jQuery plugin
I am trying to integrate zxing in my already existing iPhone app. I have
I'm trying to modify the text of a Label component that I already placed
I am trying to modify an app for a client which has already a
I am trying to write a program in PHP which I had already written
I am trying to make a forum. I already have the login and registration
i'm trying to use the VertexArray with Android NDK for a project that already

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.