我想通过点击按钮来显示UITableView
或UIView
的高度,以便在您希望查看更多更新时在App Store中显示更多详细信息该应用程序。这是教程吗?
答案 0 :(得分:0)
UIButton
2.在.h文件中创建NSInteger i
并在viewDidLoad
中设置i=0
。
3.当用户单击UIView
上的隐藏按钮时:
-(IBAction) clickMyView (id) sender {
if (i==0){
i=1;
[self changeView];
}
else{
i=0;
[self changeView];
}
4.设置chageView
:
-(void) changeView{
if (i==0){
[UIView beginAnimations : nil context:nil];
[UIView setAnimationDuration:0.3];
[UIView setAnimationBeginsFromCurrentState:TRUE];
// Change the view back to it's normal size here
[UIView commitAnimations];
}
else{
[UIView beginAnimations : nil context:nil];
[UIView setAnimationDuration:0.3];
[UIView setAnimationBeginsFromCurrentState:TRUE];
// Change the view to the new size here
[UIView commitAnimations];
}