Duplicate, clone or copy UIView

后端 未结 4 2186
失恋的感觉
失恋的感觉 2020-12-29 04:45

I have a UIView that is linked to a UIViewController via the Interface Builder. Is it possible to duplicate, clone or copy this view so that I can use it more than once?

4条回答
  •  滥情空心
    2020-12-29 05:26

    Here is a new method you can use: Use UIView's method:

    - (UIView *)snapshotViewAfterScreenUpdates:(BOOL)afterUpdates
    

    This is the fastest way to draw a view. Available in iOS 7.

提交回复
热议问题