KyleGoddard / KGFloatingDrawer

A floating navigation drawer with an interesting animated presentation written in Swift.
MIT License
499 stars 79 forks source link

Error before download the KGFloatingDrawer "Expected type after as" #2

Closed diegomaye closed 9 years ago

diegomaye commented 9 years ago

Hi,

When I open the example project I found some errors related with instance unwrapped "!". As I know the exclamation point is used for unwrap the instance, but I never see the "!" with the "as" like in KGDrawerView(line 215)

var view = self.centerViewContainer.subviews.first as! UIView

Sorry but I am new with swift and can't to figure out the problem, I try to delete the "!" unsuccessfully. I think that KGFloatingDrawer is an amazing component and I would like to use the examples to see the functionality.

error

Thanks in advance.

KyleGoddard commented 9 years ago

Can you verify that you are using XCode 6.3?

KyleGoddard commented 9 years ago

Closed as specific to Xcode 6.2 and Swift 1.1 which are unsupported.

KyleGoddard commented 9 years ago

You might be able to change the as! to just as or maybe as? and have it work with Swift 1.1 and Xcode 6.2 however it is likely that there are other parts of the library that will report hard errors for Swift 1.1 that are expected syntax in Swift 1.2.

diegomaye commented 9 years ago

Thanks Kyle