kmcgill88 / McPicker-iOS

McPicker is a customizable, closure driven UIPickerView drop-in solution with animations that is rotation ready.
MIT License
213 stars 43 forks source link

Xcode 12 build errors #66

Closed warpling closed 4 years ago

warpling commented 4 years ago

Since updating and attempting to compile with Xcode 12 beta I've getting build errors from McPicker for these two functions public class func flexibleSpace() -> McPickerBarButtonItem public class func fixedSpace(width: CGFloat) -> McPickerBarButtonItem

warpling commented 4 years ago

If anyone needs a branch that fixes this in the time being: https://github.com/warpling/McPicker-iOS

cerupcat commented 4 years ago

@warpling, with your version I'm getting Cannot override a Self return type with a non-Self return type with Xcode 12 Beta 4.

Looks like it needs to return Self and not McPickerBarButtonItem

warpling commented 4 years ago

Huh, strange. I didn't have to change that to be able to compile with Swift 5 in Xcode 12 (not sure which beta).

UtkuDalmaz commented 4 years ago

How to fix this man? Cannot override a Self return type with a non-Self

warpling commented 4 years ago

@UtkuDalmaz not sure. I just accepted the changes Xcode suggested and it compiled for me.

cerupcat commented 4 years ago

It may also depend on what you're using.

For me, with SPM and XcodeBeta 4/5, I needed to change 2 files that it was complaining about. The changes made though are different than in @warpling branch. If I get a chance, I'll make a branch.

kmcgill88 commented 4 years ago

Started on a fix for this. Checkout https://github.com/kmcgill88/McPicker-iOS/pull/69 comments more than welcome!

kmcgill88 commented 4 years ago

3.0.0 has been published and requires xcode 12.