1

Am trying to fix few bugs in UX when implementing the pod from folding cell from RAMotion github link for pod

However looked into few resources here and here was unable to understand the issue.

in FileA in the given function shows an error saying:

Argument labels '(rawValue:)' do not match any available overloads

fileprivate func convertToCAMediaTimingFunctionName(_ input: String) -> CAMediaTimingFunctionName {
    return CAMediaTimingFunctionName(rawValue: input as String)
}

while looking in the CAMediaTimingFunctionName it has following code

/* CoreAnimation - CAMediaTimingFunction.h

   Copyright (c) 2006-2018, Apple Inc.
   All rights reserved. */

public struct CAMediaTimingFunctionName : Hashable, Equatable, RawRepresentable {

    public init(rawValue: String)
}

the actual error location Any guidance would be helpful.

Smple_V
  • 838
  • 3
  • 13
  • 32
  • I copied that function into a Swift Playground and it compiled just fine. Which version of iOS and which version of Swift are you using? – rmaddy Nov 13 '18 at 16:47
  • I saw the build version as 4.0 so i changed it as 4.2 closed and build it back again it shows the same error !! – Smple_V Nov 13 '18 at 16:51
  • The code you posted works just fine for me. If you can't post code that actually reproduces the error, it is going to be difficult for anyone to help. – rmaddy Nov 13 '18 at 16:57
  • i have added a screen shot of the error – Smple_V Nov 13 '18 at 17:00
  • 1
    You can use it like this ```CAMediaTimingFunctionName(string: "something")```. Make sure UIKit is imported in your file. – danypata Nov 13 '18 at 18:55

1 Answers1

1

There has been some issues with the said RAmotion project as it was orginally designed for swift 3 later few updates were made.

However, with the limited information would suggest in saying to try something like this

fileprivate func convertToCAMediaTimingFunctionName(_ input: String) -> CAMediaTimingFunctionName {
    return CAMediaTimingFunctionName(string:input )