ios, maintain single viewcontroller as android does? -
It looks like you can put only one instance of an activity using the following code in Android.
intent .Setfag (int. FLAG_ACTIVITY_NEW_TASK; intent. FLAG_ACTIVITY_CLEAR_TOP);
How can you get the same effect in iOS?
There is no standard way to do this, but you can see a singleton like this in your view controller Can create:
+ (instancetype *) Shared View Controller {Static Foo Visitor Controller * Shared View Controller = Zero; Static transmissions_access_one talk; Despatch_precha (& amp; one time token, ^ {shareViewController = [[[FooVuCentron alloc] init];)); Return shared view controller; }
You will then be able to obtain the sharing requirement:
FooViewController * fooViewController = [FooViewController shared view controller];
Comments
Post a Comment