iOS - UIModalPresentationFormSheet for iPhone
Charleene is simple, modern and lightweight solution for porting the UIModalPresentationFormSheet (known as a system API feature on iPads) to iPhones.
Charleene takes any UIViewController as containing UIViewController and presents it modally.
Whenever Charleene is used on the iPad it calls the iOS system API for UIModalPresentationFormSheet.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Include the corresponding category on UIViewController in your implementation file
#import "UIViewController+Charleene.h"
Usage is as simple as that:
From Storyboard:
ViewControllerOfYourChoice *vc = [[UIStoryboard storyboardWithName:@“Main” bundle:nil] instantiateViewControllerWithIdentifier:@“ViewControllerOfYourChoice”];
[self presentCharleeneModally:vc transitionMode:KSModalTransitionModeFromBottom];
```
From Code:
````objc
ViewControllerOfYourChoice *vc = [[ViewControllerOfYourChoice alloc] init];
[self presentCharleeneModally:vc transitionMode:KSModalTransitionModeFromBottom];
Dismissal is as simple as calling the following method on any UIViewController
[self dismissCharleeneAnimated:YES completion:nil];
iOS7.x / iOS 8.x
Charleene is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Charleene"
- No functional update - just fixed some typos and made it a stable 1.0 release
Kersten Broich, [email protected]
Charleene is available under the MIT license. See the LICENSE file for more info.