如何使导航栏像iPhone中的照片应用程序一样透明和淡出
问题描述:
我是iPhone编程的新手......任何人都可以帮我解决..
i am new to iPhone Programming ...can anybody help me out please..
我想在iPhone中开发像照片应用程序这样的应用程序..
i want to develop an app like photo app in iPhone..
如何使iPhone中的照片应用程序中的naveigation栏和工具栏透明和淡出
How to make the naveigation bar and toolbar transparent and fadeout like in photo app in iPhone
谢谢你..
答
UINavigationBar
继承自 UIView
,所以你可以使用 UIView
的动画方法通过设置 alpha
属性来淡出它这应该有效:
UINavigationBar
inherits from UIView
, so you can use UIView
's animation methods to fade it out by setting the alpha
property to 0. This should work:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[navigationBar setAlpha:0.0];
[UIView commitAnimations];