1.去除选中样式
cell.selectionStyle =UITableViewCellSelectionStyleNone;
2.隐藏分割线
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
3.隐藏滚动条
self.tableView.showsVerticalScrollIndicator = NO;
4.判断当前屏幕是否包含某行cell
[self.tableView.indexPathsForVisibleRows containsObject:indexPath]
5.某一行cell即将开始展示
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
6.某一行cell即将移出屏幕
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
scrollView最侧边不能滚动
scrollView.bounces = NO;3.tableView最后一行分割线不显示
- (void)layoutSubviews {
[superlayoutSubviews];
for (UIView *subviewinself.contentView.superview.subviews) {
if ([NSStringFromClass(subview.class)hasSuffix:@"SeparatorView"]) {
subview.hidden = NO;
}
}
}
4.Cell没有填充上的原因:
// 添加上这一句,可以去掉导航条下边的shadowImage,就可以正常显示了self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManagermanager];
// 设置请求格式为JSON
manager.requestSerializer = [AFJSONRequestSerializerserializer];
// 解析格式 :不设置具体的解析格式,只需要拿到数据
manager.responseSerializer = [AFHTTPResponseSerializerserializer];
[manager.requestSerializerwillChangeValueForKey:@"timeoutInterval"];
manager.requestSerializer.timeoutInterval =10.f;
[manager.requestSerializerdidChangeValueForKey:@"timeoutInterval"];
在xcode右侧的inspector视图里把Autolayout属性的勾去掉就可以了
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
BOOL inside = [super pointInside:point withEvent:event];
if (!inside && self.selected)
{
inside = [self.calloutView pointInside:[self convertPoint:point toView:self.calloutView] withEvent:event];
}
return inside;
}
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIButton * btn = (UIButton *)[self.view viewWithTag:101];
if (CGRectContainsPoint(btn.frame, point)) {
return btn;
}
for (UIButton * btn in self.view.frameArr) {
if (CGRectContainsPoint(btn.frame,point)) {
return btn;
}
}
return self;
}
@property (nonatomic,copy)NSString *description;
@end
@implementation BXTool
@synthesize description = _description;