UIBarButtonItems shift position when UINavigationController is presented modally

前端 未结 3 1759
迷失自我
迷失自我 2021-02-19 11:19

I\'m presenting a UINavigationController modally, from within an iOS app extension:

UINavigationController *nav = [[UINavigationController alloc] in         


        
3条回答
  •  悲&欢浪女
    2021-02-19 11:58

    As @Stonz2 mentioned, this appears to be a characteristic of presenting a modal from a detached view controller. I was having the same problem and remedied it by re-organizing my app so that it wasn't presenting from a detached controller.

    You'll know if you're presenting from a detached controller if you get the following error message:

    Presenting view controllers on detached view controllers is discouraged

提交回复
热议问题