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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:25:34+00:00 2026-06-01T14:25:34+00:00

I read this post but I can’t get it working: Change Background Color… I

  • 0

I read this post but I can’t get it working: Change Background Color…

I like to create a base UIView class for all my view customization like background pattern, color of the buttons, color of the tab bar etc.

This is what I’ve tried:

  • Created a new Single View Application
  • Customized the view in UIViewController method -viewDidLoad
  • Created a new subclass of that UIViewController
  • In IB I created a new UIViewController object
  • In IB (Identity Insp.) I set the UIViewController class to the subclass I created earlier

Is this not the proper way to do this?
I was thinking that the new created UIViewController class will inherit all
customizations from my first UIViewController class since I subclassed that one.

Second question is how can I use a base class for certain objects instead of a whole view?
For example how do I let all UIButtons in my App inherit all the behavior I have defined in just one single class?

Hope you can help.

Happy Easter for all.

  • 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-01T14:25:36+00:00Added an answer on June 1, 2026 at 2:25 pm

    I believe you want to customize your view, but exactly how and when is not clear to me.. so I will just give the common method which will give you the general idea of how to do it..

    First create a subclass of UIView say BaseView with properties to be customized, now in the viewDidLoad methods of your viewController create an object of BaseView and customize this object as you like.. once this is done just set the self.view property of your viewController to this newly created BaseView object and then release the BaseView object..
    hoping this helps you somewhat…

    EDIT:
    based on the comments ..
    First create a BaseViewController class which subclasses UIViewController… in the viewDidLoad of this class customize your view using self.view

    Second now the viewControllers which you want to use in your tabController should subclass this BaseViewController… just don’t forget the [super viewDidLoad]; is called in the viewDidLoad of this viewcontroller.

    this is the best I have to offer.. 🙂 let me know if it works for you.

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

Sidebar

Related Questions

I read that great post on Visual Studio 2008 annoyances, but didn't see this
I've read this relevant post, but there weren't many concrete answers (poor language design
Lately I read this post: How do I use boost.lambda with boost.thread to get
Excuse the title of this post, but I can't really think of a more
I was reading about buffer, stack and heap overflows. I read this post as
On this post , I read about the usage of XMPP. Is this sort
I read this comment in the OpenID post on the stackoverflow blog. Kibbee says
I read at a few places (in the doc and in this blog post
Scenario Having already read a post on this on the same site, which didn't
This question is related to the previous post. How to save file and read

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.