Remove all subviews?

前端 未结 15 1702

When my app gets back to its root view controller, in the viewDidAppear: method I need to remove all subviews.

How can I do this?

15条回答
  •  清酒与你
    2020-11-28 01:10

    In monotouch / xamarin.ios this worked for me:

    SomeParentUiView.Subviews.All(x => x.RemoveFromSuperview);
    

提交回复
热议问题