If you want to test this yourself, I highly recommend picking up the image editor Opacity, which can generate Quartz code for a drawing (including a full UIView or CALayer subclass), as well as output a PNG of that same drawing. Oddly, I also saw a reduction in application memory usage by about 0.5 MB, which I can't fully explain. When I replaced the Quartz-drawn radial gradient with a static image, I saw a noticeable reduction in application startup time (this background is placed during application startup). In Shark, I could see that the CGContextDrawRadialGradient() call was chewing up a lot of CPU time. One area where I did see a significant performance win is for a large radial gradient that I draw as a background. If I want to change the size of a UI element in the future (maybe to support a larger or higher resolution display), I would need to re-render all of my images, where the vector drawings will scale as needed. In those cases, I've settled on using the Quartz drawing routines, simply because of the flexibility they give me. In most simple drawing cases (like your rectangle example), loading an image from disk seemed to be slightly slower than drawing one, perhaps due to the disk access required. I had a similar question, so I timed out the different approaches. How to code sharing between Android and iOS.UIPicker detect tap on currently selected row.How to make a UITableViewCell with a UITextView inside, that dynamically adjust its height, on the basis of the UITextView?.iPhone development - what is the difference between a development and distribution provisioning?.Slow start for AVAudioPlayer the first time a sound is played.iPhone UIView - Resize Frame to Fit Subviews.How do I force a UITextView to scroll to the top every time I change the text?.Error while launching the application on device.Creating iOS/OSX Frameworks: is it necessary to codesign them before distributing to other developers?.Implementing Fast and Efficient Core Data Import on iOS 5.Check if PHP-page is accessed from an iOS device.What exactly does `pod repo update` do?.iOS7 UISwitch its Event ValueChanged: Calling continuously is this Bug or what.?.Uploading archive error: "Missing iOS Distribution signing identity for.How to change height of grouped UITableView header?.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |