Skip to content

chakbun/ZBSTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZBSTools

Using Swift more conveniently, smoothly

ZBSImagePickerManager

is encapsulation of UIImageUIImagePickerController ans UIImagePickerControllerDelegate.
You can get image from camera simply like this,

ZBSImagePickerManager.shared.launchImagePickerIn(controller: viewController, sourceType: .camera) { (image) in
    //TODO:do something with image;
}

You must add NSCameraUsageDescription in info.plist if you want to get image from camera;

ZBSAlertController

subclass of UIAlertController, make less code to present A simple alert view;
You can present A alert view in your controller like this,

ZBSAlertController.simple2optionsAlertViewWith(name: "title", message: "message", yesButtonName: "Done", yesButtonAction: { (action) in
    //TODO:do something for Done action
}, noButtonName: "Cancel", noButtonAction: { (action) in
    //TODO:do something for Cancel action
}).presentedIn(self, animated: true) {
    //TODO:do something when alert view has presented
}

Usage

pod 'ZBSTools', '~> 0.0.2'

Manually

add all files of Sources to your project

About

Using Swift more conveniently, smoothly

Resources

License

Stars

Watchers

Forks

Packages

No packages published