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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:58:48+00:00 2026-05-26T15:58:48+00:00

I have been working on ipad application. In this application I have several views.

  • 0

I have been working on ipad application. In this application I have several views. here is the flow

Welcome Screen > Home Screen > rest of the sreens

I have applied a home icon (button) on navigation bar of all screens. Pressing home icon on any screen takes the user to home screen. I wrote the following code in the viewDidLoad of Home class

//**** Home button on navigation bar ****//
CGRect frame1 = CGRectMake(975.0, 4.0, 35, 35);
UIImage *buttonImage1 = [UIImage imageNamed:@"HomeIcon.png"];
UIButton *homeButton = [UIButton buttonWithType:UIButtonTypeCustom];

homeButton.frame = frame1;
[homeButton setBackgroundImage:buttonImage1 forState:UIControlStateNormal];
homeButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
homeButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
[homeButton addTarget:self action:@selector(goHome:) forControlEvents:UIControlEventTouchUpInside];
[homeButton setBackgroundColor:[UIColor clearColor]];

[self.navigationController.navigationBar addSubview:homeButton];

This button is functional. goHome is the name of the method applied in the @selector.
I want to remove this button from home screen and keep it on rest of the screens. I have applied several things but i have no idea how to do it. This seems very simple but still I am not getting it. Please guide..

Regards
PC

  • 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-26T15:58:48+00:00Added an answer on May 26, 2026 at 3:58 pm

    In your “Home Screen” viewDidAppear method do this:

    for(UIView* view in self.navigationController.navigationBar.subviews)
    {
         if(view.tag == 10)
         {
            view.hidden = YES;
         }
    }
    

    In your other View controller where you created the button set tag for home button to 10.

    /**** Home button on navigation bar ****//
    CGRect frame1 = CGRectMake(975.0, 4.0, 35, 35);
    UIImage *buttonImage1 = [UIImage imageNamed:@"HomeIcon.png"];
    UIButton *homeButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [homebutton setTag:10]; // Set tag to 10 or any value
    homeButton.frame = frame1;
    [homeButton setBackgroundImage:buttonImage1 forState:UIControlStateNormal];
    homeButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    homeButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    [homeButton addTarget:self action:@selector(goHome:) forControlEvents:UIControlEventTouchUpInside];
    [homeButton setBackgroundColor:[UIColor clearColor]];
    
    [self.navigationController.navigationBar addSubview:homeButton];
    

    And in you viewDidAppear: of this other view Controller:

    for(UIView* view in self.navigationController.navigationBar.subviews)
    {
        if(view.tag == 10)
        {
          view.hidden = NO;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working on importing XML into an iPad Core Data application. I have
I've been working with CFNetwork to create a client application for iPad, it is
I have been working on an iPad app. My app contains some PDF and
I have been working with Core Data in an iPad app and I can
An iPad project I have been working on has become bloated with a huge
I have a UITableView in an iPad application that I am working on. When
This is so weird. I have been working on a series of iterations of
I've been working on a application for iPad that use sockets to communicate with
I've been working on an iPad application that has about 15 view controllers. Some
I have been working on a web services related project for about the last

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.