TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2016 |
Maintained by Mark.
SRMModalViewController support a easy way to display a view with modal style.
SRMModalViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SRMModalViewController"
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];
[SRMModalViewController sharedInstance].backgroundColor = [UIColor blackColor];
[SRMModalViewController sharedInstance].backgroundOpacity = 0.5;
// 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.
S.R, [email protected]
SRMModalViewController is available under the MIT license. See the LICENSE file for more info.