像图这样的方式,我知道是用 UIAlertView可以作出来,但是我找了好久 都只有文字的方式,找不到怎么自定义按钮,有没有大大可以指导小妹一下 = =|||
顺带 一下 ,分享,如果带 deep link
我說錯了,不是UIalert 是 UIActivityViewController
天蓬老师2017-04-18 09:49:27
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.
黄舟2017-04-18 09:49:27
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.