Exclude View from Screenshot

后端 未结 3 1580
小鲜肉
小鲜肉 2021-01-03 10:10

This is how I take a screenshot of my view:

UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0)
view.drawViewHierarchyInRect(view.boun         


        
3条回答
  •  醉话见心
    2021-01-03 10:51

    Maybe the simplest solution would be not to include your unwanted view into the hierarchy of the taken as screenshot view. You could simply put it on top of it.

提交回复
热议问题