Mỗi khi tôi cập nhật xcode i cant dường như thay đổi titleTextAttribute
. Bây giờ khi tôi sử dụng đoạn mã sau tôi nhận được lỗi này:Thay đổi titleTextAttribute trong swift
could not find an overload init that accepts this supplied arguments
Mã trong appDelegate
:
UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: UIFont(name: "Ubuntu", size: 17), NSForegroundColorAttributeName:UIColor.whiteColor()]
UIBarButtonItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont(name: "Ubuntu-Light", size: 15), NSForegroundColorAttributeName:UIColor.whiteColor()], forState: UIControlState.Normal)
Nate! Nate! Nate! Nate! – rob5408
Thông tin khác: http://stackoverflow.com/questions/27583346/how-can-i-change-the-font-of-the-back-button-for-my-navigation-bar/28347428#28347428 – Vexy