2

I have the weirdest problem specific to a iPhone 6 device. It's related to doing transform on a UIView.

If I do something like this on my UIView:

view.transform = CGAffineTransformMakeRotation(3.14/10)

Then the view disappears entirely. On my iPhone 5, then the view rotates as it should, but on the iPhone 6 it disappears entirely.

Any animation using transform also works perfectly on my iPhone 5 but on my iPhone 6 it doesn't show and sometimes shows "sharded" views of what I'm trying to animate.

This is iPhone 6 specific and only occurs on the device and NOT in the simulator.

Any suggestions on what this could be about?

Holger Sindbaek
  • 2,278
  • 6
  • 41
  • 68

2 Answers2

2

It seems likely that something is using the frame of the view, which is undefined when you have a non-identify transform. For example, there might be a layoutSubviews method or constraint which is interacting badly with your view (It's better in iOS 8, but perhaps you ran into a yet-unsolved case). It's hard to tell what exactly is going on since you didn't supply a completely example.

You might try a tool like Xcode's view inspector or Reveal which can show you where your view is ending up and what constraints are acting on it. If that's not instructive, you should make a minimal example and post it.

It could also be differences in iOS version. Do your devices and simulators share the same point release?

Community
  • 1
  • 1
Jesse Rusak
  • 56,530
  • 12
  • 101
  • 102
0

It ended up being RubyMotion specific, so sorry for posting it with iOS tags - http://community.rubymotion.com/t/transform-making-uiview-disappear-on-iphone-6-device/344/4.

Holger Sindbaek
  • 2,278
  • 6
  • 41
  • 68