257 Commits

Author SHA1 Message Date
Constantine Loutas f09c4d0986 Fix Implicitly Unwrapped Optional Crash
The presentationController variable is declared as an implicitly unwrapped optional (line 38):

private var presentationController: SideMenuPresentationController!

There are situations where this will cause a crash, as the property could be null while transitioning:

Crashed: com.apple.main-thread
0  MyApp                          0x102c57398 closure #1 in SideMenuNavigationController.viewWillTransition(to:with:) + 107 (SideMenuAnimationController.swift:107)
1  MyApp                          0x102c573d0 thunk for @escaping @callee_guaranteed (@guaranteed UIViewControllerTransitionCoordinatorContext) -> () + 4336055248 (<compiler-generated>:4336055248)
2  UIKitCore                      0x1b67c58f4 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 276
3  UIKitCore                      0x1b67c21b4 -[_UIViewControllerTransitionContext __runAlongsideAnimations] + 284
4  UIKitCore                      0x1b67d9b38 -[_UIWindowAnimationController animateTransition:] + 344
5  UIKitCore                      0x1b6e48044 -[UIWindow _adjustSizeClassesAndResizeWindowToFrame:] + 964
6  UIKitCore                      0x1b6e546b4 -[UIWindow _resizeWindowFrameToSceneBoundsIfNecessary] + 252
7  UIKitCore                      0x1b6e4a26c __78-[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:]_block_invoke + 408
8  UIKitCore                      0x1b67da1e8 __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke_2 + 180
9  UIKitCore                      0x1b72d0e48 +[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:forScene:] + 212
10 UIKitCore                      0x1b67d9fd4 __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke + 180
11 UIKitCore                      0x1b67d9e98 -[_UIWindowRotationAnimationController animateTransition:] + 524
12 UIKitCore                      0x1b6e478c4 -[UIWindow _rotateToBounds:withAnimator:transitionContext:] + 624
13 UIKitCore                      0x1b6e49f74 -[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:] + 1436
14 UIKitCore                      0x1b6e4a4b0 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 404
15 UIKitCore                      0x1b6e49844 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 132
16 UIKitCore                      0x1b66bf2dc -[_UIFullscreenPresentationController _placeCounterRotationViewWithView:inWindow:fromOrientation:toOrientation:force:] + 520
17 UIKitCore                      0x1b66bf010 -[_UIFullscreenPresentationController _adjustOrientationIfNecessaryInWindow:forViewController:preservingViewController:] + 908
18 UIKitCore                      0x1b66b45ec -[UIPresentationController _presentWithAnimationController:interactionController:target:didEndSelector:] + 900
19 UIKitCore                      0x1b67a8590 -[UIViewController _presentViewController:modalSourceViewController:presentationController:animationController:interactionController:completion:] + 1416
20 UIKitCore                      0x1b67a9f74 -[UIViewController _presentViewController:withAnimationController:completion:] + 4212
21 UIKitCore                      0x1b67ac540 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke + 108
22 UIKitCore                      0x1b67aca94 -[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 528
23 UIKitCore                      0x1b67ac48c -[UIViewController _presentViewController:animated:completion:] + 212
24 UIKitCore                      0x1b67ac720 -[UIViewController presentViewController:animated:completion:] + 176
25 UIKitCore                      0x1b6f6f9b8 __74-[UIStoryboardPresentationSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 148
26 UIKitCore                      0x1b6f75a18 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 296
27 UIKitCore                      0x1b6f758bc -[UIStoryboardSegueTemplate _perform:] + 96
28 UIKitCore                      0x1b6f75b98 -[UIStoryboardSegueTemplate perform:] + 164
29 UIKitCore                      0x1b6e086c0 -[UIApplication sendAction:to:from:forEvent:] + 100
30 UIKitCore                      0x1b6479858 __45-[_UIButtonBarTargetAction _invoke:forEvent:]_block_invoke + 84
31 UIKitCore                      0x1b64796e4 -[_UIButtonBarTargetAction _invoke:forEvent:] + 256
32 UIKitCore                      0x1b6e086c0 -[UIApplication sendAction:to:from:forEvent:] + 100
33 UIKitCore                      0x1b67f0b30 -[UIControl sendAction:to:forEvent:] + 208
34 UIKitCore                      0x1b67f0e98 -[UIControl _sendActionsForEvents:withEvent:] + 400
35 UIKitCore                      0x1b67efeb0 -[UIControl touchesEnded:withEvent:] + 520
36 UIKitCore                      0x1b6e43b08 -[UIWindow _sendTouchesForEvent:] + 1024
37 UIKitCore                      0x1b6e452f0 -[UIWindow sendEvent:] + 3548
38 UIKitCore                      0x1b6e2045c -[UIApplication sendEvent:] + 348
39 UIKitCore                      0x1b6ea3a54 __dispatchPreprocessedEventFromEventQueue + 6688
40 UIKitCore                      0x1b6ea6648 __handleEventQueueInternal + 5368
41 UIKitCore                      0x1b6e9e578 __handleHIDEventFetcherDrain + 144
42 CoreFoundation                 0x1b2c39af4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
43 CoreFoundation                 0x1b2c39a48 __CFRunLoopDoSource0 + 84
44 CoreFoundation                 0x1b2c39198 __CFRunLoopDoSources0 + 196
45 CoreFoundation                 0x1b2c33f38 __CFRunLoopRun + 796
46 CoreFoundation                 0x1b2c338f4 CFRunLoopRunSpecific + 480
47 GraphicsServices               0x1bd04a604 GSEventRunModal + 164
48 UIKitCore                      0x1b6e07358 UIApplicationMain + 1944
49 MyApp                          0x102921628 main + 15 (AppDelegate.swift:15)
50 libdyld.dylib                  0x1b2aaf2dc start + 4

By making it a normal optional, we can avoid such crashes.
2020-08-23 09:39:02 +01:00
jonkykong be2ac457c1 Change default behavior of statusBarEndAlpha as its caused confusion for users who haven't read the documentation. 2020-07-23 19:00:12 -07:00
jonkykong 2f4d99a03c Minor bugfix for interactive pop gesture settings getting overwritten 2020-07-23 17:50:47 -07:00
jonkykong e10c8b8d51 Switch to safer weak declarations to avoid memory access crashes 2020-07-23 17:50:19 -07:00
jonkykong 8314bde8e0 Comment spelling correction 2020-07-23 17:41:28 -07:00
jonkykong 66cb4a2d4b Merge branch '6.4.8' into circular-reference-fix
* 6.4.8:
  Reran pod install to correct issues with running demo project
  Minor refactor
2020-03-26 13:18:43 -07:00
carlos 18a6f1d229 add xcode 11.4 support 2020-03-05 18:10:23 +01:00
jonkykong 537f39373c Minor refactor 2019-12-03 10:55:46 -08:00
jonkykong 00003f098f Fix for animation flash when dismissing modal view controller over SideMenu 2019-11-20 01:43:12 -08:00
jonkykong 1841827ef9 Fix for interactive regression 2019-10-30 11:36:40 -07:00
jonkykong a5852d8fd0 Refactor 2019-10-30 11:36:15 -07:00
jonkykong 43d1768175 Fix for in-call status bar height on iOS 12 and lower. 2019-10-27 16:10:21 -07:00
jonkykong 8ecc8ab441 Refactor to move view hierarchy logic out of the presentation controller and into the animation controller. Not moving it to the transition controller since it needs to happen before the animation is fully completed. 2019-10-27 16:09:54 -07:00
jonkykong 6b7de92136 Refactor 2019-10-27 16:01:18 -07:00
jonkykong f3c4a22931 Refactor 2019-10-16 23:07:03 -07:00
jonkykong 46c40f081a Refactor 2019-10-16 23:04:45 -07:00
jonkykong 3659e868be Refactor 2019-10-16 22:59:28 -07:00
jonkykong 64f9d0bfbd Bug fix 2019-09-29 13:05:56 -07:00
jonkykong 7d15070513 Scope adjustment 2019-09-26 01:16:14 -07:00
jonkykong 607260ac2e Fix for view controller views now being clipped causing shadows not to work. 2019-09-24 22:38:27 -07:00
jonkykong c346f2e0db Minor refactor 2019-09-24 03:06:02 -07:00
jonkykong 6c72727408 iOS 13 support 2019-09-24 03:05:48 -07:00
jonkykong b649404a7e Refactor 2019-09-21 23:34:26 -07:00
jonkykong 3272a0f63e Refactor 2019-09-21 18:03:30 -07:00
jonkykong 70fa815037 Refactor 2019-09-21 18:03:09 -07:00
jonkykong e8882a952d Reverting swift 4.2 changes. 2019-09-13 01:11:46 -07:00
jonkykong efc2e11fb2 Refactor 2019-09-13 01:10:51 -07:00
Rafael Francisco 32f1101e86 Fixed notification names 2019-09-10 14:17:50 +01:00
jonkykong 4f990e86a8 Fix and refactor 2019-09-06 03:01:51 -07:00
jonkykong 8200e0d49f correction 2019-09-06 00:09:05 -07:00
jonkykong c591059fbe Crash fix 2019-09-06 00:05:39 -07:00
jonkykong cf6ec23a7f File structure reorganization 2019-09-05 02:28:46 -07:00
jonkykong 21a7347079 Refactor 2019-09-05 02:18:08 -07:00
jonkykong c46745cef8 Refactor 2019-09-04 23:42:02 -07:00
jonkykong fae34995ab Refactoring 2019-09-04 23:31:08 -07:00
jonkykong 3f78b9bb49 Refactor 2019-09-04 01:40:44 -07:00
jonkykong 8aff2b3627 Merge tag '6.2.3' into 6.2.4
* tag '6.2.3':
  Updated podspec
  Propagate configured onTopShadowOffset to layer
2019-08-25 21:06:55 -07:00
Marius Rackwitz a10b94e351 Propagate configured onTopShadowOffset to layer 2019-08-20 12:50:25 +02:00
Artur Azarau e1bf7c4991 delegate was made public 2019-08-19 14:08:54 +03:00
jonkykong 159c87871b Expanded renaming to include delegates 2019-08-14 02:16:02 -07:00
jonkykong c3671408da Renamed and deprecated UISideMenuNavigationController to SideMenuNavigationController 2019-08-14 01:23:55 -07:00
jonkykong 3268b15e54 Marked InitializableClass as internal 2019-08-14 01:23:08 -07:00
jonkykong 423b56b9ac Fix for dismiss not working when menu is revealed interactively 2019-08-11 10:09:09 -07:00
jonkykong b387ef2dd7 Merge branch 'pr/524' into 6.1.4
* pr/524:
  Refactor
  Added isHidden property for public usage
2019-08-07 01:38:41 -07:00
jonkykong 22596320a3 Refactor 2019-08-07 01:38:28 -07:00
jonkykong 9363b747d1 Push logic fix 2019-08-07 01:31:22 -07:00
Mykola Vaniurskyi baae6186d7 Added isHidden property for public usage 2019-08-06 16:10:20 +03:00
jonkykong 2de8d7f758 Minor refactoring 2019-08-02 03:12:04 -07:00
jonkykong 3a01ab6398 Fix for programmatic dismissal of menu after being interactively exposed. 2019-07-31 00:37:57 -07:00
jonkykong 411bd59493 Refactor 2019-07-29 00:56:05 -07:00