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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:45:05+00:00 2026-05-23T13:45:05+00:00

I have 3 classes. First controllor is the first controllor in tabbar. I am

  • 0

I have 3 classes.

First controllor is the first controllor in tabbar. I am using presentModalViewController to present a login screen and a Home screen. I have a presentModalViewController in firstcontrollor which present the login screen and in Loginscreen viewdidload method I have presentModalViewController which present home screen. The home screen presentModalViewController is dismissed in homePage_Btn_Clicked and presentModalViewController is dismissed in login_Btn_Clicked. The problem I have is my home screen is never presented. Any help? I am new in iPhone development.

//First Controllor

FirstControllor.m

- (void)viewDidLoad
{
    [super viewDidLoad];

    Accounts_Login *lvc = [[Accounts_Login alloc]initWithNibName:@"Accounts_Login" bundle:[NSBundle mainBundle]];
    [self presentModalViewController:lvc animated:NO];    
    [lvc release];

}

//Login_view class

Login_view.m

- (void)viewDidLoad {

    [super viewDidLoad];

    Home_Screen *lvc1 = [[Home_Screen alloc]initWithNibName:@"Home_Screen" bundle:[NSBundle mainBundle]];
    [self presentModalViewController:lvc1 animated:NO];    
    [lvc1 release];

    user_ID_TextField.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"User ID"];

}

-(IBAction) login_Btn_Clicked{

    if ([services authenticate:credential_Data]) {

        [self dismissModalViewControllerAnimated:YES];

    [credential_Data autorelease];
}

//HomePage class

HomePage.m

    -(IBAction) homePage_Btn_Clicked:(id) sender{

    UIButton *theButton = (UIButton *)sender;

    int count;

    switch (theButton.tag) {

        case 101:
            count++;
            [self dismissModalViewControllerAnimated:YES];
            break;
        default:
            break;
    }

}
  • 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-23T13:45:05+00:00Added an answer on May 23, 2026 at 1:45 pm

    Try this:

    Home_Screen *lvc1 = [[Home_Screen alloc]initWithNibName:@"Home_Screen" bundle:[NSBundle mainBundle]];
    [self.parentViewController presentModalViewController:lvc1 animated:NO];    
    [lvc1 release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem with testing classes, which using UpdateModel() method. I get System.NullReferenceException. I
my code is like this: i have two classes first class: public class Box<E>
I have a .py file with lots of classes: class First(Second): #code class Third(Fourth):
First I want to describe my situation briefly. I have two classes, one MainClass
I have this application with 2 classes, in the first class I define a
I have classes which have automatic properties only like public customerName {get; set;}. They
First some brief background: I have an existing ASP.NET MVC 1 application using Entity
Hy. I have 2 controllers, the first one application/classes/controller/welcome.php and the second one application/classes/controller/admin/welcome.php
I have classes that are named exactly the same across different plug-ins that I
I have classes that are needed in both my web service and my server.

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.