
Contacts App / Inventory with Archiving 2.0
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:
Here are the […]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@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() } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@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() } |