Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A GridView which allows to set individual Rects for the Cells. So you can define Cells with different Sizes, used for e.g. in Timetables, EPGs, etc.
Objective-C
Branch: master
Pull request Compare This branch is 1 commit ahead, 1 commit behind NOUSguide:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
NGVaryingGridView
NGVaryingGridViewDemo
.gitignore
LICENSE
README.md

README.md

NOUSguide Inc.

NGVaryingGridView

A GridView which allows to set individual Rects for the Cells. So you can define Cells with different Sizes, used e.g. in Timetables, EPGs, etc.

Sticky Views are also supported on top of the GridView and on the left side.

NGVaryingGridView

Usage

self.gridView = [[NGVaryingGridView alloc] initWithFrame:self.view.bounds];
self.gridView.gridViewDelegate = self;
[self.view addSubview:self.gridView];

[self.gridView reloadData];

The following Delegate-Methods are required:

// You should return an Array which contains CGRects for every Cell you want to display inside the GridView
- (NSArray *)rectsForCellsInGridView:(NGVaryingGridView *)gridView {
    NSMutableArray *rectsArray = [NSMutableArray array];
    [array addObject:[NSValue valueWithCGRect:CGrectMake(...)]]

    // ...

    return rectsArray;
}

// return an UIView representing your Cell
- (UIView *)gridView:(NGVaryingGridView *)gridView viewForCellWithRect:(CGRect)rect index:(NSUInteger)index {
    YourUIViewSubclass *gridCell = (YourUIViewSubclass *)[gridView dequeueReusableCell] ? : [[YourUIViewSubclass alloc] initWithFrame:rect];
    gridCell.frame = rect;

    // setup gridCell

    return gridCell
}

Just have a look inside the provided Demo-Application.

Credits

NGVaryingGridView was created by Philip Messlehner

License

NGPageControl is available under the MIT license. See the LICENSE file for more info. For usage without attribution contact NOUSguide.

Something went wrong with that request. Please try again.