1
我有UIButton视图,当我录制这个按钮时我想创建新视图并在iPad屏幕上显示它,我如何查看这个视图,就像从按钮增长到全屏一样?从动画点调整UIView的大小
我有UIButton视图,当我录制这个按钮时我想创建新视图并在iPad屏幕上显示它,我如何查看这个视图,就像从按钮增长到全屏一样?从动画点调整UIView的大小
下一次居然表现出一定的努力,与您寻求帮助
- (void)buttonTapped:(UIButton *)button;
{
UIView *expandingView = [[UIView alloc] initWithFrame:button.frame];
expandingView.backgroundColor = [UIColor redColor];
[self.view addSubview:expandingView];
[UIView animateWithDuration:.25f
animations:^{
expandingView.frame = self.view.bounds;
}];
}
点击按钮事件时试了一下等等。
创建视图,帧大小为0和渊源考作为 按钮的中心
。2.加使用动画块变化 到MAINVIEW
3.Then帧到原单
What are block-based animation methods in iPhone OS 4.0?
使用此qn来查找如何添加动画