I am new to swift and havne't programmed in objective C. So i'm new :-) trying to do something fairly simple. Link a table view cell click to call a method in the controller like so http://prntscr.com/4m9kf7
Edit:
i have these methods in my MasterController
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
override func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) {
I have added breakpoints in all 4 of them. and when clicking on the cell it doesn't stop in either of them. See Screen shot:
http://prntscr.com/4m9ql0
You need to implement the didSelectRowAtIndexPath
delegate method and put your handling code inside it.
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
//CODE TO BE RUN ON CELL TOUCH
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With