Deprecations.swift 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. //
  2. // Deprecations.swift
  3. // SideMenu
  4. //
  5. // Created by Jon Kent on 7/3/19.
  6. //
  7. import UIKit
  8. // Deprecations; to be removed at a future date.
  9. extension SideMenuManager {
  10. @available(*, deprecated, renamed: "leftMenuNavigationController")
  11. open var menuLeftNavigationController: SideMenuNavigationController? {
  12. get { return nil }
  13. set {}
  14. }
  15. @available(*, deprecated, renamed: "rightMenuNavigationController")
  16. open var menuRightNavigationController: SideMenuNavigationController? {
  17. get { return nil }
  18. set {}
  19. }
  20. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  21. public var menuPresentMode: SideMenuPresentationStyle {
  22. get { return .viewSlideOut }
  23. set {}
  24. }
  25. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  26. public var menuPushStyle: SideMenuPushStyle {
  27. get { return .default }
  28. set {}
  29. }
  30. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  31. public var menuAllowPushOfSameClassTwice: Bool {
  32. get { return true }
  33. set {}
  34. }
  35. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  36. public var menuWidth: CGFloat {
  37. get { return 0 }
  38. set {}
  39. }
  40. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  41. public var menuAnimationPresentDuration: Double {
  42. get { return 0.35 }
  43. set {}
  44. }
  45. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  46. public var menuAnimationDismissDuration: Double {
  47. get { return 0.35 }
  48. set {}
  49. }
  50. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  51. public var menuAnimationCompleteGestureDuration: Double {
  52. get { return 0.35 }
  53. set {}
  54. }
  55. @available(*, deprecated, message: "This property has been moved to the SideMenuPresentationStyle class.")
  56. public var menuAnimationFadeStrength: CGFloat {
  57. get { return 0 }
  58. set {}
  59. }
  60. @available(*, deprecated, message: "This property has been moved to the SideMenuPresentationStyle class.")
  61. public var menuAnimationTransformScaleFactor: CGFloat {
  62. get { return 1 }
  63. set {}
  64. }
  65. @available(*, deprecated, message: "This property has been moved to the SideMenuPresentationStyle class.")
  66. public var menuAnimationBackgroundColor: UIColor? {
  67. get { return nil }
  68. set {}
  69. }
  70. @available(*, deprecated, message: "This property has been moved to the SideMenuPresentationStyle class.")
  71. public var menuShadowOpacity: Float {
  72. get { return 0.5 }
  73. set {}
  74. }
  75. @available(*, deprecated, message: "This property has been moved to the SideMenuPresentationStyle class.")
  76. public var menuShadowColor: UIColor {
  77. get { return .black }
  78. set {}
  79. }
  80. @available(*, deprecated, message: "This property has been moved to the SideMenuPresentationStyle class.")
  81. public var menuShadowRadius: CGFloat {
  82. get { return 5 }
  83. set {}
  84. }
  85. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  86. public var menuPresentingViewControllerUserInteractionEnabled: Bool {
  87. get { return false }
  88. set {}
  89. }
  90. @available(*, deprecated, message: "This property has been moved to the SideMenuPresentationStyle class.")
  91. public var menuParallaxStrength: Int {
  92. get { return 0 }
  93. set {}
  94. }
  95. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  96. public var menuFadeStatusBar: Bool {
  97. get { return true }
  98. set {}
  99. }
  100. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  101. public var menuAnimationOptions: UIView.AnimationOptions {
  102. get { return .curveEaseInOut }
  103. set {}
  104. }
  105. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  106. public var menuAnimationCompletionCurve: UIView.AnimationCurve {
  107. get { return .easeIn }
  108. set {}
  109. }
  110. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  111. public var menuAnimationUsingSpringWithDamping: CGFloat {
  112. get { return 1 }
  113. set {}
  114. }
  115. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  116. public var menuAnimationInitialSpringVelocity: CGFloat {
  117. get { return 1 }
  118. set {}
  119. }
  120. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  121. public var menuDismissOnPush: Bool {
  122. get { return true }
  123. set {}
  124. }
  125. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  126. public var menuAlwaysAnimate: Bool {
  127. get { return false }
  128. set {}
  129. }
  130. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  131. public var menuDismissWhenBackgrounded: Bool {
  132. get { return true }
  133. set {}
  134. }
  135. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  136. public var menuBlurEffectStyle: UIBlurEffect.Style? {
  137. get { return nil }
  138. set {}
  139. }
  140. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  141. public weak var menuLeftSwipeToDismissGesture: UIPanGestureRecognizer? {
  142. get { return nil }
  143. set {}
  144. }
  145. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  146. public weak var menuRightSwipeToDismissGesture: UIPanGestureRecognizer? {
  147. get { return nil }
  148. set {}
  149. }
  150. @available(*, deprecated, message: "This property has been moved to the SideMenuNavigationController class.")
  151. public var menuEnableSwipeGestures: Bool {
  152. get { return true }
  153. set {}
  154. }
  155. @available(*, deprecated, renamed: "enableSwipeToDismissGesture")
  156. public var enableSwipeGestures: Bool {
  157. get { return true }
  158. set {}
  159. }
  160. @available(*, deprecated, renamed: "SideMenuPresentationStyle")
  161. public typealias MenuPresentMode = SideMenuPresentationStyle
  162. @available(*, deprecated, renamed: "addScreenEdgePanGesturesToPresent")
  163. @discardableResult public func menuAddScreenEdgePanGesturesToPresent(toView view: UIView, forMenu sides: [PresentDirection] = [.left, .right]) -> [UIScreenEdgePanGestureRecognizer] {
  164. return []
  165. }
  166. @available(*, deprecated, renamed: "addPanGestureToPresent")
  167. @discardableResult public func menuAddPanGestureToPresent(toView view: UIView) -> UIPanGestureRecognizer {
  168. return UIPanGestureRecognizer()
  169. }
  170. }
  171. extension SideMenuPresentationStyle {
  172. @available(*, deprecated, renamed: "viewSlideOutMenuIn")
  173. public static var viewSlideInOut: SideMenuPresentationStyle { return viewSlideOutMenuIn }
  174. }
  175. @available(*, deprecated, renamed: "SideMenuNavigationController")
  176. public typealias UISideMenuNavigationController = SideMenuNavigationController
  177. @available(*, deprecated, renamed: "SideMenuNavigationControllerDelegate")
  178. public typealias UISideMenuNavigationControllerDelegate = SideMenuNavigationControllerDelegate