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

Material 2 & Swift 3 Release #520

Closed
danieldahan opened this Issue Sep 16, 2016 · 11 comments

Comments

Projects
None yet
5 participants
@danieldahan
Member

danieldahan commented Sep 16, 2016

The latest date that Material 2 with Swift 3 support will be released is on September 30th 2016.

We are making final decisions on the API going forward, and writing documentation to support the Material framework.

We appreciate your support and look forward to providing an excellent product that we are proud to share with our growing community.

@danieldahan danieldahan added this to the Material 2 milestone Sep 16, 2016

@danieldahan danieldahan self-assigned this Sep 16, 2016

@danieldahan danieldahan changed the title from Material 2 Release to Material 2 Release With Swift 3 Sep 16, 2016

@danieldahan danieldahan changed the title from Material 2 Release With Swift 3 to Material 2 & Swift 3 Release Sep 16, 2016

@sachinletsgo

This comment has been minimized.

Show comment
Hide comment
@sachinletsgo

sachinletsgo Sep 28, 2016

I am waiting for swift 3 as it is not working with swift 3.

sachinletsgo commented Sep 28, 2016

I am waiting for swift 3 as it is not working with swift 3.

@chashmeetsingh

This comment has been minimized.

Show comment
Hide comment
@chashmeetsingh

chashmeetsingh Sep 28, 2016

Till then u can check the development branch it contains support for swift 3

pod 'Material', :git => 'https://github.com/CosmicMind/Material.git', :branch => 'development'

chashmeetsingh commented Sep 28, 2016

Till then u can check the development branch it contains support for swift 3

pod 'Material', :git => 'https://github.com/CosmicMind/Material.git', :branch => 'development'

@badboy-tian

This comment has been minimized.

Show comment
Hide comment
@badboy-tian

badboy-tian Sep 29, 2016

toolbar.titleLabel.textColor = MaterialColor.white error: Use of unresolved identifler 'MaterialColor'

badboy-tian commented Sep 29, 2016

toolbar.titleLabel.textColor = MaterialColor.white error: Use of unresolved identifler 'MaterialColor'

@chashmeetsingh

This comment has been minimized.

Show comment
Hide comment

chashmeetsingh commented Sep 29, 2016

@badboy-tian

This comment has been minimized.

Show comment
Hide comment
@badboy-tian

badboy-tian Sep 29, 2016

Thank you. but toolbar.leftControls can not work now?

badboy-tian commented Sep 29, 2016

Thank you. but toolbar.leftControls can not work now?

@chashmeetsingh

This comment has been minimized.

Show comment
Hide comment
@chashmeetsingh

chashmeetsingh Sep 29, 2016

whats the problem?

chashmeetsingh commented Sep 29, 2016

whats the problem?

@badboy-tian

This comment has been minimized.

Show comment
Hide comment
@badboy-tian

badboy-tian Sep 29, 2016

ListViewController.swift:557:9: Value of type 'Toolbar' has no member
'leftControls'

badboy-tian commented Sep 29, 2016

ListViewController.swift:557:9: Value of type 'Toolbar' has no member
'leftControls'

@danieldahan

This comment has been minimized.

Show comment
Hide comment
@danieldahan

danieldahan Sep 29, 2016

Member

@tianqiujie it is now leftViews.

Member

danieldahan commented Sep 29, 2016

@tianqiujie it is now leftViews.

@badboy-tian

This comment has been minimized.

Show comment
Hide comment
@badboy-tian

badboy-tian Sep 29, 2016

In ios 9 my toolbar work nice, but when upgrade to the ios 10. It is cannot work normal. please help me. Thank you very much!

fileprivate func initToolbar() {
        let containerView = UIView()
        mToolbarContainer.addSubview(containerView)

       // MaterialLayout.alignToParent(mToolbarContainer, child: containerView, top: 0, left: 0, right: 0)
        //view.layout(containerView).edges(top: 0, left: 0, right: 0)

        //48
        let toolbar = Toolbar()
        toolbar.height += 4
        print(toolbar.height)

        view.layout(containerView).edges(top: 0, left: 0, bottom: view.frame.size.height - toolbar.height, right: 0)

        containerView.bounds.size.height = toolbar.height
        containerView.addSubview(toolbar)

        // Title label.
        toolbar.title = "My Files".localedStr
        toolbar.titleLabel.textColor = Color.white

        let image: UIImage? = UIImage(named: "arrow_back")//MaterialIcon.cm.menu

        // Menu button.
        let backBtn: IconButton = IconButton()
        backBtn.pulseColor = Color.white
        backBtn.tintColor = Color.white
        backBtn.setImage(image, for: UIControlState())
        backBtn.setImage(image, for: .highlighted)
        backBtn.addTarget(self, action: #selector(onBack), for: UIControlEvents.touchUpInside)

        /*
         To lighten the status bar - add the
         "View controller-based status bar appearance = NO"
         to your info.plist file and set the following property.
         */
        toolbar.backgroundColor = Color.blue.base

        //toolbar.leftControls = [backBtn]
        toolbar.leftViews = [backBtn]
    }

IOS9:
image

IOS10:
image

badboy-tian commented Sep 29, 2016

In ios 9 my toolbar work nice, but when upgrade to the ios 10. It is cannot work normal. please help me. Thank you very much!

fileprivate func initToolbar() {
        let containerView = UIView()
        mToolbarContainer.addSubview(containerView)

       // MaterialLayout.alignToParent(mToolbarContainer, child: containerView, top: 0, left: 0, right: 0)
        //view.layout(containerView).edges(top: 0, left: 0, right: 0)

        //48
        let toolbar = Toolbar()
        toolbar.height += 4
        print(toolbar.height)

        view.layout(containerView).edges(top: 0, left: 0, bottom: view.frame.size.height - toolbar.height, right: 0)

        containerView.bounds.size.height = toolbar.height
        containerView.addSubview(toolbar)

        // Title label.
        toolbar.title = "My Files".localedStr
        toolbar.titleLabel.textColor = Color.white

        let image: UIImage? = UIImage(named: "arrow_back")//MaterialIcon.cm.menu

        // Menu button.
        let backBtn: IconButton = IconButton()
        backBtn.pulseColor = Color.white
        backBtn.tintColor = Color.white
        backBtn.setImage(image, for: UIControlState())
        backBtn.setImage(image, for: .highlighted)
        backBtn.addTarget(self, action: #selector(onBack), for: UIControlEvents.touchUpInside)

        /*
         To lighten the status bar - add the
         "View controller-based status bar appearance = NO"
         to your info.plist file and set the following property.
         */
        toolbar.backgroundColor = Color.blue.base

        //toolbar.leftControls = [backBtn]
        toolbar.leftViews = [backBtn]
    }

IOS9:
image

IOS10:
image

@danieldahan

This comment has been minimized.

Show comment
Hide comment
@danieldahan

danieldahan Sep 29, 2016

Member

What are you trying to do with the containerView ? and let's move this to https://gitter.im/CosmicMind/Material

Member

danieldahan commented Sep 29, 2016

What are you trying to do with the containerView ? and let's move this to https://gitter.im/CosmicMind/Material

@danieldahan danieldahan closed this Oct 1, 2016

@astromme

This comment has been minimized.

Show comment
Hide comment
@astromme

astromme Dec 14, 2016

FYI for anyone who runs into Xcode claiming that Material isn't updated to Swift 3 -- you may need to update Cocoapods to 1.1.1 or above. Updating and then running pod install fixed the problem for me.

The errors were:

The target “Material” contains source code developed with an earlier version of Swift.
Choose “Convert” to update the source code in this target to the latest SDKs. You will be given the choice to use Swift 2.3 syntax or update to Swift 3.
This action can be performed later using “Convert to Current Swift Syntax” in the Edit menu.

“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

astromme commented Dec 14, 2016

FYI for anyone who runs into Xcode claiming that Material isn't updated to Swift 3 -- you may need to update Cocoapods to 1.1.1 or above. Updating and then running pod install fixed the problem for me.

The errors were:

The target “Material” contains source code developed with an earlier version of Swift.
Choose “Convert” to update the source code in this target to the latest SDKs. You will be given the choice to use Swift 2.3 syntax or update to Swift 3.
This action can be performed later using “Convert to Current Swift Syntax” in the Edit menu.

“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

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