Skip to content

Instantly share code, notes, and snippets.

@joshteng
Created October 15, 2013 14:27
Show Gist options
  • Save joshteng/6992388 to your computer and use it in GitHub Desktop.
Save joshteng/6992388 to your computer and use it in GitHub Desktop.
#Table Delegate
def tableView(tableView, didSelectRowAtIndexPath: indexPath)
tableView.deselectRowAtIndexPath(indexPath, animated: true)
# @alert = UIAlertView.alloc.initWithTitle("test", message:"test", delegate:nil, cancelButtonTitle:"Cancel", otherButtonTitles:"Yes").show
@alert = UIAlertView.alloc.initWithTitle("Confirm Support Request", message:"A customer service representative will give you a call", delegate: self, cancelButtonTitle: "cancel", otherButtonTitles: "Yes")
@alert.show
end
def alertView(alertView, clickedButtonAtIndex: indexPath)
puts indexPath
if indexPath == 1
status_controller = StatusController.alloc.initWithOption(@option_value, @username)
self.navigationController.pushViewController(status_controller, animated: true)
end
puts @alert
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment