Skip to content

Initial Delay #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
a-v-ebrahimi opened this issue Aug 7, 2017 · 4 comments
Open

Initial Delay #11

a-v-ebrahimi opened this issue Aug 7, 2017 · 4 comments

Comments

@a-v-ebrahimi
Copy link

Initially KenBurnsImageView shows nothing, but after a while starts to animate.

@deletedcu
Copy link

I found same issue, but can't resolve this.

@PeterAlanoca
Copy link

var kenBurns = KenBurnsImageView();

override func viewDidLoad() {
    super.viewDidLoad()
    let image = #imageLiteral(resourceName: "loginBackground1")
    kenBurns = newKenBurnsImageView(image: image)
    self.view.addSubview(kenBurns)
}

func newKenBurnsImageView(image: UIImage) -> KenBurnsImageView {
    let ken = KenBurnsImageView()
    ken.setImage(image)
    ken.zoomIntensity = 1.5
    ken.setDuration(min: 5, max: 13)
    ken.frame = view.bounds
    ken.startAnimating()
    return ken
}

@steve111MV
Copy link

I can't yet resolve it but i used a simple trick as i'm using SwiftUI

ZStack {
          Image("my_asset_image")
                        .resizable()
                        .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: 240, alignment: .top)

          CustomKenBurnsImageView(imageName: "my_asset_image")
                          .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: 240, alignment: .top)
}

And during the delay i have a static image in the background. And the EndUser does't experiment the 4 seconds delay

@andreybutov
Copy link

I put in a quick/hacky workaround resolving the crash related to the queue and the delay on initial animation. PR is pending. You can find it here in the meantime: https://github.com/Antair/KenBurns/commit/e14510a09e20957723e6ab0dfbd0a60474b9143b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants