0
我有代碼來旋轉和調整滾動視圖,這樣,當iPhone橫向的方向是正確的。UIScrollView不能正確調整大小
這就是視圖看起來像旋轉前:
滾動視圖是黃色的。
這是什麼樣子後:
這是日誌語句設置爲滾動視圖的新框架後,我說,你可以看到,它顯然不是它說,它應該是!
CGRect for object after setting to new: UIScrollView, {{0, 100}, {480, 150}}
[UIView animateWithDuration:kAnimationDuration animations:^{
CGRect boundsRect = anObject.frame;
boundsRect.origin.x = x;
boundsRect.origin.y = y;
boundsRect.size.width = width;
boundsRect.size.height = height;
anObject.frame = boundsRect;
NSLog(@"CGRect for object after setting to new: %@, %@",[anObject class], NSStringFromCGRect(anObject.frame));
} completion:^ (BOOL finished){
if (finished) {
[UIView animateWithDuration:kAnimationDuration animations:^{
anObject.alpha = 1.0;
}];
}
}];
我在想什麼?
感謝