This is a very simple Image Picker Controller by Swift.
AssetsLibrary.framework is required.
let pickerController = DKImagePickerController()
pickerController.pickerDelegate = self
self.presentViewController(pickerController, animated: true) {}
func imagePickerControllerCancelled() {
self.dismissViewControllerAnimated(true, completion: nil)
}
func imagePickerControllerDidSelectedAssets(assets: [DKAsset]!) {
for (index, asset) in enumerate(assets) {
}
self.dismissViewControllerAnimated(true, completion: nil)
}
/// The height of the bottom of the preview
var previewHeight: CGFloat = 80
var rightButtonTitle: String = "确定"
/// Displayed when denied access
var noAccessView: UIView = {