Post

Replies

Boosts

Views

Activity

Reply to Tuple Comparision
true and false are not 1 and 0 as in other languages. But of course, this works let myTuple = ("blue", 0) let otherTuple = ("blue", 1) if myTuple < otherTuple { print("yes it evaluates") } and this as well: let myTuple2 = ("blue", false) let otherTuple2 = ("blue", true) if myTuple2 == otherTuple2 { print("yes it evaluates") } else { print("Not equal") } You may be interested in reading this discussion in Swift forum: https://forums.swift.org/t/why-bool-doesnt-conform-to-comparable/10698/6
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’25
Reply to Trying to Connect an Outlet to a Gesture Recogniser in Storyboard
I have created the tap gesture in storyboard and added it to the view controller hierarchy by dragging the tap gesture onto the view controller. You drag in the viewController, and try to apply to multiple objects (each cell's label: that's what "repeating content" means here). That cannot work as a gesture is attached to a unique object. So you need as many tapGestures as there are cells. The simplest in your case would be to create the tap gesture in code, in the init of collectionCell. Or try to declare the tapGesture in storyboard in the cell.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’25
Reply to Trying to Connect an Outlet to a Gesture Recogniser in Storyboard
You do not provide enough information about you proceeded. Did you do those steps ? create a tapGesture in storyboard by dragging the object in the viewController structure ? -> Could you show the attributes inspector of the tapGesture ? you control dragged in storyboard from the tapGesture to the label object in the viewController structure (in storyboard)? -> Do you see the tapGesture listed Connections inspector of the label? You say: When I connect the outlet to the gesture recogniser I get this error: How exactly do you try to connect ? Is it the label in storyboard or IBOutlet in code (you should not do it) ? Please clarify   How can I connect the tap gesture recogniser in storyboard to my code? What do you want to connect exactly in code ? You don't have to connect the tapGesture to the label IBOutlet in code. The connection is made in storybaord as explained before. If you want to declare an action for the tapGesture, then create the IBAction @IBAction func tapped(_ sender: UITapGestureRecognizer) { } select the tapGesture in stroryboard corntrol-drag from the tapgesture to the IBAction -> You should now see "tapped" in the connections inspector of the tapGesture in the sent actions section. It seems you have tried to connect the incrementNumberOfTaps action to the cell and not to the tapGesture.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’25
Reply to Cell Delegate Method Not Being Called
When looking at code in documentation, registration is done differently, by creating a default content configuration and then adjusting: let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, Int> { cell, indexPath, item in var contentConfiguration = cell.defaultContentConfiguration() contentConfiguration.text = "\(item)" contentConfiguration.textProperties.color = .lightGray cell.contentConfiguration = contentConfiguration } Could you also test with a log: let mainCellRegistration = UICollectionView.CellRegistration<EmotionExplorerCell, Item> { cell, indexPath, item in print("cell", cell, indexPath, item) // <<-- ADD THIS switch item { case .main(emotion: let emotion, icon: let iconName, red: let red, green: let green, blue: let blue) : cell.configure(iconName: iconName, title: emotion, red: red, green: green, blue: blue) cell.index = indexPath.row cell.delegate = self case .title(title: -, buttonTitle:
Topic: UI Frameworks SubTopic: UIKit
Jul ’25
Reply to Cell Delegate Method Not Being Called
However, calling the cell delegate method from the cell is not calling the method in the view controller. It's not very clear.   calling the cell delegate method from the cell Which method is it ? repromptLLMForIconName ?   is not calling the method in the view controller. Which method is it ? Have you checked that delegate is not nil ? print("delegate", delegate) delegate?.repromptLLMForIconName(iconName, index: index, emotion: emotion, red: red, green: green, blue: blue)
Topic: UI Frameworks SubTopic: UIKit
Jul ’25
Reply to No more simulators showing in Xcode
I cleaned Xcode caches. I reinstalled Xcode 14.2 To no avail. If I try to add simulator, then look at the simulators list, I get a whole bunch of(all for iOS 16.2). But no one appear in the target list for compiling. I'll try solution proposed here: https://stackoverflow.com/questions/78372541/xcode-doesnt-show-simulators Even though XProtectPayloads. If it says 151, it doesn' work. I updated system to the latest available for this MacBook. No change. I disabled xprotect. No change.
Jun ’25
Reply to How can I have a view cover the status bar?
In UIKit, you can call override var prefersStatusBarHidden: Bool { return true } In SwiftUI, equivalent by calingl the modifier: struct ContentView: View { var body: some View { Text("Hello, World!") .statusBar(hidden: true) } } More details here: https://medium.com/app-makers/how-to-hide-the-status-bar-in-swiftui-all-methods-explained-07eeca7ac3d6
Topic: UI Frameworks SubTopic: SwiftUI
Jun ’25
Reply to Epic games website sign in page
We all would like all bugs to fixed immediately, at our will. But that does not work like this. iOS 26 is a beta, with all the potential issues. You use it at your own risk But you can: report a bug in feedback assistant use a released version of iOS contact the web site.The problem may be on their side.
Topic: Safari & Web SubTopic: General
Jun ’25
Reply to App
That is not a question for this forum, which is about your app development, not about using apps. Don't forget that iOS 26 is beta that you use at your own risks. If you need stability you should stay with a released version. So,you should either: contact TikTok (maybe a users forum) file a bug report
Topic: Community SubTopic: Apple Developers Tags:
Jun ’25
Reply to Is Half Open Range Subset of One Sided Range
@SaurabhSaini Is it just a question of terminology and documentation ? [..<2] of One Sided Range as it is already included in Half Open Range? Could you explain what you mean precisely ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Can't post because "This post contains sensitive language"
The anti spam is crazy. At the end, it will even more discourage developers to post on the forum. I had a similar problem with word f r e e: https://developer.apple.com/forums/thread/779778 You should file a yet another bug report.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Tuple Comparision
true and false are not 1 and 0 as in other languages. But of course, this works let myTuple = ("blue", 0) let otherTuple = ("blue", 1) if myTuple < otherTuple { print("yes it evaluates") } and this as well: let myTuple2 = ("blue", false) let otherTuple2 = ("blue", true) if myTuple2 == otherTuple2 { print("yes it evaluates") } else { print("Not equal") } You may be interested in reading this discussion in Swift forum: https://forums.swift.org/t/why-bool-doesnt-conform-to-comparable/10698/6
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Trying to Connect an Outlet to a Gesture Recogniser in Storyboard
I have created the tap gesture in storyboard and added it to the view controller hierarchy by dragging the tap gesture onto the view controller. You drag in the viewController, and try to apply to multiple objects (each cell's label: that's what "repeating content" means here). That cannot work as a gesture is attached to a unique object. So you need as many tapGestures as there are cells. The simplest in your case would be to create the tap gesture in code, in the init of collectionCell. Or try to declare the tapGesture in storyboard in the cell.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Trying to Connect an Outlet to a Gesture Recogniser in Storyboard
You do not provide enough information about you proceeded. Did you do those steps ? create a tapGesture in storyboard by dragging the object in the viewController structure ? -> Could you show the attributes inspector of the tapGesture ? you control dragged in storyboard from the tapGesture to the label object in the viewController structure (in storyboard)? -> Do you see the tapGesture listed Connections inspector of the label? You say: When I connect the outlet to the gesture recogniser I get this error: How exactly do you try to connect ? Is it the label in storyboard or IBOutlet in code (you should not do it) ? Please clarify   How can I connect the tap gesture recogniser in storyboard to my code? What do you want to connect exactly in code ? You don't have to connect the tapGesture to the label IBOutlet in code. The connection is made in storybaord as explained before. If you want to declare an action for the tapGesture, then create the IBAction @IBAction func tapped(_ sender: UITapGestureRecognizer) { } select the tapGesture in stroryboard corntrol-drag from the tapgesture to the IBAction -> You should now see "tapped" in the connections inspector of the tapGesture in the sent actions section. It seems you have tried to connect the incrementNumberOfTaps action to the cell and not to the tapGesture.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to Invalid Characters in Info.plist File
Could you post your info.plist ? Open it as Source code and post the compete file.
Replies
Boosts
Views
Activity
Jul ’25
Reply to Cell Delegate Method Not Being Called
Where is configureDataSource called ?
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Jul ’25
Reply to Cell Delegate Method Not Being Called
When looking at code in documentation, registration is done differently, by creating a default content configuration and then adjusting: let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, Int> { cell, indexPath, item in var contentConfiguration = cell.defaultContentConfiguration() contentConfiguration.text = "\(item)" contentConfiguration.textProperties.color = .lightGray cell.contentConfiguration = contentConfiguration } Could you also test with a log: let mainCellRegistration = UICollectionView.CellRegistration<EmotionExplorerCell, Item> { cell, indexPath, item in print("cell", cell, indexPath, item) // <<-- ADD THIS switch item { case .main(emotion: let emotion, icon: let iconName, red: let red, green: let green, blue: let blue) : cell.configure(iconName: iconName, title: emotion, red: red, green: green, blue: blue) cell.index = indexPath.row cell.delegate = self case .title(title: -, buttonTitle:
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Jul ’25
Reply to Cell Delegate Method Not Being Called
However, calling the cell delegate method from the cell is not calling the method in the view controller. It's not very clear.   calling the cell delegate method from the cell Which method is it ? repromptLLMForIconName ?   is not calling the method in the view controller. Which method is it ? Have you checked that delegate is not nil ? print("delegate", delegate) delegate?.repromptLLMForIconName(iconName, index: index, emotion: emotion, red: red, green: green, blue: blue)
Topic: UI Frameworks SubTopic: UIKit
Replies
Boosts
Views
Activity
Jul ’25
Reply to Detect if a change has been made to biometrics using FaceID or TouchID
Why would a third party have to know and the right to know ? IMHO that would be a privacy (and possibly security) breach, isn't it ?
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to What is the least painful way to start using Swift packages in my very old app?
Just a personal opinion. Unless you have really imperative reason to refactor your project, and if your app works correctly, I would not undertake such a work. You will spend huge amount of time with the risk to create a lot of bugs. In any case, make sure you have a complete project back up (not only Time Machine).
Replies
Boosts
Views
Activity
Jun ’25
Reply to No more simulators showing in Xcode
I cleaned Xcode caches. I reinstalled Xcode 14.2 To no avail. If I try to add simulator, then look at the simulators list, I get a whole bunch of(all for iOS 16.2). But no one appear in the target list for compiling. I'll try solution proposed here: https://stackoverflow.com/questions/78372541/xcode-doesnt-show-simulators Even though XProtectPayloads. If it says 151, it doesn' work. I updated system to the latest available for this MacBook. No change. I disabled xprotect. No change.
Replies
Boosts
Views
Activity
Jun ’25
Reply to How can I have a view cover the status bar?
In UIKit, you can call override var prefersStatusBarHidden: Bool { return true } In SwiftUI, equivalent by calingl the modifier: struct ContentView: View { var body: some View { Text("Hello, World!") .statusBar(hidden: true) } } More details here: https://medium.com/app-makers/how-to-hide-the-status-bar-in-swiftui-all-methods-explained-07eeca7ac3d6
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jun ’25
Reply to Epic games website sign in page
We all would like all bugs to fixed immediately, at our will. But that does not work like this. iOS 26 is a beta, with all the potential issues. You use it at your own risk But you can: report a bug in feedback assistant use a released version of iOS contact the web site.The problem may be on their side.
Topic: Safari & Web SubTopic: General
Replies
Boosts
Views
Activity
Jun ’25
Reply to App
That is not a question for this forum, which is about your app development, not about using apps. Don't forget that iOS 26 is beta that you use at your own risks. If you need stability you should stay with a released version. So,you should either: contact TikTok (maybe a users forum) file a bug report
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Jun ’25