iOS code drawings vs png

I've found a program for converting SVG images directly into code. Sounds like an epic solution for iOS application size problems but here occurs some obstacles. Drawing complex images result into 4k+ lines of hardcore code. Its about 100 kB pure file size that almost equals to initial png image size.

So the question - is there any point(total app size gain) of drawing such kind of images from code or better include em in project as normal pngs? Whats the ration between code size and binary size? Or how could I calculate it?

Answers


After times of research, I've found that UIBezierPath solves my problem pretty nice. Yes, UIBezierPath is just a wrap for CoreGraphics that is based on CPU but as Apple recommends - use highest level of abstraction for your purposes and let system do it job.

Performance for drawing vector images using UIBezierPath is high enough for any 2D interface element. As I've tested - speed factor for retina display even for hardest images was about 45-50 fps that is more than enough for primitive UI animations.

So the verdict is - drawing your interface using code saves memory and nerves.


Need Your Help

WP 8.1 Universal: Prevent ScrollViewer from automatically moving scrolled content to left edge

listview windows-store-apps windows-phone-8.1 scrollviewer windows-universal

I have a ListView with images and I'd like to be able to zoom into the whole listview while still being able to scroll the listview. Therefore I put a ScrollViewer around the ListView.

Repository Updates Only With Initial Commit

git github git-push

If I run 'git push' in terminal, it won't update my repository on github; however, if I initialize the git, and run the three following: 'git init', 'git add .', and finally, 'git commit -m "Initial

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.