UIView add subview gap

186 Views Asked by At

I know it's may be a stupid question to ask. But I am designing a single-view application in xcode 3 , ios 5. Programatically adding a subview and imageview to take up the whole screen. But it shows a small gap at the bottom of my view on the screen. Not sure why. Here is the code. any suggestion ?

[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
homeView =[[UIView alloc] initWithFrame:self.view.frame];
UIImageView *backImage= [[UIImageView alloc] initWithFrame:self.view.frame];
backImage.image=[UIImage imageNamed:@"bg.png"];
[homeView addSubview:backImage];
[self.view addSubview:homeView];
1

There are 1 best solutions below

0
On

The gap was due to some transparent pixels in the image i was using. Nothing was wrong with the code. It has been resolved. Thanks