Permalink
Browse files

start on main tableview

  • Loading branch information...
1 parent be6a9db commit abd79e5b92038c52229d0db5fba61b5301847e11 @sschroed committed Jan 25, 2009
Showing with 31 additions and 13 deletions.
  1. +29 −11 Classes/RootViewController.m
  2. +2 −2 RootViewController.xib
@@ -65,23 +65,41 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 0;
+ return 2;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *CellIdentifier = @"Cell";
-
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
- }
-
- // Set up the cell...
-
- return cell;
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GitHub"];
+ if(cell == nil) {
+ cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero] autorelease];
+ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ cell.selectionStyle = UITableViewCellSelectionStyleBlue;
+ }
+
+ switch(indexPath.section) {
+ case 0: {
+ switch(indexPath.row) {
+ case 0: {
+ cell.text = @"Public Repositories";
+ cell.image = [UIImage imageNamed:@"public.png"];
+ break;
+ }
+ case 1: {
+ cell.text = @"Private Repositories";
+ cell.image = [UIImage imageNamed:@"private.png"];
+ break;
+ }
+ }
+ break;
+ }
+ case 1: {
+ break;
+ }
+ }
+ return cell;
}
@@ -131,7 +131,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>RootViewController</string>
<string>UIResponder</string>
- <string>{{236, 276}, {320, 480}}</string>
+ <string>{{271, 71}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
</object>
@@ -155,7 +155,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">13</int>
+ <int key="maxID">15</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">

0 comments on commit abd79e5

Please sign in to comment.