有没有可能当用户点击按钮时,它会显示或隐藏内容。如果是,是否可以进行动画转换?
发布于 2011-01-30 21:15:42
是。
您可以创建一个自定义按钮,在其中添加一个UILable或UIimage,并隐藏,显示和动画它,如你所愿。
如果需要更多细节,请告诉我。
发布于 2011-01-30 21:18:15
是的,这是可能的。您将希望在接口构建器中使用UIButton的tap up inside操作。
至于动画效果,只需将代码包装为
[UIView beginAnimations:nil context:nil]
//code to animate the view
[UIView commitAnimations]从iOS 4开始,您也可以使用块来设置动画。有关更多参考信息,请参阅以下内容:
http://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/AnimatingViews/AnimatingViews.html#//apple_ref/doc/uid/TP40009503-CH6-SW3
https://stackoverflow.com/questions/4843005
复制相似问题