Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the lightest way to draw images and text in Objective C?

I am planning to implement a component similar to the iphone's photo album.. I guess that using uviews will make the component to have a bad performace , I mean scrolling slow and all of the stuff ... so which way should I take? Is CALayer better than UIViews in terms of performance? Is there any other (lighter) way to draw images or text without using UIView subclasses?

Any link or idea will be great,

Thanks you!

like image 923
Omer Avatar asked Dec 28 '25 01:12

Omer


1 Answers

There are plenty of tutorials about graphics and the pros and cons of UIView vs drawing. I'm no expert but I suspect that performance is more likely to come from your instantiation and caching strategies. I.e. if you want fast scrolling then looking at minimising the number of objects instantiated, caching and reusing those that are and an effective block loading routine for loading data will all yield large benefits.

But I'd be inclined to do a simple proof of concept app first, load it onto a device and see how fast it goes and where you are most likely to need to address performance issues. Apart from standard design strategies such as caching and reusing components, attempting to optimize the performance before you have identified where the performance bottlenecks are occurring is generally not a good idea.

like image 176
drekka Avatar answered Dec 30 '25 15:12

drekka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!