-
Notifications
You must be signed in to change notification settings - Fork 389
UIlable
#399
-
import SwiftUI
import SwiftUIIntrospect
@_spi(Advanced) import SwiftUIIntrospect
public struct MyUILabelType: IntrospectableViewType {}
extension IntrospectableViewType where Self == MyUILabelType {
public static var uiLabel: Self { .init() }
}
#if canImport(UIKit)
extension iOSViewVersion<MyUILabelType, UILabel> {
public static let v13 = Self(for: .v13)
public static let v14 = Self(for: .v14)
public static let v15 = Self(for: .v15)
public static let v16 = Self(for: .v16)
public static let v17 = Self(for: .v17)
}
#endif
can we make this work
if i want some thing like this :
Text("")
.introspect(.uiLabel, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { label in
label.attributedText = NSAttributedString(string: "THis is Attributed String", attributes: [
.font:UIFont.boldSystemFont(ofSize: 16),
.foregroundColor: UIColor.green
])
}
i try and it not work
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment