Skip to content

Instantly share code, notes, and snippets.

@MTattin
Created October 17, 2016 11:13
Show Gist options
  • Save MTattin/efaefe00205f6c181e28a4fc5fb9253d to your computer and use it in GitHub Desktop.
Save MTattin/efaefe00205f6c181e28a4fc5fb9253d to your computer and use it in GitHub Desktop.
UIVideoEditorControllerの「保存」のテキスト変更 ref: http://qiita.com/MTattin/items/a4563ce8e55dc0919c54
///
/// 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