Setting a zero scale transform on a view sets the frame size to zero

Originator:futuretap
Number:rdar://18392574 Date Originated:19-Sep-2014 12:37 PM
Status:Duplicate/18082719/Open Resolved:
Product:iOS Product Version:8.0
Classification:Other Bug Reproducible:Always
 
Summary:
When I want to scale down a view in an animation I used to do

[UIView animateWithDuration:duration animations:^{
    view.transform = CGAffineTransformMakeScale(0, 0);
}];

This doesn't work anymore in iOS 8 and the change is not animated but immediate. The reason apparently is that setting a zero scale transform sets the frame size of the view to zero immediately.

Steps to Reproduce:
Run the code above on iOS 8.

Expected Results:
The view should scale down animated.

Actual Results:
The view immediately disappears.

Version:
6.0 (6A313)

Notes:
Regression from iOS 7. It also worked on iOS 8 when the app was built against the iOS 7 SDK.

My workaround: Do a transform of CGAffineTransformMakeScale(0.0001, 0.0001) which is correctly animated.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!