How to make a transparent background, see the main screen?

Possible duplicate:
Transparent application for iphone

I want to make an application in which the user can see the main screen, that is, the screen on which this application icon is present. Can anyone tell how to do this? I tried to do this by setting:

self.view.backgroundColor=[UIColor clearColor];
self.view.opaque=NO;

But it does not show a transparent screen. Can anybody help me?

+5
source share
2 answers

You can add image to window in appDelegate

UIImage* bgImage = [UIImage imageNamed:@"bg.png"];
UIImageView* bgView = [[UIImageView alloc]initWithImage:bgImage];
[self.window addSubview:bgView];
[bgView release];

and then you can set all background images as you wish, by default it is clearColor

[self.view setBackgroundColor:[UIColor colorWithRed:100 green:0 blue:0 alpha:0.1]]; // for red transparent


[self.view setBackgroundColor:[UIColor colorWithRed:0 green:100 blue:0 alpha:0.1]]; // for green transparent


[self.view setBackgroundColor:[UIColor colorWithRed:0 green:0 blue:100 alpha:0.1]]; // for blue transparent
+4
source

Without an official SDK, this is not possible.

EDIT: , one..

+2

All Articles