UIView(QMUI_Snapshotting)

@interface UIView (QMUI_Snapshotting)

方便地将某个 UIView 截图并转成一个 UIImage,注意如果这个 UIView 本身做了 transform,也不会在截图上反映出来,截图始终都是原始 UIView 的截图。

  • Undocumented

    Declaration

    Objective-C

    - (UIImage *)qmui_snapshotLayerImage;

    Swift

    func qmui_snapshotLayerImage() -> UIImage
  • Undocumented

    Declaration

    Objective-C

    - (UIImage *)qmui_snapshotImageAfterScreenUpdates:(BOOL)afterScreenUpdates;

    Swift

    func qmui_snapshotImage(afterScreenUpdates: Bool) -> UIImage