how to add a view over window in uiviewcontroller

前端 未结 4 716
轮回少年
轮回少年 2021-01-24 20:19

Is it possible to add a subview over the window from a uiviewcontroller and then removing that also?

Thanks Pankaj

4条回答
  •  一个人的身影
    2021-01-24 20:58

    [[UIApplication sharedApplication].keyWindow.subviews.firstObject addSubview:yourView];

    if you are using an iPad in landscape you should add your view over ther window's first subview.

    @Yuvaraj.M this is the solution to your problem

提交回复
热议问题