Closed BrandonCopley closed 12 years ago
That looks great. I never tested it before, assuming it was going to be problematic. But it's nice to know it just works. Feel free to issue a Pull Request, or I can just merge your code from the blog post. Thanks!
I've merged your changes, but in the process made numerous other changes to support multiple sections. Most of my changes were stylistic, though some were functional changes too. I decided to break the existing interface just to keep it simpler for newer users. Existing users shouldn't have much difficulty in fixes required to use the new method calls. I've documented mostly everything in the README. Do you mind pulling my latest changes just to make sure everything still works for you? You might see a bug or two where you need to replace "index" with "indexPath". Thanks.
Your app Comic Turtle looks great! Well done. And thanks for letting me know that EasyTableView has been used successfully in a production app! I've used EasyTableView with a number of clients, but their apps have yet to be released, and I have not used it in any of my own Yodel Code branded apps. Thanks again for helping with the extensions for multiple sections and section headers and footers.
Great,
I will yes soon - I'm working on now allowing rotated headers an footers, they work but everything shows up rotated :P.
Brandon
On Mar 1, 2012, at 5:56 PM, Aleksey Novicov reply@reply.github.com wrote:
I've merged your changes, but in the process made numerous other changes to support multiple sections. Most of my changes were stylistic, though some were functional changes too. I decided to break the existing interface just to keep it simpler for newer users. Existing users shouldn't have much difficulty in fixes required to use the new method calls. I've documented mostly everything in the README. Do you mind pulling my latest changes just to make sure everything still works for you? You might see a bug or two where you need to replace "index" with "indexPath". Thanks.
Your app Comic Turtle looks great! Well done. And thanks for letting me know that EasyTableView has been used successfully in a production app! I've used EasyTableView with a number of clients, but their apps have yet to be released, and I have not used it in any of my own Yodel Code branded apps. Thanks again for helping with the extensions for multiple sections and section headers and footers.
Reply to this email directly or view it on GitHub: https://github.com/alekseyn/EasyTableView/issues/12#issuecomment-4274130
I'll carry on this thread under Issue #14.
Alright why couldn't we implement headers and footers? I believe I have added headers and footers and done a great implementation.
Can I share this code?
-(UIView)tableView:(UITableView )tableView viewForHeaderInSection:(NSInteger)section{ if ([delegate respondsToSelector:@selector(easyTableView:viewForHeaderInSection:)]) { return [delegate easyTableView:self viewForHeaderInSection:section]; } return [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; }
-(UIView)tableView:(UITableView )tableView viewForFooterInSection:(NSInteger)section{
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
}
(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSUInteger numOfItems = _numItems;
if ([delegate respondsToSelector:@selector(numberOfCellsForEasyTableView:inSection:)]) { numOfItems = [delegate numberOfCellsForEasyTableView:self inSection:section];
}
return numOfItems; }
(UIView )viewAtIndex:(NSUInteger)index inSection:(NSInteger)section{ NSIndexPath indexPath = [NSIndexPath indexPathForRow:index inSection:section]; UIView *cell = [self.tableView cellForRowAtIndexPath:indexPath];
return [cell viewWithTag:CELL_CONTENT_TAG]; }
in the .h
This seems to work swimmingly.