We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望能默认显示出UITableView的自定义(headerView 和 footerView)作为分割线 类似下面这种代码
(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return dataArray.count; }
(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 1; }
(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { return 10; }
(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 20; }
(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UITableViewHeaderFooterView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"headerView"]; if (headerView == nil) { headerView = [[UITableViewHeaderFooterView alloc] initWithReuseIdentifier:@"headerView"]; headerView.contentView.backgroundColor = UIColor.redColor; } return headerView; }
(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { UITableViewHeaderFooterView *footerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"footerView"]; if (footerView == nil) { footerView = [[UITableViewHeaderFooterView alloc] initWithReuseIdentifier:@"footerView"]; footerView.contentView.backgroundColor = UIColor.yellowColor; } return footerView; }
The text was updated successfully, but these errors were encountered:
默认是默认到什么程度。只要给足组件你想要的信息就可以显示的。 这里需要固定section,否则组件也不知道你希望有几个分区。
Sorry, something went wrong.
好的 我知道了 谢谢
能支持一下传入外部的 UIImage吗,因为传入 placeholderName 如果这个图片是在其他组件里面,访问到这个图片必须以 inBundle:resourceBundle 方式才能访问到
No branches or pull requests
希望能默认显示出UITableView的自定义(headerView 和 footerView)作为分割线
类似下面这种代码
(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return dataArray.count;
}
(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 1;
}
(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 10;
}
(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 20;
}
(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UITableViewHeaderFooterView *headerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"headerView"];
if (headerView == nil) {
headerView = [[UITableViewHeaderFooterView alloc] initWithReuseIdentifier:@"headerView"];
headerView.contentView.backgroundColor = UIColor.redColor;
}
return headerView;
}
(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UITableViewHeaderFooterView *footerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"footerView"];
if (footerView == nil) {
footerView = [[UITableViewHeaderFooterView alloc] initWithReuseIdentifier:@"footerView"];
footerView.contentView.backgroundColor = UIColor.yellowColor;
}
return footerView;
}
The text was updated successfully, but these errors were encountered: