Hi, all Here is the updated version of the Contacts app with archiving. It will now let you save and load multiple contacts. I am just going to list some of the new things added. Here are the previous and next buttons on the Load View screen:
|
@IBAction func previousPressed(sender: AnyObject) { // PREVIOUS BUTTON if index == 0 { index = inventory.itemArray.count - 1 } else { index-- } println("index: (index)") indexLabel.text = "(index + 1)" loadItem(inventory.itemArray[index]) changePlaceHolderText() } |
|
@IBAction func nextPressed(sender: AnyObject) { // NEXT BUTTON if index >= inventory.itemArray.count - 1 { index = 0 } else { index++ } println("index: (index)") indexLabel.text = "(index + 1)" loadItem(inventory.itemArray[index]) changePlaceHolderText() } |
Here are the […]