Adding/Concatenating two textfields into one label in iOS

后端 未结 2 443
猫巷女王i
猫巷女王i 2021-01-27 09:12

I have two text fields, say name and initial in one view controller and I want to display both as one label in another view controller. How can I do this?

2条回答
  •  长情又很酷
    2021-01-27 09:48

    To send data from one page to another have a look SO answer here And to Adding/Concatenating two string you have two ways -

    1. Use NSMutableString that has appendString method.
    2. Save nsstring in NSArray and use componentsJoinedByString Method

提交回复
热议问题