search

Home  >  Q&A  >  body text

ios - 如果用UIActivityViewController作出分享的按钮

像图这样的方式,我知道是用 UIAlertView可以作出来,但是我找了好久 都只有文字的方式,找不到怎么自定义按钮,有没有大大可以指导小妹一下 = =|||

顺带 一下 ,分享,如果带 deep link

我說錯了,不是UIalert 是 UIActivityViewController

伊谢尔伦伊谢尔伦2771 days ago473

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师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.

    reply
    0
  • 黄舟

    黄舟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.

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:49:27

    Correct answer
    http://www.iashes.com/2015-02...
    Please refer to

    reply
    0
  • Cancelreply