Latest 0.0.3
Homepage https://github.com/SongRanMark/SRMModalViewController
License MIT
Platforms ios 7.0, requires ARC

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];

![](https://github.com/SongRanMark/SRMModalViewController/blob/master/README resource/BackgroundColor.gif)

[SRMModalViewController sharedInstance].backgroundOpacity = 0.5;

![](https://github.com/SongRanMark/SRMModalViewController/blob/master/README resource/BackgroundOpacity.gif)

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];

![](https://github.com/SongRanMark/SRMModalViewController/blob/master/README resource/ShowAnother.gif)

You can download example project to get more info.

Author

S.R, [email protected]

License

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

Latest podspec

{
    "name": "SRMModalViewController",
    "version": "0.0.3",
    "summary": "SRMModalViewController support a easy way to display a view with modal style.",
    "description": "SRMModalViewController support a easy way to display a view with modal style.You will love it.",
    "homepage": "https://github.com/SongRanMark/SRMModalViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "SongRanMark",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/SongRanMark/SRMModalViewController.git",
        "tag": "v0.0.3"
    },
    "source_files": "*.{h,m}",
    "exclude_files": "Example",
    "requires_arc": true
}

Pin It on Pinterest

Share This