Custom Beautiful UIView For Handling IDs in iOS
IDView
Custom Beautiful UIView For Handling IDs in iOS
Setup
Set the placeholder images for the front and back faces.
override func viewDidLoad() {
super.viewDidLoad()
idView.frontPlaceHolderImage = ...
idView.backPlaceHolderImage = ...
...
Change Images
- To set the image for the current face..
idView.set(image: UIImage(), flip: true)
- Or you can just flip the view without changing the images..
idView.flip()
Delegate
Set the view delegate to get feedback when image changes through..
func idView(_ idView: IDView, wasTappedOn face: IDView.Face)
Properties & Functions
- get the current face..
idView.face
- get the image for particular face..
idView.image(for: .back)
idView.image(for: .front)