2

ブラウザ、スカイプ、その他のウィンドウタブの最小化のようにUIViewを閉じたい。しかし、私はこのようにUIViewを閉じたいと思います。最小化などのUIViewを閉じるボタンをクリックし、ボタンが表示されている場所を閉じることを意味します。つまり、UIButtonをナビゲーションに配置します。

UIViewを最小化したくないので、最小化のようにUIViewを閉じます。

専門家からのヒントは大歓迎です。

4

1 に答える 1

0

このコードを使用

[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]

これはあなたを助けるはずです

于 2013-01-24T10:50:07.030 に答える