Skip to content

Commit

Permalink
Deprecated messages to renamed
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Oct 29, 2019
1 parent ecba387 commit 8d7a151
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
12 changes: 6 additions & 6 deletions Sources/Extensions/UIView+Hero.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,34 +116,34 @@ public extension UIView {
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.id instead")
@available(*, renamed: "hero.id")
@IBInspectable var heroID: String? {
get { return hero.id }
set { hero.id = newValue }
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.isEnabled instead")
@available(*, renamed: "hero.isEnabled")
@IBInspectable var isHeroEnabled: Bool {
get { return hero.isEnabled }
set { hero.isEnabled = newValue }
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.isEnabledForSubviews instead")
@available(*, renamed: "hero.isEnabledForSubviews")
@IBInspectable var isHeroEnabledForSubviews: Bool {
get { return hero.isEnabledForSubviews }
set { hero.isEnabledForSubviews = newValue }
}

@available(*, deprecated, message: "Use hero.modifiers instead")
@available(*, renamed: "hero.modifiers")
var heroModifiers: [HeroModifier]? {
get { return hero.modifiers }
set { hero.modifiers = newValue }
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.modifierString instead")
@available(*, renamed: "hero.modifierString")
@IBInspectable var heroModifierString: String? {
get { fatalError("Reverse lookup is not supported") }
set { hero.modifiers = newValue?.parse() }
Expand Down Expand Up @@ -188,7 +188,7 @@ public extension UIView {
}
}

@available(*, deprecated, message: "Use hero.storedAplha instead")
@available(*, renamed: "hero.storedAplha")
internal var heroStoredAlpha: CGFloat? {
get { return hero.storedAlpha }
set { hero.storedAlpha = newValue }
Expand Down
36 changes: 18 additions & 18 deletions Sources/Extensions/UIViewController+Hero.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public extension UIViewController {
static var heroConfig = "heroConfig"
}

@available(*, deprecated, message: "Use hero.config instead")
@available(*, renamed: "hero.config")
internal var heroConfig: HeroViewControllerConfig {
get { return hero.config }
set { hero.config = newValue }
Expand All @@ -116,25 +116,25 @@ public extension UIViewController {
set { hero.config.previousTabBarDelegate = newValue }
}

@available(*, deprecated, message: "Use hero.storedSnapshot instead")
@available(*, renamed: "hero.storedSnapshot")
internal var heroStoredSnapshot: UIView? {
get { return hero.config.storedSnapshot }
set { hero.config.storedSnapshot = newValue }
}

@available(*, deprecated, message: "Use hero.modalAnimationType instead")
@available(*, renamed: "hero.modalAnimationType")
var heroModalAnimationType: HeroDefaultAnimationType {
get { return hero.modalAnimationType }
set { hero.modalAnimationType = newValue }
}

@available(*, deprecated, message: "Use hero.modalAnimationTypeString instead")
@available(*, renamed: "hero.modalAnimationTypeString")
@IBInspectable var heroModalAnimationTypeString: String? {
get { return hero.modalAnimationTypeString }
set { hero.modalAnimationTypeString = newValue }
}

@available(*, deprecated, message: "Use hero.isEnabled instead")
@available(*, renamed: "hero.isEnabled")
@IBInspectable var isHeroEnabled: Bool {
get { return hero.isEnabled }
set { hero.isEnabled = newValue }
Expand All @@ -156,14 +156,14 @@ public extension HeroExtension where Base: UINavigationController {
}

extension UINavigationController {
@available(*, deprecated, message: "Use hero.navigationAnimationType instead")
@available(*, renamed: "hero.navigationAnimationType")
public var heroNavigationAnimationType: HeroDefaultAnimationType {
get { return hero.navigationAnimationType }
set { hero.navigationAnimationType = newValue }
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.navigationAnimationTypeString instead")
@available(*, renamed: "hero.navigationAnimationTypeString")
@IBInspectable public var heroNavigationAnimationTypeString: String? {
get { return hero.navigationAnimationTypeString }
set { hero.navigationAnimationTypeString = newValue }
Expand All @@ -185,14 +185,14 @@ public extension HeroExtension where Base: UITabBarController {
}

public extension UITabBarController {
@available(*, deprecated, message: "Use hero.tabBarAnimationType instead")
@available(*, renamed: "hero.tabBarAnimationType")
var heroTabBarAnimationType: HeroDefaultAnimationType {
get { return hero.tabBarAnimationType }
set { hero.tabBarAnimationType = newValue }
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.tabBarAnimationTypeString instead")
@available(*, renamed: "hero.tabBarAnimationTypeString")
@IBInspectable var heroTabBarAnimationTypeString: String? {
get { return hero.tabBarAnimationTypeString }
set { hero.tabBarAnimationTypeString = newValue }
Expand Down Expand Up @@ -332,49 +332,49 @@ public extension HeroExtension where Base: UIViewController {
}

extension UIViewController {
@available(*, deprecated, message: "use hero.dismissViewController instead")
@available(*, renamed: "hero.dismissViewController")
@IBAction public func ht_dismiss(_ sender: UIView) {
hero.dismissViewController()
}

@available(*, deprecated, message: "use hero.replaceViewController(with:) instead")
@available(*, renamed: "hero.replaceViewController(with:)")
public func heroReplaceViewController(with next: UIViewController) {
hero.replaceViewController(with: next)
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.dismissViewController instead")
@available(*, renamed: "hero.dismissViewController")
@IBAction public func hero_dismissViewController() {
hero.dismissViewController()
}

// TODO: can be moved to internal later (will still be accessible via IB)
@available(*, deprecated, message: "Use hero.unwindToRootViewController instead")
@available(*, renamed: "hero.unwindToRootViewController")
@IBAction public func hero_unwindToRootViewController() {
hero.unwindToRootViewController()
}

@available(*, deprecated, message: "Use hero.unwindToViewController(_:) instead")
@available(*, renamed: "hero.unwindToViewController(_:)")
public func hero_unwindToViewController(_ toViewController: UIViewController) {
hero.unwindToViewController(toViewController)
}

@available(*, deprecated, message: "Use hero.unwindToViewController(withSelector:) instead")
@available(*, renamed: "hero.unwindToViewController(withSelector:)")
public func hero_unwindToViewController(withSelector: Selector) {
hero.unwindToViewController(withSelector: withSelector)
}

@available(*, deprecated, message: "Use hero_unwindToViewController(withClass:) instead")
@available(*, renamed: "hero_unwindToViewController(withClass:)")
public func hero_unwindToViewController(withClass: AnyClass) {
hero.unwindToViewController(withClass: withClass)
}

@available(*, deprecated, message: "Use hero.unwindToViewController(withMatchBlock:) instead")
@available(*, renamed: "hero.unwindToViewController(withMatchBlock:)")
public func hero_unwindToViewController(withMatchBlock: (UIViewController) -> Bool) {
hero.unwindToViewController(withMatchBlock: withMatchBlock)
}

@available(*, deprecated, message: "Use hero.replaceViewController(with:) instead")
@available(*, renamed: "hero.replaceViewController(with:)")
public func hero_replaceViewController(with next: UIViewController) {
hero.replaceViewController(with: next)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Transition/HeroTransition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ open class HeroTransition: NSObject {
public var isTransitioning: Bool { return state != .possible }
public internal(set) var isPresenting: Bool = true

@available(*, deprecated, message: "Use isTransitioning instead")
@available(*, renamed: "isTransitioning")
public var transitioning: Bool {
return isTransitioning
}
@available(*, deprecated, message: "Use isPresenting instead")
@available(*, renamed: "isPresenting")
public var presenting: Bool {
return isPresenting
}
Expand Down

0 comments on commit 8d7a151

Please sign in to comment.