This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Twitter/Twitter.h> | |
#import <Accounts/Accounts.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface MentionViewController () | |
- (void)refresh; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[self refresh]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | |
{ | |
// Return the number of sections. | |
return 1; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
// Return the number of rows in the section. | |
return [statuses count]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
if(cell == nil){ | |
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault | |
reuseIdentifier:CellIdentifier]; | |
cell.textLabel.font = [UIFont systemFontOfSize:11.0]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)refresh { | |
ACAccountStore *accountStore = [[ACAccountStore alloc] init]; | |
ACAccountType *twitterAccountType = | |
[accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; | |
[accountStore requestAccessToAccountsWithType:twitterAccountType | |
withCompletionHandler:^(BOOL granted, NSError *error) | |
{ | |
if (!granted) { | |
NSLog(@"User rejected access to his account."); | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Twitter/Twitter.h> | |
#import <Accounts/Accounts.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)pressSendButton:(id)sender { | |
ACAccountStore *accountStore = [[ACAccountStore alloc] init]; | |
ACAccountType *twitterAccountType = | |
[accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; | |
[accountStore requestAccessToAccountsWithType:twitterAccountType | |
withCompletionHandler:^(BOOL granted, NSError *error) | |
{ | |
if (!granted) { | |
NSLog(@"User rejected access to his account."); | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface FavoritesViewController : UITableViewController | |
{ | |
NSMutableArray *statuses; | |
} |