I would like to know that how can we mimic the UI of iOS game center app? It ha开发者_开发百科s a very cool interface. I wonder how they are drawing text, Custom Tab Bar Controller etc.
Creating a custom UITabBarController like that of Game Center is possibly the hardest of all iOS customisation techniques, and will more than likely need a complete custom component building from scratch. Unfortunately Apple do not want you to mess with the UITabBarController much.
See this answer iOS TabBar Image assignment for how to change the tint color of the tab bar.
The rest is fairly straight forward and can be found out about on here, custom UINavigationItem for the UINavigationBar and basic UIWebView and UILabels will help you achieve everything else.
Hope this helps
I found the best approach was to create my own tab bar controller.
While it's not trivial, it is straightforward once you attempt it. For the "tab bar", I used a plain UIView. Inside the UIView I placed a UIImageView (to hold the tab bar background image--can be anything you want) and several UIButtons (for each tab button--very customizable since each is a UIButton). Doing it this way lets you do anything you want in terms of tab bar appearance.
You can use this trick to customize your nav bar background
-(void)styleNavBar:(CGImageRef)backgroundImage
{
navBar.layer.contents = (id)backgroundImage ;
}
Also, for custom nav bar buttons:
UIButton * customButton ; // your custom left or right nav bar button
// put it into a bar button item:
UIBarButtonItem * barButtonItem = [ [ UIBarButtonItem alloc ] initWithCustomView:customButton ] ;
That should be a good start!
精彩评论