What is the best way to display a int variable together with a string?
I have a table view with custom cell. The cell contains some labels and two buttons. One of the labels is a nameLabel. This label contains the name of the cell. The buttons is a minusButton and a plussButton. And a label that is counting the presses on these buttons. The table view VC is embedded in a tab bar controller. I have a summary VC where I would like to display the amount in the countingLabel and the text in the corresponding nameLabel together.
So, when the user presses on the plussButton in the cell named iPhone once, the summary VC should display: 1 iPhone.
If the user presses the plussButton again, the summary VC shoud display 2 iPhone. And if the user also presses the plussButton in the cell named iPad the summary VC should display:
The items should be in separate lines.
And, of course, the opposite function when the minusButton is pressed.
The function should be similar to most shopping apps.
Powered by WPeMatico