How can i improve the performance of my app(swift) that seams to struggle

330 Views Asked by At

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

0

There are 0 best solutions below