Skip to content

An Objective-C class that adds a sense of depth to your modal popup views.

License

Notifications You must be signed in to change notification settings

lionxing/ASDepthModal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASDepthModal

ASDepthModal is mostly inspired by a nice CSS work from http://lab.hakim.se/avgrund/ (although ASDepthModal does not provide any blur effect).

It gives a sense of depth between the current fullscreen view which is sent backward and a modal popup view which appears in front.

Works on iOS 5 and 6.

Try it

Download the whole project and run it under Xcode. You can choose either iPhone or iPad destination. It supports all orientations change.

Use it

Just copy ASDepthModalViewController.h and ASDepthModalViewController.m in your project and #import "ASDepthModalViewController.h" where you need it.

Show

Once you have your popup view, here is how you would present it

[ASDepthModalViewController presentView:yourPopupView];

Hide

The popup view is automatically closed as soon as you tap outside of it.

If you need to close the popup view by code (you usually have a "close" button for this purpose)

[ASDepthModalViewController dismiss];

Configure

You can configure the background color as well as the effect applied on the popup when it appears ans disappears.

[ASDepthModalViewController presentView:yourPopupView withBackgroundColor:color popupAnimationStyle:style];

Three styles are available : no effect, grow effect or shrink effect.

ARC Support

This class requires ARC.

About

An Objective-C class that adds a sense of depth to your modal popup views.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published