The error is "Initializer for conditional binding must have Optional type, not 'UITabBarItem'"
lass BaseTabBarViewController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
//The code below is the reason I get error for
if let notif = (self.tabBar.items?[2])! as UITabBarItem {
NotificationManager.sharedInstance.notifTabbar = notif
}else{
// NotificationManager.sharedInstance.notifTabbar.badgeValue = ""
}