Configure size of modal panels from storyboard with a custom segue
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Modaly Demo.xcodeproj Removing test target & related files Jul 3, 2014
Modaly Demo Updating example Jul 15, 2014
Modaly Removing trailing spaces Feb 23, 2015
Screenshots
.gitignore
LICENSE.md Adding LICENSE Jul 3, 2014
Modaly.podspec Bump podspec version to 0.2.4 Feb 23, 2015
README.md Correct the capitalization of Xcode in README Feb 17, 2016

README.md

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.