ios - check if imageview has been rotated — Objective-c -
i have imageview being rotated pi/4 (radians) every time it's taped. works fine code:
- (void)handletap:(uitapgesturerecognizer *)taprecognize { if (taprecognize == taprecognizer) { cgaffinetransform transform = cgaffinetransformrotate(imageview.transform, (m_pi / 4)); [imageview settransform:transform]; } the taprecognizer asigned imageview.
now, want check if imageview has been rotated. code:
if (cgaffinetransformequaltotransform(imageview.transform, rot45)) //rot45 cgaffinetransformmakerotation variable set m_pi / 4 { nslog("rotated"); } that works fine first tap, when has been rotated 45°. want able check when has been taped 2 times, means has been rotated 90°. , on. want different actions on each rotation-angle. how can check that?
sorry if question unclear
devise scheme map tag property rotation. on every rotation update tag value.
Comments
Post a Comment