Using Core Animation instead of Insets to scale

I had a problem when I used views with subviews where scaling was breaking view's layout.
Changing insets scaling to Core Animation's Transform functions solved it.