I made an app that uses a custom UIDynamicBehavior but i have problems with performance. So the game i wrote has a circle in the middle of the screen and there are little circle dots "flying" out of the middle in random directions to the border of the circle. I have about 4-5 circles on the screen at the same time at most and the frames are already droping. I have also tried using multithreading but i get some weird errors i dont understand so im presuming i was using it wrong. Does anyone have any experience with that? Can someone help me please? In the file you see a function "lunchBall", that gats called about every second or so. Thank you. Here is the file: https://www.dropbox.com/s/hbf2qux47zhd9ap/BallDynamicBehavior.swift?dl=0
Asked
Active
Viewed 316 times
0
-
3This is too general a question for StackOverflow (it falls into the category of "here is my whole project; please debug it"). You need to start with Instruments and see where you're spending your time. I've easily managed dozens of behaviors without any frame drops. See https://github.com/iosptl/ios7ptl/tree/master/ch19-dynamics/TearOff for an example. The most common error is forgetting to remove behaviors after you're done with them. They don't go away on their own. – Rob Napier Dec 22 '15 at 17:47
-
Thanks you. I will check that. – Dec 22 '15 at 17:48