Post

Replies

Boosts

Views

Activity

VNRecognizeTextRequest does not recognise single letters
I use VNRecognizeTextRequest to recognise a series of letters drawn by hand in the app. When I draw a few letters, it usually works fine. is recognised as "LV" But if I draw a single letter: or in most cases, I get zero observation, even using recognitionLevel3. But this was recognized as "V": It is apparently not a question of how well drawn letters, as even this was recognised as "LI": However, this one was not I have even tried to add custom words, to no avail: request.customWords = ["I", "V", "L"] General observation is that single letters are rarely or never recognised, dual letters may be recognised ; 3 letters are systematically recognised. But, I have now increased the brushWidth, and it works much better, even with single letter: What tuning of VNRecognizeTextRequest do I miss ?
5
0
263
3w
Liquid glass problems in UIToolbar
I add a series of buttons in the UIToolbar of accessoryView. Before liquidGlass (Xcode 26.6, iOS 26), I get this: Buttons are properly stacked, allowing up to 8 buttons, which is what I need. But with liquidGlass, buttons are now enclosed in a useless bubble, and thus take much more space. No way to accommodate 8 buttons anymore, they are displayed in the "…" followup section, which is very inconvenient. In iOS 26, I can still set UIDesignRequiresCompatibility to true and get the expected presentation. But that does not work in Xcode 27 / iOS 27. Code is essentially the following: let bar = UIToolbar(frame:CGRect(x: 0, y: 0, width: 200, height: 44)) let letterBack = UIImage(named: "letterBackground")! let targetSize = CGSize(width: 36, height: 36) let scaledImage = letterBack.scalePreservingAspectRatio( targetSize: targetSize ) let letterI = UIBarButtonItem(title: "I", style: .plain, target: self, action: #selector(letterTapped(_:))) letterI.setBackgroundImage(scaledImage, for: .normal, barMetrics: .default) // Same for other letters bar.items = [letterI, letterV, letterX, letterL, letterC, flexibleSpace, peseudoReturn] bar.sizeToFit() aTextField.inputAccessoryView = bar I have tried to use barMetrics: .compact to no avail So, a few questions: Is it possible, with liquidGlass, to have the buttons displayed without their ellipse bubble, so that they stack against each other ? Is there other appearence setting to set ? Or should I give up toolbar and create a collectionView that I will place atop keyboard ? In anycase, liquidGlass is really problematic in term of screen estate use.
2
0
692
Aug ’26
emoji don't show in UITextField with Xcode 27 ?
Using Xcode 27.0ß4. I set a textField text with an emoji: statusReponseLabel.text = "👍" In iOS 27, I get the expected result (on the left). In iOS 26.3 (simulator), I just get a question mark. I have tested with a print, the text is properly set. I replaced with: statusReponseLabel.text = "A👍B" In iOS 26.3, I get A followed by the question mark, B is skipped as well. Is it an iOS issue or just a simulator issue in beta version ?
0
0
255
Aug ’26
Some discussion on gestureRecognizers
I would appreciate some feedback on this simple technical point. When a gesture is defined in code, it is simply added to the view with myFirstView.addGestureRecognizer(someGesture) That's fine. But, if by mistake, the same gesture is added later to another view myOtherView.addGestureRecognizer(someGesture) myFirstView will not receive anymore the notification. That's well known and documented, because in fact the gesture references the view and can only reference one. So my point: this may be a bit misleading, as API let one believe that the gesture is attached to the view ; hence, why not attach to a second view ? wouldn't it be better to have API where view is explicitly "attached" to gesture ? someGesture.attach(to: myFirstView) Doing so, if I later someGesture.attach(to: myOtherView) it would be clearer I am changing the attached view. I noted that when we define a gesture in IB, we can only connect from the view to the gesture, not from gesture to the view which seems to follow the same logic. A simple extension does it: extension UITapGestureRecognizer { func attach(to view: UIView) { view.addGestureRecognizer(self) } } Any thought ? PS: I'm amazed by code completion. I just typed extension UITapGestureRecognizer { func attach(to view: UIView) and it completed automatically the code with view.addGestureRecognizer(self)
0
0
203
Aug ’26
Emoji rotated variation
Emoji are very convenient to be used instead of image, directly as String. In some cases, a variation to show them rotated (but still as String, not converted as image) would be useful. Examples may be arrows or flags if you need to show them floating from the top and not from the side of the pole. And I would declare: flag = "🇺🇸" or So the question; is it possible to generate new emoji as rotated initial emojis ? Or better, do such extensions already exist.
3
1
2.3k
Aug ’26
Images in segmentedControl segments do not draw properly
This is UIKit app, in Xcode 26.3 (but same issue in 16.4). I create (in IB) a segmentedControl, with 2 segments. I set the images that are stored in assets. They show properly in Xcode. But when running (26.1 simulator), they just show a black image. In Xcode                                                                           On simulator at runtime I've tried to set background to clear as well as tint, to no avail. What am I missing ?
5
0
590
Aug ’26
MacBook Air icon does not show in airdrop
That is not exactly a development issue, but more a Mac configuration (which may hide other problems ?). I use a new MacBookAir with MacOS 26. When I Airdrop from another Mac (15.7.8) the MacBookAir does not show any icon but a blank area, whilst other devices show their icons: That seems an old issue with MacBookAir: https://www.reddit.com/r/macbookair/comments/1benu4o/blank_airdrop_icon/ Beside this, Airdrop works OK. Just as if the MacBookAir icon was missing in some system file ? Has anyone a solution ? I filed a bug report FB24034384
7
0
658
Aug ’26
preferredLanguages incorrectly read in iOS 26.1 simulators ?
I have to use the user preferred language (the first, here French). In didFinishLaunchingWithOptions, I select the first in the array of languages. print(#function, Locale.preferredLanguages) let prefLanguage = Locale.preferredLanguages.count > 0 ? Locale.preferredLanguages[0] : "en" So I expect to get Français. That works OK in iOS 16 (both on device and simulator) as well as on iPad iOS 26, but not on iOS 26.1 simulator. log for iOS 16 simulator or on devices: application(_:didFinishLaunchingWithOptions:) ["fr-FR", "en-FR", "es-FR", "it-FR", "de-FR", "el-FR"] log for iOS 26 (Xcode 26.3) application(_:didFinishLaunchingWithOptions:) ["en-FR", "fr-FR", "es-FR", "de-FR", "it-FR", "el-FR"] Order is changed. Is this a known bug or am I missing something ?
1
0
1.1k
Jul ’26
Subclassing UISegmentedControl in Xcode 26 strange behavior
UIKit application. I have a UISegmentedControl which displays flags, using the emoji for the text of the segment (SegmentedControl defined in stroryboard). Depending app is in Portrait or Landscape, the segmented control is displayed vertically or horizontally. When horizontal, nothing to do, direct display from stroryboard, works as expected. When vertical (Portrait), I have to rotate the UISegmentedControl π/2. And To get the flags properly oriented, I rotate each image -π/2. That works fine when compiling with Xcode 16.4. But when compiling with Xcode 26.3, rotation of segments do not work. Here is the illustration, compile on target simulators 26.2 in both cases (3rd image explained below):                             Xcode 16.4           -               Xcode 26.3 subviews rotated   -     removed subviews rotation Now the code. I subclassed UISegmentedControl to draw at will. class SegmentedControlRotable: UISegmentedControl { @IBInspectable var vertical : Bool = false // IBInspectable is now ignored override func draw(_ rect: CGRect) { if vertical { self.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: -CGFloat.pi / 2.0) // reverse rotate // 3rd picture: this line commented out. } } else { // does no change self.transform = CGAffineTransform(rotationAngle: 0.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: 0.0) } } } // More code with touchesEnded, works OK in both cases } In fact, with Xcode 26, segments are always drawn on an horizontal line. l I noticed that the structure of self.subviews is different. 19 subviews in Xcode 16, 12 in Xcode 26. I removed the rotation of subviews, and it's OK. Just flags are now vertical (as illustrated above). What do I miss ? How to rotate the subviews in Xcode 26 ?
0
0
346
Jun ’26
Localising UISegmentedControl (storyboard based)
In this iOS app, with UIKit in Swift, I create a UISegmentedControl in stroryboard. I define the text for each segmentTitles in IB ,and need to localise. I have tried in the main.xxx files "id.segmentTitles" = ["a", "b", "c", "d", "e"]; to no avail. I understand this is a very very old issue that UISegmentedControl are not localized from stroryboard: https://stackoverflow.com/questions/12884751/uisegmentedcontrol-and-localization I tried to use a similar approach as for UITextView (which are not either localized) helpTextView.text = NSLocalizedString("id.text", tableName: "Main", comment: "helpTextView") But cannot make it. I found a work around, by localising in code: let seg0 = NSLocalizedString("a", comment: "Segment") segmentedControl.setTitle(seg0, forSegmentAt: 0) However, I get error messages in log unless I clear the segment titles in IB: ERROR: id.segmentTitles[0] not found in table Main of bundle CFBundle 0x600003b101c0 Is there a solution to this ?
4
0
561
Jun ’26
func scene(_ scene: UIScene, openURLContexts URLContexts: Set) not called
This is an iOS app that runs on Mac in iPad mode. on Mac, I want to be able to drop a file (pdf) on the app icon and see it in the app to display some notification that operation was OK. For this, I use notification, sent from sceneDelegate. All VC add observer for the notification, allowing to display whatever the front VC is. It works OK in most cases, except when: I drop a file on the app icon in the dock (app launched from Xcode which creates the icon in dock) In this case, I need to repeat the drop to get the notification sent. After that, it works systematically. The problem does not come from notification, but because func scene(_ scene: UIScene, openURLContexts URLContexts: Set) is not called, as I could test with: func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { print("dropped") } dropped is logged only on second drop. Why does this occur only for the dock icon ?
0
0
495
May ’26
New AppStore Connect Welcome page layout bugged
The Welcome page of AppStoreConnect has slightly changed. Analysis section is out, with an explanation message: News Access Analytics in the Apps section Analytics is now available in the Apps section. Get access to over 100 new metrics, improved filtering capabilities, and new monetization benchmarking reports. Learn more Problem: link does not work. https://developer.apple.com/news/?id=hh6v4b55 And I found nothing in the apps section… Same for you ?
0
0
348
Mar ’26
Inserting a SF Symbol in a textField or a Label, as text
In UIKit, Swift, I would need to insert a SF Symbol into a textField or a label. The symbol shows correctly in Xcode (in a string in code or in IB). But at runtime, the symbol is not found and replaced in the TextField by the unfound symbol: Is there a way to achieve this and display the symbol as a pure string, like we do with emoji ?
Replies
7
Boosts
0
Views
846
Activity
3w
VNRecognizeTextRequest does not recognise single letters
I use VNRecognizeTextRequest to recognise a series of letters drawn by hand in the app. When I draw a few letters, it usually works fine. is recognised as "LV" But if I draw a single letter: or in most cases, I get zero observation, even using recognitionLevel3. But this was recognized as "V": It is apparently not a question of how well drawn letters, as even this was recognised as "LI": However, this one was not I have even tried to add custom words, to no avail: request.customWords = ["I", "V", "L"] General observation is that single letters are rarely or never recognised, dual letters may be recognised ; 3 letters are systematically recognised. But, I have now increased the brushWidth, and it works much better, even with single letter: What tuning of VNRecognizeTextRequest do I miss ?
Replies
5
Boosts
0
Views
263
Activity
3w
Liquid glass problems in UIToolbar
I add a series of buttons in the UIToolbar of accessoryView. Before liquidGlass (Xcode 26.6, iOS 26), I get this: Buttons are properly stacked, allowing up to 8 buttons, which is what I need. But with liquidGlass, buttons are now enclosed in a useless bubble, and thus take much more space. No way to accommodate 8 buttons anymore, they are displayed in the "…" followup section, which is very inconvenient. In iOS 26, I can still set UIDesignRequiresCompatibility to true and get the expected presentation. But that does not work in Xcode 27 / iOS 27. Code is essentially the following: let bar = UIToolbar(frame:CGRect(x: 0, y: 0, width: 200, height: 44)) let letterBack = UIImage(named: "letterBackground")! let targetSize = CGSize(width: 36, height: 36) let scaledImage = letterBack.scalePreservingAspectRatio( targetSize: targetSize ) let letterI = UIBarButtonItem(title: "I", style: .plain, target: self, action: #selector(letterTapped(_:))) letterI.setBackgroundImage(scaledImage, for: .normal, barMetrics: .default) // Same for other letters bar.items = [letterI, letterV, letterX, letterL, letterC, flexibleSpace, peseudoReturn] bar.sizeToFit() aTextField.inputAccessoryView = bar I have tried to use barMetrics: .compact to no avail So, a few questions: Is it possible, with liquidGlass, to have the buttons displayed without their ellipse bubble, so that they stack against each other ? Is there other appearence setting to set ? Or should I give up toolbar and create a collectionView that I will place atop keyboard ? In anycase, liquidGlass is really problematic in term of screen estate use.
Replies
2
Boosts
0
Views
692
Activity
Aug ’26
emoji don't show in UITextField with Xcode 27 ?
Using Xcode 27.0ß4. I set a textField text with an emoji: statusReponseLabel.text = "👍" In iOS 27, I get the expected result (on the left). In iOS 26.3 (simulator), I just get a question mark. I have tested with a print, the text is properly set. I replaced with: statusReponseLabel.text = "A👍B" In iOS 26.3, I get A followed by the question mark, B is skipped as well. Is it an iOS issue or just a simulator issue in beta version ?
Replies
0
Boosts
0
Views
255
Activity
Aug ’26
Some discussion on gestureRecognizers
I would appreciate some feedback on this simple technical point. When a gesture is defined in code, it is simply added to the view with myFirstView.addGestureRecognizer(someGesture) That's fine. But, if by mistake, the same gesture is added later to another view myOtherView.addGestureRecognizer(someGesture) myFirstView will not receive anymore the notification. That's well known and documented, because in fact the gesture references the view and can only reference one. So my point: this may be a bit misleading, as API let one believe that the gesture is attached to the view ; hence, why not attach to a second view ? wouldn't it be better to have API where view is explicitly "attached" to gesture ? someGesture.attach(to: myFirstView) Doing so, if I later someGesture.attach(to: myOtherView) it would be clearer I am changing the attached view. I noted that when we define a gesture in IB, we can only connect from the view to the gesture, not from gesture to the view which seems to follow the same logic. A simple extension does it: extension UITapGestureRecognizer { func attach(to view: UIView) { view.addGestureRecognizer(self) } } Any thought ? PS: I'm amazed by code completion. I just typed extension UITapGestureRecognizer { func attach(to view: UIView) and it completed automatically the code with view.addGestureRecognizer(self)
Replies
0
Boosts
0
Views
203
Activity
Aug ’26
Emoji rotated variation
Emoji are very convenient to be used instead of image, directly as String. In some cases, a variation to show them rotated (but still as String, not converted as image) would be useful. Examples may be arrows or flags if you need to show them floating from the top and not from the side of the pole. And I would declare: flag = "🇺🇸" or So the question; is it possible to generate new emoji as rotated initial emojis ? Or better, do such extensions already exist.
Replies
3
Boosts
1
Views
2.3k
Activity
Aug ’26
Images in segmentedControl segments do not draw properly
This is UIKit app, in Xcode 26.3 (but same issue in 16.4). I create (in IB) a segmentedControl, with 2 segments. I set the images that are stored in assets. They show properly in Xcode. But when running (26.1 simulator), they just show a black image. In Xcode                                                                           On simulator at runtime I've tried to set background to clear as well as tint, to no avail. What am I missing ?
Replies
5
Boosts
0
Views
590
Activity
Aug ’26
MacBook Air icon does not show in airdrop
That is not exactly a development issue, but more a Mac configuration (which may hide other problems ?). I use a new MacBookAir with MacOS 26. When I Airdrop from another Mac (15.7.8) the MacBookAir does not show any icon but a blank area, whilst other devices show their icons: That seems an old issue with MacBookAir: https://www.reddit.com/r/macbookair/comments/1benu4o/blank_airdrop_icon/ Beside this, Airdrop works OK. Just as if the MacBookAir icon was missing in some system file ? Has anyone a solution ? I filed a bug report FB24034384
Replies
7
Boosts
0
Views
658
Activity
Aug ’26
How to know gender of system voice
I would need to know which gender is used by the iOS system for speechSynthesis. I have tried let aVoice = AVSpeechSynthesisVoice() print(#function, #line, aVoice.gender.rawValue) But always get 0, for unspecified
Replies
1
Boosts
0
Views
534
Activity
Jul ’26
preferredLanguages incorrectly read in iOS 26.1 simulators ?
I have to use the user preferred language (the first, here French). In didFinishLaunchingWithOptions, I select the first in the array of languages. print(#function, Locale.preferredLanguages) let prefLanguage = Locale.preferredLanguages.count > 0 ? Locale.preferredLanguages[0] : "en" So I expect to get Français. That works OK in iOS 16 (both on device and simulator) as well as on iPad iOS 26, but not on iOS 26.1 simulator. log for iOS 16 simulator or on devices: application(_:didFinishLaunchingWithOptions:) ["fr-FR", "en-FR", "es-FR", "it-FR", "de-FR", "el-FR"] log for iOS 26 (Xcode 26.3) application(_:didFinishLaunchingWithOptions:) ["en-FR", "fr-FR", "es-FR", "de-FR", "it-FR", "el-FR"] Order is changed. Is this a known bug or am I missing something ?
Replies
1
Boosts
0
Views
1.1k
Activity
Jul ’26
Subclassing UISegmentedControl in Xcode 26 strange behavior
UIKit application. I have a UISegmentedControl which displays flags, using the emoji for the text of the segment (SegmentedControl defined in stroryboard). Depending app is in Portrait or Landscape, the segmented control is displayed vertically or horizontally. When horizontal, nothing to do, direct display from stroryboard, works as expected. When vertical (Portrait), I have to rotate the UISegmentedControl π/2. And To get the flags properly oriented, I rotate each image -π/2. That works fine when compiling with Xcode 16.4. But when compiling with Xcode 26.3, rotation of segments do not work. Here is the illustration, compile on target simulators 26.2 in both cases (3rd image explained below):                             Xcode 16.4           -               Xcode 26.3 subviews rotated   -     removed subviews rotation Now the code. I subclassed UISegmentedControl to draw at will. class SegmentedControlRotable: UISegmentedControl { @IBInspectable var vertical : Bool = false // IBInspectable is now ignored override func draw(_ rect: CGRect) { if vertical { self.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: -CGFloat.pi / 2.0) // reverse rotate // 3rd picture: this line commented out. } } else { // does no change self.transform = CGAffineTransform(rotationAngle: 0.0) for subview in self.subviews { subview.transform = CGAffineTransform(rotationAngle: 0.0) } } } // More code with touchesEnded, works OK in both cases } In fact, with Xcode 26, segments are always drawn on an horizontal line. l I noticed that the structure of self.subviews is different. 19 subviews in Xcode 16, 12 in Xcode 26. I removed the rotation of subviews, and it's OK. Just flags are now vertical (as illustrated above). What do I miss ? How to rotate the subviews in Xcode 26 ?
Replies
0
Boosts
0
Views
346
Activity
Jun ’26
Localising UISegmentedControl (storyboard based)
In this iOS app, with UIKit in Swift, I create a UISegmentedControl in stroryboard. I define the text for each segmentTitles in IB ,and need to localise. I have tried in the main.xxx files "id.segmentTitles" = ["a", "b", "c", "d", "e"]; to no avail. I understand this is a very very old issue that UISegmentedControl are not localized from stroryboard: https://stackoverflow.com/questions/12884751/uisegmentedcontrol-and-localization I tried to use a similar approach as for UITextView (which are not either localized) helpTextView.text = NSLocalizedString("id.text", tableName: "Main", comment: "helpTextView") But cannot make it. I found a work around, by localising in code: let seg0 = NSLocalizedString("a", comment: "Segment") segmentedControl.setTitle(seg0, forSegmentAt: 0) However, I get error messages in log unless I clear the segment titles in IB: ERROR: id.segmentTitles[0] not found in table Main of bundle CFBundle 0x600003b101c0 Is there a solution to this ?
Replies
4
Boosts
0
Views
561
Activity
Jun ’26
func scene(_ scene: UIScene, openURLContexts URLContexts: Set) not called
This is an iOS app that runs on Mac in iPad mode. on Mac, I want to be able to drop a file (pdf) on the app icon and see it in the app to display some notification that operation was OK. For this, I use notification, sent from sceneDelegate. All VC add observer for the notification, allowing to display whatever the front VC is. It works OK in most cases, except when: I drop a file on the app icon in the dock (app launched from Xcode which creates the icon in dock) In this case, I need to repeat the drop to get the notification sent. After that, it works systematically. The problem does not come from notification, but because func scene(_ scene: UIScene, openURLContexts URLContexts: Set) is not called, as I could test with: func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { print("dropped") } dropped is logged only on second drop. Why does this occur only for the dock icon ?
Replies
0
Boosts
0
Views
495
Activity
May ’26
Window size of iOS app running on Mac
I need constraint the window size for an iOS app running on Mac. That's easy for a MacApp, using self.window?.minSize.width = 450 self.window?.maxSize.width = 450 or use func windowDidResize(_ notification: Notification) { } but how to achieve it in UIKit ?
Replies
3
Boosts
0
Views
1.1k
Activity
Apr ’26
New AppStore Connect Welcome page layout bugged
The Welcome page of AppStoreConnect has slightly changed. Analysis section is out, with an explanation message: News Access Analytics in the Apps section Analytics is now available in the Apps section. Get access to over 100 new metrics, improved filtering capabilities, and new monetization benchmarking reports. Learn more Problem: link does not work. https://developer.apple.com/news/?id=hh6v4b55 And I found nothing in the apps section… Same for you ?
Replies
0
Boosts
0
Views
348
Activity
Mar ’26