Post

Replies

Boosts

Views

Activity

Reply to Adjusting Spacing in ArrangementView
[quote='910693022, DTS Engineer, /thread/852370?answerId=910693022#910693022'] ArrangementView { PrimaryView() .padding(.trailing, 16) // Creates the gap[/quote] While this is a helpful workaround, it doesn't quite fit my needs as it only works for horizontal arrangements, and I would need to apply it to both views to keep everything centered. Obviously, this can be solved by using multiple horizontal and vertical paddings with if statements, but it will be a headache.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
2w
Reply to (iPhone Duo) Toolbar Items are misplaced for RTL layout-direction
I have a live application in the App Store that mainly targets Arab users and heavily depends on forcing RTL layout direction, and it's working perfectly on both iPhone and iPad without any issues. I apply environment(\.layoutDirection, .rightToLeft) to navigation containers so that navigation behaviors (such as swiping right-to-left to go back) and toolbar items placement align with Arab users’ expectations. This applies even when English is set as the primary language on the device, a choice many users make, including me. When I tested the app on iPhone Duo simulator, I noticed several issues caused by applying the RTL environment. You can find in the video below some of those issues, like not aligning toolbar items correctly, and swiping left-to-right instead of right-to-left to go back. https://streamable.com/0kq8c9 I already submitted issues in Feedback Assistant several days ago but nobody responded. FB25090932 FB25119804
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3w
Reply to Dynamic Presentation Sheet Heights
My issue has been solved on Stack Overflow by Benzy Neez. struct ContentView: View { let detents: Set<PresentationDetent> = [.height(150), .height(300)] @State private var selectedDetent: PresentationDetent = .height(150) @State private var actualHeight: CGFloat? var body: some View { Text("Parent View") .sheet(isPresented: .constant(true)) { NavigationStack { Form { NavigationLink("Button") { GeometryReader { proxy in RoundedRectangle(cornerRadius: 20) .fill(.blue) .navigationTitle("Child") .frame(maxHeight: actualHeight) .animation(.default, value: actualHeight) .onChange(of: proxy.size.height) { _, newVal in actualHeight = newVal } } .onAppear { selectedDetent = .height(300) } } } .navigationTitle("Parent") .navigationBarTitleDisplayMode(.inline) .presentationDetents(detents, selection: $selectedDetent) .onAppear { selectedDetent = .height(150) } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Reply to Dynamic Presentation Sheet Heights
[quote='847221022, DTS Engineer, /thread/791111?answerId=847221022#847221022'] Changes to the presentationDetents are animated by default on iOS and custom animations are not yet supported. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. [/quote] I'm not attempting to create custom animations. My issue is that presentationDetents is not animated despite using a built-in API provided by Apple without any workarounds.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Reply to Adjusting Spacing in ArrangementView
[quote='910693022, DTS Engineer, /thread/852370?answerId=910693022#910693022'] ArrangementView { PrimaryView() .padding(.trailing, 16) // Creates the gap[/quote] While this is a helpful workaround, it doesn't quite fit my needs as it only works for horizontal arrangements, and I would need to apply it to both views to keep everything centered. Obviously, this can be solved by using multiple horizontal and vertical paddings with if statements, but it will be a headache.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
2w
Reply to (iPhone Duo) Toolbar Items are misplaced for RTL layout-direction
They are two different issues, one about misplacement of the presented sheet while using presentationPlacement() for RTL layout (leading sheets presented on left instead of right for Arabic), and another about misplacement of toolbar items (items placed on top-bar instead of the sidebar in inner-display, and in left side instead of the camera side in outer-display).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
2w
Reply to (iPhone Duo) Toolbar Items are misplaced for RTL layout-direction
I have a live application in the App Store that mainly targets Arab users and heavily depends on forcing RTL layout direction, and it's working perfectly on both iPhone and iPad without any issues. I apply environment(\.layoutDirection, .rightToLeft) to navigation containers so that navigation behaviors (such as swiping right-to-left to go back) and toolbar items placement align with Arab users’ expectations. This applies even when English is set as the primary language on the device, a choice many users make, including me. When I tested the app on iPhone Duo simulator, I noticed several issues caused by applying the RTL environment. You can find in the video below some of those issues, like not aligning toolbar items correctly, and swiping left-to-right instead of right-to-left to go back. https://streamable.com/0kq8c9 I already submitted issues in Feedback Assistant several days ago but nobody responded. FB25090932 FB25119804
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
3w
Reply to Dynamic Presentation Sheet Heights
My issue has been solved on Stack Overflow by Benzy Neez. struct ContentView: View { let detents: Set<PresentationDetent> = [.height(150), .height(300)] @State private var selectedDetent: PresentationDetent = .height(150) @State private var actualHeight: CGFloat? var body: some View { Text("Parent View") .sheet(isPresented: .constant(true)) { NavigationStack { Form { NavigationLink("Button") { GeometryReader { proxy in RoundedRectangle(cornerRadius: 20) .fill(.blue) .navigationTitle("Child") .frame(maxHeight: actualHeight) .animation(.default, value: actualHeight) .onChange(of: proxy.size.height) { _, newVal in actualHeight = newVal } } .onAppear { selectedDetent = .height(300) } } } .navigationTitle("Parent") .navigationBarTitleDisplayMode(.inline) .presentationDetents(detents, selection: $selectedDetent) .onAppear { selectedDetent = .height(150) } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Dynamic Presentation Sheet Heights
[quote='847221022, DTS Engineer, /thread/791111?answerId=847221022#847221022'] Changes to the presentationDetents are animated by default on iOS and custom animations are not yet supported. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. [/quote] I'm not attempting to create custom animations. My issue is that presentationDetents is not animated despite using a built-in API provided by Apple without any workarounds.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’25