Giter VIP home page Giter VIP logo

mtzoomwindow's Introduction

Read Me

This class provides a simple way to zoom a specific UIView and display it fullscreen, upon a defined action of the user (uses UIGestureRecognizer to detect actions). If the user performs the action on the specified UIView the view gets zoomed in animated and is displayed fullscreen, with a black background. If the user performs the same gesture again, the UIView gets zoomed back out and everything is like it was before.

This is a simple way that feels lighter to the user then pushing an own UIViewController just for displaying something in fullscreen.

Usage

You can use MTZoomWindow like this:

// specify size of the UIView when it is zoomed in
viewToZoom.zoomedSize = CGSizeMake(300,460);
viewToZoom.zoomedAutoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
viewToZoom.wrapInScrollviewWhenZoomed = YES;

// find this awesome shortcut for UITapGestureRecognizer in @zwaldowski's BlocksKit
[viewToZoom whenTapped:^{
    [viewToZoom zoomIn];
}];

Adding MTZoomWindow to your project

  1. Just copy over the files MTZoomWindow.h, MTZoomWindow.m, UIView+MTZoom.h, UIView+MTZoom.m and MTZoomWindowDelegate.h to your project.
  2. import "MTZoomWindow.h" everywhere where you want to use it
  3. There is no step 3 :)

Known Issues

When your App supports landscape orientation you have to create MTZoomWindow in your AppDelegate:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // ...
    // create ZoomWindow to listen for orientation changes
    [MTZoomWindow sharedWindow];

    return YES;
}

Screenshots

MTZoomWindow used on a MKMapView

MTZoomWindow

mtzoomwindow's People

Contributors

alloy avatar messi avatar myell0w avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mtzoomwindow's Issues

Zoom window doesn't handle rotation properly

I have an app that can rotate to any orientation on the iPad. Sometimes when I zoom in on a view, the zoomed view comes up sideways. It seems to depend on how the iPad was orientated when I started up the app.

Also, when the iPad is rotated while the zoomed in view is visible, the zoomed image shrinks to a tiny square in the corner of the black screen - its the same as the zoomed out size.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.