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

Allow configuring specific LottieView properties #2415

Merged
merged 2 commits into from
May 28, 2024

Conversation

freak4pc
Copy link
Contributor

@freak4pc freak4pc commented May 28, 2024

This is just a tiny helper method that makes configuring specific properties on the internal LottieAnimationView a bit nicer.

It means you can directly do:

LottieView(...)
    .configure(\.contentMode, .scaleAspectFit)

Without opening up an entire closure, which feels a bit more ergonomic and clean in most use-cases.

Let me know your thoughts :)

@calda
Copy link
Member

calda commented May 28, 2024

Also remember to run bundle exec rake format:swift to apply the necessary code changes to satisfy the linter

@freak4pc
Copy link
Contributor Author

Also remember to run bundle exec rake format:swift to apply the necessary code changes to satisfy the linter

done, just wanted to confirm this is how you usually format your code?
image

@calda
Copy link
Member

calda commented May 28, 2024

Yes, that's the style used by Airbnb's Swift Style Guide (https://github.com/airbnb/swift)

@calda calda enabled auto-merge (squash) May 28, 2024 17:36
@calda calda merged commit 5c8d511 into airbnb:master May 28, 2024
12 checks passed
@freak4pc freak4pc deleted the lottieview-configure-prop branch May 28, 2024 18:22
cgrindel-self-hosted-renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request Jul 10, 2024
)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [airbnb/lottie-spm](https://togithub.com/airbnb/lottie-spm) | minor |
`from: "4.4.3"` -> `from: "4.5.0"` |

---

### Release Notes

<details>
<summary>airbnb/lottie-spm (airbnb/lottie-spm)</summary>

###
[`v4.5.0`](https://togithub.com/airbnb/lottie-spm/releases/tag/4.5.0)

[Compare
Source](https://togithub.com/airbnb/lottie-spm/compare/4.4.3...4.5.0)

#### New Features

- Added drop shadow support to main thread rendering engine
([airbnb/lottie-ios#2423)
- Added support for opacity text animators
([airbnb/lottie-ios#2436)
- Added `LottieView` helper for configuring individual
`LottieAnimationView` properties
([airbnb/lottie-ios#2415)

#### Bug Fixes

- Fixed issue where bezier paths could be closed incorrectly
([airbnb/lottie-ios#2418)
- Fixed bug where font providers were ignored in precomposition layers
in the main thread rendering engine
([airbnb/lottie-ios#2439)
- Fixed issue where lottie-spm package could cause package operations to
unexpectedly fail on Linux
([airbnb/lottie-spm#27).

#### Version Compatibility

**Lottie now requires Xcode 15 / Swift 5.9 or later**
([airbnb/lottie-ios#2400).
Our version support policy is that Lottie supports Swift / Xcode
versions back to the minimum version that is permitted by Apple for
submissions to the App Store. As of April 2024, this is Xcode 15 / Swift
5.9: https://developer.apple.com/news/?id=fxu2qp7b.

**Full Changelog**:
airbnb/lottie-ios@4.4.3...4.5.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants