-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
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
继承YKPageCell问题 #3
Comments
你好 第一个cell的frame是在之后才确定的 if (i == 0) {
YKPageCell *cell = [self.dataSource pageView:self cellForIndex:i];
cell.frame = frame;
[scrollView addSubview:cell];
[self.displayCells setObject:cell forKey:@(i)];
} |
不是很明白下边的代码应该写到哪一块,能加到demo中吗 |
不是的,我的意思是,cell的frame会在之后被YKPageView自动设置 |
其后由于return的cell是从缓存池取出,所以已有frame就无需在设置了 |
@Property (nonatomic, weak) YKPageView *pageView; 你demo中一定要用weak 属性么 |
@Eliothu |
我在FirstTableView继承YKPageCell后
static NSString *identifier = @"pageCell";
FirstTableView *cell = [pageView dequeueReusableCellWithIdentifier:identifier];
if (cell == nil) {
cell = [[FirstTableView alloc] initWithIdentifier:identifier];
}
return cell;
}
调用父类initWithIdentifier:方法,FirstTableView的frame是(0,0,0,0),请问是么原因导致的
qq:1183599228
The text was updated successfully, but these errors were encountered: