diff --git a/shared/presentation/src/iosMain/kotlin/network/bisq/mobile/presentation/PlatformPresentationAbstractions.ios.kt b/shared/presentation/src/iosMain/kotlin/network/bisq/mobile/presentation/PlatformPresentationAbstractions.ios.kt index c56e5cf1..eb0840e0 100644 --- a/shared/presentation/src/iosMain/kotlin/network/bisq/mobile/presentation/PlatformPresentationAbstractions.ios.kt +++ b/shared/presentation/src/iosMain/kotlin/network/bisq/mobile/presentation/PlatformPresentationAbstractions.ios.kt @@ -10,6 +10,7 @@ import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.cinterop.addressOf import kotlinx.cinterop.useContents import kotlinx.cinterop.usePinned +import network.bisq.mobile.domain.PlatformImage import platform.CoreGraphics.CGContextRef import platform.CoreGraphics.CGRectMake import platform.CoreGraphics.CGSize @@ -33,10 +34,11 @@ fun NSData.toByteArray(): ByteArray { } @OptIn(ExperimentalForeignApi::class) -actual fun getPlatformPainter(platformImage: UIImage): Painter { +actual fun getPlatformPainter(platformImage: PlatformImage): Painter { return object : Painter() { override val intrinsicSize: Size get() { + platformImage as UIImage val size: CValue = platformImage.size return Size( width = size.useContents { this.width.toFloat() },