cocoa touch - Touches Began not working with Swift 3.0 on Xcode 8.0 beta -


i making game swift 3.0 on xcode 8.0 beta. in gamescene have touchbegan function:

override func touchesbegan(_ touches: set<uitouch>, event: uievent?) {     t in touches {         let location = t.location(in: self)         let nodeattouch = self.atpoint(location)         let touchedsprite = nodeattouch as! skspritenode         print("touch detected")         if touchedsprite skbutton {             print("button touched")             touchedsprite.run(skaction.resize(bywidth: 25, height: 25, duration: 0.25))         }     } } 

for strange reason print on line 6 doesn't print out when touch screen, therefore meaning touch not being detected. ideas or fixes, else having problem? in advance.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -