Post

Replies

Boosts

Views

Activity

Reply to LazyVStack in ScrollView flitters on insertion in iOS 17
Find a solution for iOS 17+. Reduce Data Struct into a one-dimensional Array. /** ✅ Make sure LazyVStack is always visible. */ ScrollView { LazyVStack { ForEach(data) { item in switch item.viewStyle { // dynamic config view by data case 1: DynamicHeightView1() case 2: DynamicHeightView2() default: DynamicHeightView() } } } } /** ❌ The contents inside a LazyVStack may disappear from view when the user is scrolling or when the keyboard changes the focus state. */ ScrollView { ForEach(data) { section in LazyVStack { ForEach(section) { row in DynamicHeightView() } } } } // ❌ or ScrollView { View() LazyVStack { ForEach(section) { row in DynamicHeightView() } } LazyVStack { ForEach(section) { row in DynamicHeightView() } } View() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’23
Reply to Initialising CloudKit schema on public database fails for in Core Data with multiple strings (rdar://FB8995024)
Meet same issue and find a solution: Don't use initializeCloudKitSchema(), instead of creating an entity, then the system will auto generate schema, without creating extra field( CD_***_ckasset). Example: You use 「PublicEntity」 in 「Public」Configuration; Create a 「PublicEntity」 set value for every field use context.save() then schema 「CD_PublicEntity」 will auto generate.
Sep ’21
Reply to SwiftUI - Drag gesture blocks scroll gesture only on iPhone 11
This is a bug in iOS 18(Both iPad and iPhone). Unable to find a suitable solution, I ended up rewriting all views using SwiftUI’s highPriorityGesture with UIKit. This bug is truly disappointing.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to 3+ weeks of waiting for Family Controls entitlement
Request permission for each target:request form I received approval emails about 3 weeks later. A website doesn’t seem to be mandatory; no one visited the URL I provided.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to LazyVStack in ScrollView flitters on insertion in iOS 17
Find a solution for iOS 17+. Reduce Data Struct into a one-dimensional Array. /** ✅ Make sure LazyVStack is always visible. */ ScrollView { LazyVStack { ForEach(data) { item in switch item.viewStyle { // dynamic config view by data case 1: DynamicHeightView1() case 2: DynamicHeightView2() default: DynamicHeightView() } } } } /** ❌ The contents inside a LazyVStack may disappear from view when the user is scrolling or when the keyboard changes the focus state. */ ScrollView { ForEach(data) { section in LazyVStack { ForEach(section) { row in DynamicHeightView() } } } } // ❌ or ScrollView { View() LazyVStack { ForEach(section) { row in DynamicHeightView() } } LazyVStack { ForEach(section) { row in DynamicHeightView() } } View() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to LazyVStack in ScrollView flitters on insertion in iOS 17
I have a familiar issue and no workaround. :-( Scenario: iOS17 + LazyVStack + ScrollView, ScrollView flitters, and Views inside LazyVStack disappear when TextField changes FocusState.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to iOS17 TextField SwiftUI firstResponder does not work
Same issue and my solution. Scene: iOS17 + ScrollView + LazyVStack + Textfields.(iOS16 working as expected) Log: -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. Solution: Replace LazyVStack with VStack solved my problem.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Initialising CloudKit schema on public database fails for in Core Data with multiple strings (rdar://FB8995024)
Meet same issue and find a solution: Don't use initializeCloudKitSchema(), instead of creating an entity, then the system will auto generate schema, without creating extra field( CD_***_ckasset). Example: You use 「PublicEntity」 in 「Public」Configuration; Create a 「PublicEntity」 set value for every field use context.save() then schema 「CD_PublicEntity」 will auto generate.
Replies
Boosts
Views
Activity
Sep ’21