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

Add animated content update support #261

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

bryankeller
Copy link
Contributor

Details

This adds animated setContent support to HorizonCalendar. Due to SwiftUI animation / UIKit-interop limitations, we don't currently attempt to animate from CalendarViewRepresentable. There's a hacky path forward if we mirror some private properties like this:

(lldb) po Mirror(reflecting: context.transaction.animation!).children.map { ($0, $1) }
▿ 1 element
  ▿ 0 : 2 elements
    ▿ .0 : Optional<String>
      - some : "base"
    ▿ .1 : BezierAnimation
      - duration : 0.35
      ▿ curve : BezierTimingCurve
        - ax : 0.52
        - bx : -0.78
        - cx : 1.26
        - ay : -2.0
        - by : 3.0
        - cy : 0.0

Related Issue

N/A

Motivation and Context

Improve animation support.

How Has This Been Tested

Example app.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@bryankeller bryankeller added the enhancement New feature or request label Aug 24, 2023
@bryankeller bryankeller force-pushed the bk/add-animated-update-support branch from ef1d528 to ff9f456 Compare August 24, 2023 19:12
Copy link
Contributor

@brynbodayle brynbodayle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bryankeller bryankeller merged commit 2a71dab into master Aug 25, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants