Chapter 16. Drawing with CoreGraphics

Up until this point, any graphics we've drawn have been intrinsically handled by the controls we've used. For example, we've created plenty of buttons, but we've never had to draw them ourselves. Sometimes, however, we need to do custom drawing beyond what the controls offer out of the box. For example, let's say that you want to build a view that has a rounded rectangle border. You could do this with images, but for maximum configurability, you could draw the lines and corners using CoreGraphics. That way, you could vary the radius of the corners, as well as the color and thickness of the lines, without having to do new images every time.

We have several options to do custom drawing, including CoreGraphics, ...

Get Developing C# Apps for iPhone and iPad Using MonoTouch: iOS Apps Development for .NET Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.