Design with SwiftUI

RSS for tag

Discuss the WWDC23 Session Design with SwiftUI

Posts under wwdc2023-10115 tag

5 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

numericText transition for normal SwiftUI View
Description In Live Activities, we saw many beautiful animations that powered by .numericText() like Text(time, style: .timer), or even Text with .contentTransition(.numericText()) applied. But it seems like in normal SwiftUI View, these beautiful animations are gone. Instead, we saw a blinking result or fade-in-out result. Is that exactly right? ScreenShots In Live Activity: In normal SwiftUI View:
6
1
3.2k
Dec ’23
AppShortcuts error: Command ValidateAppShortcutStringsMetadata emitted errors
In Xcode 15 beta 3 and beta 4, if you add a AppShortcuts.xcstrings catalog or legacy AppShortcuts.strings files to the project, the project will always fail to build due to the following error. error: Unable to call validation: The data couldn’t be read because it isn’t in the correct format. (in target 'LearnAppShortcuts' from project 'LearnAppShortcuts') Command ValidateAppShortcutStringsMetadata emitted errors but did not return a nonzero exit code to indicate failure The error seems related to a cli called ValidateAppShortcutStringsMetadata. Reproducing Steps (1) In Xcode 15 beta 3/4, create a new iOS app project. (2) Add an arbitrary AppIntent and AppShortcutsProvider. import AppIntents struct MyAction: AppIntent { static let title: LocalizedStringResource = "My Action" func perform() async throws -> some IntentResult { return .result() } } struct MyAppShortcts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut(intent: MyAction(), phrases: [ "Perform action with \(.applicationName)" ], shortTitle: "Perform My Action", systemImageName: "heart") } } (3) Create a new AppShortcuts.xcstrings catalog file and add it to the iOS target (4) Build the project. The string catalog will be updated as expected. However, the build will fail.
3
0
836
Aug ’23
ScrollView cause Evaluating dispatch of UIEvent:
Why ScrollView shows event logs in console. ScrollView { VStack(alignment: .leading, spacing:0) { HStack{ Text("ScrollView Testing").font(.largeTitle) Spacer() } } } code-block # Logs `Evaluating dispatch of UIEvent: 0x600003909ad0; type: 0; subtype: 0; backing type: 11; shouldSend: 1; ignoreInteractionEvents: 0, systemGestureStateChange: 0` Is this behavior normal or something messing up with UIEvent ? I am new bee with ScrollView.
0
0
644
Aug ’23