Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two Error in WKTabBarController.swift swift 4 #3

Open
h-o-sein opened this issue May 3, 2018 · 0 comments
Open

two Error in WKTabBarController.swift swift 4 #3

h-o-sein opened this issue May 3, 2018 · 0 comments

Comments

@h-o-sein
Copy link

h-o-sein commented May 3, 2018

error in WKTabBarController.swift

  • 1- Error
    Argument of '#selector' refers to instance method 'didChangeOrientation' that is not exposed to Objective-C

NotificationCenter.default.addObserver( self, selector: #selector(didChangeOrientation(_:)), name: NSNotification.Name.UIApplicationDidChangeStatusBarOrientation, object: nil) if let vc = tabBarController(self, viewControllerAtIndex: 0) { changeViewController(vc) }
error:
selector: #selector(didChangeOrientation(_:)),

and

  • 2- Error
    Contextual closure type '(_, WKTabBarItem) -> _' expects 2 arguments, but 1 was used in closure body

open func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let proportion = tabBarItems[indexPath.row].proportion let sum = tabBarItems.reduce(0.0) { $0.0 + $0.1.proportion } return CGSize(width: collectionView.bounds.width * CGFloat(proportion / sum), height: collectionView.bounds.height) }

error :
let sum = tabBarItems.reduce(0.0) { $0.0 + $0.1.proportion }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant