Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在、ビューに 2 つの UIButton があります。交換方法を教えていただきたいです。スワイプジェスチャの使用方法はすでに理解しています。位置をアニメーションで入れ替えるのに助けが必要です。ありがとう
自動レイアウトを使用していないと仮定すると、スワップをアニメーション化できます
[UIView animateWithDuration:0.25 animations:^{ CGRect savedFrame = self.button1.frame; self.button1.frame = self.button2.frame; self.button2.frame = savedFrame; }];