Skip to content

The utility to display a view with modal style for iOS development

License

Notifications You must be signed in to change notification settings

SongRanMark/SRMModalViewController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

40a99af · Jun 15, 2017

History

27 Commits
Nov 1, 2016
Apr 26, 2016
Jul 26, 2016
Mar 25, 2016
Jun 15, 2017
Apr 26, 2016
Apr 26, 2016
Jul 26, 2016
Nov 1, 2016
Nov 1, 2016
Mar 27, 2016
Mar 27, 2016

Repository files navigation

SRMModalViewController

Version Platform License

SRMModalViewController support a easy way to display a view with modal style.

Installation

SRMModalViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SRMModalViewController"

Usage

UIViewController *viewController = [UIViewController new];
viewController.view.frame = CGRectMake(0, 0, 200, 200);
viewController.view.backgroundColor = [UIColor whiteColor];
[[SRMModalViewController sharedInstance] showViewWithController:viewController];

or

UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
view.backgroundColor = [UIColor whiteColor];
[[SRMModalViewController sharedInstance] showView:view];

Custom color and opacity of background mask.

[SRMModalViewController sharedInstance].backgroundColor = [UIColor blackColor];

[SRMModalViewController sharedInstance].backgroundOpacity = 0.5;

Show another one in a modal view diplayed already.

// Hide first one
[[SRMModalViewController sharedInstance] showView:self.contentView];
// Do not hide first one
SRMModalViewController *modalViewController = [SRMModalViewController new];
[modalViewController showView:self.contentView];

You can download example project to get more info.

Author

S.R, firecrackerinlane2@gmail.com

License

SRMModalViewController is available under the MIT license. See the LICENSE file for more info.

About

The utility to display a view with modal style for iOS development

Resources

License

Stars

Watchers

Forks

Packages

No packages published