WWScrollableMaskImageView

main

Implement draggable mask layer function.
William-Weng/WWScrollableMaskImageView

WWScrollableMaskImageView

Swift-5.6 iOS-14.0 TAG Swift Package Manager-SUCCESS LICENSE

  • Implement draggable mask layer function.
  • 實現可拖動式遮罩層功能。

WWScrollableMaskImageView

WWScrollableMaskImageView

dependencies: [
    .package(url: "https://github.com/William-Weng/WWScrollableMaskImageView.git", .upToNextMajor(from: "1.0.0"))
]

Function - 可用函式

函式 功能
setting(originalImage:maskImage:maskViewWidth:imageContentMode:barImage:barContentMode:barColor:) 設定Bar圖片設定

Example

import UIKit
import WWScrollableMaskImageView

final class ViewController: UIViewController {

    @IBOutlet weak var maskView: WWScrollableMaskImageView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let originalImage = UIImage(named: "OriginalImage")
        let maskImage = UIImage(named: "MaskImage")
        let barImage = UIImage(named: "Bar")
        let barNinePngImage = barImage?.resizableImage(withCapInsets: UIEdgeInsets(top: 30, left: 0, bottom: 30, right: 0), resizingMode: .stretch)
        
        maskView.setting(originalImage: maskImage, maskImage: originalImage, maskViewWidth: maskView.frame.width * 0.5 - 16, barImage: barNinePngImage, barContentMode: .scaleToFill, barColor: .clear)
    }
}

Description

  • Swift Tools 5.6.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Oct 21 2024 14:29:06 GMT-0900 (Hawaii-Aleutian Daylight Time)