Custom View in UIAlertController

后端 未结 2 2063
失恋的感觉
失恋的感觉 2021-01-14 14:30

I am trying to put a custom view inside a UIAlertController. I\'m running into some odd issues with the sizing of the custom view.

I want the custom vie

2条回答
  •  暖寄归人
    2021-01-14 14:48

    You're not supposed to do that. To quote the docs:

    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.

    If you go against an explicit statement like that from Apple all bets are off, and even if you can get it to work on the current OS version, it could break with any future version.

提交回复
热议问题