Commit a57d9892 by Daniel Dahan

editor: updated Capture to asynchronously change cameras

parent a9eafa58
......@@ -1122,7 +1122,10 @@ extension Capture {
*/
@objc
fileprivate func handleChangeCameraButton(button: UIButton) {
changeCamera()
DispatchQueue.main.async { [weak self] in
self?.changeCamera()
}
delegate?.capture?(capture: self, didPressChangeCamera: button)
}
......
......@@ -129,7 +129,7 @@ extension NSMutableAttributedString {
- Parameter range: A NSRange.
*/
open func addAttribute(characterAttribute: CharacterAttribute, value: Any, range: NSRange) {
addAttribute(characterAttribute.rawValue, value: value, range: range)
addAttribute(CharacterAttributeToValue(attribute: characterAttribute), value: value, range: range)
}
/**
......@@ -138,6 +138,6 @@ extension NSMutableAttributedString {
- Parameter range: A NSRange.
*/
open func removeAttribute(characterAttribute: CharacterAttribute, range: NSRange) {
removeAttribute(characterAttribute.rawValue, range: range)
removeAttribute(CharacterAttributeToValue(attribute: characterAttribute), range: range)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment