Modaly CocoaPods

Configure size of modal panels from storyboard with a custom segue

3 years after

Display modal view controllers is easy if you want to follow Apple guidelines and default sizes, but if you need more than Form Sheet, Page Sheet or full screen, Modaly will help you, and all from storyboard, defining size of view controller as you like!

Modaly in iPad

Install

Modaly is available via CocoaPods, so you only need to include this line in your Podfile

pod 'Modaly'

Use

You only need to select a button in your storyboard, and drag holding rigth button pressed to another view controller. When action segue dialog appears (image below), select modaly.

Action Segue Dialog

After that, you need to select freeformin view controller metrics menu (image below), and that's all!

Metrics

Modaly supports common UIViewControllers and UINavigationControllers, and the best way to discover it is download and open Demo Xcode project:

Storyboard

Segue reference

To facilitate segue use, I use segue itself as UIViewControllerTransitioningDelegate, so it's important to save reference to segue because it could be release on display, and animation would call to a dealloc object. It's easy to do that on -prepareForSegue:sender: method:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue isKindOfClass:[JMGModaly class]]) {
        // It needs to retain segue because it's animation transition delegate
        self.modalSegue = (JMGModaly *)segue;
    }
}

One more time, I recommend you to open demo project to see that easily.

Acknowledges

Author

License

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

Related Repositories

Redmine-Feedbacks

Redmine-Feedbacks

Get Feedbacks from your iOS App directly to the bug tracker in Redmine ...

SVWebViewController

SVWebViewController

A simple inline browser for iOS. ...

Redmine-Feedbacks

Redmine-Feedbacks

Get Feedbacks from your iOS App directly to the bug tracker in Redmine ...

SVWebViewController

SVWebViewController

A drop-in inline browser for your iOS app. ...


Top Contributors

patoroco ReadmeCritic

Releases

-   0.2.4 zip tar
-   0.2.3 zip tar
-   0.2.2 zip tar
-   0.2.1 zip tar
-   0.2.0 zip tar
-   0.1.7 zip tar
-   0.1.6 zip tar
-   0.1.5 zip tar
-   0.1.4 zip tar
-   0.1.3 zip tar
-   0.1.2 zip tar
-   0.1.1 zip tar
-   0.1.0 zip tar