https://github.com/fromkk/fkgridview
Simply grid layout expression for iOS.
https://github.com/fromkk/fkgridview
Last synced: about 1 year ago
JSON representation
Simply grid layout expression for iOS.
- Host: GitHub
- URL: https://github.com/fromkk/fkgridview
- Owner: fromkk
- License: gpl-2.0
- Created: 2014-03-05T05:01:33.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-05T08:34:22.000Z (over 12 years ago)
- Last Synced: 2025-02-03T14:27:48.440Z (over 1 year ago)
- Language: Objective-C
- Size: 156 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
FKGridView
==========
簡単なグリッドレイアウトをObjective-Cで表現します。

## Sample code
> //initialize
> self.gridView = [FKGridView new];
> //set view frame
> self.gridView.frame = self.view.bounds;
> //set col counts
> self.gridView.cols = 3;
> //auto resize items.
> self.gridView.autoresizeWidth = YES;
> //add subview
> [self.view addSubview:self.gridView];
>
> for (int i = 0; i < 102; i++) {
> //create subview
> UIView *currentView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, (320.0f - 5.0f * 4.0f) / 3.0f, rand() % 10 * 10.0f)];
> //red background color
> currentView.backgroundColor = [UIColor redColor];
> //add item. if animated is NO then stop animation.
> [self.gridView addGridItemView:currentView animated:YES];
> }