SHARE
TWEET

Untitled

a guest May 25th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @IBAction func handlePuppySwitch(_ sender: UISwitch) {
  2.        
  3.         let updateIndexPaths = [IndexPath(row: 0, section: TableSections.dynamicSection.rawValue)]
  4.        
  5.         if (sender.isOn) {
  6.             puppyLabel.text = "Puppy Enabled"
  7.  
  8.             dynamicContent.insert("Puppy is on!", at: 0)
  9.             tableView.insertRows(at: updateIndexPaths, with: .bottom)
  10.         } else {
  11.             puppyLabel.text = "Puppy"
  12.            
  13.             dynamicContent.remove(at: 0)
  14.             tableView.deleteRows(at: updateIndexPaths, with: .left)
  15.         }
  16.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top