GithubHelp home page GithubHelp 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

myell0w avatar alloy avatar messi avatar

Stargazers

 avatar mxmind avatar azure avatar Cameron Ehrlich avatar Angus H. avatar 挡不住的君文 avatar Soheil avatar  avatar Erhan Bayraktar avatar Julian Weiss avatar liwt avatar ArronPJ avatar  avatar Krishnaprasad Jagadish avatar Vicente avatar Joel Bernstein avatar Mo Safder avatar Will Jessop avatar  avatar  avatar  avatar Jesse Squires avatar  avatar Pin Shih Wang avatar Vinh Nguyen avatar Ignacio Romero Zurbuchen avatar Jesse Cox avatar  avatar Pawel Dudek avatar Ali Sufyan avatar mayulu avatar gaurav taywade avatar Johannes Plunien avatar Yasuhiro Inami avatar Kitsion avatar Ilia Postolaki avatar  avatar cc avatar  avatar Bob Edmonston avatar Indrajit Chakrabarty avatar Yatin Chauhan avatar Suren avatar Alberto Jerez avatar Old Frank avatar  avatar gaocong avatar Luis Hernandez avatar Phillipe Casorla Sagot avatar  avatar Cemal YILMAZ avatar  avatar Reejo Samuel avatar robin avatar Nick Randall avatar  avatar  avatar Haoran Chen avatar  avatar Brett Spurrier avatar Kaijie Yu avatar James Tang avatar David Chang avatar Jim Lester avatar  avatar zhulin avatar jprothwell avatar Oliver Letterer avatar Corey Tian avatar TH avatar Andreas Schubert avatar Opencode avatar André Mathlener avatar Collin Brewer avatar Steve Wood avatar  avatar Romain Briche avatar Sungcheol Kim avatar Luosky avatar Kyle Howells avatar diwup avatar Jonah Grant avatar  avatar  avatar Simon Pang avatar Lex Tang avatar Muhammad Adil avatar Kai avatar Christopher Pickslay avatar Mark Carpenter avatar Jorge (Hezi) Cohen avatar  avatar John Yanarella avatar clearbrian avatar Daniel Gräfe avatar Tomas Jukin avatar Bruno Wernimont avatar Tom Mulder avatar David Linsin avatar John Kolash avatar

Watchers

 avatar mayulu avatar  avatar James Cloos avatar Pin Shih Wang avatar Nick Randall avatar Suren 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.