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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:23:28+00:00 2026-06-11T11:23:28+00:00

I am working in iPhone application, Using XCode 4.3.2 tool develop my application (not

  • 0

I am working in iPhone application, Using XCode 4.3.2 tool develop my application (not using story board). When I press a button from homescreen.m to navigate to Login screen, then I run the app, cannot navigate from home to login screen, how to fix this issue?
I tried this:

Class Name – Appdelegate.m

     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];

    home = [[HomeScreen alloc]init];
    UINavigationController *navi =[[UINavigationController alloc]initWithRootViewController:home];
    [self.window addSubview:navi.view];
    return YES;
}

Class Name – HomeScreen.m

#import "HomeScreen.h"
#import "LoginScreen.h"

@interface HomeScreen ()

@end

@implementation HomeScreen

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title=@"HomeScreen";

    UIButton *Button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    Button1.frame = CGRectMake(10, 100, 100, 50);
    [Button1 setTitle:@"Homescreen" forState:UIControlStateNormal];
    [Button1 addTarget:self action:@selector(GotONext) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:Button1]; 
    // Do any additional setup after loading the view.
}


-(void)GotONext
{
    LoginScreen *log =[[LoginScreen alloc]init];
    [self.navigationController pushViewController:log animated:YES];
}

Class Name – LoginScreen.m

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title=@"LoginScreen";


}

enter image description here

  • 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-11T11:23:29+00:00Added an answer on June 11, 2026 at 11:23 am

    try bellow code…

        - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    home = [[[HomeScreen alloc] initWithNibName:@"HomeScreen" bundle:nil] autorelease];
            UINavigationController *navviewController1=[[UINavigationController alloc]initWithRootViewController: HomeScreen];
    self.window.rootViewController = navviewController1;
        return YES;
    }
    

    and on next button method use bellow code…

    -(void)GotONext
    {
        LoginScreen *log =[[LoginScreen alloc]initWithNibName:@"LoginScreen" bundle:nil] autorelease];
        [self.navigationController pushViewController:log animated:YES];
    }
    

    i hope this help you…

    🙂

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

Sidebar

Related Questions

I am working in iPhone application, Using Xcode 4.3.2 tool to develop it, Using
I am working on an Iphone application using storyboard. I have a button in
I have been working with iPhone application in which i am using sqlite database.
I'm working on an iPhone application. I'm using Storyboard. I wanted to have one
I am working on iphone networking application.. I am using asihttp , a wrapper
i'm working on an iPhone application which retrieve sqlite database from server through json/rest
I have converted an iPhone application using the wizard like thing in XCode into
I'm currently working on an iphone application. I started working on this from a
I am using Xcode 4.2 to develop a storyboard application. I am trying to
Currently i am working in Android application, In iphone application Using presentModalViewController to animate

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.