ios - CGPoint compiler error -


i've tried write expression:

 var  movedifference: cgpoint = cgpoint(touchpoint.x - self.anchorpointinpoints().x, touchpoint.y - self.anchorpointinpoints().y) 

but xcode swears:

argument labels '(_:, _:)' not match available overloads

please fix problem.

thanks in advance.

you missed argument labels on cgpoint initializer:

cgpoint(x: ..., y: ...) 

also: type inference, don't need redeclare var type:

var movedifference = cgpoint(... 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -