Wednesday, 14 March 2012

Setting BackGround image and clearing the view

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    // Add the navigation controller's view to the window and display.
   
    UIView *backgroundView = [[UIView alloc] initWithFrame: _window.frame];
    backgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Bg.png"]];
    [_window addSubview:backgroundView];
   
    self.window.rootViewController = self.navigationController;
    [self.window makeKeyAndVisible];
    return YES;
}

//wherever needed..


- (void)viewDidLoad
{
    [super viewDidLoad];
 
    self.view.backgroundColor=[UIColor clearColor];

}

No comments:

Post a Comment