GithubHelp home page GithubHelp logo

m1entus / mzformsheetpresentationcontroller Goto Github PK

View Code? Open in Web Editor NEW
976.0 976.0 145.0 3.42 MB

MZFormSheetPresentationController provides an alternative to the native iOS UIModalPresentationFormSheet, adding support for iPhone and additional opportunities to setup UIPresentationController size and feel form sheet.

License: MIT License

Objective-C 90.20% Ruby 0.43% Swift 9.37%

mzformsheetpresentationcontroller's Introduction

MZFormSheetPresentationController

MZFormSheetPresentationController provides an alternative to the native iOS UIModalPresentationFormSheet, adding support for iPhone and additional opportunities to setup controller size and feel form sheet.

MZFormSheetPresentationController also has a number of predefined transitions so you can customize whether the modal form slides in, fades in, bounces in or you can create your own custom transition. There are also a number of properties for customizing the exact look and position of the form. It support also pan gesture dismissing.

This project is continuation of MZFormSheetController which allow you to make form sheet when deployment target is set to >iOS5 but use some tricky UIWindow hacks.

Here are a couple of images showing MZFormSheetPresentationController in action:

2.x Change Log:

  • Fully tested and certified for iOS 9
  • Support for tvOS
  • Fixed issue with text size based on size class
  • Fixed autolayout issues
  • Added dissmisal pan gesture on each direction
  • Rewritten MZFormSheetPresentationController to use UIPresentationController
  • Support for adding shadow to content view
  • Added frame configuration handler which allow you to change frame during rotation and animations
  • Added shouldCenterHorizontally property
  • Allowed make your custom animator to support native transitions
  • Allow to make dynamic contentViewSize depents on displayed UIViewController

Upgrade from 1.x

As a major version change, the API introduced in 2.0 is not backward compatible with 1.x integrations. Upgrading is straightforward.

  • Use MZFormSheetPresentationViewController instead of MZFormSheetPresentationController

  • MZFormSheetPresentationController now inherits from UIPresentationController and manage presentation of popup

  • MZFormSheetPresentationViewController have property presentationController which allows you customization presented content view

  • MZFormSheetPresentationController registerTransitionClass is now MZTransition registerTransitionClass

  • func entryFormSheetControllerTransition(formSheetController: MZFormSheetPresentationController, completionHandler: MZTransitionCompletionHandler) changed to func entryFormSheetControllerTransition(formSheetController: UIViewController, completionHandler: MZTransitionCompletionHandler) which formSheetController frame is equal to contentViewSize with view origin.

Requirements

MZFormSheetPresentationController requires either iOS 8.x and above.

Installation

###Carthage

Add the following line to your Cartfile.

github "m1entus/MZFormSheetPresentationController" "master"

Then run carthage update --no-use-binaries or just carthage update.

After building the framework you will need to add it to your project and import it using the Framework header:

#import <MZFormSheetPresentationController/MZFormSheetPresentationControllerFramework.h>

For further details on the installation and usage of Carthage, visit it's project page.

###CocoaPods

Add the following line to your Podfile.

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

target 'ProjectName' do
    pod 'MZFormSheetPresentationController'
end

Then run pod install --verbose or just pod install. For details of the installation and usage of CocoaPods, visit it's project page.

How To Use

There are two example projects, one is for Objective-C second is for Swift.

Let's start with a simple example

Objective-C

UINavigationController *navigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"formSheetController"];
MZFormSheetPresentationViewController *formSheetController = [[MZFormSheetPresentationViewController alloc] initWithContentViewController:navigationController];
formSheetController.presentationController.contentViewSize = CGSizeMake(250, 250); // or pass in UILayoutFittingCompressedSize to size automatically with auto-layout

[self presentViewController:formSheetController animated:YES completion:nil];

Swift

let navigationController = self.storyboard!.instantiateViewController(withIdentifier: "formSheetController") as! UINavigationController
let formSheetController = MZFormSheetPresentationViewController(contentViewController: navigationController)
formSheetController.presentationController?.contentViewSize = CGSize(width: 250, height: 250)  // or pass in UILayoutFittingCompressedSize to size automatically with auto-layout

self.present(formSheetController, animated: true, completion: nil)

This will display view controller inside form sheet container.

If you want to dismiss form sheet controller, use default dismissing view controller action.

Objective-C

[self dismissViewControllerAnimated:YES completion:nil];

Swift

self.dismiss(animated: true, completion: nil)

Easy right ?!

Passing data

If you want to pass data to presenting view controller, you are doing it like normal. Just remember that IBOutlets are initialized after viewDidLoad, if you don't want to create additional properies, you can always use completion handler willPresentContentViewControllerHandler to pass data directly to outlets. It is called after viewWillAppear and before MZFormSheetPresentationViewController animation.

Objective-C

MZFormSheetPresentationViewController *formSheetController = [[MZFormSheetPresentationViewController alloc] initWithContentViewController:navigationController];

PresentedTableViewController *presentedViewController = [navigationController.viewControllers firstObject];
presentedViewController.textFieldBecomeFirstResponder = YES;
presentedViewController.passingString = @"PASSSED DATA!!";

formSheetController.willPresentContentViewControllerHandler = ^(UIViewController *vc) {
    UINavigationController *navigationController = (id)vc;
    PresentedTableViewController *presentedViewController = [navigationController.viewControllers firstObject];
    [presentedViewController.view layoutIfNeeded];
    presentedViewController.textField.text = @"PASS DATA DIRECTLY TO OUTLET!!";
};

[self presentViewController:formSheetController animated:YES completion:nil];

Swift

let formSheetController = MZFormSheetPresentationViewController(contentViewController: navigationController)

let presentedViewController = navigationController.viewControllers.first as! PresentedTableViewController
presentedViewController.textFieldBecomeFirstResponder = true
presentedViewController.passingString = "PASSED DATA"

formSheetController.willPresentContentViewControllerHandler = { vc in
    let navigationController = vc as! UINavigationController
    let presentedViewController = navigationController.viewControllers.first as! PresentedTableViewController
    presentedViewController.view?.layoutIfNeeded()
    presentedViewController.textField?.text = "PASS DATA DIRECTLY TO OUTLET!!"
}

self.present(formSheetController, animated: true, completion: nil)

Using pan gesture to dismiss

typedef NS_OPTIONS(NSUInteger, MZFormSheetPanGestureDismissDirection) {
    MZFormSheetPanGestureDismissDirectionNone = 0,
    MZFormSheetPanGestureDismissDirectionUp = 1 << 0,
    MZFormSheetPanGestureDismissDirectionDown = 1 << 1,
    MZFormSheetPanGestureDismissDirectionLeft = 1 << 2,
    MZFormSheetPanGestureDismissDirectionRight = 1 << 3,
    MZFormSheetPanGestureDismissDirectionAll = MZFormSheetPanGestureDismissDirectionUp | MZFormSheetPanGestureDismissDirectionDown | MZFormSheetPanGestureDismissDirectionLeft | MZFormSheetPanGestureDismissDirectionRight
};
UINavigationController *navigationController = [self formSheetControllerWithNavigationController];
MZFormSheetPresentationViewController *formSheetController = [[MZFormSheetPresentationViewController alloc] initWithContentViewController:navigationController];

formSheetController.interactivePanGestureDissmisalDirection = MZFormSheetPanGestureDismissDirectionAll;

[self presentViewController:formSheetController animated:YES completion:nil];

Blur background effect

It is possible to display blurry background, you can set MZFormSheetPresentationController default appearance or directly to MZFormSheetPresentationController

Objective-C

// Blur will be applied to all MZFormSheetPresentationControllers by default
[[MZFormSheetPresentationController appearance] setShouldApplyBackgroundBlurEffect:YES];

or

// This will set to only one instance
formSheetController.shouldApplyBackgroundBlurEffect = YES;

Swift

// Blur will be applied to all MZFormSheetPresentationControllers by default
MZFormSheetPresentationController.appearance().shouldApplyBackgroundBlurEffect = true

or

// This will set to only one instance
formSheetController.shouldApplyBackgroundBlurEffect = true

Transitions

MZFormSheetPresentationViewController has predefined couple transitions.

Objective-C

typedef NS_ENUM(NSInteger, MZFormSheetPresentationTransitionStyle) {
 MZFormSheetPresentationTransitionStyleSlideFromTop = 0,
 MZFormSheetPresentationTransitionStyleSlideFromBottom,
 MZFormSheetPresentationTransitionStyleSlideFromLeft,
 MZFormSheetPresentationTransitionStyleSlideFromRight,
 MZFormSheetPresentationTransitionStyleSlideAndBounceFromTop,
 MZFormSheetPresentationTransitionStyleSlideAndBounceFromBottom,
 MZFormSheetPresentationTransitionStyleSlideAndBounceFromLeft,
 MZFormSheetPresentationTransitionStyleSlideAndBounceFromRight,
 MZFormSheetPresentationTransitionStyleFade,
 MZFormSheetPresentationTransitionStyleBounce,
 MZFormSheetPresentationTransitionStyleDropDown,
 MZFormSheetPresentationTransitionStyleCustom,
 MZFormSheetPresentationTransitionStyleNone,
};

If you want to use them you will have to just assign contentViewControllerTransitionStyle property

Objective-C

formSheetController.contentViewControllerTransitionStyle = MZFormSheetPresentationTransitionStyleFade;

You can also create your own transition by implementing MZFormSheetPresentationViewControllerTransitionProtocol protocol and register your transition class as a custom style.

Objective-C

@interface CustomTransition : NSObject <MZFormSheetPresentationViewControllerTransitionProtocol>
@end

[MZTransition registerTransitionClass:[CustomTransition class] forTransitionStyle:MZFormSheetTransitionStyleCustom];

formSheetController.contentViewControllerTransitionStyle = MZFormSheetTransitionStyleCustom;

Swift

class CustomTransition: NSObject, MZFormSheetPresentationViewControllerTransitionProtocol {
}

MZTransition.registerClass(CustomTransition.self, for: .custom)

formSheetController.contentViewControllerTransitionStyle = .custom

if you are creating own transition you have to call completionBlock at the end of animation.

Objective-C

- (void)exitFormSheetControllerTransition:(nonnull UIViewController *)presentingViewController
                        completionHandler:(nonnull MZTransitionCompletionHandler)completionHandler {
    CGRect formSheetRect = presentingViewController.view.frame;
    formSheetRect.origin.x = [UIScreen mainScreen].bounds.size.width;

    [UIView animateWithDuration:0.3
                          delay:0
                        options:UIViewAnimationOptionCurveEaseIn
                     animations:^{
                         presentingViewController.view.frame = formSheetRect;
                     }
                     completion:^(BOOL finished) {
                         completionHandler();
                     }];
}

Swift

func exitFormSheetControllerTransition(_ presentingViewController: UIViewController, completionHandler: @escaping MZTransitionCompletionHandler) {
    var formSheetRect = presentingViewController.view.frame
    formSheetRect.origin.x = UIScreen.main.bounds.width

    UIView.animate(withDuration: 0.3, delay: 0.0, options: UIView.AnimationOptions.curveEaseIn, animations: {
        presentingViewController.view.frame = formSheetRect
    }, completion: {(value: Bool)  -> Void in
        completionHandler()
    })
}

Transparent Touch Background

If you want to have access to the controller that is below MZFormSheetPresentationController, you can set property transparentTouchEnabled and background view controller will get all touches.

Objective-C

MZFormSheetPresentationViewController *formSheetController = [[MZFormSheetPresentationViewController alloc] initWithContentViewController:viewController];
formSheetController.presentationController.transparentTouchEnabled = YES;

Swift

let formSheetController = MZFormSheetPresentationViewController(contentViewController: viewController)
formSheetController.presentationController?.isTransparentTouchEnabled = true

Completion Blocks

/**
 The handler to call when presented form sheet is before entry transition and its view will show on window.
 */
@property (nonatomic, copy, nullable) MZFormSheetPresentationViewControllerCompletionHandler willPresentContentViewControllerHandler;

/**
 The handler to call when presented form sheet is after entry transition animation.
 */
@property (nonatomic, copy, nullable) MZFormSheetPresentationViewControllerCompletionHandler didPresentContentViewControllerHandler;

/**
 The handler to call when presented form sheet will be dismiss, this is called before out transition animation.
 */
@property (nonatomic, copy, nullable) MZFormSheetPresentationViewControllerCompletionHandler willDismissContentViewControllerHandler;

/**
 The handler to call when presented form sheet is after dismiss.
 */
@property (nonatomic, copy, nullable) MZFormSheetPresentationViewControllerCompletionHandler didDismissContentViewControllerHandler;

Autolayout

MZFormSheetPresentationController supports autolayout.

Storyboard

MZFormSheetPresentationController supports storyboard.

MZFormSheetPresentationViewControllerSegue is a custom storyboard segue which use default MZFormSheetPresentationController settings.

If you want to get acces to form sheet controller and pass data using storyboard segue, the code will look like this:

Objective-C

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"segue"]) {
        MZFormSheetPresentationControllerSegue *presentationSegue = (id)segue;
        presentationSegue.formSheetPresentationController.presentationController.shouldApplyBackgroundBlurEffect = YES;
        UINavigationController *navigationController = (id)presentationSegue.formSheetPresentationController.contentViewController;
        PresentedTableViewController *presentedViewController = [navigationController.viewControllers firstObject];
        presentedViewController.textFieldBecomeFirstResponder = YES;
        presentedViewController.passingString = @"PASSSED DATA!!";
    }
}

Swift

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if let identifier = segue.identifier {
        if identifier == "segue" {
            let presentationSegue = segue as! MZFormSheetPresentationViewControllerSegue
            presentationSegue.formSheetPresentationController.presentationController?.shouldApplyBackgroundBlurEffect = true
            let navigationController = presentationSegue.formSheetPresentationController.contentViewController as! UINavigationController
            let presentedViewController = navigationController.viewControllers.first as! PresentedTableViewController
            presentedViewController.textFieldBecomeFirstResponder = true
            presentedViewController.passingString = "PASSED DATA"
        }
    }
}

ARC

MZFormSheetPresentationController uses ARC.

App Extensions

Some position calculations access [UIApplication sharedApplication] which is not permitted in application extensions. If you want to use MZFormSheetPresentationController in extensions add the MZ_APP_EXTENSIONS=1 preprocessor macro in the corresponding target.

If you use Cocoapods you can use a post install hook to do that:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "MZFormSheetPresentationController"
            target.build_configurations.each do |config|
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'MZ_APP_EXTENSIONS=1'
            end
        end
    end
end

Contact

Michal Zaborowski

Twitter

mzformsheetpresentationcontroller's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mzformsheetpresentationcontroller's Issues

Question with autolayout: adaptative size

Hello,

First, thank you for this library.
I have a question regarding its use with autolayout.

I don't see how to go around the contentViewSize of MZFormSheetPresentationController in order to let autolayout handle the sizes.

Example 1: I have a view with a label, text = "hello world". I pin the label to the its superview edges. So I expect the presented view to have a small size.

Example 2: I want the width of my view to be 80% of the screen.

Thanks!

interactivePanGestureDissmisalDireciton retains Content View Controller

Hey!

Awesome work here.

Be careful that setting interactivePanGestureDissmisalDireciton is retaining the controller presented and do never dealloc.

I solved by adding this in viewDidDissapear

    [self removeEdgeDismissalPanGestureRecognizer];
    [self removePresentaingViewDismissalPanGestureRecognizer];

Best

Center not work

I Love MZFormSheetPresentationController !!! =)

But I was not happy with the location of the Pop-up'a. It is located just below the Navigation Controller'a. All attempts to move it to the center of the screen does not lead to any success.

My code:

LikeChoiceNavigationController *choiceNavigationController = [STORYBOARD instantiateViewControllerWithIdentifier:@"LikeChoiceNavigationController"];

MZFormSheetPresentationController *formSheetController = [[MZFormSheetPresentationController alloc] initWithContentViewController:choiceNavigationController];

formSheetController.contentViewSize = CGSizeMake(280, 320);
formSheetController.shouldDismissOnBackgroundViewTap = YES;
formSheetController.shouldCenterVertically = YES;
formSheetController.contentViewControllerTransitionStyle = MZFormSheetTransitionStyleBounce;

[navigationController presentViewController:formSheetController animated:YES completion:nil];

iOS 9 autolayout on custom sizing view

Thanks for great library and excellent support.

But in iOS9, the autolayout looks broken (look at the textview) especially on the second view. This problem occurs once I upgraded my device to iOS9 (I tested it in simulator), and it fix itself after some event like rotating device or drag the view around (like you want to close it). Any explanation?

image

Thanks

Cocoapods install fails

It looks like the updated podspec file is not tagged for the latest version.

Not sure if that is the only problem, but we get the following every time we try to install this pod:

[!] Unable to satisfy the following requirements:

- `MZFormSheetPresentationController (~> 2.1.3)` required by `Podfile`

How to make the modal background transparent.

Is there a way to present a modal that instead of having a white background as it is by default. It has a transparent or blurred background ? currently the blurred option in MZ just blurs the outside background of the modal.

I intent to have a ViewController that is showing a camera feed, and I would like to present a modal on top of that, with blurred background so I can still see the camera refreshing in the back.

Text size based on size class

In one of my VC's that I am displaying with MZFormSheetPresentationController, I have a label whose font is based on the devices size class. However, when the form sheet is displayed the font size does not change based on the content size of the form sheet. How can I change this?

Callbacks based on interactivePanGestureDissmisalDirection

Is it possible to provide different callbacks for each direction that a user could swipe the view? I would like to implement functionality that would dismiss the view if swiped down, but save some entered information if swiped up.

Thanks.

Autoresizing breaking autolayout constraints to container view

As depicts in the screenshots below, the uiviewcontroller seems to ignore the constraints for leading and trailing space. Everything is working fine after i disable autolayout it seems. Perhaps it could be caused by UIViewAutoResizing__

  1. Constraints set for top, left, right
    screen shot 2015-07-29 at 3 33 45 pm
  2. Landscape
    screen shot 2015-07-29 at 3 36 40 pm
    3.Potrait
    screen shot 2015-07-29 at 3 36 57 pm

Update contentSize when rotation

Hi ! Thanks for this great library !

I just wanted to know how do you update the frame of the content when the rotate the device ?

Indeed I saw on the 2.0.0 changelog this line:
"Added frame configuration handler which allow you to change frame during rotation and animations"

But no way to see how we can handle this.

Thanks again !

Update README

The latest version of MZFormSheetPresentationController subclasses UIPresentationController but it's not clear how it's intended to be used.

Some demo code would be great!

Autolayout buttons

I am having an issue displaying a formsheet with 2 buttons vertically spaced (evenly, centered horizontally). I want the buttons to have a minimum height of 50 each. I cannot seem to accomplish this in a formsheet with the default size. Each time I run I get a message saying all constraints cannot be satisfied. Can you lead me in the right direction/post a sample project of how I can display these buttons in the formsheet?

Cocoa pod supported?

I am confused on what I need to install/copy to use this. I downloaded the example project and I see two pod dependencies.

contentViewSize not working on iPad

Everything is working perfectly on iPhone... but I can't get the right frame on iPad (portrait and landscape). It's exactly the same code for the both platform:

    [[MZFormSheetPresentationController appearance] setShouldApplyBackgroundBlurEffect:YES];
    [[MZFormSheetPresentationController appearance] setBlurEffectStyle:UIBlurEffectStyleDark];

    KFPurchasePassViewController *purchasePassVC = [[KFPurchasePassViewController alloc] initWithNibName:@"KFPurchasePassViewController" bundle:nil];
    MZFormSheetPresentationViewController *formSheetController = [[MZFormSheetPresentationViewController alloc] initWithContentViewController:purchasePassVC];
    formSheetController.presentationController.contentViewSize = CGSizeMake(300.f, 426.f);
    formSheetController.contentViewControllerTransitionStyle = MZFormSheetPresentationTransitionStyleDropDown;
    formSheetController.presentationController.shouldCenterVertically = YES;
    formSheetController.presentationController.shouldDismissOnBackgroundViewTap = YES;    
    [self presentViewController:formSheetController animated:YES completion:nil];

The KFPurchasePassViewController is using a xib, but the contraints are the same for iPhone and iPad.

simulator screen shot 12 nov 2015 10 07 32

So, as we can see on the screenshots, the frame isn't the right one, the width is larger....
Any ideas why I'm getting this? Did I miss something?

Vertical center

I get the same position no matter of the value assigned to shouldCenterVertically.

Bug in your project

Hi i downloaded your project to test it out, unfortunately when i tried to compile it i ran into a bug, this is the error:
ld: library not found for -lPods-MZAppearance
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i hope to be able to test it soon

Background turns light grey instead of blurred?

Hi,

I have exactly the same issue that I have with MZFormSheetController.

https://github.com/m1entus/MZFormSheetController/issues/182

I've adding my viewcontroller to my navigation controller programmatically, rather than with my storyboard, although I don't know why that should make a difference.

I now have.

Any ideas?

UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];

nav.navigationBarHidden = YES;

MZFormSheetPresentationController *formSheetController = 
    [[MZFormSheetPresentationController alloc] 
     initWithContentViewController:nav];
formSheetController.shouldApplyBackgroundBlurEffect = YES;
formSheetController.blurEffectStyle = UIBlurEffectStyleExtraLight;
// To set blur effect color, but uglty animation
//    formSheetController.backgroundColor = [[UIColor redColor] colorWithAlphaComponent:0.8];

[self presentViewController:formSheetController animated:YES completion:nil];


Animating changes in contentViewFrameForPresentationController

When I add cells into my table view, I am able to correctly use

- (CGRect)contentViewFrameForPresentationController:(MZFormSheetPresentationController *)presentationController currentFrame:(CGRect)currentFrame

to make the change in height. However, its a little abrupt. I was hoping to be able to animate the change in height? Is that possible? I'm combed the source code but can't find anything.

Transitions Using Storyboard

If i want to use a different transition using storyboard and segues, how and where would I specify that in the code? If its even possible?

Thank you!

'MZFormSheetPresentationViewController' has no member 'shouldApplyBackgroundBlurEffect'

Error:

Value of type 'MZFormSheetPresentationViewController' has no member 'shouldApplyBackgroundBlurEffect'

Code:

        let controller = self.storyboard!.instantiateViewControllerWithIdentifier("addArticleToGroup") as! AddArticleToGroupViewController
        controller.group = data
        let formSheetController = MZFormSheetPresentationViewController(contentViewController: controller)
        formSheetController.shouldApplyBackgroundBlurEffect = true // error here
        self.presentViewController(formSheetController, animated: true, completion: nil)

MZAppearance/MZAppearance.h' file not found

I am getting this error while importing into my xcode. I have imported swift project.

/Users/myname/Downloads/MZFormSheetPresentationController-master/MZFormSheetPresentationController/MZFormSheetPresentationController.h:27:9: error: 'MZAppearance/MZAppearance.h' file not found

import <MZAppearance/MZAppearance.h>

    ^

:0: error: failed to import bridging header '/Users/myname/Downloads/MZFormSheetPresentationController-master/MZFormSheetPresentationController/MZFormSheetPresentationController Swift Example-Bridging-Header.h'

Please tell me how can I resolve this issue ?

Touch transparent background

Thanks for the great library. In the older MZFormSheetController you included support for touch transparent backgrounds using formSheet.formSheetWindow.transparentTouchEnabled = YES. Is this behavior supported in MZFormSheetPresentationController?

Init content with Navigation Controller with Root from Viewcontroller (Nib nor Storyboard)

I'm using view controller which using nib to as root controller of UINavigationController. Then I use MZFormSheetController to display this navigation controller. But the problem is when I need push a new view controller to this navigation controller, the modal view is disappear (the only left is blur screen). But by your example, I see that you instantiate from storyboard with exist push segue from vc1 -> vc2. So how I can resolve this problem? Any help is really appreciate. Thank in advance. The code like this:

Init by navigation controller (with root controller is orderViewController):

modalNavController = [[UINavigationController alloc] initWithRootViewController:self.orderViewController];
modalNavController.navigationBarHidden = YES;
[self initMZPresentationControllerWith:modalNavController];

Then, I want to push vc 2 to this navigation controller:
OptionsDetailViewController *optionsDetailVC = [[OptionsDetailViewController alloc] init];
optionsDetailVC.options = dishOptions;
[self.orderViewController.navigationController pushViewController:optionsDetailVC animated:YES];

I tap on cell to push new view controller.By this the modal view is disappear and the rest of it is blur screen. (Figure below)
screen shot 2015-10-10 at 7 47 32 am

support iOS 7?

does this support iOS 7? running the example on a iPhone 4 iOS 7.x, I got this
screen shot 2015-07-23 at 4 48 30 pm

imported but MZAppearance/MZAppearance file not found

Getting this error when included these lines in header file:

#import "MZFormSheetPresentationController.h"
#import "MZFormSheetPresentationControllerSegue.h"

error:

MZFormSheetPresentationController/MZFormSheetPresentationController.h:28:9: 'MZAppearance/MZAppearance.h' file not found

Setting PortraitTopInset has no effect.

I've noticed that setting the PortraitTopInset doesn't seem to have any effect. Had to manually change the default value in MZFormSheetPresentationController.m

Swipe to close the modal

While I'm at it, is there any way to dismiss the modals by swiping down on the navigation bar of a modally presented view (you know, like the mail app modals).

Pod Install Failing specifically on this repo

Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:

- `MZFormSheetPresentationController (= 1.1.1)` required by `Podfile`

/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/resolver.rb:388:in `handle_resolver_error'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/resolver.rb:69:in `rescue in resolve'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/resolver.rb:56:in `resolve'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/installer/analyzer.rb:535:in `block in resolve_dependencies'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/user_interface.rb:59:in `section'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/installer/analyzer.rb:533:in `resolve_dependencies'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/installer/analyzer.rb:70:in `analyze'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/installer.rb:209:in `analyze'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/installer.rb:131:in `block in resolve_dependencies'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/user_interface.rb:59:in `section'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/installer.rb:130:in `resolve_dependencies'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/installer.rb:103:in `install!'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/command/project.rb:101:in `run'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/lib/cocoapods/command.rb:48:in `run'
/Users/btate/.rvm/gems/ruby-2.2.1/gems/cocoapods-0.38.1/bin/pod:44:in `<top (required)>'
/Users/btate/.rvm/gems/ruby-2.2.1/bin/pod:23:in `load'
/Users/btate/.rvm/gems/ruby-2.2.1/bin/pod:23:in `<main>'
/Users/btate/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/Users/btate/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'

Swift example not building

https://github.com/m1entus/MZFormSheetPresentationController/tree/master/Example/Swift isn't building with XCode 7. Any suggestions?

CompileSwift normal i386 /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/CustomTransition.swift
cd /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c "/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/TransparentViewController.swift" "/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/ViewController.swift" -primary-file "/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/CustomTransition.swift" "/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/AppDelegate.swift" "/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/PresentedTableViewController.swift" -target i386-apple-ios8.3 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -I /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator -F /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator -F /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator/Pods -g -import-objc-header "/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/MZFormSheetPresentationController/MZFormSheetPresentationController Swift Example-Bridging-Header.h" -module-cache-path /Users/vamsee/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc "-I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/swift-overrides.hmap" -Xcc -iquote -Xcc "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-generated-files.hmap" -Xcc "-I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-own-target-headers.hmap" -Xcc "-I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-all-non-framework-target-headers.hmap" -Xcc -ivfsoverlay -Xcc "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/all-product-headers.yaml" -Xcc -iquote -Xcc "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-project-headers.hmap" -Xcc -I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator/include -Xcc "-I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/DerivedSources/i386" -Xcc "-I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/DerivedSources" -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift -emit-module-doc-path "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransitionpartial.swiftdoc" -Onone -module-name MZFormSheetPresentationController_Swift_Example -emit-module-path "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransitionpartial.swiftmodule" -serialize-diagnostics-path "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.dia" -emit-dependencies-path "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.d" -emit-reference-dependencies-path "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.swiftdeps" -o "/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.o"

0 swift 0x000000010c5d910b llvm::sys::PrintStackTrace(sFILE) + 43
1 swift 0x000000010c5d984b SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff8edc4f1a sigtramp + 26
3 swift 0x000000010c487833 (anonymous namespace)::Verifier::visitInstruction(llvm::Instruction&) + 6275
4 swift 0x000000010c4847ce llvm::InstVisitor<(anonymous namespace)::Verifier, void>::visit(llvm::Instruction&) + 2782
5 swift 0x000000010c47b9a9 (anonymous namespace)::Verifier::verify(llvm::Function const&) + 2153
6 swift 0x000000010c48de32 (anonymous namespace)::VerifierLegacyPass::runOnFunction(llvm::Function&) + 18
7 swift 0x000000010c44ba56 llvm::FPPassManager::runOnFunction(llvm::Function&) + 294
8 swift 0x000000010c44b49d llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 189
9 swift 0x000000010a7e1d67 performLLVM(swift::IRGenOptions&, swift::DiagnosticEngine&, llvm::sys::SmartMutex
, llvm::Module
, llvm::TargetMachine_, llvm::StringRef) + 759
10 swift 0x000000010a7e0d8b performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl_, swift::SILModule_, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile_, unsigned int) + 1547
11 swift 0x000000010a7e0f10 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule_, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 64
12 swift 0x000000010a6e82e8 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 13704
13 swift 0x000000010a6e4b4a frontend_main(llvm::ArrayRef<char const*>, char const_, void_) + 2682
14 swift 0x000000010a6e11d7 main + 2247
15 libdyld.dylib 0x00007fff8ec0b5c9 start + 1
Stack dump:
0. Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/TransparentViewController.swift /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/ViewController.swift -primary-file /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/CustomTransition.swift /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/AppDelegate.swift /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift/MZFormSheetPresentationController Swift Example/PresentedTableViewController.swift -target i386-apple-ios8.3 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -I /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator -F /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator -F /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator/Pods -g -import-objc-header /Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/MZFormSheetPresentationController/MZFormSheetPresentationController Swift Example-Bridging-Header.h -module-cache-path /Users/vamsee/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-generated-files.hmap -Xcc -I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-own-target-headers.hmap -Xcc -I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/MZFormSheetPresentationController Swift Example-project-headers.hmap -Xcc -I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/DerivedSources/i386 -Xcc -I/Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/vamsee/Development/git/iOS/MZFormSheetPresentationController/Example/Swift -emit-module-doc-path /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransitionpartial.swiftdoc -Onone -module-name MZFormSheetPresentationController_Swift_Example -emit-module-path /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransitionpartial.swiftmodule -serialize-diagnostics-path /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.dia -emit-dependencies-path /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.d -emit-reference-dependencies-path /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.swiftdeps -o /Users/vamsee/Library/Developer/Xcode/DerivedData/MZFormSheetPresentationController_Swift_Example-dwwmcdxoqyjhxdcsrnbcroikvtir/Build/Intermediates/MZFormSheetPresentationController Swift Example.build/Debug-iphonesimulator/MZFormSheetPresentationController Swift Example.build/Objects-normal/i386/CustomTransition.o

  1. Running pass 'Module Verifier' on function '@TFC47MZFormSheetPresentationController_Swift_Example16CustomTransition34entryFormSheetControllerTransitionfS0_FTCSo33MZFormSheetPresentationController17completionHandlerFT_T__T'

Command failed due to signal: Segmentation fault: 11

Changing transition style after presenting not working

Hi;

In MZFormSheetController by changing transition style after presenting the formSheet I can achieve come and go style animations.

For example the below example should come from right of the screen and leaving from left. But in MZFormSheetPresentationController changing transition style not working as before.

    _formPresentSheet.contentViewControllerTransitionStyle = MZFormSheetPresentationTransitionStyleSlideAndBounceFromRight;

    [fromVC presentViewController:_formPresentSheet animated:YES completion:^{
            _formPresentSheet.contentViewControllerTransitionStyle = MZFormSheetPresentationTransitionStylelideAndBounceFromLeft;                
    }];

I wanna achieve this transition. If this is not possible I think I should use custom transitions. I tried it and could not manage to work it out. If there is a way to do it as I was doing before it would be very handy, if not can you show me a way how to achieve it?

Also MZFormSheetPresentationTransitionStylelideAndBounceFromLeft is misspelled.

Swipe to go back

I love your lib - the simplicity in how to use it and how great it looks is just amazing. So first of all, thanks for that :)

However, I noticed that you cannot perform a left screen edge swipe to go back up the navigation stack. Do you have any idea how to solve this?

Rotation issue. Happens starting from 2.0+. Reproducible on iOS 8&9

Hi :) unfortunately, i've faced small issue with your awesome library.

If MZFormSheetPresentationController is presenting any controller (in my case it's alert view), than origin of it's content view is calculated wrong during transition to another size/size class.

Steps:

  1. Launch sample project.
  2. Present popover
  3. Present alert
  4. Rotate to landscape (or you can present in landscape and rotate to portrait)
  5. Observer results

I see this results since MZFormSheet started to use UIPresentationController API. So here comes the question: is that me doing something wrong or we have a bug?

Thanks for help! Ping me if you will need additional info.

Sample code can be found here in master branch: https://github.com/Austinate/MZFormSheetIssueSample

Normal result:
simulator screen shot 28 2015 11 45 43

Buggy result:
simulator screen shot 28 2015 11 45 36

presenting another view?

If I present an MZFormSheet, and then present another view using the MZFormSheet, the MZFormSheet dismisses itself. Is there a way to prevent this?

EDIT: It doesn't actually dismiss itself, but the dismiss animation is performed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.