UIAlertController is moved to buggy position at top of screen when it calls `presentViewController:`

前端 未结 12 1388
心在旅途
心在旅途 2020-12-08 06:36

Presenting a view from a UIAlertController moves the alert to a buggy position at the top-left corner of the screen. iOS 8.1, device and simulator.

We h

12条回答
  •  心在旅途
    2020-12-08 07:03

    EDIT: Tested in 2020, Xcode 11.2, iOS 13

    If anyone still looking for a better answer to this, then here is my solution. Use updateConstraints method to readjust the constraints.

    your_alert_controller_obj.updateConstraints()
    

提交回复
热议问题