mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-06 17:32:52 +08:00
Change MyCompany stuff to Two Toasters
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// DiscussionBoard
|
||||
//
|
||||
// Created by Jeremy Ellison on 1/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
// Copyright 2011 Two Toasters. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DBTopicsTableViewController.h"
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
- (void)createModel {
|
||||
[super createModel];
|
||||
|
||||
|
||||
UIBarButtonItem* item = nil;
|
||||
if ([DBUser currentUser]) {
|
||||
item = [[[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStyleBordered target:self action:@selector(logoutButtonWasPressed:)] autorelease];
|
||||
}
|
||||
self.navigationItem.leftBarButtonItem = item;
|
||||
|
||||
|
||||
UIBarButtonItem* newItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addButtonWasPressed:)] autorelease];
|
||||
self.navigationItem.rightBarButtonItem = newItem;
|
||||
}
|
||||
@@ -46,14 +46,14 @@
|
||||
- (void)didLoadModel:(BOOL)firstTime {
|
||||
[super didLoadModel:firstTime];
|
||||
RKRequestTTModel* model = (RKRequestTTModel*)self.model;
|
||||
|
||||
|
||||
NSMutableArray* items = [NSMutableArray arrayWithCapacity:[model.objects count]];
|
||||
|
||||
|
||||
for(DBTopic* topic in model.objects) {
|
||||
NSString* url = [NSString stringWithFormat:@"db://topics/%@/posts", topic.topicID];
|
||||
[items addObject:[TTTableTextItem itemWithText:topic.name URL:url]];
|
||||
}
|
||||
|
||||
|
||||
NSLog(@"Items: %@", items);
|
||||
// Ensure that the datasource's model is still the RKRequestTTModel;
|
||||
// Otherwise isOutdated will not work.
|
||||
|
||||
Reference in New Issue
Block a user