Hero: Update for Swift 4?

Created on 14 Sep 2017  路  12Comments  路  Source: HeroTransitions/Hero

Getting errors while compiling in Swift 4. Any update in progress and/or any temporary fixes?

image

Most helpful comment

Found a temporary fix.

In HeroBaseController.swift, adding @objc infront of the functions animate() and complete() removes the issues.

All 12 comments

Found a temporary fix.

In HeroBaseController.swift, adding @objc infront of the functions animate() and complete() removes the issues.

I thought Swift 4 has compatibility layer for Swift 3 emulation. I just imported Hero into my project which uses Swift 4. I don't seem to have any issue with it.

Swift 4 does have a compatibility layer for Swift 3 emulation. However, according to the documentation, extensions can add functionality to an existing type but they cannot override existing functionality.

https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Extensions.html

I think this error started popping up when I ran pod update.

ping?

Hello, any progress on this?

Hey!

using alpha version in Podfile helps out:)

@lonkly Which version are you using exactly? and does it solve the flicker issue when replacing view controllers inside a UINavigationController?

@atalw This fixed the problem, I appreciate it.

@lonkly How do you use alpha version? Thx

To use the alpha version simply put this in your Podfile

pod 'Hero', '1.0.0-alpha.4'

For someone met the issue, try to update your pod usingpod update

Was this page helpful?
0 / 5 - 0 ratings