UI_Singleton (single-case value) and ui_singleton
Create a class to inherit NSObject
# Import <Foundation/Foundation. h> @ interface FinxingDate: NSObject # pragma mark-create Singleton method // id of the difference as the return value (generic pointer) I don't know which type of object instancetype can be dynamically recognized // naming conventions, share + class name // + (metadata data *) + (instancetype) Begin finxingdate; // host @ property (nonatomic, strong) NSString * inputString; @ end
@ Implementation FinxingDate // static value-preserving effect static FinxingDate * date = nil; // This method is used to create a singleton + (instancetype) complete FinxingDate {// if (nil = date) {date = [[FinxingDate alloc] init];} return date;} @ end must be executed for the first time
Assign the value[FinxingDate into FinxingDate]. inputString
You can transfer values between multiple pages.
Copyright Disclaimer: This article is an original outlan article and cannot be reproduced without the permission of the blogger.