brandonmcansh
03/08/2024, 4:11 AMTimofey Solonin
03/08/2024, 8:21 PMbinaryTarget
in an SPM package or a spec.vendored_frameworks
in a CocoaPods spec. Could this be what you are looking for?brandonmcansh
03/08/2024, 8:25 PMbrandonmcansh
03/08/2024, 11:59 PMbrandonmcansh
03/08/2024, 11:59 PMbrandonmcansh
03/08/2024, 11:59 PMbrandonmcansh
03/09/2024, 12:00 AMpublic struct Badge : UIViewControllerRepresentable {
@State public var count: Int32
@MainActor public init(count: Int32) {
_count = State(initialValue: count)
}
public func makeUIViewController(context: Context) -> UIViewController {
ComponentsKt._Badge(count: count)
}
public func updateUIViewController(_ uiViewController: UIViewController, context: Context) {
}
}
brandonmcansh
03/09/2024, 12:00 AMstruct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
HStack {
Text("Hello, world!")
Badge(count: 3)
}
}
.padding()
}
}
#Preview {
ContentView()
}
brandonmcansh
03/09/2024, 12:02 AMinternal val uiContentSizeCategoryToFontScaleMap = mapOf(
+ UIContentSizeCategoryExtraSmall to 0.8f,
UIContentSizeCategorySmall to 0.85f,
UIContentSizeCategoryMedium to 0.9f,
UIContentSizeCategoryLarge to 1f, // default preference
UIContentSizeCategoryExtraLarge to 1.1f,
UIContentSizeCategoryExtraExtraLarge to 1.2f,
UIContentSizeCategoryExtraExtraExtraLarge to 1.3f,
// These values don't work well if they match scale shown by
// Text Size control hint, because iOS uses non-linear scaling
// calculated by UIFontMetrics, while Compose uses linear.
UIContentSizeCategoryAccessibilityMedium to 1.4f, // 160% native
UIContentSizeCategoryAccessibilityLarge to 1.5f, // 190% native
UIContentSizeCategoryAccessibilityExtraLarge to 1.6f, // 235% native
UIContentSizeCategoryAccessibilityExtraExtraLarge to 1.7f, // 275% native
UIContentSizeCategoryAccessibilityExtraExtraExtraLarge to 1.8f, // 310% native
// UIContentSizeCategoryUnspecified
)
Pablichjenkov
03/09/2024, 12:42 AMPablichjenkov
03/09/2024, 12:44 AMbrandonmcansh
03/09/2024, 12:45 AMPablichjenkov
03/09/2024, 12:53 AMbrandonmcansh
03/09/2024, 12:53 AMPablichjenkov
03/09/2024, 1:08 AMbrandonmcansh
03/09/2024, 1:18 AMbrandonmcansh
03/09/2024, 2:00 AMPablichjenkov
03/09/2024, 2:10 AMbrandonmcansh
03/09/2024, 2:17 AMbrandonmcansh
03/09/2024, 7:38 PMbrandonmcansh
03/09/2024, 7:39 PMbrandonmcansh
03/09/2024, 7:39 PMPablichjenkov
03/09/2024, 8:45 PM