I want to create blowing candle in my app. So, please can someone point me to some tutorial and give me some idea that how can I do it. Should I have to use OpenGl for that? Than point me to good tutorial about OpenGL.
Asked
Active
Viewed 740 times
-6
-
Please read [faq](http://stackoverflow.com/faq#questions) – Krishnabhadra Mar 07 '13 at 09:40
-
1Check this: http://stackoverflow.com/questions/4019388/simulating-a-candle-flame-in-objective-c and this: https://github.com/codeport/ios/tree/master/outsider/iPhoneSDK-tutorial and this: http://answers.unity3d.com/questions/34976/how-to-simulate-candle-light-on-iphone.html Basically: read the FAQ and try Google sometimes – blaa Mar 07 '13 at 09:44
1 Answers
2
Get some images of blowing candle from ur graphix team and use this code to animate them
NSArray *imagesArray=[NSArray arrayWithObjects:
[UIImage imageNamed:@"blowingCandle1.jpg"],
[UIImage imageNamed:@"blowingCandle2.jpg"],
[UIImage imageNamed:@"blowingCandle3.jpg"],
[UIImage imageNamed:@"blowingCandle4.jpg"],
nil];
UIImageView *blowCandleImageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0,80, 240)];
blowCandleImageView.backgroundColor=[UIColor blackColor];
blowCandleImageView.animationImages=imagesArray;
blowCandleImageView.animationDuration=1.0;
blowCandleImageView.animationRepeatCount=0;
[blowCandleImageView startAnimating];
[self.view addSubView:blowCandleImageView];

BhushanVU
- 3,455
- 1
- 24
- 33