in this way you will change language for all device, but in my case I should change language for only my application
Post
Replies
Boosts
Views
Activity
@Claude31, on iOS 14.5, xCode 12.5 your suggestion open general settings, and if I change language I changed for iPad, but not for my application (checked on simulator)
I make double check and it's worked correctly)
thanks a lot for your answer)
For future who will have the same issue - please check this Apple likn - https://developer.apple.com/news/?id=u2cfuj88 (this is the new way to change the language on the fly in your application, but only for iOS 13 and higher)
@Claude31 please, attach this link https://developer.apple.com/news/?id=u2cfuj88 to your first message and add restriction for iOS 13 and higher and I will mark it like answer.
here is a solution:
struct TestView: View {
var body: some View {
Text("description")
.clipShape(getShape(position: .middle))
}
}
struct TestView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
enum ElementPosition {
case first
case middle
}
func getShape(position: ElementPosition) -> some Shape {
switch position {
case .first:
return AnyShape(Circle())
case .middle:
return AnyShape(Rectangle())
}
}
@Claude31 here is a gist with a sample that you can try, just add a CustomTextFieldsView to your VC and try
@myintruder do you have any updates about this?