Skip to content
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

Background dimmed view is NOT animating #132

Closed
omidgolparvar opened this issue Oct 27, 2018 · 10 comments
Closed

Background dimmed view is NOT animating #132

omidgolparvar opened this issue Oct 27, 2018 · 10 comments
Labels
bug Something isn't working

Comments

@omidgolparvar
Copy link

Describe the bug
In the previous versions, dimmed background view (screenBackground) was dismissed animatedly (fade out). But in this version, after dismissing our UIView/UIViewController, dimmed view is dismissing WITHOUT animation.

To Reproduce
I use this code:

var attributes = EKAttributes.centerFloat
attributes.entryBackground = .visualEffect(style: .extraLight)
attributes.entranceAnimation = .init(
	translate: nil,
	scale: .init(from: 1.2, to: 1, duration: 0.2),
	fade: .init(from: 0.0, to: 1, duration: 0.2)
)
attributes.displayDuration = .infinity
attributes.shadow = .none
attributes.scroll = .disabled
attributes.entryInteraction = .absorbTouches
attributes.screenInteraction = .absorbTouches
attributes.positionConstraints.maxSize = .init(width: .constant(value: 300), height: .constant(value: 500))
attributes.positionConstraints.verticalOffset = 12
attributes.positionConstraints.size = .init(width: .offset(value: 12), height: .intrinsic)
attributes.roundCorners = .all(radius: 8)
attributes.screenBackground = .color(color: UIColor.black.withAlphaComponent(0.4))
attributes.exitAnimation = .init(
	translate: nil,
	scale: nil,
	fade: .init(from: 1.0, to: 0.0, duration: 0.2)
)

// setting up elements...

let simpleMessage = EKSimpleMessage(image: imageContent, title: titleContent, description: descriptionContent)
let alertMessage = EKAlertMessage(simpleMessage: simpleMessage, imagePosition: .top, buttonBarContent: buttonBarContent)
let contentView = EKAlertMessageView(with: alertMessage)
SwiftEntryKit.display(entry: contentView, using: attributes)

iPhone (please complete the following information):

  • Device: iPhone 8
  • iOS Version: iOS 12
  • Xcode Version: 10
  • Dependency Manager Version: CocoaPods 1.4.0
  • SwiftEntryKit Release # 0.8.2

Screenshots / Video Links
screenrecording_10-27-2018 14-14-32

@huri000
Copy link
Owner

huri000 commented Oct 27, 2018

@omidgolparvar - Thank you for opening this issue. I'll investigate and keep you posted.

@huri000 huri000 added the bug Something isn't working label Oct 27, 2018
huri000 added a commit that referenced this issue Oct 27, 2018
Background dimmed view is NOT animating #132
@huri000
Copy link
Owner

huri000 commented Oct 27, 2018

Fixed in 0.8.3 - Please let me know if that works for you. :-)

@omidgolparvar
Copy link
Author

Unfortunately, I still have the issue. :(

@huri000
Copy link
Owner

huri000 commented Oct 27, 2018

Are you sure you installed 0.8.3? I've tested it using the example project and imported SwiftEntryKit 0.8.3 in another workspace just in case. It works perfectly as you can see in the following gif: here

@omidgolparvar
Copy link
Author

Oooooh...
It seems that the mistake is shared between us!! 😂
I installed 0.8.3, and you did not release 0.8.4 on Cocoapods.
😁

@huri000
Copy link
Owner

huri000 commented Oct 27, 2018

O.K :-)
0.8.3 already contains the fix that is exemplified by the gif in my previous comment. So, if you installed version 0.8.3 you must have that fix and it should work well. Let me know if I've misunderstood something.

@omidgolparvar
Copy link
Author

I installed 0.8.3 and the problem is still here. 😕

img_1095

@huri000
Copy link
Owner

huri000 commented Oct 27, 2018

O.K. Can you try something else? Please use the following project. Tap the button on the center of the screen to try the entry preset. Please let me know if the background exit animation sync with the entry itself.
tester-swiftentrykit.zip

@omidgolparvar
Copy link
Author

The problem was cocoapod! When ever I tried to install 0.8.3, it uses cached version of SwiftEntryKit. I added skip_download_cache: true in ~/.cocoapods/config.yaml in order to force cocoapod to redownload SwiftEntryKit, and the problem is solved.

Thanks.
😋👍

@huri000
Copy link
Owner

huri000 commented Oct 27, 2018

Great! Glad I could help! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants