In one view controller, I store some array value and I will get that value from another view controller. How to save array value in shared manager and how to retrieve that array value from another view controller? How to use shared preference in Xcode? Is that possible? Please help me with the example.Thank you.
my code is
(id)sharedManager {
static AssistantView *sharedMyManager = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ sharedMyManager = [[self alloc] init]; });
return sharedMyManager; }
and i put the value
[[AssistantView sharedManager]results]; // where results is array