SwiftEntryKit icon indicating copy to clipboard operation
SwiftEntryKit copied to clipboard

Rotate float top view issue under iPhone X, and so on.

Open archerx3 opened this issue 4 years ago • 0 comments

Describe the bug A similar question<iPhone x issue>

To Reproduce

  1. Code as following:
    var attributes: EKAttributes

    attributes = .bottomFloat
    attributes.windowLevel = .alerts
    attributes.hapticFeedbackType = .success
    attributes.screenInteraction =  .forward
    attributes.entryInteraction = .absorbTouches
    attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt)
    attributes.screenBackground = .color(color: .clear)
    attributes.entryBackground = .color(color: .clear)
    attributes.entranceAnimation = .init(scale: .init(from: 0.9, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 0, to: 1, duration: 0.3))
    attributes.exitAnimation = .init(scale: .init(from: 1, to: 0.9, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0)), fade: .init(from: 1, to: 0, duration: 0.3))
    attributes.displayDuration = .infinity
    attributes.border = .value(color: .black, width: 0.5)
    attributes.shadow = .active(with: .init(color: .black, opacity: 0.3, radius: 5, offset: .zero))
    attributes.positionConstraints.size = .init(width: .constant(value: min(UIScreen.main.bounds.width, UIScreen.main.bounds.height)), height: .intrinsic)
    attributes.positionConstraints.verticalOffset = 0
    attributes.positionConstraints.safeArea = .empty(fillSafeArea: false)
   
    return attributes
  1. Add the code attributes.positionConstraints.safeArea = .overridden

  2. And active the auto rotate attributes.positionConstraints.rotation.isEnabled = true

  3. When show float view, rotate screen. The view will overlay with device top.

Expected behavior The view will not overlay with device top.

iPhone (please complete the following information):

  • Device: iPhone X
  • iOS Version: iOS 13.4
  • Xcode Version: 11.4.1
  • Dependency Manager Version: CocoaPods 1.8.0
  • SwiftEntryKit Release: 1.2.3

Screenshots / Video Links Simulator Screen Shot - iPhone 11 - 2020-05-14 at 14 14 40

archerx3 avatar May 14 '20 06:05 archerx3