Image magnification techniques, clarification needed

Before i start reinventing the wheel, i thought i'd check here to see if there are known image magnification techniques people know and love?

I am thinking .. for each image, on finger tap, i'd pop up an enlarged version of the same image (part of probably). Can i get away with a single image (and actually magnify it) or should i just swap images as user moves his/her finger?

Does this sound reasonable or, is this too much of a brute force approach?

Answers


From what I understand of your question - you want to tap on a thumbnail and it transitions to the full size/ larger size.

Best way of the top of my head would be to have a UIImageview with it's content mode set to UIViewContentModeAspectFill.

add the image view with CGSize of say 50X50 -- then add a UITapGestureRecogniser on it that triggers a function that does something like this:

- (void)tapped:(id)sender{
    UIImageView *v = [(UITapGestureRecognizer *)sender view];
    CGRect f = [v frame];
    f.size = CGSizeMake(200,200);//or whatever size
    [UIView animateWithDuration:0.25f 
                     animations:^(){
                         [v setFrame:f];
                     }];
}

hope this helps

Cheers,

Michael


Need Your Help

Using Case in a select statement

sql sql-server

Consider the following table

Ion Auth/CodeIgniter Fatal Error

php codeigniter authentication ion

Receiving this fatal error when trying to access my planner.php and shared.php controllers. Any thoughts?

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.