开发者

How to send next responder from custom button on tableviewcell to UITableViewController?

UPDATE:

开发者_开发问答

i have MENUViewController and i insert this view to TableViewCell, when i press button on MENUViewController how to pass nextResponder to TableViewCell ?

from LOG at my button in MENUViewController class->NSLog(@"nextResponder = %@", self.nextResponder); it show like this?

2010-07-22 02:14:12.627 NewsReaderV2[3576:207] button Press
2010-07-22 02:14:12.653 NewsReaderV2[3576:207] nextResponder = <UITableViewCell: 0x5f33120; frame = (0 48; 320 129); autoresize = W; layer = <CALayer: 0x5f330d0>>
2010-07-22 02:14:13.987 NewsReaderV2[3576:207] button Press
2010-07-22 02:14:13.988 NewsReaderV2[3576:207] nextResponder = <UITableViewCell: 0x5f3a490; frame = (0 177; 320 129); autoresize = W; layer = <CALayer: 0x5f3a570>>
2010-07-22 02:14:18.019 NewsReaderV2[3576:207] button Press
2010-07-22 02:14:18.020 NewsReaderV2[3576:207] nextResponder = <UITableViewCell: 0x692b210; frame = (0 306; 320 129); autoresize = W; layer = <CALayer: 0x6925480>>

@END of UPDATE

i have insert button on each cell ,when i press on that button it will not send message to

  • (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

how to make responder from button send message to UITableViewController?


If you want to select corresponding cell when button in it clicked - determine cell's indexpath in click handler (see similar question). Then call selectRowAtIndexPath:animated:scrollPosition: method on your table view.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜