kaandedeoglu / KDCircularProgress

A circular progress view with gradients written in Swift
MIT License
1.21k stars 217 forks source link

Swift 3 errors? #52

Closed jefgodesky closed 7 years ago

jefgodesky commented 8 years ago

I think my problem is probably related to #49, but the solution there doesn't help me. I'm using CocoaPods 1.1.1 (Podfile included below). I delete the /Pods directory and run pod install. Everything seems OK until I open up the workspace and try to build. Then I get 70 errors, all in KDCircularProgress.swift. They look a lot like the errors I got when I was converting my own code over to Swift 3. They are:

/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:49:37: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:68:27: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:70:27: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:98:37: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:131:39: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:144:46: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:151:43: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:156:54: Contextual member 'blackColor' has no associated value
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:168:58: Contextual member 'clearColor' has no associated value
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:179:23: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:193:9: 'userInteractionEnabled' has been renamed to 'isUserInteractionEnabled'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:201:19: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:207:9: 'userInteractionEnabled' has been renamed to 'isUserInteractionEnabled'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:216:32: Method does not override any method from its superclass
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:227:28: Contextual member 'clearColor' has no associated value
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:228:35: Extra argument in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:248:23: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:253:19: Missing argument label 'colors:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:261:80: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:266:32: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:270:44: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:271:35: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:279:30: Cannot assign value of type 'KDCircularProgress' to type 'CAAnimationDelegate?'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:283:23: 'addAnimation(_:forKey:)' has been renamed to 'add(_:forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:286:59: 'NSTimeInterval' has been renamed to 'TimeInterval'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:294:73: Downcast from 'KDCircularProgress.KDCircularProgressViewLayer?' to 'KDCircularProgress.KDCircularProgressViewLayer' only unwraps optionals; did you mean to use '!'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:308:30: 'animationForKey' has been renamed to 'animation(forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:311:26: Method does not override any method from its superclass
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:327:26: Argument names for method 'willMoveToSuperview(newSuperview:)' do not match those of overridden method 'willMoveToSuperview'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:327:26: 'willMoveToSuperview' has been renamed to 'willMove(toSuperview:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:367:66: Cannot call value of non-function type 'UIColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:373:36: 'CGGradientRef' has been renamed to 'CGGradient'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:392:29: Argument names for method 'needsDisplayForKey(key:)' do not match those of overridden method 'needsDisplayForKey'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:392:29: 'needsDisplayForKey' has been renamed to 'needsDisplay(forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:393:50: 'needsDisplayForKey' has been renamed to 'needsDisplay(forKey:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:396:18: Initializer does not override a designated initializer from its superclass
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:423:23: Argument names for method 'drawInContext(ctx:)' do not match those of overridden method 'drawInContext'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:423:23: 'drawInContext' has been renamed to 'draw(in:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:433:13: 'CGContextAddArc' is unavailable: Use addArc(center:radius:startAngle:endAngle:clockwise:)
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:435:13: 'CGContextSetStrokeColorWithColor' has been replaced by instance method 'CGContext.setStrokeColor(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:435:62: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:436:13: 'CGContextSetFillColorWithColor' has been replaced by instance method 'CGContext.setFillColor(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:436:73: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:437:13: 'CGContextSetLineWidth' has been replaced by instance method 'CGContext.setLineWidth(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:438:13: 'CGContextSetLineCap' has been replaced by instance method 'CGContext.setLineCap(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:438:48: 'Butt' has been renamed to 'butt'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:439:13: 'CGContextDrawPath' has been replaced by instance method 'CGContext.drawPath(using:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:439:37: 'FillStroke' has been renamed to 'fillStroke'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:444:43: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:445:57: Missing argument label 'value:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:454:33: Value of optional type 'CGContext?' not unwrapped; did you mean to use '!' or '?'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:455:35: Value of optional type 'CGContext?' not unwrapped; did you mean to use '!' or '?'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:456:31: Value of optional type 'CGContext?' not unwrapped; did you mean to use '!' or '?'?
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:458:27: 'CGImageRef' has been renamed to 'CGImage'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:461:13: 'CGContextSaveGState' has been replaced by instance method 'CGContext.saveGState()'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:467:24: 'CGColorGetNumberOfComponents' has been replaced by property 'CGColor.numberOfComponents'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:467:59: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:468:42: 'CGColorGetComponents' has been replaced by property 'CGColor.components'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:468:69: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:476:62: 'CGColorGetComponents' has been replaced by property 'CGColor.components'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:476:89: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:480:40: Missing argument label 'ctx:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:484:47: Cannot call value of non-function type 'UIColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:503:40: Missing argument label 'ctx:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:506:13: 'CGContextRestoreGState' has been replaced by instance method 'CGContext.restoreGState()'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:511:13: 'CGContextSetFillColorWithColor' has been replaced by instance method 'CGContext.setFillColor(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:511:55: 'CGColor' has been renamed to 'cgColor'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:512:13: 'CGContextFillRect' has been replaced by instance method 'CGContext.fill(_:)'
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:517:77: Missing argument label 'colorCount:' in call
/path/to/app/Pods/KDCircularProgress/KDCircularProgress/KDCircularProgress.swift:534:62: Missing argument label 'value:' in call

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

def infrastructure_pods
    pod 'Firebase/AdMob'
    pod 'Firebase/Crash'
    pod 'Firebase/RemoteConfig'

    pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :submodules => true
    pod 'Realm', :git => 'https://github.com/realm/realm-cocoa.git', :submodules => true

    pod 'Alamofire', '~> 4.0'
end

def ui_pods
    pod 'KDCircularProgress'
end

target 'App' do
    infrastructure_pods
    ui_pods
end

target 'AppTests' do
    infrastructure_pods
    ui_pods
end

target 'AppTests' do
    infrastructure_pods
    ui_pods
end