Create a view yourself. Write out the style. Then when needed. Just add this view to keywindow. When canceling, remove this view.
You will encounter this kind of pop-up window in the future. This is all done. You must not be limited in your development thinking. When writing controls, don’t limit yourself to the few official controls. More complex ones need to be implemented by yourself. And these are commonly used. It must be independent and don't write everything in the viewcontroller.
I recommend encapsulating a ViewController and making it appear modally every time. If you want the same level as AlertView/Sheet/UIAlertController. Then you can also use UIWindows in the package to appear this ViewController.
It shouldn’t be possible to do this with AlertView. You can try UIActionSheet for this. Write the method to appear in Alert to UIView. However, the problem with the version is that after iOS8, UIAlertController is used extensively using Block and there is no proxy, unless the proxy of ViewController is used. . In short, it is an inelegant method.
So my suggestion is to encapsulate UIViewController.
Create a view yourself. Write out the style. Then when needed. Just add this view to keywindow. When canceling, remove this view.
You will encounter this kind of pop-up window in the future. This is all done. You must not be limited in your development thinking. When writing controls, don’t limit yourself to the few official controls. More complex ones need to be implemented by yourself. And these are commonly used. It must be independent and don't write everything in the viewcontroller.
I recommend encapsulating a ViewController and making it appear modally every time.
If you want the same level as AlertView/Sheet/UIAlertController.
Then you can also use UIWindows in the package to appear this ViewController.
It shouldn’t be possible to do this with AlertView. You can try UIActionSheet for this. Write the method to appear in Alert to UIView. However, the problem with the version is that after iOS8, UIAlertController is used extensively using Block and there is no proxy, unless the proxy of ViewController is used. . In short, it is an inelegant method.
So my suggestion is to encapsulate UIViewController.
Correct answer
http://www.iashes.com/2015-02...
Please refer to