I have a UIControl in which I used the MonoTouch.CoreGraphics classes to draw some elements and placed the UIControl in a UIView through AddSubview. I'm trying to take a look and flip it all over to mimic something like the movement of a minute or second hand on a watch or dial. I get the impression that I can do this with Transform on a UIView.
The name of my UIView is a container. I tried:
container.Transform.Rotate(-0.78f);
I also tried:
CGAffineTransform t = CGAffineTransform.MakeIdentity(); t.Rotate(-0.78f); container.Transform = t;
I also tried:
CGAffineTransform t = CGAffineTransform.MakeRotation(-0.78f); container.Transform = t;
I also tried this and its other combinations:
UIView.BeginAnimations("rotate"); UIView.SetAnimationDuration(0.5); container.Transform.Rotate((float)Math.PI); UIView.CommitAnimations();
None of the above have affected my display. It does not rotate or move in the slightest degree. All iOS related posts relate to CGAffineTransformRotate, but I cannot find an exact Mono match for this, and I assume this is equivalent to what I do above. Is there any other way that I should try to turn my mind around?
source share