2

At first time, when i create UILabel i used address as variable. it worked ok. but when i changed the variable 'address' to 'dropOffAddress'. It become error when i run emulator Iphone. Actually it happen for all UILabel, it cant change the name of variable. I newbie in IOS. How to change the variable name ? I also cant delete the variable, error will occur. How to solve it ?

First when i create the UILabel i put name of label is 'address' then i run it ok. after that i need to change the name of UILabel to 'dropOffAddress'. Then when i run, it have error.

1
  • Go to the storyboard and remove the old connection with named 'address' and reconnect with new name 'dropOffAddress'.
    – nynohu
    Dec 27, 2016 at 1:20

2 Answers 2

1

Your label's outlets in storyboard has old names. You have to go to the storyboard, find your label then right click and remove old outlet, and create new one.

0

Hey to solve this do the following:

  • Go to your storyboard and right click the label you are trying to rename
  • hit the the x next to your old variable name 'address' to remove the relation between the button and the file you connected it with
  • reconnect the button as you did before by control dragging to the file, this time name it 'dropOffAddress'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.