2

I have a background view with an image which fill all the view. Above this view, I added another view with backgroundColor [UIColor clear] and the attribute opaque to NO.

Here is what I would like to happen:

The desired outcome

Here is what happens instead:

The current outcome

I want to draw a png image with transparency above this last view with drawInRect:. The problem is that all the transparency of the image is filled with the pixels of the first view (the one with the image). If I do addSubview: the problem is fixed, but I have to to do a draw.

Does anyone have the answer of my problem?

Monolo
  • 18,205
  • 17
  • 69
  • 103
  • I do not understand the setup, nor the problem. Maybe an image would help? – Nikolai Ruhe Apr 12 '13 at 09:05
  • This one is with drawInRect http://imageshack.us/photo/my-images/40/beforevy.png/ And this one http://imageshack.us/photo/my-images/826/afterf.png/ with addSubview. The last one is correct, but I want the same result but with drawInRect. – David Goncalves Apr 12 '13 at 09:22
  • need more clear elaboration.. – Sharanya K M Apr 12 '13 at 09:45
  • My understanding is that the problem is the thin green outline around each card: you would like to see the card that's been drawn before it in that space, rather than the green background, right? – Sergey Kalinichenko Apr 12 '13 at 16:01
  • why don't you remove the green background around the cards? you would get the desired result... – holex Apr 12 '13 at 16:22
  • @dasblinkenlight Yeah i would like to see the card that's been drawn before and not the green background. The green outline around each car is normaly transparent, because it's png images. – David Goncalves Apr 15 '13 at 10:16
  • @DavidGoncalves I flagged the question for reopening, I think there's a decent chance the moderators will reopen it. – Sergey Kalinichenko Apr 15 '13 at 10:22
  • here is my `drawRect:` method code : - (void)drawRect:(CGRect)rect { [currentImage.image drawInRect:rect]; } – David Goncalves Apr 15 '13 at 11:57

0 Answers0