I want to customize my GUI for the iPhone in monodevelop but I can't seem to find resources that wi开发者_如何学运维ll show me how to do it. How can I change the background color (load a picture/logo) and change the navigation bar color etc.? Thanks in advance! (What is the programatic way to do this?)
You can change the navigation bar color using the following code:
UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
YourViewController *viewController = [[YourViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] \
initWithRootViewController:viewController];
[viewController release];
[[navigationController navigationBar] setTintColor:[UIColor blackColor]];
[window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
You can set the background color (I guess that you want to set the background color of UIView) like this
UIView *mainView = [[UIView alloc] init];
[mainView setBackgroundColor:[UIColor whiteColor]];
Hope it helps! ;)
精彩评论