Change background color of a view in Xcode 4.0?

Discussion in 'C Programming' started by Ben, Mar 28, 2011.

  1. Ben

    Ben

    Joined:
    Mar 28, 2011
    Messages:
    4
    Hi, Im trying to change the background color to black and the font to white in my second view on my app in Xcode 4.0, But i cant figure out how to here are the 2 codes associated with the second view:

    1.
    #import "SecondViewController.h"


    @implementation SecondViewController

    /*
    // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
    - (void)viewDidLoad
    {
    [super viewDidLoad];
    }
    */

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
    }


    - (void)didReceiveMemoryWarning
    {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc. that aren't in use.
    }


    - (void)viewDidUnload
    {
    [super viewDidUnload];

    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
    }


    - (void)dealloc
    {
    [super dealloc];

    }

    @end


    2.
    #import <UIKit/UIKit.h>


    @interface SecondViewController : UIViewController {

    }

    @end
    Ben, Mar 28, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ather Ali Shaikh

    How do i change background color to transparent

    Ather Ali Shaikh, Dec 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,302
    Chris Jackson
    Dec 4, 2003
  2. Parthiv Joshi
    Replies:
    1
    Views:
    630
    Samuel L Matzen
    Jul 6, 2004
  3. fig000
    Replies:
    0
    Views:
    4,527
    fig000
    Sep 6, 2004
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    364
    Kamaljeet Saini
    Feb 13, 2009
  5. laredotornado@zipmail.com
    Replies:
    1
    Views:
    255
    marss
    Feb 14, 2007
Loading...

Share This Page