ios - Can't find a solution to fix shake motion in xcode 7, swift -


i've been struggling problem quite lot , searched answer, couldn't find any, hope i'll answers here. so, when run project in simulator , if choose /hardware -> shake gesture/ , code have breakpoint in code. right on first line says if motion == .motionshake ... breakpoints. have ideas?

override func motionbegan(motion: uieventsubtype, withevent event: uievent?) {     if motion == .motionshake {         fadefortune()          } } override func motionended(motion: uieventsubtype, withevent event: uievent?) {     if motion == .motionshake {         newfortune()         } } override func motioncancelled(motion: uieventsubtype, withevent event: uievent?) {     if motion == .motionshake {         newfortune()         } } 


Comments