diff options
author | Vitaly Takmazov | 2013-11-07 12:18:27 +0400 |
---|---|---|
committer | Vitaly Takmazov | 2013-11-07 12:18:27 +0400 |
commit | ff23c4eb5d382d25c2e4779e0ea8f4b724651105 (patch) | |
tree | fe2c0e99608add7a851f797ab31d5e33b98de281 /Juick/MessagesViewController.m | |
parent | 8c69b5408e5d2870d60f15662f1d567e6cd55da7 (diff) |
load public pages from reveal view
Diffstat (limited to 'Juick/MessagesViewController.m')
-rw-r--r-- | Juick/MessagesViewController.m | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Juick/MessagesViewController.m b/Juick/MessagesViewController.m index 55f8a19..6c594ba 100644 --- a/Juick/MessagesViewController.m +++ b/Juick/MessagesViewController.m @@ -32,13 +32,11 @@ static NSString *CellIdentifier = @"MessageCell"; @implementation MessagesViewController -- (id)initWithURL:(NSURL *)messagesURL +- (void)loadFromURL:(NSURL *)messagesURL withTitle:(NSString *)title { - self = [super init]; - if (self) { - self.url = messagesURL; - } - return self; + [self setUrl:messagesURL]; + self.title = title; + [self refreshData:nil]; } - (void) refreshData:(UIRefreshControl *)refresh { @@ -95,7 +93,6 @@ static NSString *CellIdentifier = @"MessageCell"; { [super viewDidLoad]; self.dataLoading = NO; - self.title = @"Discover"; [self.view setBackgroundColor:[ColorsAndButtons mainBackground]]; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { SWRevealViewController *revealController = [self revealViewController]; @@ -114,7 +111,8 @@ static NSString *CellIdentifier = @"MessageCell"; //UINib *cellNib = [UINib nibWithNibName:@"MessageCell" bundle:nil]; //[self.tableView registerNib:cellNib forCellReuseIdentifier:@"MessageCell"]; - [self.tableView registerClass:[MessageCell class] forCellReuseIdentifier:CellIdentifier]; + [self.tableView registerClass:[MessageCell class] forCellReuseIdentifier:CellIdentifier]; + [self loadFromURL:[NSURL URLWithString:@"https://api.juick.com/messages"] withTitle:@"Discover"]; } |