How to retrieve all the values Stored in NSUserDefaults?
<p>I am creating a Save button where the user clicks and stores the information using <code>NSUserDefaults</code>. When the user loads the app again, and clicks Show button, all the information stored before should display.  For example</p>

<p>Monday User inserts value 5 times: 20 , 30 ,40 ,50 ,60</p>

<p>Tuesday nothing.</p>

<p>Wednesday nothing.</p>

<p>Thursday same user inserts: 30, 20, 50, 80</p>

<p>Friday values are:  40, 20 </p>

<p>Now on Saturday when the user click show then the data should display:
20, 30,40,50,60,30,20,50,80,40,20</p>

<p>SO far my coding is:</p>

<pre><code>@IBOutlet weak var dayTB: UITextField!

@IBOutlet weak var numTB: UITextField!

@IBOutlet weak var showLabel: UILabel! // displays all the values stored

var Money = 0
@IBAction func saveBtn(_ sender: Any) {
    Money += 1
    var MoneyNumberString:String = String(format: "Dollars:%i", Money)
    self.showLabel.text = (string: MoneyNumberString)
    let defaults: UserDefaults = UserDefaults.standard 
    defaults.set(MoneyNumberString, forKey: "money")
    defaults.synchronize() 
}

 @IBAction func showbtnact(_ sender: Any) {
    let defaults: UserDefaults = UserDefaults.standard
    var money = defaults.value(forKey: "money") as? String
    showLabel.text! = money!
}
</code></pre>

<p>Hope there is a solution for this problem :) Thanks</p>