https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
w

wisha khn

11/23/2023, 8:15 AM
Hey everyone, anyone knows how to disable Dynamic scaling from ios side in KMP app
a

Alexander Zhirkevich

11/23/2023, 8:24 AM
For Compose? You can provide your own density with
LocalDensity
w

wisha khn

11/23/2023, 8:28 AM
Yes for Compose-multiplatform Can you please share any example code snippet? I am trying to disable dynamic scaling for IOS side android side is already disabled
a

Alexander Zhirkevich

11/23/2023, 8:31 AM
If you mean disable system-driven font size
Copy code
CompositionLocalProvider(
    LocalDensity provides Density(LocalDensity.current.density, 1f)
){
   ///content
}
w

wisha khn

11/23/2023, 8:31 AM
will it work on IOS side too?
👌 1
3 Views