Post

Replies

Boosts

Views

Activity

Reply to Force RTL support for default alerts
If your app only support RTL language then you can make you development language to Arabic and removed all localized file and Localized resources from Info.plist. Also UIView.appearence.sementicContentAttribute code. Then try to build and run. All UI and share option are in RTL. A good example is here https://ahmedk92.github.io/2018/08/10/Arabic-As-A-Default-Language-for-Your-iOS-App.html
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’23
Reply to Persisting scroll position when changing segment control in swiftUI
struct HomeListView:View { @State private var favoriteColor = 0 var body: some View { VStack { Picker("What is your favorite color?", selection: $favoriteColor) { Text("Red").tag(0) Text("Green").tag(1) } .pickerStyle(.segmented) .padding(EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8)) selectedView } .navigationBarTitleDisplayMode(.inline) } @ViewBuilder var selectedView: some View { switch favoriteColor { case 0: HomeViewListing() default: TestListingView() } } } struct HomeViewListing:View { var body: some View { ScrollView { LazyVStack { ForEach(0..<100) { item in Text("\(item)") } } } .scrollIndicators(.hidden) } } struct TestListingView:View { var body: some View { ScrollView { LazyVStack { ForEach(0..<100) { item in Text("\(item)") } } } .scrollIndicators(.hidden) } } Steps to reproduce 1)Scroll HomeListingView item to 98 2)Change segment control( to TestListingView) 3)Change segment control again(to HomeListingView) Scroll position is changed now to 0 but it should be at position 98(step 1 )
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’23
Reply to UITextField ToolTip is showing wrong Arabic text
I resolved the issue after removing UIView.appearance().semanticContentAttribute = .forceRightToLeft from AppDelegate and set sematicContentAttribute of baseview.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to UITextField ToolTip is showing wrong Arabic text
Please check FB13300264
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to Force RTL support for default alerts
If your app only support RTL language then you can make you development language to Arabic and removed all localized file and Localized resources from Info.plist. Also UIView.appearence.sementicContentAttribute code. Then try to build and run. All UI and share option are in RTL. A good example is here https://ahmedk92.github.io/2018/08/10/Arabic-As-A-Default-Language-for-Your-iOS-App.html
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to Persisting scroll position when changing segment control in swiftUI
struct HomeListView:View { @State private var favoriteColor = 0 var body: some View { VStack { Picker("What is your favorite color?", selection: $favoriteColor) { Text("Red").tag(0) Text("Green").tag(1) } .pickerStyle(.segmented) .padding(EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8)) selectedView } .navigationBarTitleDisplayMode(.inline) } @ViewBuilder var selectedView: some View { switch favoriteColor { case 0: HomeViewListing() default: TestListingView() } } } struct HomeViewListing:View { var body: some View { ScrollView { LazyVStack { ForEach(0..<100) { item in Text("\(item)") } } } .scrollIndicators(.hidden) } } struct TestListingView:View { var body: some View { ScrollView { LazyVStack { ForEach(0..<100) { item in Text("\(item)") } } } .scrollIndicators(.hidden) } } Steps to reproduce 1)Scroll HomeListingView item to 98 2)Change segment control( to TestListingView) 3)Change segment control again(to HomeListingView) Scroll position is changed now to 0 but it should be at position 98(step 1 )
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Persisting scroll position when changing segment control in swiftUI
Scroll Position of HomeViewListing after changing segment to MostPopularView. If scroll HomeViewListing to end and changing segment to MostPopularView and then again to changing to HomeViewListing so this time HomeViewListing should be end of page but it is not
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to TextView Getting Crash with long HTML text in iOS16
Crash is not occurring if I am making UITextView isScrollable property to TRUE (which is not my requirement). I have fixed the issue by making isScrollable property to TRUE and re-calculating content size so that is scrolling behavior will not be visible.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jun ’22