How to pass a textfiled value from one view to any other view xcode

前端 未结 3 439
北海茫月
北海茫月 2021-01-26 10:53

I have to pass a UITextField value from one view to other views(2nd,3rd...views).Actually in my 3rd ViewController I have a scrollView and I have to display value on it .But UIT

3条回答
  •  再見小時候
    2021-01-26 11:44

    Declare the string globally in the AppDelegate.h this will help in keeping the value of the string constant throughout the files. Also wherever you want to add the string or change its value or assign it import the AppDelegate.h .

    Also check these links :-

    passing NSString from one class to the other

    Pass NSString from one class to another

提交回复
热议问题