开发者

How do I change the color scheme of my iPhone GUI?

开发者 https://www.devze.com 2023-03-07 20:34 出处:网络
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)

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! ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消