Save textfield data inside Array and then Load Array in New View

I have written some code which saves the data from textfield into an array and in the new view it loads up fine however the problem is when i go back to my first view and input new value and then press save , on history it doesnt pick up the array. below is what i have done so far:

input: sterlingpound textfield has 10.21 euro textfield has 0.99

view 1: (has save button and textfields)

@IBAction func Save(_ sender: UIButton){
   let sterlingpound = sterlingpound.text
   let euro = euro.text

   let currencyarray = [sterlingpound, euro]
   UserDefaults.standard.set(currencyarray, forKey: "DataKey"

view 2: (loading array )

overide func viewDidLoad(){


func loadArray(){
 let currencyArray = UserDefaults.standard.array(forKey: "DataKey")

 //prints out all values in array
 for element in currencyArray! {

results: 10.21 0.99

what I need is so that everytime user changes the values inside textfields and presses save all of that data is saved and loaded onto the new viewcontroller.

any help will be appreciated.