ビュー(UIImageView)を回転させてサイズを変更して、スーパービューから外れないようにします。だから私は次のように書いた。
//rotating and resizing process
//testing subview is in superview
CGRect rect = subview.bounds;
CGRect converted_rect = [subview convertRect:rect toView:subview.superview];
if(!CGRectContainsRect(subview.superview.frame, converted_rect))
{
//restore proccess
}
しかし、私のコードでは、スーパービュー エリアから出るのを防ぐことはできません。