objective c - Circular animation in Apple watch using UIGraphicsContext -


i want create circular animation in apple watch using core graphics. want create animation earth revolving around sun continuously. have tried method below crashes application on watch after time. please share suggestions , ideas on this.

attempt:

uigraphicsbeginimagecontext(contextsize); cgcontextref context    = uigraphicsgetcurrentcontext(); cgcontextsetstrokecolorwithcolor(context, [uicolor whitecolor].cgcolor);  [sprite.image drawatpoint:sprite.position];  // convert uiimage cgimageref imgref       = cgbitmapcontextcreateimage(context); self.lastimage          = [uiimage imagewithcgimage:imgref];  // end graphics context uigraphicsendimagecontext();  [self.container setimage:self.lastimage]; 
  1. tgesprite own custom class having 2 objects 1. uiimage , 2. cgpoint position.
  2. in above code find point of circular path of specified radius , draw image on series of position after regular interval of time.
  3. when try smooth animation , reduce interval time 25 times in second. runs 2 iterations , crashes.
  4. in nutshell, want create circular animation in have complete control of object revolving.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -