I am new in ios development .I have searched many tutorials that are using framework for data-grid with License key.I want to show data like this table at given link . How i can use uicollection view to display tabular data like in link ? In code in gridview.h file is :
import
@interface GridViewCell : UITableViewCell
@property (nonatomic, strong) UIButton *column1;
@property (nonatomic, strong) UIButton *column2;
@property (nonatomic, strong) UIButton *column3;
@end
The code in gridview.m file is :
//
// GridViewCell.m
// SQLite3DBSample
//
// Created by Dezine House on 22/12/2014.
// Copyright (c) 2014 Bilal ARSLAN. All rights reserved.
//
#define CELL_WIDTH 100
#define CELL_HEIGHT 80
#import "GridViewCell.h"
@implementation GridViewCell
@synthesize column1, column2, column3;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
column1 = [[UIButton alloc] initWithFrame:CGRectMake(5, 5, CELL_WIDTH, CELL_HEIGHT)];
[self addSubview:column1];
column2 = [[UIButton alloc] initWithFrame:CGRectMake(CELL_WIDTH+ 10, 5, CELL_WIDTH, CELL_HEIGHT)];
[self addSubview:column2];
column3 = [[UIButton alloc] initWithFrame:CGRectMake(CELL_WIDTH + CELL_WIDTH + 15, 5, CELL_WIDTH, CELL_HEIGHT)];
[self addSubview:column3];
}
return self;
}
- (void)awakeFromNib
{
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
GridViewCell *cell = (GridViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[GridViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
[cell.column1 setBackgroundColor:[UIColor blackColor]];
[cell.column2 setBackgroundColor:[UIColor blackColor]];
[cell.column3 setBackgroundColor:[UIColor blackColor]];
return cell;
}
@end