To run the example project, clone the repo, and run pod install
from the Example directory first.
@IBOutlet weak var sliceView: PKCSlice!
self.sliceView.delegate = self
//self.sliceView.autoSlice(false)
extension ViewController: PKCSliceDelegate{
func pkcSliceTouch(_ index: Int) {
}
}
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)
public protocol PKCSliceDelegate {
func pkcSliceTouch(_ index: Int)
}
PKCSlice is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "PKCSlice"
pikachu987, [email protected]
PKCSlice is available under the MIT license. See the LICENSE file for more info.