开发者

iPhone - selection of row in table view only changes that cell, leaves table intact

I am attempting to create a custom tableview where I have a list of events, and when the event is selected, only that cell is replace with information (or icons leading to other views)

My question is how would one b开发者_如何学Goe able to implement such a concept? I know it needs to be done in didSelectRowAtIndexPath however I am not sure how to push this view (or better yet, just a horizontal table view) into this space.

Any suggestions would be greatly appreciated.


then you can do one thing first create custome cell ,you can make sub calss of UITableViewCell and design as you want ,this is the cell that will be shown when you click on the cell after table view is loaded now in

- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 

when the table row is selected reload tabledata by calling this method

[self.tableView reloadData];

and in your method

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 

if your cell is selected return customcell

it will work , i have done it take help from this link http://www.alexandre-gomes.com/?p=482 good luck

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜