Swifty Hackies

  1. Navigation Bar 上的 titleLabel
    if let navTitleLabel = navigationController?.navigationBar.subviews.filter({ v in
    let cls: AnyClass = NSClassFromString("UINavigationItemView")!
    return v.dynamicType == cls.self
    }).first?.subviews.first as? UILabel {
    print(navTitleLabel)
    }

你可能感兴趣的:(Swifty Hackies)