如何UITableViewCell
在应用商店应用中的标题右侧添加“查看全部>”按钮?
3 回答
0
您可以将按钮(和标题标题)添加到自定义UIView
并将其添加为表格标题(使用-[UITableView
tableHeaderView]
于 2014-06-27T12:04:53.337 回答
0
UIButton
只需在您的自定义 UITableViewCell 中拖动一个。使该UIButton
外观样式自定义并编写您的内容文本“查看全部>”。在 .h 文件中创建按钮属性的链接,CustomCell
并将 targetSelector 添加到委托方法中cellForRowAtIndexPathMethod
的按钮。UITableView
对于前-
[seeAllBtn addTarget:self action:@selector(seeAllAction:) forControlEvents:UIControlEventTouchUpInside];
不要忘记在owner
你的控制器中实现这个方法UITableView
。
于 2014-06-27T12:05:37.657 回答
0
类似的东西:
UIBarButtonItem *button = [[UIBarButtonItem alloc] init];
[button setTitle:@"See all"];
[self.navigationItem setRightBarButtonItem:button];
于 2014-06-27T11:58:07.483 回答