Customize UINavigationBar and remove drop shadow at the bottom of UINavigationBar
2013-08-29 13:59
447 查看
UIImage
*navigationBarImg = [UIImage
imageNamed:@"navigationBar"];
//You must specified the BarMetrics for UINavigationBar, Otherwise it reports an exception.
[[UINavigationBar
appearance]
setBackgroundImage:navigationBarImg
forBarMetrics:UIBarMetricsDefault];
//This is the key to eliminate drop shadow of UINavigationBar
[[UINavigationBar
appearance]
setShadowImage:[[UIImage
alloc]init]];
*navigationBarImg = [UIImage
imageNamed:@"navigationBar"];
//You must specified the BarMetrics for UINavigationBar, Otherwise it reports an exception.
[[UINavigationBar
appearance]
setBackgroundImage:navigationBarImg
forBarMetrics:UIBarMetricsDefault];
//This is the key to eliminate drop shadow of UINavigationBar
[[UINavigationBar
appearance]
setShadowImage:[[UIImage
alloc]init]];
相关文章推荐
- Allow user to scroll and maintain position with "Scroll To Bottom of the Div" example
- Debug error:"One or more breakpoints cannot be set and have been disabled.Execution will stop at the beginning of the program."
- Title and close button are shown on the bottom of the window, SmartGWT
- One or more breakpoints cannot be set and have been disabled!Execution will stop at the beginning of the program
- Tear Drop Of The Week : Hope At Heartbreak Motel
- One or more breakpoints cannot be set and have been disabled.Execution will stop at the beginning of the program
- Odd elements at odd and even elements at even positionThis is question asked in one of the interview
- Remove border from right and bottom of WPF full-screen window
- 【JOURNAL】deep sadness and sorrow at the unexpected passing of Michael Jackson
- Linux - How to remove the new line at the end of file when using vim
- Put a Submit Button At the Bottom of a Survey
- const at the end of function and passing const object in a function call
- E文积累_20080403_at the drop of a hat
- One or more breakpoints cannot be set and have been disable.Execution will stop at the begining of the programe
- An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means
- How to Customize the Left Navigation Bar of SPPS Home Page
- How to Customize the Left Navigation Bar of SPPS Home Page [Another Solution]
- ASP.NET AJAX DropShadow 控件的一个BUG和解决方法(a bug of DropShadow and solution to resolve)
- DropBand:A Simple and Effective Method for Promoting the VHR Scene Classification Accuracy of CNN
- Rule 6: Put Scripts at the Bottom(Chapter 6 of High performance Web Sites)