iOS Question Smooth bitmap rotation

tufanv

Expert
Licensed User
Longtime User
Hello,

I am trying to rotate a bitmap with using sleep. I have loaded a bitmap and set it to a imageview.
Every 10 ms I want to rotate the image 1 degress. It should be quite easy but I dont think this is correct. It crashes after some seconds , I think I mustnt load the bitmap to imageview with every loop. What is the correct way to do this ?

B4X:
For i=0 To 100

        bmp=bmp.Rotate(i)
        imgcark.Bitmap=bmp
        Sleep(10)
        
    Next

ty
 
Top