I've converted my project to Swift3, and updated Material to version 2.0.
It's seems like almost everything went smooth except the Switch controller when it set inside the Navigation Controller.
First the initial position is wrong, and when rotating the device it seems like the Switch controller width property grows bigger.
Here's my setup:
fileprivate func prepareSwitchControl() {
switchControl = Switch(state: .off, style:.light, size: .medium)
switchControl.delegate = self
}
fileprivate func prepareNavigationItem() {
navigationItem.title = "Hello"
navigationItem.titleLabel.textColor = .white
navigationItem.titleLabel.textAlignment = .left
navigationItem.leftViews = [menuButton]
navigationItem.rightViews = [switchControl, searchButton]
}
You could also reproduce this problem by editing the NavigationController or ToolbarController demo project; change the starButton to Switch.
Thank you for reporting this. I will take a look. I am about to hop on a plane, so once I have a stable connection, I will get back to you.
Taking a look at this now :)
Hey! Material 2.1.1 should fix the issue :) Thank you for bringing this to our attention.
Awesome!, Thank you @danieldahan, and you're welcome.