How to add view in UIWindow?

前端 未结 8 1425
星月不相逢
星月不相逢 2021-02-14 22:42

I wanted to add a view in UIWindow with following code:

 AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
 UIWindo         


        
8条回答
  •  情话喂你
    2021-02-14 23:16

    You can add view using the following

    [[[UIApplication sharedApplication] keyWindow] addSubview:YOUR_VIEW];
    

提交回复
热议问题