{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/a583e5a36c0dc627675e25f9c3fe585c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a583e5a36c0dc627675e25f9c3fe585c","url":"https://api.github.com/users/lgadams","login":"lgadams","id":1153502},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-03T05:16:29Z","comments":1,"closed_at":null,"url":"https://api.github.com/repos/Xenofex/MultiColumnTableViewForiOS/issues/3","body":"Hi Xenofex,\r\n\r\nI have been playing around with the grid and have been trying to find an easy way to not use sections.\r\n\r\nWhat I have come up with, which I think needs some work is something like this:\r\n\r\nIn your example, I have modified viewDidLoad in MultiColumnTableViewController.m to look like this:\r\n\r\n- (void)viewDidLoad\r\n{\r\n[super viewDidLoad];\r\n    numberOfColumns = 5;\r\n    numberOfRows = 30;\r\n    numberOfSections = 1;\r\n    \r\n    colWidth = 240.0f;\r\n    headerHeight = 100;\r\n    headerWidth = colWidth;\r\n   \r\n    data = [[NSMutableArray alloc] initWithCapacity:numberOfRows];\r\n\r\n    for (int i = 0; i < numberOfRows; i++) \r\n    {        \r\n            NSMutableArray *rowArray = [NSMutableArray arrayWithCapacity:numberOfColumns];\r\n            for (int j = 0; j < numberOfColumns; j++) {\r\n                [rowArray addObject:text];\r\n            }\r\n            \r\n            //[sectionArray addObject:rowArray];\r\n        [data addObject:rowArray];        \r\n    }\r\n    \r\n    \r\n    tblView = [[EWMultiColumnTableView alloc] initWithFrame:CGRectInset(self.view.bounds, 5.0f, 5.0f)];\r\n//    tblView.sectionHeaderEnabled = YES;\r\n//    tblView.cellWidth = 100.0f;\r\n//    tblView.boldSeperatorLineColor = [UIColor blueColor];\r\n//    tblView.normalSeperatorLineColor = [UIColor blueColor];\r\n//    tblView.boldSeperatorLineWidth = 10.0f;\r\n//    tblView.normalSeperatorLineWidth = 10.0f;\r\n    tblView.dataSource = self;\r\n    tblView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;\r\n    [self.view addSubview:tblView];\r\n}\r\n\r\nand modified this method to just return the number of rows…\r\n\r\n- (NSInteger)tableView:(EWMultiColumnTableView *)tableView numberOfRowsInSection:(NSInteger)section\r\n{\r\n    return [data count];\r\n}\r\n\r\nIs there an easier and more readable way to not use sections and just have pure rows in the grid? I couldn't really see any other way with out extending the API a bit...\r\n\r\nAlso, is there a more dynamic way to calculate the width/height of the columns rather than hard coding them? Sorry I am new to iOS programming. \r\n\r\nThanks!","html_url":"https://github.com/Xenofex/MultiColumnTableViewForiOS/issues/3","number":3,"title":"How to not show sections in table","id":2126405,"created_at":"2011-11-02T20:55:42Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/bdcbf5938283883a69b87483412a49fe?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"bdcbf5938283883a69b87483412a49fe","url":"https://api.github.com/users/Xenofex","login":"Xenofex","id":227744},"updated_at":"2011-11-03T05:16:29Z","url":"https://api.github.com/repos/Xenofex/MultiColumnTableViewForiOS/issues/comments/2613360","body":"Hi, Igadams\r\n\r\n> Is there an easier and more readable way to not use sections and just have pure rows in the grid?\r\n\r\nJust set `sectionHeaderEnabled = NO`, as that in your code, you commented out\r\nthe line to set this value to `YES`. This property is `NO` by default\r\n\r\n>  Also, is there a more dynamic way to calculate the width/height of the columns rather than hard coding them?\r\n\r\nDefinitely there are. Looking into the file `EWMultiColumnTableView.h`, you'll find that there are many delegate methods which can configure the grid. In your case here,\r\n\r\n```objective-c\r\n- (CGFloat)tableView:(EWMultiColumnTableView *)tableView heightForCellAtIndexPath:(NSIndexPath *)indexPath column:(NSInteger)column;\r\n\r\n- (CGFloat)tableView:(EWMultiColumnTableView *)tableView widthForColumn:(NSInteger)column;\r\n```\r\n\r\nthe 2 methods do exactly what you want.\r\n\r\nMaybe you are not familiar with the original UITableView. This multi-column table view is designed working in the same way of the original UITableView. You implement some required delegate methods, then you got the basic layout. If you want it more customizable, just implement more.\r\n","id":2613360,"created_at":"2011-11-03T05:16:29Z"}}