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

Release 0.21.0 #444

Merged
merged 123 commits into from
Mar 25, 2023
Merged

Release 0.21.0 #444

merged 123 commits into from
Mar 25, 2023

Conversation

Alex009
Copy link
Member

@Alex009 Alex009 commented Mar 25, 2023

Changes

Improvements

Fixes

Breaking changes

ColorResource api was changed. Old behavior with platform-independent logic now supported by ColorDesc. ColorResource now works as other resources - by platform rules.

Thanks

@kevincianfarini , @jittya , @zacharee , @Cilestal , @InsanusMokrassar , @wakaztahir , @PaulWoitaschek

kevincianfarini and others added 30 commits June 23, 2022 11:06
Replace cinterops with regular kotlin code.
 To support runtime The switch the files need to be copied to iosApp. which can be automated by a gradle task like below and configure it as iOS  run script.

val copyColorAssetsToIOSApp = tasks.register<Copy>("copyColorAssetsToIOSApp") {
    from("$rootDir/resources/build/generated/moko/iosMain/res/Assets.xcassets")
    into("$rootDir/iosApp/iosApp/Assets.xcassets/colors")
}

Now to get the color from the iOS app assets we need to use UIColor.colorNamed(“colorName”) function. Below extension method can be used for that

fun ColorResource.getThemeColor(): UIColor {
   return UIColor.colorNamed(this.name)!!
}
name added in ColorResource.kt to support runtime theme switch in iOS
Always use forward slash for JVM resources
@Alex009 Alex009 added this to the 0.21.0 milestone Mar 25, 2023
@github-advanced-security
Copy link

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@Alex009 Alex009 merged commit 6d9d055 into master Mar 25, 2023
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.

8 participants