如何使导航栏像iPhone中的照片应用程序一样透明和淡出 [英] How to make a Navigation bar transparent and fade out like in the photo app in the iPhone

查看:79
本文介绍了如何使导航栏像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];

这篇关于如何使导航栏像iPhone中的照片应用程序一样透明和淡出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆