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

Overview

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

Comments
  • Clicking on the background to dismiss the formsheetpresentationcontroller sometimes doesn't dismiss but only un-blur the background

    Clicking on the background to dismiss the formsheetpresentationcontroller sometimes doesn't dismiss but only un-blur the background

    After present a view controller, and generally after I click on some parts in this presented view, and then when I click on the background, this view doesn't disappear but only causes the background from blur to clear. I saw someone else also have this problem from the older version https://github.com/m1entus/MZFormSheetController/issues/191.

    bug 
    opened by JosephZZ 14
  • Headers are not exposed correct when using with Carthage

    Headers are not exposed correct when using with Carthage

    1. Can't import & use MZFormSheetPresentationViewController.
    #import <MZFormSheetPresentationController/MZFormSheetPresentationViewController.h> // THIS FAILS
    
    1. MZTransition.h isn't found.
    #import <UIKit/UIKit.h>
    #import <MZAppearance/MZAppearance.h>
    #import "MZTransition.h"  // import not found.
    
    typedef void(^MZFormSheetPresentationControllerTransitionBeginCompletionHandler)(UIViewController * __nonnull presentingViewController);
    
    opened by fatuhoku 13
  • Background turns light grey instead of blurred?

    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];
    
    
    
    opened by JulesMoorhouse 12
  • Status bar is bright when contentViewController is presented

    Status bar is bright when contentViewController is presented

    The status bar style is .LightContent, I hope it will be dim when when contentViewController is presented. However, it is bright which seems like highlighted with a dim background. Any advice?

    opened by ghost 9
  • Change content size for second view controller from first view controller

    Change content size for second view controller from first view controller

    I see in the first demo image, two view controllers have different content size. I presented my first view controller with formSheetPresentationController, but I need to change the content size for the second view controller that I push from first view controller. The update for 2.x changelog says

    • Allow to make dynamic contentViewSize depends on displayed UIViewController

    but it's not documented anywhere how to achieve that. It'll be very helpful if you document that.

    opened by Joker666 7
  • Preserve presenter frame

    Preserve presenter frame

    When presenting a formSheet, it's using the screen frame instead of the viewController's one. Is there any way to present a formSheet with the presenter frame?

    opened by tbaranes 7
  • frameConfigurationHandler problem with keyboard

    frameConfigurationHandler problem with keyboard

    Hi,

    I am using frameConfigurationHandler to align my presented view to the bottom of the screen like this:

            formSheetController.presentationController.frameConfigurationHandler = ^(UIView *presentedView, CGRect currentFrame) {
                return CGRectMake(currentFrame.origin.x, weakSelf.view.frame.size.height - currentFrame.size.height, currentFrame.size.width, currentFrame.size.height);
            };
    

    At the same time this view aligned to the bottom contains 2 input TextFields so I am also setting movementActionWhenKeyboardAppears

    formSheet.presentationController.movementActionWhenKeyboardAppears = MZFormSheetActionWhenKeyboardAppearsMoveToTopInset;
    

    The problem is that when I tap the textField the keyboard covers the whole bottom view which doesn't slide up. I suppose it is a conflict between setting my custom frame and displaying keyboard. Or am I doing something wrong?

    Thanks :)

    opened by Skornos 7
  • MZAppearance/MZAppearance.h' file not found

    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 ?

    opened by irfanzsheikh 7
  • contentViewSize with rotation

    contentViewSize with rotation

    Currently I have my contentViewSize setup as such

    presentationSegue.formSheetPresentationController.presentationController?.contentViewSize = CGSize(width: self.view.bounds.size.width, height: 450)

    I would like that to hold true while rotating the size. So my view is always full width.

    Thanks in advance

    opened by acegreen 6
  • Rotation issue. Happens starting from 2.0+. Reproducible on iOS 8&9

    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

    opened by Austinate 6
  • Dismissing a view displaying over view presented with MZFormSheetPresentationController reveals missing parent.

    Dismissing a view displaying over view presented with MZFormSheetPresentationController reveals missing parent.

    Hey @m1entus.

    Not sure if you've seen this one before but also seeing it when presenting another view using MZFormSheetPresentationController.

    When presenting the new view the presenting view animates out but doesn't seem to come back when dismissing the child modal.

    Video: http://cl.ly/051F0Q2m3e3V

    Dug into this a little but couldn't find the route cause of it.

    opened by ay8s 6
  • Xcode 13: Building universal frameworks with common architectures is not possible

    Xcode 13: Building universal frameworks with common architectures is not possible

    Is this project still supported? There haven't been any commits in the last couple of years. I’m running into this:

    16827 16:25: repo/ (master) $ carthage update
    *** Fetching MZFormSheetPresentationController
    *** Fetching MZAppearance
    *** Checking out MZAppearance at "b47471ed78f80bcf47608cb11df6750d08df1e78"
    *** Checking out MZFormSheetPresentationController at "2.4.3"
    *** xcodebuild output can be found in /var/folders/16/jfb809_s2fz01ql7k494f6pc0000gn/T/carthage-xcodebuild.BC7Hi2.log
    *** Building scheme "MZAppearance" in MZAppearance.xcodeproj
    A shell task (/usr/bin/xcrun lipo -create /Users/me/Library/Caches/org.carthage.CarthageKit/DerivedData/13.0_13A233/MZAppearance/b47471ed78f80bcf47608cb11df6750d08df1e78/Build/Intermediates.noindex/ArchiveIntermediates/MZAppearance/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/MZAppearance.framework/MZAppearance /Users/me/Library/Caches/org.carthage.CarthageKit/DerivedData/13.0_13A233/MZAppearance/b47471ed78f80bcf47608cb11df6750d08df1e78/Build/Products/Release-iphonesimulator/MZAppearance.framework/MZAppearance -output /Users/me/Projects/Personal/FooManager/repo/Carthage/Build/iOS/MZAppearance.framework/MZAppearance) failed with exit code 1:
    fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/me/Library/Caches/org.carthage.CarthageKit/DerivedData/13.0_13A233/MZAppearance/b47471ed78f80bcf47608cb11df6750d08df1e78/Build/Intermediates.noindex/ArchiveIntermediates/MZAppearance/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/MZAppearance.framework/MZAppearance and /Users/me/Library/Caches/org.carthage.CarthageKit/DerivedData/13.0_13A233/MZAppearance/b47471ed78f80bcf47608cb11df6750d08df1e78/Build/Products/Release-iphonesimulator/MZAppearance.framework/MZAppearance have the same architectures (arm64) and can't be in the same fat output file
    
    Building universal frameworks with common architectures is not possible. The device and simulator slices for "MZAppearance" both build for: arm64
    Rebuild with --use-xcframeworks to create an xcframework bundle instead.
    
    opened by JetForMe 0
  • Crash on allowDismissByPanningPresentedView

    Crash on allowDismissByPanningPresentedView

    [general] Caught exception during autorelease pool drain NSInternalInconsistencyException: It is an error to release a paused or stopped property animator. Property animators must either finish animating or be explicitly stopped and finished before they can be released.

    Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'It is an error to release a paused or stopped property animator. Property animators must either finish animating or be explicitly stopped and finished before they can be released.'

    opened by umairgillani94 0
  • iOS 12 ONLY: [_UIAlertControllerAlertPresentationController setBackgroundVisibilityPercentage:]: unrecognized selector sent to instance 0x13130b3b0 -[NSOrderedSet initWithSet:copyItems:]

    iOS 12 ONLY: [_UIAlertControllerAlertPresentationController setBackgroundVisibilityPercentage:]: unrecognized selector sent to instance 0x13130b3b0 -[NSOrderedSet initWithSet:copyItems:]

    This crash only happen on iOS 12. Here's the detail.

    `#0. Crashed: com.twitter.crashlytics.ios.exception 0 KhmerCalendar 0x100dd6630 CLSProcessRecordAllThreads + 4314342960 1 KhmerCalendar 0x100dd6af0 CLSProcessRecordAllThreads + 4314344176 2 KhmerCalendar 0x100dc6334 CLSHandler + 4314276660 3 KhmerCalendar 0x100dd4c34 __CLSExceptionRecord_block_invoke + 4314336308 4 libdispatch.dylib 0x22e43e484 _dispatch_client_callout + 16 5 libdispatch.dylib 0x22e3eb5c8 _dispatch_lane_barrier_sync_invoke_and_complete + 56 6 KhmerCalendar 0x100dd46a4 CLSExceptionRecord + 4314334884 7 KhmerCalendar 0x100dd44d4 CLSExceptionRecordNSException + 4314334420 8 KhmerCalendar 0x100dd40cc CLSTerminateHandler() + 4314333388 9 libc++abi.dylib 0x22dbc90fc std::__terminate(void (*)()) + 16 10 libc++abi.dylib 0x22dbc8cec __cxa_rethrow + 144 11 libobjc.A.dylib 0x22dbd5c20 objc_exception_rethrow + 44 12 CoreFoundation 0x22e99014c CFRunLoopRunSpecific + 544 13 GraphicsServices 0x230c09584 GSEventRunModal + 100 14 UIKitCore 0x25bba4c00 UIApplicationMain + 212 15 KhmerCalendar 0x100bae370 main (main.m:13) 16 libdyld.dylib 0x22e44ebb4 start + 4

    --

    Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x22ea05ea4 __exceptionPreprocess 1 libobjc.A.dylib 0x22dbd5a50 objc_exception_throw 2 CoreFoundation 0x22e91eb14 -[NSOrderedSet initWithSet:copyItems:] 3 CoreFoundation 0x22ea0b7bc forwarding 4 CoreFoundation 0x22ea0d46c _CF_forwarding_prep_0 5 MZFormSheetPresentationController 0x101dd1bd8 (Missing) 6 MZFormSheetPresentationController 0x101dd188c (Missing) 7 MZFormSheetPresentationController 0x101dcf4bc (Missing) 8 UIKitCore 0x25b7bd0d0 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] 9 UIKitCore 0x25b7c56ec _UIGestureRecognizerSendTargetActions 10 UIKitCore 0x25b7c2f70 _UIGestureRecognizerSendActions 11 UIKitCore 0x25b7c2458 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] 12 UIKitCore 0x25b7b5760 _UIGestureEnvironmentUpdate 13 UIKitCore 0x25b7b52cc -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] 14 UIKitCore 0x25b7b509c -[UIGestureEnvironment _updateForEvent:window:] 15 UIKitCore 0x25bbe0cb4 -[UIWindow sendEvent:] 16 UIKitCore 0x25bbbffcc -[UIApplication sendEvent:] 17 UIKitCore 0x25bc8ee38 __dispatchPreprocessedEventFromEventQueue 18 UIKitCore 0x25bc91830 __handleEventQueueInternal 19 UIKitCore 0x25bc8a320 __handleHIDEventFetcherDrain 20 CoreFoundation 0x22e9960e0 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION 21 CoreFoundation 0x22e996060 __CFRunLoopDoSource0 22 CoreFoundation 0x22e995944 __CFRunLoopDoSources0 23 CoreFoundation 0x22e990810 __CFRunLoopRun 24 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific 25 GraphicsServices 0x230c09584 GSEventRunModal 26 UIKitCore 0x25bba4c00 UIApplicationMain 27 KhmerCalendar 0x100bae370 main (main.m:13) 28 libdyld.dylib 0x22e44ebb4 start

    #0. Crashed: com.twitter.crashlytics.ios.exception 0 KhmerCalendar 0x100dd6630 CLSProcessRecordAllThreads + 4314342960 1 KhmerCalendar 0x100dd6af0 CLSProcessRecordAllThreads + 4314344176 2 KhmerCalendar 0x100dc6334 CLSHandler + 4314276660 3 KhmerCalendar 0x100dd4c34 __CLSExceptionRecord_block_invoke + 4314336308 4 libdispatch.dylib 0x22e43e484 _dispatch_client_callout + 16 5 libdispatch.dylib 0x22e3eb5c8 _dispatch_lane_barrier_sync_invoke_and_complete + 56 6 KhmerCalendar 0x100dd46a4 CLSExceptionRecord + 4314334884 7 KhmerCalendar 0x100dd44d4 CLSExceptionRecordNSException + 4314334420 8 KhmerCalendar 0x100dd40cc CLSTerminateHandler() + 4314333388 9 libc++abi.dylib 0x22dbc90fc std::__terminate(void (*)()) + 16 10 libc++abi.dylib 0x22dbc8cec __cxa_rethrow + 144 11 libobjc.A.dylib 0x22dbd5c20 objc_exception_rethrow + 44 12 CoreFoundation 0x22e99014c CFRunLoopRunSpecific + 544 13 GraphicsServices 0x230c09584 GSEventRunModal + 100 14 UIKitCore 0x25bba4c00 UIApplicationMain + 212 15 KhmerCalendar 0x100bae370 main (main.m:13) 16 libdyld.dylib 0x22e44ebb4 start + 4

    #1. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #2. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #3. JavaScriptCore bmalloc scavenger 0 libsystem_kernel.dylib 0x22e59af0c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x22e618c88 _pthread_cond_wait$VARIANT$mp + 636 2 libc++.1.dylib 0x22db68568 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 96 3 JavaScriptCore 0x235d4ec68 std::__1::cv_status std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) + 124 4 JavaScriptCore 0x235d4eb18 std::__1::cv_status std::__1::condition_variable_any::wait_until<std::__1::unique_lockbmalloc::Mutex, std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >(std::__1::unique_lockbmalloc::Mutex&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > > const&) + 112 5 JavaScriptCore 0x235d4d7b4 bmalloc::Scavenger::threadRunLoop() + 296 6 JavaScriptCore 0x235d4ce70 bmalloc::Scavenger::Scavenger(std::__1::lock_guardbmalloc::Mutex&) + 10 7 JavaScriptCore 0x235d4e91c std::__1::__thread_specific_ptrstd::__1::__thread_struct::set_pointer(std::__1::__thread_struct*) + 38 8 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 9 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 10 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #4. WebThread 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 CoreFoundation 0x22e995ad8 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x22e990974 __CFRunLoopRun + 1396 4 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific + 436 5 WebCore 0x2378013e8 RunWebThread(void*) + 592 6 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 7 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 8 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #5. com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 CoreFoundation 0x22e995ad8 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x22e990974 __CFRunLoopRun + 1396 4 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific + 436 5 Foundation 0x22f386494 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 6 Foundation 0x22f386340 -[NSRunLoop(NSRunLoop) runUntilDate:] + 148 7 UIKitCore 0x25bc950c4 -[UIEventFetcher threadMain] + 136 8 Foundation 0x22f4b923c NSThread__start + 1040 9 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 10 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 11 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #6. HZAFNetworking 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 CoreFoundation 0x22e995ad8 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x22e990974 __CFRunLoopRun + 1396 4 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific + 436 5 Foundation 0x22f386494 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 6 Foundation 0x22f3c1e84 -[NSRunLoop(NSRunLoop) run] + 88 7 KhmerCalendar 0x1010aeae8 +[HZAFURLConnectionOperation networkRequestThreadEntryPoint:] (HZAFURLConnectionOperation.m:164) 8 Foundation 0x22f4b923c NSThread__start + 1040 9 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 10 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 11 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #7. com.twitter.crashlytics.ios.MachExceptionServer 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 KhmerCalendar 0x100dc1310 CLSMachExceptionServer + 4314256144 3 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 4 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 5 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #8. com.apple.CoreMotion.MotionThread 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 CoreFoundation 0x22e995ad8 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x22e990974 __CFRunLoopRun + 1396 4 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific + 436 5 CoreFoundation 0x22e990e7c CFRunLoopRun + 80 6 CoreMotion 0x2343e5c58 (Missing) 7 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 8 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 9 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #9. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #10. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #11. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e6211c0 _pthread_wqthread + 540 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #12. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #13. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e6211c0 _pthread_wqthread + 540 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #14. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #15. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e6211c0 _pthread_wqthread + 540 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #16. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e6211c0 _pthread_wqthread + 540 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #17. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #18. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #19. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #20. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #21. com.heyzap.sdk.mediation 0 libsystem_kernel.dylib 0x22e59b428 __semwait_signal + 8 1 libsystem_c.dylib 0x22e5105d0 nanosleep + 212 2 Foundation 0x22f3e9ba8 +[NSThread sleepForTimeInterval:] + 136 3 KhmerCalendar 0x1010bbba8 hzWaitUntilIntervalOnQueue (HZDispatch.m:39) 4 KhmerCalendar 0x1010bba94 hzWaitUntilInterval (HZDispatch.m:19) 5 KhmerCalendar 0x101129e04 __55-[HeyzapMediation requestBannerWithOptions:completion:]_block_invoke.875 (HeyzapMediation.m:1206) 6 libdispatch.dylib 0x22e43d6c8 _dispatch_call_block_and_release + 24 7 libdispatch.dylib 0x22e43e484 _dispatch_client_callout + 16 8 libdispatch.dylib 0x22e3e182c _dispatch_continuation_pop$VARIANT$mp + 412 9 libdispatch.dylib 0x22e3e0ef4 _dispatch_async_redirect_invoke + 600 10 libdispatch.dylib 0x22e3eda18 _dispatch_root_queue_drain + 376 11 libdispatch.dylib 0x22e3ee2c0 _dispatch_worker_thread2 + 128 12 libsystem_pthread.dylib 0x22e62117c _pthread_wqthread + 472 13 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #22. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #23. com.heyzap.sdk.mediation 0 libsystem_kernel.dylib 0x22e59b428 __semwait_signal + 8 1 libsystem_c.dylib 0x22e5105d0 nanosleep + 212 2 Foundation 0x22f3e9ba8 +[NSThread sleepForTimeInterval:] + 136 3 KhmerCalendar 0x1010bbba8 hzWaitUntilIntervalOnQueue (HZDispatch.m:39) 4 KhmerCalendar 0x1010bba94 hzWaitUntilInterval (HZDispatch.m:19) 5 KhmerCalendar 0x10117d464 -[HZWaterfallFetcher fetchTraditionalAdNetwork:index:shouldStop:fetchComplete:hasMediationFill:fetchOptions:datumsAlreadyFetched:mediationFetchStartDate:unifiedAuctionStartDate:shouldTriggerExchangeAuction:timeToAuction:waterfallSet:datumsToCheckShowability:showableAdaptersWithAnAdInRange:numberOfShowableNetworksToFetch:adType:] (HZWaterfallFetcher.m:361) 6 KhmerCalendar 0x10117c8e8 __82-[HZWaterfallFetcher fetchWaterfall:creativeTypes:mediationSettings:fetchOptions:]_block_invoke.345 (HZWaterfallFetcher.m:193) 7 CoreFoundation 0x22e8eb4cc -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 216 8 KhmerCalendar 0x10117b720 __82-[HZWaterfallFetcher fetchWaterfall:creativeTypes:mediationSettings:fetchOptions:]_block_invoke.302 (HZWaterfallFetcher.m:192) 9 libdispatch.dylib 0x22e43d6c8 _dispatch_call_block_and_release + 24 10 libdispatch.dylib 0x22e43e484 _dispatch_client_callout + 16 11 libdispatch.dylib 0x22e3e182c _dispatch_continuation_pop$VARIANT$mp + 412 12 libdispatch.dylib 0x22e3e0ef4 _dispatch_async_redirect_invoke + 600 13 libdispatch.dylib 0x22e3eda18 _dispatch_root_queue_drain + 376 14 libdispatch.dylib 0x22e3ee2c0 _dispatch_worker_thread2 + 128 15 libsystem_pthread.dylib 0x22e62117c _pthread_wqthread + 472 16 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #24. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #25. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #26. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #27. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #28. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #29. com.apple.network.connections 0 libusrtcp.dylib 0x22fd1e0e0 nw_tcp_access_globals + 36 1 libusrtcp.dylib 0x22fd58d4c tcp_input_available + 140 2 libusrtcp.dylib 0x22fd211e8 nw_protocol_tcp_input_available + 196 3 libnetwork.dylib 0x22fabef34 nw_channel_add_input_frames + 4060 4 libnetwork.dylib 0x22fabdef4 nw_channel_update_input_source + 136 5 libnetwork.dylib 0x22fabd788 __nw_channel_create_block_invoke.21 + 52 6 libdispatch.dylib 0x22e43e484 _dispatch_client_callout + 16 7 libdispatch.dylib 0x22e3e182c _dispatch_continuation_pop$VARIANT$mp + 412 8 libdispatch.dylib 0x22e3f1b9c _dispatch_source_invoke$VARIANT$mp + 1704 9 libdispatch.dylib 0x22e3e7a1c _dispatch_workloop_invoke$VARIANT$mp + 2000 10 libdispatch.dylib 0x22e3eeeb8 _dispatch_workloop_worker_thread + 600 11 libsystem_pthread.dylib 0x22e6210dc _pthread_wqthread + 312 12 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #30. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e6211c0 _pthread_wqthread + 540 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #31. Thread 0 libsystem_kernel.dylib 0x22e59bb9c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x22e621100 _pthread_wqthread + 348 2 libsystem_pthread.dylib 0x22e623cec start_wqthread + 4

    #32. com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 CoreFoundation 0x22e995ad8 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x22e990974 __CFRunLoopRun + 1396 4 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific + 436 5 CFNetwork 0x22efb300c -[__CoreSchedulingSetRunnable runForever] + 212 6 Foundation 0x22f4b923c NSThread__start + 1040 7 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 8 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 9 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #33. Thread 0 libsystem_kernel.dylib 0x22e58fef8 semaphore_timedwait_trap + 8 1 libdispatch.dylib 0x22e3df064 _dispatch_sema4_timedwait$VARIANT$mp + 64 2 libdispatch.dylib 0x22e3df9c0 _dispatch_semaphore_wait_slow + 72 3 libdispatch.dylib 0x22e3ed7dc _dispatch_worker_thread + 352 4 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 5 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 6 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #34. Thread 0 libsystem_kernel.dylib 0x22e58fef8 semaphore_timedwait_trap + 8 1 libdispatch.dylib 0x22e3df064 _dispatch_sema4_timedwait$VARIANT$mp + 64 2 libdispatch.dylib 0x22e3df9c0 _dispatch_semaphore_wait_slow + 72 3 libdispatch.dylib 0x22e3ed7dc _dispatch_worker_thread + 352 4 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 5 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 6 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #35. com.apple.CFStream.LegacyThread 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 CoreFoundation 0x22e995ad8 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x22e990974 __CFRunLoopRun + 1396 4 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific + 436 5 CoreFoundation 0x22e9a9174 _legacyStreamRunLoop_workThread + 268 6 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 7 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 8 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #36. AVAudioSession Notify Thread 0 libsystem_kernel.dylib 0x22e58fea4 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x22e58f37c mach_msg + 72 2 CoreFoundation 0x22e995ad8 __CFRunLoopServiceMachPort + 236 3 CoreFoundation 0x22e990974 __CFRunLoopRun + 1396 4 CoreFoundation 0x22e9900e0 CFRunLoopRunSpecific + 436 5 AVFAudio 0x2349a460c GenericRunLoopThread::Entry(void*) + 164 6 AVFAudio 0x2349d0768 CAPThread::Entry(CAPThread*) + 88 7 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 8 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 9 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #37. WebCore: LocalStorage 0 libsystem_kernel.dylib 0x22e59af0c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x22e618c88 _pthread_cond_wait$VARIANT$mp + 636 2 JavaScriptCore 0x235d37794 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 80 3 JavaScriptCore 0x235d1e9a0 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2004 4 WebKitLegacy 0x238c87180 bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184 5 WebKitLegacy 0x238c89e24 std::__1::unique_ptr<WTF::Function<void ()>, std::__1::default_delete<WTF::Function<void ()> > > WTF::MessageQueue<WTF::Function<void ()> >::waitForMessageFilteredWithTimeout<WTF::MessageQueue<WTF::Function<void ()> >::waitForMessage()::'lambda'(WTF::Function<void ()> const&)>(WTF::MessageQueueWaitResult&, WTF::MessageQueue<WTF::Function<void ()> >::waitForMessage()::'lambda'(WTF::Function<void ()> const&)&&, WTF::WallTime) + 156 6 WebKitLegacy 0x238c8943c WebCore::StorageThread::threadEntryPoint() + 68 7 JavaScriptCore 0x235d359f0 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 256 8 JavaScriptCore 0x235d36f58 WTF::wtfThreadEntryPoint(void*) + 12 9 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 10 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 11 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4

    #38. WTF::AutomaticThread 0 libsystem_kernel.dylib 0x22e59af0c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x22e618c88 _pthread_cond_wait$VARIANT$mp + 636 2 JavaScriptCore 0x235d377d8 WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 148 3 JavaScriptCore 0x235d1e9a0 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, WTF::TimeWithDynamicClockType const&) + 2004 4 JavaScriptCore 0x235cf82e4 bool WTF::Condition::waitUntilWTF::Lock(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184 5 JavaScriptCore 0x235cf8684 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 216 6 JavaScriptCore 0x235d359f0 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 256 7 JavaScriptCore 0x235d36f58 WTF::wtfThreadEntryPoint(void*) + 12 8 libsystem_pthread.dylib 0x22e62025c _pthread_body + 128 9 libsystem_pthread.dylib 0x22e6201bc _pthread_start + 48 10 libsystem_pthread.dylib 0x22e623cf4 thread_start + 4 `

    opened by garudaonekh 1
  • Memory Leak issue

    Memory Leak issue

    Hi

    First thanks for the great library. It's really useful.

    But I am facing the memory leaks when using this library. I have debug into the code and came to know that this code is causing memory leak.

    self.propertyAnimator = [[UIViewPropertyAnimator alloc] initWithDuration:1.0 curve:UIViewAnimationCurveLinear animations:^{ self.blurBackgroundView.effect = nil; }];

    To resolve it I have changed it to weak self as instructed by Apple to avoid any memory issue.

    __weak MZFormSheetPresentationController *weakSelf = self; self.propertyAnimator = [[UIViewPropertyAnimator alloc] initWithDuration:1.0 curve:UIViewAnimationCurveLinear animations:^{ weakSelf.blurBackgroundView.effect = nil; }];

    Please update the pod with resolution of this issue. Thanks!!!

    opened by asifbilal786 3
  • Anyone experiences freezing in iOS 12?

    Anyone experiences freezing in iOS 12?

    I am wondering if anyone experiences freezing after the popup displayed in iOS 12? My app started to get frozen and no button is working when the popup is displayed. I cannot reproduce it because it happens randomly.

    opened by gbesler 1
Releases(2.4.1)
Owner
Michał Zaborowski
@ hey
Michał Zaborowski
Elissa displays a notification on top of a UITabBarItem or any UIView anchor view to reveal additional information.

Elissa Attach a local notification to any UIView to reveal additional user guidance. Usage Example Per default, Elissa will try to align to the center

null 169 Aug 14, 2022
A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

Putra Z. 43 Feb 4, 2022
An alternative to UIStackView for common Auto Layout patterns.

StackLayout StackLayout builds on Auto Layout to make some of the most common layouts easier to manage. It creates the constraints that you need and a

Bridger Maxwell 76 Jun 29, 2022
Highly customizable Action Sheet Controller with Assets Preview written in Swift

PPAssetsActionController Play with me ▶️ ?? If you want to play with me, just tap here and enjoy! ?? ?? Show me ?? Try me ?? The easiest way to try me

Pavel Pantus 72 Feb 4, 2022
A replacement of default action sheet, but has very simple usage

KPActionSheet A replacement of default action sheet, but has very simple usage. Todo Add more custom affects and styles. Installation CocoaPods KPActi

Kenny 7 Jun 27, 2022
It provides UI components such as popover, popup, dialog supporting iOS apps

Overview LCUIComponents is an on-going project, which supports creating transient views appearing above other content onscreen when a control is selec

Linh Chu 7 Apr 8, 2020
Provides an iOS view controller allowing a user to draw their signature with their finger in a realistic style.

Swift version now available! Mimicking pen-on-paper signatures with a touch screen presents a difficult set of challenges. The rate touch events are e

Uber Open Source 1.3k Jan 6, 2023
A simple way to hide the notch on the iPhone X

NotchKit NotchKit is a simple way to hide the notch on the iPhone X, and create a card-like interface for your apps. Inspired by this tweet from Sebas

Harshil Shah 1.8k Dec 5, 2022
Use the iPhone X notch in creative ways 👩‍🎨👨‍🎨.

NotchToolkit NotchToolkit is a framework for iOS that allow developers use the iPhone X notch space in creative ways. Inspired by I was working on thi

Ahmed Bekhit 56 Nov 22, 2022
ScrollViewPlus is a small library that provides some helpful extension and capabilities for working with NSScrollView.

ScrollViewPlus is a small library that provides some helpful extension and capabilities for working with NSScrollView.

Chime 12 Dec 26, 2022
RangeSeedSlider provides a customizable range slider like a UISlider.

RangeSeekSlider Overview RangeSeekSlider provides a customizable range slider like a UISlider. This library is based on TomThorpe/TTRangeSlider (Objec

WorldDownTown 644 Dec 12, 2022
The CITPincode package provides a customizable pincode view

The CITPincode package provides a customizable pincode view. It includes an optional resend code button with a built-in cooldown and an optional divider to be placed anywhere between the cells.

Coffee IT 3 Nov 5, 2022
SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!

SAHistoryNavigationViewController Support 3D Touch for iOS9!! SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationConto

Taiki Suzuki 1.6k Dec 29, 2022
SheetPresentation for SwiftUI. Multiple devices support: iOS, watchOS, tvOS, macOS, macCatalyst.

SheetPresentation for SwiftUI. Multiple devices support: iOS, watchOS, tvOS, macOS, macCatalyst.

Aben 13 Nov 17, 2021
An UITextView in Swift. Support auto growing, placeholder and length limit.

GrowingTextView Requirements iOS 8.0 or above Installation CocoaPods GrowingTextView is available through CocoaPods. To install it, simply add the fol

Kenneth Tsang 941 Jan 5, 2023
Powerful and easy-to-use vector graphics Swift library with SVG support

Macaw Powerful and easy-to-use vector graphics Swift library with SVG support We are a development agency building phenomenal apps. What is Macaw? Mac

Exyte 5.9k Jan 1, 2023
A UINavigationController subclass that support pop interactive UINavigationbar with hidden or show.

KDInteractiveNavigationController Features ✨ UINavigationController interactive with UINavigationBar hidden or show Hide all UINavigationController ba

Kingiol 154 Dec 3, 2022
A UITextView subclass that adds support for multiline placeholder written in Swift.

KMPlaceholderTextView A UITextView subclass that adds support for multiline placeholder written in Swift. Usage You can set the value of the placehold

Zhouqi Mo 794 Jan 7, 2023
🔍 Awesome fully customize search view like Pinterest written in Swift 5.0 + Realm support!

YNSearch + Realm Support Updates See CHANGELOG for details Intoduction ?? Awesome search view, written in Swift 5.0, appears search view like Pinteres

Kyle Yi 1.2k Dec 17, 2022