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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:39:26+00:00 2026-05-27T04:39:26+00:00

My AppDelegate.h // // AppDelegate.h // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> {

  • 0

My AppDelegate.h

//
//  AppDelegate.h
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
    UIWindow *window;
    UITabBarController *tabBarController;
}

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UITabBarController *tabBarController;

@end

My AppDelegate.m

//
//  AppDelegate.m
//
#import "AppDelegate.h"

#import "AppNavigationController.h"

#import "ExamViewController.h"
#import "SignsViewController.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize tabBarController = _tabBarController;

- (void)dealloc
{
    [_tabBarController release];
    [_window release];
    [super dealloc];
}

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

    // Initializating our Tab Bar Controller
    tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil];

    // Exam Controller Setup
    ExamViewController *examViewController = [[ExamViewController alloc] initWithStyle:UITableViewStylePlain];
    AppNavigationController *examNavigationController = [[AppNavigationController alloc] initWithRootViewController:examViewController];

    examViewController.title = @"Экзамен";
    examViewController.tabBarItem.image = [UIImage imageNamed:@"icon_exam.png"];
    // -------------------------------------

    // Signs Controller Setup
    SignsViewController *signsViewController = [[SignsViewController alloc] initWithStyle:UITableViewStylePlain];
    AppNavigationController *signsNavigationController = [[AppNavigationController alloc] initWithRootViewController:signsViewController];

    signsViewController.title = @"Знаки";
    signsViewController.tabBarItem.image = [UIImage imageNamed:@"icon_signs.png"];

    // -------------------------------------

    [tabBarController  setViewControllers:[NSArray arrayWithObjects:examNavigationController, signsNavigationController, nil]];

    [self.window addSubview:tabBarController.view];
    [self.window makeKeyAndVisible];

    [examNavigationController release];
    [examViewController release];

    [signsNavigationController release];
    [signsViewController release];

    return YES;
}

Also I have empty UINavigationController.

The thing I want to implement is customized navigation bar for all viewcontrollers which use it
For example: Now I have only two viewcontrollers and now I put self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; in viewDidLoad method in ExamViewController.m and SignsViewController.m
But probably I’d like to add two or more tabs and want to customize navigation bar in one place.
So the question is: How to customize navigation bar in one place to look the same in every viewcontroller without customizing it in each viewcontroller in viewDidLoad method?

  • 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-27T04:39:26+00:00Added an answer on May 27, 2026 at 4:39 am

    Try this:.

    1. Create anew view controller, let’s say ViewControllerTemplate.h
    2. set the design to the ViewControllerTemplate navigation controller in the .m file
    3. Then each time you want to crate a view controller just set the ViewControllerTemplate.h as its super class, and it will inherit the design.

      ViewControllerTemplate *newController = [[ViewControllerTemplate alloc]init];
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My AppDelegate.h : #import <UIKit/UIKit.h> #import Child.h @interface AppDelegate : UIResponder <UIApplicationDelegate> { NSManagedObjectModel
In my AppDelegate, I have #import <UIKit/UIKit.h> #import CustomerProfile.h @interface AppDelegate : UIResponder <UIApplicationDelegate>
I have the following code in my AppDelegate : #import <UIKit/UIKit.h> @class PersonalDiarySystemViewController; @interface
EDIT 1: changed the code to: delegate.h: #import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate :
I accidentally deleted my appDelegate window outlet and don't manage to resore it again.
//inside New_Entry.h IBOutlet UIDatePicker *timePicker; @property (nonatomic, retain) UIDatePicker *timePicker; //inside New_Entry.m @synthesize timePicker;
I have setup coredata in my appDelegate, but it first loads the mainWindow.xib and
I have a Tableview on AppDelegate That calls a SecondView (dvController) when DidSelectRowAtIndexPath using:
I the allocated arrays in the didFinishLaunching of my appdelegate.And I released those arrays
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MaSystemGuiAppDelegate *appDelegate = (MaSystemGuiAppDelegate *)[[UIApplication sharedApplication] delegate]; appDelegate.deneme

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.