简体   繁体   中英

How to use extern NSString for move the string value from first view to second View Controller

I would like to use extern NSString for moving the string value from First View controller to Second View Controller .

is there any example that show how to use extern NSString to pass data between two view controllers.

Thank you.

Try like this:

in your first view controller :

extern NSString *Str;

Then define it in @interface

@interface{
NSString *Str;
}

Then assign the value as per your requirement in @Implementation

and then you can use Str as a variable in second view controller

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM