I made a struct, and a function inside of it and I don't understand why it is asking me for the wrong parameters when I try to call it. Here is my function declaration:
struct UserInterfaceVariables { func applyCustomAnimation(view: AnimatableView, animationType: String, duration: Double, delay: Double, damping: CGFloat, velocity: CGFloat, force: CGFloat) { view.animationType = animationType view.duration = duration view.delay = delay view.damping = damping view.velocity = velocity view.force = force } } And in another view controller, I try to call it, it asks me for a "UserInterfaceVariables" parameter, but that isn't the type of parameter I want to input... I want to input the parameters from my function declaration ("animationType", etc...)
UserInterfaceVariables.applyCustomAnimation(UserInterfaceVariables) Do note that the "UserInterfaceVariables" entry (in the parentheses) is the type of parameter it is expecting... i.e. this is what it looks like on Xcode:
Why is it not asking me for the parameters declared in my function definition ?
EDIT 1 Tentative solution:
let userInterfaceVariables = UserInterfaceVariables() applyCustomAnimation(view: ..., .....) 
static