0
我在我的viewcontroller
中有一個UIView。它有框架(34,250,253,193),它是水平中心。我想放大和縮小這個UIView。隨着放大,它與中心工作正常。但是,縮小後,它的工作不正確。目前,視圖從右向左縮小。我不想要這個。我希望它縮小與中心。縮小中心UIView動畫
這是我的代碼
-(void)zoomin:(UIView*)view {
view.transform = CGAffineTransformMakeScale(0.1,0.1);
[UIView animateWithDuration:2.0 animations: ^{
view.transform = CGAffineTransformMakeScale(1,1);
}];
}
-(void)zoomout:(UIView*)view {
view.transform = CGAffineTransformMakeScale(1,1);
[UIView animateWithDuration:2.0 animations: ^{
view.transform = CGAffineTransformMakeScale(0.1,0.1);
}];
}
誰能幫幫我?請 – Duyklinsi