In Mac OSX Sierra, to solve the issue, I had to do the following:
Clean:
brew uninstall imagemagick
brew unlink imagemagick
Then install:
// | |
// CameraController.swift | |
// | |
import AVFoundation | |
import Photos | |
import UIKit | |
class CameraController: UIViewController { | |
enum Camera { |
extension PHPhotoLibrary { | |
typealias PhotoAsset = PHAsset | |
typealias PhotoAlbum = PHAssetCollection | |
static func saveImage(image: UIImage, albumName: String, completion: (PHAsset?)->()) { | |
if let album = self.findAlbum(albumName) { | |
saveImage(image, album: album, completion: completion) | |
return | |
} |
Suppose we want to add support for a new iOS 8 API in our framework that replaces an older iOS 7 API. There are a few problems we might face:
These three problems require three different technical solutions:
respondsToSelector:
)__IPHONE_OS_VERSION_MAX_ALLOWED
macro