Post

Replies

Boosts

Views

Activity

Comment on I try to run function on another class, But have a suspicious nil in code.
You closed your own question by marking it as correct answer (which visibly was not). Don't expect many more answers. But check the identifier you passed to instantiateViewController and what class you have defined in storyboard for this Setting VC (it should be SettingUI). And remember: you should not unwrap an optional (controllerTwo) if you are not absolutely sure it cannot be nil. But you should test with if let controllerTwo { …
Topic: Programming Languages SubTopic: Swift Tags:
May ’23
Comment on Problem with UIBarButton menu
So the question is: who is self referring to ? Could you check ? Maybe it is to an instance that does not exist anymore. Could you try adding a capture of self ? UIAction(title: "Edit Value", image: UIImage(systemName: "square.and.pencil"), handler: { [self] (_) in
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’23
Comment on I try to run function on another class, But have a suspicious nil in code.
You closed your own question by marking it as correct answer (which visibly was not). Don't expect many more answers. But check the identifier you passed to instantiateViewController and what class you have defined in storyboard for this Setting VC (it should be SettingUI). And remember: you should not unwrap an optional (controllerTwo) if you are not absolutely sure it cannot be nil. But you should test with if let controllerTwo { …
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’23
Comment on Problem with UIBarButton menu
So the question is: who is self referring to ? Could you check ? Maybe it is to an instance that does not exist anymore. Could you try adding a capture of self ? UIAction(title: "Edit Value", image: UIImage(systemName: "square.and.pencil"), handler: { [self] (_) in
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23