How to call my custom alert controller function to display in other view controller?

后端 未结 2 1711
不思量自难忘°
不思量自难忘° 2021-01-20 12:38

I have write my custom alert view controller.But,I am having error at calling my alert controller from other view controller.It show me the error that I described below.

2条回答
  •  无人及你
    2021-01-20 12:51

    I see you made as subclass, but in the UIAlertController documentation is written:

    The UIAlertController class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.

    I would recommend you do not go against it. If you need something very custom better to use UIViewController and display with custom behavior.

提交回复
热议问题