In this way, after popping, the viewController still has a strong reference pointing to it and will not be cleared. The next time you push, you will still push to the viewController
The simplest thing is to make it a singleton. There is only one instance in the entire app life cycle. Create it once during initialization, and use it the rest of the time.
This is time limited, right? If you push to enter the page again in a short time, you will stay on the pop-out interface. You only need to judge the time difference between the time of exit and the time of re-entering. If the time difference is less than the time difference, the interface will pop up. If the time difference is greater than the time difference, the interface will be refreshed.
There is only one thing like Moments in the APP, I think it is better to make it a singleton. After looking at it, when the network is disconnected, it shows that it is loading when I pull it up. When I go back and go back in, it still shows that it is loading. It feels like it is not released. And the data is also cached. After disconnecting from the Internet, killing the APP, and re-entering, the data refreshed before in the circle of friends can be seen
You only need to have a strong reference to the viewController
In this way, after popping, the viewController still has a strong reference pointing to it and will not be cleared. The next time you push, you will still push to the viewController
That should actually be cache
The simplest thing is to make it a singleton. There is only one instance in the entire app life cycle. Create it once during initialization, and use it the rest of the time.
Can store page attributes, such as offsets and so on
This is time limited, right? If you push to enter the page again in a short time, you will stay on the pop-out interface. You only need to judge the time difference between the time of exit and the time of re-entering. If the time difference is less than the time difference, the interface will pop up. If the time difference is greater than the time difference, the interface will be refreshed.
Just implement the push and pop methods yourself
Write the next vc as an attribute and then push it
Just don’t let the page be released
There is only one thing like Moments in the APP, I think it is better to make it a singleton. After looking at it, when the network is disconnected, it shows that it is loading when I pull it up. When I go back and go back in, it still shows that it is loading. It feels like it is not released.
And the data is also cached. After disconnecting from the Internet, killing the APP, and re-entering, the data refreshed before in the circle of friends can be seen