0

The previous explanation was muddled up and rewritten. - 2019.07.23

  1. I have two UIView named MainView, CanvasView.
  2. MainView, CanvasView have the same frame, and More precisely, there is CanvasView on MainView.
  3. Using UIGraphicsGetCurrentContext, I colored a certain area for CanvasView.

Next, I want to fill the MainView's area just like an uncoloured area of CanvasView with different colors or images like photoshop feature filling selected areas or fill other areas.

  • 1
    Please mention what you have tried and where you stuck. Please edit the question and add such details. – Kampai Jul 22 '19 at 09:43
  • go through https://stackoverflow.com/questions/52553432/how-can-i-colour-my-sketch-using-pen-tool-within-the-limited-edge-boundaries-usi/52586986#52586986 , I think you are looking for something like this. – Shivam Gaur Jul 22 '19 at 09:59
  • This may help you - https://stackoverflow.com/questions/1160229/how-to-get-the-color-of-a-pixel-in-an-uiview – teja_D Jul 22 '19 at 10:23
  • @Kampai I'm sorry that the explanation is not good. Currently, I'm thinking of using the UIView's pixels to solve. – Woonhyeong Jul 23 '19 at 00:55
  • @ShivamGaur Thank you ! I didn't know there was an algorithm like this. It's very similar to what I've been looking for. – Woonhyeong Jul 23 '19 at 01:40

0 Answers0