reset transformation of UIImageView - objc

I have two imageviews which are transformed like this:

- (void)handleTap:(UITapGestureRecognizer *)tapRecognize
    if (tapRecognize == tapRecognizer)
        CGAffineTransform transform = CGAffineTransformRotate(lineImage.transform, (M_PI /  4));
        [image1 setTransform:transform];
    if (tapRecognize == tapRecognizer2)
        CGAffineTransform transform = CGAffineTransformRotate(lineImage2.transform, (M_PI / 4));
        [image2 setTransform:transform];

I also have added the tapRecognizer to the imageviews. My question is how I can like reset the transform, in this case the rotation when a button is pressed. To set it to its original mode. How can I do this?


set the transform property to the identity matrix

Set the transform to CGAffineTransformIdentity.

Bonus advice: You don't need to compare tapRecognize with a gesture recognizer; just look at tapRecognize.view to learn what view was tapped.

Need Your Help

Play a youtube url in android

android video youtube videoview

I have a fragment and a videoview is present inside that fragment.I have a you tube url for video.

Maven EJB dependence

java maven ejb

i got 2 Applications (EAR-s), each of them have own EJB-module.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.