开发者

subview hiding the table view iphone

I have an image view on which i have included a table view. Now i wanted to insert a subview on the image view through which i wanted to show an extended background image.

I have added a subview like so on viewDidLoad....

if([data count]>3)
{
    UIImageView *i=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"test.png"]];
    [i setFrame:CGRectMake(1.25,350,321,210)];
    [[self view] addSubview:i];
    //[[self view] sendSubviewToBack:i];
    [i release], i=nil;
}

The problem is the table view is not showing up in the region where i added the sub view. I tried to send the subview to back but if i do so only 开发者_开发知识库the previous image view is showing up... Plz help...


After adding the image view

[self.view bringSubviewToFront:myTableView];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜