Skip to content

Instantly share code, notes, and snippets.

@quangtqag
Created July 20, 2016 08:13
Show Gist options
  • Save quangtqag/b8c2caeb1830e127360b0e3c4d52d49c to your computer and use it in GitHub Desktop.
Save quangtqag/b8c2caeb1830e127360b0e3c4d52d49c to your computer and use it in GitHub Desktop.
private func findTitleLabel() {
let navBar = self.navigationController!.navigationBar
let navigationItemView = navBar.subviews.filter { return String($0.dynamicType) == "UINavigationItemView" }[0]
let titleLabel = navigationItemView.subviews.filter { return $0 is UILabel }[0] as! UILabel
print("title label = \(titleLabel)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment