-2

this question could be a possibile duplicate. I've deleted and re asking the same question only to provide an answer that could help others to fix this issue

collision.addBoundary(withIdentifier: "barriera" as NSCopying, from: CGPoint(0, self.view.frame.height/2), to: CGPoint(self.view.frame.width, self.view.frame.height/2))
Community
  • 1
  • 1
Riccardo
  • 66
  • 2
  • 16
  • @TiagoMarinho I've asked and answered my own question only to share my knowledge and to help others who might have to face this same issue – Riccardo Oct 02 '16 at 15:38
  • 3
    I'm sure you asked and answered your question with the best intentions possible, but it's already answered somewhere else here. Deleting and re-asking the same question doesn't make it unique. – Tiago Marinho Oct 02 '16 at 15:40
  • so what should I do? tap the "that solved my problem!" button as suggested at the beginning of the question? @TiagoMarinho – Riccardo Oct 02 '16 at 15:43
  • 1
    If the [original question](http://stackoverflow.com/questions/37946990/cgrectmake-cgpointmake-cgsizemake-cgrectzero-cgpointzero-is-unavailable-in) was helpful to you, vote it up. That's all you can do. – Tiago Marinho Oct 02 '16 at 15:45

1 Answers1

-1

collision.addBoundary(withIdentifier: "barriera" as NSCopying, from: CGPoint(x: 0, y: self.view.frame.height/2), to: CGPoint(x: self.view.frame.width, y: self.view.frame.height/2))

as a matter of fact all I was missing in the above question were x and y

Riccardo
  • 66
  • 2
  • 16