Post

Replies

Boosts

Views

Activity

Reply to Need Help Transfer Data From Button
I get the error '-[LearnHockey.FavCell CamButtonA:]: unrecognized selector sent to instance 0x7f9fe6038800'. I created the segue too but I don't know what to put in my willrowat exactly.    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {     if segue.identifier == "hs" {     let destinationController = segue.destination as? HighlightsVC       destinationController!.playerName = GlobalFavPlayer.globalFav!.yahooName!   }   }    override func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {     //not sure what to put in here   }
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’21
Reply to Need Help Transfer Data From Button
This is the best I could do with making a global variable but what do I put inside exactly willSelectRowAt, You can't put any segues in there. struct GlobalFavPlayer {       func addObserver() {   NotificationCenter.default.post(name: .passFavNotification,                   object: GlobalFavPlayer.globalFav)   }       static var globalFav: CurrentPlayers?         }
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’21
Reply to Need Help Transfer Data From Button
Oh I forgot to mention that my data source is a set so it is not like that. I'm not sure how to get the value from the cell like you have done. var favSet: Set<CurrentPlayers> {     FavouriteManager.shared.favSet   }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
I get the error '-[LearnHockey.FavCell CamButtonA:]: unrecognized selector sent to instance 0x7f9fe6038800'. I created the segue too but I don't know what to put in my willrowat exactly.    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {     if segue.identifier == "hs" {     let destinationController = segue.destination as? HighlightsVC       destinationController!.playerName = GlobalFavPlayer.globalFav!.yahooName!   }   }    override func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {     //not sure what to put in here   }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
This is the best I could do with making a global variable but what do I put inside exactly willSelectRowAt, You can't put any segues in there. struct GlobalFavPlayer {       func addObserver() {   NotificationCenter.default.post(name: .passFavNotification,                   object: GlobalFavPlayer.globalFav)   }       static var globalFav: CurrentPlayers?         }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
What exactly should I put in my button in my cell that does the action?    @IBAction func CamButtonA(_ sender: UIButton) {     //?    }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
I am still confused I don't understand what you mean by cell reference. I am also not sure how to reference the VC inside of UITableViewController.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Need Help Transfer Data From Button
The thing is I don't want the whole cell to be selected. I just want the button to be.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21