O
O
ordoko2015-09-17 00:52:48
iOS
ordoko, 2015-09-17 00:52:48

How to draw a colorful iOS line?

The goal is to make a custom slider: the slider moves along a horizontal thick line consisting of 7 multi-colored segments. I have two ideas - put a picture under the transparent slider or draw it. I can put a picture, but I don't know how to draw. Or rather, I know only through core graphics by drawing segments from one point to another (CGContextMoveToPoint, CGContextAddLineToPoint...), are there any simpler ways?5f93af5dec83435c9acda72988fb18b7.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lyeskin, 2015-09-17
@lyeskin

Well, do you draw with CoreGraphics , or do you want the "draw a line with multi-colored segments" method in the standard tool? Moreover, drawing such a segment takes no more than a few lines.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question