Latest 1.1.0
Homepage https://github.com/zkh90644/ASMaskImageView
License Apache License 2.0
Platforms ios 8.0
Authors

GitHub license
pod
blog

English Version README.MD

一个简单的页面遮罩效果类,主要用于UIImageView与对于UILabel中的文字的遮罩。支持圆角切割,支持透明背景图片,支持移动效果。

效果图

showImage

安装方法


cocoapods

pod 'ASMaskImageView', '~> 1.0.0'
use_frameworks!

使用方法


创建需要用来遮罩的MaskView对象(该对象继承于UIImageView)

touchView = MaskView.init(image:UIImage.init(named: "1")!,frame: CGRect.init(origin: CGPoint(x: 0,y: 0), size: CGSize(width: 100, height: 100)))

将需要被遮罩的UILabel控件加入MaskView对象maskViewArray属性中

touchView!.maskViewArray.append(label1)
touchView!.maskViewArray.append(label2)
touchView!.maskViewArray.append(label3)

当需要使用遮罩效果的时候调用changeMoveImage()方法即可

func move(gesture:UIPanGestureRecognizer)throws {
    touchView?.center = gesture.locationInView(self.view)
    try touchView?.changeMoveImage()

}

Latest podspec

{
    "name": "ASMaskImageView",
    "version": "1.1.0",
    "summary": "ASMaskImageView is a simple maskView library with UIImageView",
    "description": "This is a easy UIImageView subClass to get a maskView.nIt will help you to mask UIImageView with UILabel.",
    "homepage": "https://github.com/zkh90644/ASMaskImageView",
    "license": {
        "type": "Apache License 2.0",
        "file": "LICENSE"
    },
    "authors": {
        "Creator": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/zkh90644/ASMaskImageView.git",
        "tag": "1.1.0"
    },
    "source_files": "ASMaskImageView/*"
}

Pin It on Pinterest

Share This