1
我想將UIView從一個父視圖移動到另一個,並調整它的大小,現在我得到了這個,但動畫,我怎麼能沒有動畫呢? videoMover是基於其新父母移動和調整大小的視圖。無動畫調整UIView的大小
這是我的代碼,正在做調整大小,視圖的父母之前更改。
CGRect fsRect = CGRectMake(0,0,videoMover.superview.bounds.size.width, videoMover.superview.bounds.size.height);
CGSize presentationSize = CGSizeMake(1280,720);
CGSize viewSize = fsRect.size;
CGFloat scale = fmin(viewSize.width/presentationSize.width, viewSize.height/presentationSize.height);
CGRect videoRect = AVMakeRectWithAspectRatioInsideRect(presentationSize,fsRect);
videoMover.autoresizesSubviews = NO;
videoMover.frame = fsRect;
videoMaster.frame = fsRect;
((CALayer*)[videoMaster.layer.sublayers objectAtIndex:0]).frame = fsRect;