Created
October 17, 2016 11:13
-
-
Save MTattin/efaefe00205f6c181e28a4fc5fb9253d to your computer and use it in GitHub Desktop.
UIVideoEditorControllerの「保存」のテキスト変更 ref: http://qiita.com/MTattin/items/a4563ce8e55dc0919c54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// | |
/// CstmVideoEditorController | |
/// | |
class CstmVideoEditorController: UIVideoEditorController { | |
/// | |
/// will appear | |
/// | |
override func viewWillAppear(_ animated: Bool) { | |
super.viewWillAppear(animated) | |
for v in self.navigationBar.subviews { | |
if v is UIButton { | |
/// | |
/// 右側のボタンか判定 | |
/// | |
if v.frame.origin.x > self.view.w * 0.5 { | |
(v as! UIButton).setTitle("Done", for: UIControlState.normal) | |
(v as! UIButton).setTitle("Done", for: UIControlState.disabled) | |
(v as! UIButton).setTitle("Done", for: UIControlState.selected) | |
(v as! UIButton).setTitle("Done", for: UIControlState.highlighted) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment