jkpang / PPBadgeView

iOS Custom Badge, Support UIView, UITabBarItem, UIBarButtonItem ,Support Objective-C/Swift; iOS自定义Badge组件, 支持UIView, UITabBarItem, UIBarButtonItem, 支持Objective-C/Swift
MIT License
848 stars 118 forks source link

XCode 10 GM and Swift 4.2 fails to compile #16

Closed jlaws closed 5 years ago

jlaws commented 6 years ago

PPBadgeViewSwift v2.2.0 still fails to build in the latest Xcode with Swift 4.2

/Users/joelaws/Workspace/kratos/Pods/PPBadgeViewSwift/PPBadgeView/swift/PPBadgeLabel.swift:72:27: 'NSAttributedStringKey' has been renamed to 'NSAttributedString.Key' /Users/joelaws/Workspace/kratos/Pods/Foundation.NSAttributedStringKey:2:18: 'NSAttributedStringKey' was obsoleted in Swift 4.2 /Users/joelaws/Workspace/kratos/Pods/PPBadgeViewSwift/PPBadgeView/swift/UIView+PPBadgeView.swift:178:22: 'bringSubview(toFront:)' has been renamed to 'bringSubviewToFront(_:)' /Users/joelaws/Workspace/kratos/Pods/UIKit.UIView:17:15: 'bringSubview(toFront:)' was obsoleted in Swift 4.2

damozhang commented 6 years ago

@jlaws I am sorry. I made a mistake and I forgot to update the code to swift 4.2 in #15 . I will submit a pull request again to fix. Or you can try my fork first.

jkpang commented 6 years ago

I do not have Xcode10 and Swift4.2 environment yet. I will release it to CocoaPods after upgrading in a few days. You can install it in this way now: pod 'PPBadgeViewSwift', :git => 'https://github.com/jkpang/PPBadgeView.git', :tag => '2.2.1' @jlaws

alexwheeller commented 5 years ago

2.2.1 still has this issue: UIView+PPBadgeView.swift:178:22: 'bringSubview(toFront:)' has been renamed to 'bringSubviewToFront(_:)' I fixed it in my fork.

jlaws commented 5 years ago

Works great, thank you!