Skip to content

thedp/PKCSlice

 
 

Repository files navigation

PKCSlice

Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

use storyboard

image

image

image

image

image


@IBOutlet weak var sliceView: PKCSlice!

self.sliceView.delegate = self
//self.sliceView.autoSlice(false)


extension ViewController: PKCSliceDelegate{
    func pkcSliceTouch(_ index: Int) {
        
    }
}







use code

image


var images = [UIImage]()
images.append(UIImage(named: "4.png")!)
images.append(UIImage(named: "3.png")!)
images.append(UIImage(named: "2.png")!)
images.append(UIImage(named: "1.png")!)
let sliceView = PKCSlice(self.superView, sliceImages: images)







touch Delegate

image

image


public protocol PKCSliceDelegate {
    func pkcSliceTouch(_ index: Int)
}

Requirements

Installation

PKCSlice is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "PKCSlice"

Author

pikachu987, [email protected]

License

PKCSlice is available under the MIT license. See the LICENSE file for more info.

About

Slice Button

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 52.1%
  • Shell 42.8%
  • Ruby 2.7%
  • Objective-C 2.4%