TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
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.
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.
NGVaryingGridView was created by Philip Messlehner
NGPageControl is available under the MIT license. See the LICENSE file for more info. For usage without attribution contact NOUSguide.