Reputation: 5536
I have an iphone app that gets jpeg images through wifi at a rate I can control and displayes them using a uiimageview. it seems that the best performance i can get is about 2fps. it lookes like the uiimageview cant handle [uiimageview setimage:image] quickly.
is there a better solution other than using uiimageview that will allow me a betterframe rate?
Upvotes: 1
Views: 582
Reputation: 9113
I understand you need JSon to pass multiple info from your service but clearly re creating your image from a json string consumes both memory and processor time. Use the Json to pass the url of the bytes instead and retrieve the bytes using another get.
I expect you to have a json like { path = "/images/funnryrabbits.jpg", anyProperty: "anyValue" }
Upvotes: 1
Reputation: 21893
Try using the .animationImages
property of UIImageView. It takes an array of UIImages and animates them like a flipbook or an animated gif. You can make some cheap but quick animations by putting in a bunch of slides and letting UIImageView do the animation.
I don't know if you can manipulate that array as it's rendering the animation, is the thing.
Upvotes: 0