开发者

iPhone table menu

Hi all i would like to build a menu that looks li开发者_高级运维ke a table and when i click on a cell it goes to another view. But i want for the tableView to be inside a UIView. I need starting points, like how it's done, not the actual coding. I dont want someone to write it for me

here are some examples on what i want

iPhone table menu

iPhone table menu


My Suggestion

You could use a container view, it will have your UITableView as a subview.

UIView* m_OthersView;
UIView* m_ContainerView;
UIView* m_TableView;

[self.view addSubviews:m_ContainerView];
[self.view addSubviews:m_OthersView];

if you need menu in your view,

 [m_ContainerView addSubviews:m_TableView]

and if you don't

[m_TableView removeFromSuperview];

Thanks,


If what you want to accomplish is that background behind the table view and a custom size of the table view I suppose you could do the following in your viewDidLoad of the table view controller

UIImageView *background = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg.png"]];
[self.view addSubview:background];
[self.view sendSubviewToBack:background]; // Now the background should be behind the table view.
self.tableView.frame = yourFrame;

I haven't tried it, but I think it should work. If not let me know.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜