Post

Replies

Boosts

Views

Activity

Comment on Presentation single with code
the () is at the end of the closure, to tell the closure to execute and return result, which initialise the var. If you write only var controller: NSWindowController? = { … } the var is a closure, not NSWindowController. With () at the end, closure executes and returns the expected NSWindowController.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Comment on [Swift] How to properly subclass UITextfield and work with its delegate
You did it perfectly by marking the correct answer. That "closes" the thread, showing readers that you got what you needed.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on [Swift] How to properly subclass UITextfield and work with its delegate
Yes, need to be careful. You are not the only one to have met the issue. This may be of interest for you: https://stackoverflow.com/questions/35763244/implementing-a-delegate-method-in-a-subclass-whose-superclass-conforms-to-that-p
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on [Swift] How to properly subclass UITextfield and work with its delegate
As a precaution you could add information header to the subclass (///) warning that it sets its delegate and this should not be done in calling method. Or use myTF.delegate = myTF
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Who's on top? Swift, nonSwiftUI
Thanks for feed back, you can close the thread now.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on code sign failed with non zero exit code
Thanks. It will be better to start a new thread and close this one.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Who's on top? Swift, nonSwiftUI
No, normally it is the order in the storyboard that matters. If you move Red View higher in list, it will appear below Green. Even if there is no IBOutlet created, just the views in IB.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Prevent Text Field from containing 2 decimal points in Swift
Note that your code should not crash, whatever input user does. You have to make it more robust. May be the reason is you are converting to Float, something like      let value = Float(textField.text!) If so, you should instead test for nil with:          let value = Float(textField.text!) ?? 0.0
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on boundingRectWithSize returns different values in iOS15
Could you post the FB number once done, in case.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Presentation single with code
the () is at the end of the closure, to tell the closure to execute and return result, which initialise the var. If you write only var controller: NSWindowController? = { … } the var is a closure, not NSWindowController. With () at the end, closure executes and returns the expected NSWindowController.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on code sign failed with non zero exit code
Thanks for feedback and good luck. Is it your first submission ? And don't forget to close the thread.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Presentation single with code
I did not think of this case. So, just get          controller?.showWindow(self)     out of the if controller == nil { } ; then no need to reset to nil.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Crash in ios15 EXC_CRASH (SIGKILL)
Noted a similar issue reported:      https://developer.apple.com/forums/thread/688122
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Override info.plist value at runtime
That will be a Ti'punch…
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on No more mail notification from forum
I did mark my post for watching, and did not receive any notification of your answer. I filed a bug report     Aug 17, 2021 at 10:49 PM – FB9525818. Did you too ?
Replies
Boosts
Views
Activity
Aug ’21
Comment on Navigation Controller Back Button not working correctly when tapped
So you can see it for yourself if you download it.: I trust what you said. But it is no help, only some source code would allow to understand, as it is something in the project (I just tried a navigation controller in a brand new project and it worked fine.). Did you build some extensions for buttons ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’21