• This repository has been archived on 17/Feb/2019
  • Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Objective-C
  • Created over 12 years ago
  • Updated over 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UIGridView offers a simple way to use a grid (multiple-column UITableView) on iOS

UIGridView (iOS = iPhone/iPad)

UIGridView offers a simple way to build a grid (multiple-column UITableView).

It supports:

  • Adjust the width of a column (individually)
  • Adjust the height of a row (individually)
  • Click event on a cell
  • Customize cell

Here is how it looks like:

UIGridView Example

How to use it

  1. Include /Classes/UIGridView/* into your project
  2. Setup the delegate uiGridViewDelegate of UIGridView; Methods that shall be implemented are shown below:
- (CGFloat) gridView:(UIGridView *)grid widthForColumnAt:(int)columnIndex
{
	return 80;
}

- (CGFloat) gridView:(UIGridView *)grid heightForRowAt:(int)rowIndex
{
	return 80;
}

- (NSInteger) numberOfColumnsOfGridView:(UIGridView *) grid
{
	return 4;
}


- (NSInteger) numberOfCellsOfGridView:(UIGridView *) grid
{
	return 33;
}

- (UIGridViewCell *) gridView:(UIGridView *)grid cellForRowAt:(int)rowIndex AndColumnAt:(int)columnIndex
{
	Cell *cell = (Cell *)[grid dequeueReusableCell];
	
	if (cell == nil) {
		cell = [[Cell alloc] init];
	}
	
	cell.label.text = [NSString stringWithFormat:@"(%d,%d)", rowIndex, columnIndex];
	
	return cell;
}

- (void) gridView:(UIGridView *)grid didSelectRowAt:(int)rowIndex AndColumnAt:(int)colIndex
{
	NSLog(@"%d, %d clicked", rowIndex, colIndex);
}

Author

Tanin Na Nakorn

License

Do What The Fuck You Want To Public License (http://sam.zoy.org/wtfpl/)

  1. You just DO WHAT THE FUCK YOU WANT TO.

More Repositories

1

tip

Programmable tooltip that can be used with any Mac OS app
Objective-C
917
star
2

git-notes

Sync your personal notes through Git automatically
Go
55
star
3

wiky.js

Wiky.js - a simple Javascript library to convert Wiki MarkUp language to HTML
JavaScript
47
star
4

noo

Mouse and touchpad configuration for Mac OS
Swift
36
star
5

whowish_word

whowish_word is a Rails gem to make static content editable
JavaScript
21
star
6

silver

An MVC framework for Titanium SDK that gives you a Facebook-alike app on both iOS and Android
JavaScript
18
star
7

javaparser.rs

[work-in-progress] Java parser written in Rust
Rust
16
star
8

sbt-svelte

The best way to integrate Svelte with Playframework.
Scala
12
star
9

bazel-pex-pip

Python
11
star
10

wiky

Wiky - A simple Ruby library to convert Wiki markup to HTML
Ruby
7
star
11

lilit-lang

[Work in progress] A programming language. Ideal for command-line tools
Rust
6
star
12

superintendent

Write SQL on CSV files
6
star
13

watir-webdriver-rails

watir-webdriver-rails provides a dead-simple way to use Watir with Rails 3
Ruby
6
star
14

scala-interpreter

Build your own language and API in Scala.
Scala
6
star
15

zeus

An RTMP server that receives a streamed video from a Flash client and writes the video to an FLV file
JavaScript
5
star
16

lilit-browser-extension

Lilit's Chrome browser extension
Scala
3
star
17

UIHorizontalTableView

Objective-C
3
star
18

backward-modal

iOS 4 to support self.presentingViewController
Objective-C
3
star
19

birdstagram

Objective-C
3
star
20

php_db_migrate

PHP Database Migration Library helps you manage changes in your database schemas.
PHP
3
star
21

loading.js

An elegant javascript that show a loading image on a button, an icon, or a textbox
JavaScript
2
star
22

dynonamics

Ruby
2
star
23

ruby_redis_lock

A distributed lock for Ruby (using Redis)
HTML
2
star
24

flash_hack

Java
2
star
25

sbt-web-test-js

Run Jasmine tests within playframework (or sbt-web-based project)
JavaScript
1
star
26

yabac

Yet a better auto-complete library
JavaScript
1
star
27

writepub_editor

A WYSIWYG editor for a public website
JavaScript
1
star
28

watir_labs

Techniques for Watir-WebDriver
JavaScript
1
star
29

dynonamics-rails-234

Dynonamics on Rails 2.3.4
Ruby
1
star
30

HopIn

JavaScript
1
star
31

pagination_helper

A library to generate pagination toolbar for WritePub
Ruby
1
star
32

loca_ios

Objective-C
1
star
33

wiky_editor

Wiky Editor - A jQuery-plugin that converts textarea into Wiki markup editor
JavaScript
1
star
34

UISuperTableView

UITableView with loading screen and no-data screen
Objective-C
1
star
35

thai-breakiterator

Java
1
star
36

whowish_foundation

JavaScript
1
star
37

writepub_editor_ruby

A HTML parser for Writepub editor
Ruby
1
star
38

dynonamics-server-3

JavaScript
1
star
39

loca_web

Ruby
1
star
40

jquery.default_text

jQuery.default_text - A jQuery plugin, which make a default input text by cloning the original
JavaScript
1
star
41

UILoader

Put a loading icon on any UIView
Objective-C
1
star
42

sass_fix_ie

It automatically includes zoom:1 and *display:inline for you, when you have display: inline-block. This is to fix the inline-block problem on IE7.
Ruby
1
star
43

dynonamics-rails-303

Dynonamics on Rails 3.0.3
Ruby
1
star