gpt4 book ai didi

iphone - 如何在iPhone中关闭UIView,如“Skype或任何窗口”最小化?

转载 作者:行者123 更新时间:2023-12-01 16:52:32 24 4
gpt4 key购买 nike

我想关闭UIView,如浏览器,Skype和其他窗口选项卡最小化。但我想这样关闭我的UIView。表示我单击UIView时关闭了哪个按钮(如缩小),并关闭了按钮显示的位置,即:我将UIButton置于导航上。

我不想最小化我的UIView,我想像最小化一样关闭我的UIView。

专家的任何提示都将受到欢迎。

最佳答案

使用此代码

[UIView beginAnimations:nil context:NULL];[UIView setAnimationDuration:<duration>];[UIView setAnimationRepeatAutoreverses:NO];[UIView setAnimationRepeatCount:0]
[yourView setTransform:CGAffineTransformMakeScale(0.009, 0.009)]; //if you dont get ratio start with 0.5,0.5 keep reducing till you get right number
yourView.center=yourButton.center

[UIView commitAnimations]

//in order to maximize do

[UIView beginAnimations:nil context:NULL];[UIView setAnimationDuration:<duration>];[UIView setAnimationRepeatAutoreverses:NO];[UIView setAnimationRepeatCount:0]
[yourView setTransform:CGAffineTransformMakeScale(1, 1)];
yourView.center=CGPointMake(320/2.0f,480/2.0f);

[UIView commitAnimations]

这应该对你有帮助

关于iphone - 如何在iPhone中关闭UIView,如“Skype或任何窗口”最小化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14499450/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com