Ross
Ross

Reputation: 14415

Most effective way of drawing 4 lines in an iPhone app?

basic question, but I'm unsure. Not looking for code as an answer.

I want to draw 4 short lines 1px lines on a view. What is the best way to approach this task? Options:-

Thanks Ross

Upvotes: 0

Views: 154

Answers (2)

Jasarien
Jasarien

Reputation: 58448

Quick and dirty way to achieve this is to just create a UIView and set it's height (or width, depending on its orientation) to 1px, and then set a background colour and slap it onto your view as a subview.

Upvotes: 1

rpetrich
rpetrich

Reputation: 32326

Simplest way is to create a UIView subclass and perform your drawing in drawRect:. See the CoreGraphics guide for details on how to draw a line.

Upvotes: 2

Related Questions