Post

Replies

Boosts

Views

Activity

Reply to How to detect backspace in SwiftUI TextField without falling back to UIViewRepresentable?
You may use .onKeyPress: struct ContentView: View { @State private var vText: String = "" var body: some View { HStack { TextField("Enter text", text: Binding( get: { vText }, set: { newValue in vText = newValue } )) .onChange(of: vText) { oldText, newText in let typed = newText.replacingOccurrences(of: oldText, with: "") if newText.count < oldText.count { print("backspace") } else { print("typed char is: ", typed) } } } .onKeyPress(characters: .controlCharacters, action: { keyPress in if vText.count == 0 { print("Control key \(keyPress.characters)") // Do whatever needed and test if backspace } return .ignored // handled would intercept the typing }) } } Let us know if that works (don't forget to close the thread if so).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
5d
Reply to Is there a way to force a fallback language?
What I usually do is to have a "language button" on the initial page. Tapping on it brings user to the app's settings, where user can select the preferred language. That may be better than trying to force to English. In fact, if user has not selected English in the list of "Preferred Languages", that may just mean he/she does not speak English. Defaulting to English will not be good as he/she may prefer French or Italian.
6d
Reply to Clarification on the planned removal of UIDesignRequiresCompatibility
In some cases, liquid glass creates problems because buttons take a much larger space. Here is an example with navigation items. Prior LiquidGlass (UIDesignRequiresCompatibility = true) Everything fits without problem. With LiquidGlass (UIDesignRequiresCompatibility = false) Text is clipped as there is no more room for it as buttons are much wider. Adapting a lot of screens may require significant design changes. In this case, there is an option (not optimal, but working), by adapting the font size (https://stackoverflow.com/questions/62589078/automatically-adjust-navigation-item-title-font-size-to-fit). let title = NSLocalizedString("xxx.xxx.xxx.title", tableName: "Main", comment: "") // Retrieve the original title let navbarTitle = UILabel() navbarTitle.text = title navbarTitle.minimumScaleFactor = 0.5 navbarTitle.adjustsFontSizeToFitWidth = true navigationItem.titleView = navbarTitle
Topic: UI Frameworks SubTopic: General Tags:
6d
Reply to Picker text wrapping
Could you show the code where you populate the picker ? And screenshots ? Maybe you have to set the cell explicitly as here: func pickerView(pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusingView view: UIView!) -> UIView { var label : UILabel if view == nil { label = UILabel(frame: CGRect(x: 0, y: 0, width: 0, height: UIFont.systemFontOfSize(UIFont.systemFontSize()).lineHeight * 2 * UIScreen.mainScreen().scale)) label.textAlignment = NSTextAlignment.Center label.numberOfLines = 2 // For you should be 1 label.lineBreakMode = NSLineBreakMode.ByWordWrapping label.autoresizingMask = UIViewAutoresizing.FlexibleWidth } else { label = view as UILabel } label.text = line1 + "\n" + line2 return label; } Get details here: https://stackoverflow.com/questions/1865002/uipickerview-with-multiline-uilabel
Topic: UI Frameworks SubTopic: SwiftUI
May ’26
Reply to French Tax Form Blocking App Submission - Auto-Entrepreneur / VAT Exempt
Ask for a VAT number as auto entrepreneur: https://entreprendre.service-public.gouv.fr/vosdroits/F23570 Comment obtenir un numéro de TVA intracommunautaire pour auto-entrepreneur ? L'entreprise doit faire sa demande d'attribution de numéro de TVA intracommunautaire en ligne via la messagerie de son compte professionnel sur le site impots.gouv.fr. Pour cela, il faut cliquer sur « Messagerie », puis « Écrire », puis « TVA » et enfin : « Je demande un numéro de TVA intracommunautaire ».
May ’26
Reply to How do I make an editable NSTextField wrap inside an NSTableView cell?
That does not occur with a stand alone TextField. May be there is an issue with line 9: tableView.usesAutomaticRowHeights = true Could you comment it out ? Otherwise, could you try this: make non editable change to editable when you type on text -> What happens then ? Does it change to single line ? Then you can have this work around: make it editable when yo type on it when editing done, return to non editable
Topic: UI Frameworks SubTopic: AppKit Tags:
May ’26
Reply to How to detect backspace in SwiftUI TextField without falling back to UIViewRepresentable?
You may use .onKeyPress: struct ContentView: View { @State private var vText: String = "" var body: some View { HStack { TextField("Enter text", text: Binding( get: { vText }, set: { newValue in vText = newValue } )) .onChange(of: vText) { oldText, newText in let typed = newText.replacingOccurrences(of: oldText, with: "") if newText.count < oldText.count { print("backspace") } else { print("typed char is: ", typed) } } } .onKeyPress(characters: .controlCharacters, action: { keyPress in if vText.count == 0 { print("Control key \(keyPress.characters)") // Do whatever needed and test if backspace } return .ignored // handled would intercept the typing }) } } Let us know if that works (don't forget to close the thread if so).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
5d
Reply to Is there a way to force a fallback language?
What I usually do is to have a "language button" on the initial page. Tapping on it brings user to the app's settings, where user can select the preferred language. That may be better than trying to force to English. In fact, if user has not selected English in the list of "Preferred Languages", that may just mean he/she does not speak English. Defaulting to English will not be good as he/she may prefer French or Italian.
Replies
Boosts
Views
Activity
6d
Reply to Clarification on the planned removal of UIDesignRequiresCompatibility
In fact, it is very clear in Xcode documentation: Warning Temporarily use this key while reviewing and refining your app’s UI for the design in the latest SDKs. The system ignores this key when you build for iOS 27 or later, iPadOS 27 or later, Mac Catalyst 27 or later, macOS 27 or later, or tvOS 27 or later.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
6d
Reply to Clarification on the planned removal of UIDesignRequiresCompatibility
In some cases, liquid glass creates problems because buttons take a much larger space. Here is an example with navigation items. Prior LiquidGlass (UIDesignRequiresCompatibility = true) Everything fits without problem. With LiquidGlass (UIDesignRequiresCompatibility = false) Text is clipped as there is no more room for it as buttons are much wider. Adapting a lot of screens may require significant design changes. In this case, there is an option (not optimal, but working), by adapting the font size (https://stackoverflow.com/questions/62589078/automatically-adjust-navigation-item-title-font-size-to-fit). let title = NSLocalizedString("xxx.xxx.xxx.title", tableName: "Main", comment: "") // Retrieve the original title let navbarTitle = UILabel() navbarTitle.text = title navbarTitle.minimumScaleFactor = 0.5 navbarTitle.adjustsFontSizeToFitWidth = true navigationItem.titleView = navbarTitle
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
6d
Reply to Localising UISegmentedControl (storyboard based)
@DTS Engineer Thanks for the help. I have tried to localise in the Main.Strings, but I probably miss the correct syntax. I used: "ESW-3P-rRR.segmentTitles" = ["a", "b", "c", "d", "e"]; What is the right one ? Unfortunately your post does not include the example for syntax.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
1w
Reply to Deleting an App in Prepare for Submission State
What do you want to delete ? And why ? Why not just update the code to solve the issues raised during review and submit this new version ?
Replies
Boosts
Views
Activity
2w
Reply to First App Store review submitted after publishing on Google Play 🚀
Usually, review lasts for a few hours. Wish you good.
Replies
Boosts
Views
Activity
3w
Reply to The Items Below are Required?
In AppSoreConnect, if you go to your app, in the AppStore section, you have an app privacy link. You have there a field for entering the URL of the privacy policy (can be your web site). See the page here (in French version) Hope that helps.
Replies
Boosts
Views
Activity
4w
Reply to Textfield with both a formatter and axis
You should be able to use one of the init (e.g., axis) and then set up the format with modifiers. See if this can help: https://mehmetbaykar.com/posts/swiftui-textfield-axis-and-format/
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Picker text wrapping
Could you show the code where you populate the picker ? And screenshots ? Maybe you have to set the cell explicitly as here: func pickerView(pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusingView view: UIView!) -> UIView { var label : UILabel if view == nil { label = UILabel(frame: CGRect(x: 0, y: 0, width: 0, height: UIFont.systemFontOfSize(UIFont.systemFontSize()).lineHeight * 2 * UIScreen.mainScreen().scale)) label.textAlignment = NSTextAlignment.Center label.numberOfLines = 2 // For you should be 1 label.lineBreakMode = NSLineBreakMode.ByWordWrapping label.autoresizingMask = UIViewAutoresizing.FlexibleWidth } else { label = view as UILabel } label.text = line1 + "\n" + line2 return label; } Get details here: https://stackoverflow.com/questions/1865002/uipickerview-with-multiline-uilabel
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
May ’26
Reply to French Tax Form Blocking App Submission - Auto-Entrepreneur / VAT Exempt
Ask for a VAT number as auto entrepreneur: https://entreprendre.service-public.gouv.fr/vosdroits/F23570 Comment obtenir un numéro de TVA intracommunautaire pour auto-entrepreneur ? L'entreprise doit faire sa demande d'attribution de numéro de TVA intracommunautaire en ligne via la messagerie de son compte professionnel sur le site impots.gouv.fr. Pour cela, il faut cliquer sur « Messagerie », puis « Écrire », puis « TVA » et enfin : « Je demande un numéro de TVA intracommunautaire ».
Replies
Boosts
Views
Activity
May ’26
Reply to Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
In the same way, @IBDesignable, @IBInspectable have disappeared some time ago. Is it only with objC code or Swift as well ? I do hope I'm wrong, but sometimes, looks like they are silently killing IB to force developers to SwiftUI. That would be very very negative evolution.
Replies
Boosts
Views
Activity
May ’26
Reply to How do I make an editable NSTextField wrap inside an NSTableView cell?
Yes, I think problem comes from height calculation during editing. What I do in such a case: make the text non editable when typing on text, create a temporary NSTextField that overlays the cell The text is edited there when editing done, copy content in the cell text and delete the temporary textField.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to How do I make an editable NSTextField wrap inside an NSTableView cell?
That does not occur with a stand alone TextField. May be there is an issue with line 9: tableView.usesAutomaticRowHeights = true Could you comment it out ? Otherwise, could you try this: make non editable change to editable when you type on text -> What happens then ? Does it change to single line ? Then you can have this work around: make it editable when yo type on it when editing done, return to non editable
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Problème avec le payement des 99 $.
C'est lundi matin, après le WE, en Californie. Donc patience, je pense que la validation devrait arriver dans la journée.
Replies
Boosts
Views
Activity
May ’26