Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bit of cleanup.

  • Loading branch information...
commit 02536836b28746592ed608efc3569b4d2c80932d 1 parent 4c5ec0d
@peterfriese authored
View
18 TwitterClient.xcodeproj/project.pbxproj
@@ -43,8 +43,8 @@
5005E4D015825109008F26C8 /* grayArrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = grayArrow.png; sourceTree = "<group>"; };
5005E4D115825109008F26C8 /* grayArrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "grayArrow@2x.png"; sourceTree = "<group>"; };
5005E4D415825163008F26C8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
- 882735E91472CAB7009B73B5 /* TweetComposeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TweetComposeViewController.h; sourceTree = "<group>"; };
- 882735EA1472CAB7009B73B5 /* TweetComposeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TweetComposeViewController.m; sourceTree = "<group>"; };
+ 882735E91472CAB7009B73B5 /* TweetComposeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = TweetComposeViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+ 882735EA1472CAB7009B73B5 /* TweetComposeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = TweetComposeViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
882735EB1472CAB7009B73B5 /* TweetComposeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TweetComposeViewController.xib; sourceTree = "<group>"; };
88850FBC14272FBA000A61F9 /* TwitterClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TwitterClient.app; sourceTree = BUILT_PRODUCTS_DIR; };
88850FC014272FBA000A61F9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@@ -52,16 +52,16 @@
88850FC414272FBA000A61F9 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
88850FC814272FBA000A61F9 /* TwitterClient-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TwitterClient-Info.plist"; sourceTree = "<group>"; };
88850FCA14272FBA000A61F9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 88850FCC14272FBA000A61F9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 88850FCC14272FBA000A61F9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = main.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
88850FCE14272FBA000A61F9 /* TwitterClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TwitterClient-Prefix.pch"; sourceTree = "<group>"; };
- 88850FCF14272FBA000A61F9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
- 88850FD014272FBA000A61F9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
- 88850FD7142730A2000A61F9 /* AccountsListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccountsListViewController.h; sourceTree = "<group>"; };
- 88850FD8142730A2000A61F9 /* AccountsListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccountsListViewController.m; sourceTree = "<group>"; };
+ 88850FCF14272FBA000A61F9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppDelegate.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+ 88850FD014272FBA000A61F9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = AppDelegate.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
+ 88850FD7142730A2000A61F9 /* AccountsListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AccountsListViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+ 88850FD8142730A2000A61F9 /* AccountsListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = AccountsListViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
88850FDD1427330F000A61F9 /* Twitter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Twitter.framework; path = System/Library/Frameworks/Twitter.framework; sourceTree = SDKROOT; };
88850FDF14273316000A61F9 /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; };
- 888B42E9144D5FE400A8FAFC /* TweetsListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TweetsListViewController.h; sourceTree = "<group>"; };
- 888B42EA144D5FE400A8FAFC /* TweetsListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TweetsListViewController.m; sourceTree = "<group>"; };
+ 888B42E9144D5FE400A8FAFC /* TweetsListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = TweetsListViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+ 888B42EA144D5FE400A8FAFC /* TweetsListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = TweetsListViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
View
6 TwitterClient/AccountsListViewController.h
@@ -3,7 +3,7 @@
// TwitterClient
//
// Created by Peter Friese on 19.09.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import <UIKit/UIKit.h>
@@ -12,8 +12,8 @@
#import <QuartzCore/QuartzCore.h>
@interface AccountsListViewController : UITableViewController <EGORefreshTableHeaderDelegate> {
- EGORefreshTableHeaderView *_refreshHeaderView;
- BOOL _reloading;
+ EGORefreshTableHeaderView *_refreshHeaderView;
+ BOOL _reloading;
}
@property (strong, nonatomic) ACAccountStore *accountStore;
View
224 TwitterClient/AccountsListViewController.m
@@ -3,7 +3,7 @@
// TwitterClient
//
// Created by Peter Friese on 19.09.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import "AccountsListViewController.h"
@@ -28,158 +28,164 @@ @implementation AccountsListViewController
- (id)initWithStyle:(UITableViewStyle)style
{
- self = [super initWithStyle:style];
- self.title = @"Accounts";
- if (self) {
- if (_refreshHeaderView == nil) {
-
- EGORefreshTableHeaderView *view = [[EGORefreshTableHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f - self.tableView.bounds.size.height, self.tableView.frame.size.width, self.tableView.bounds.size.height)];
- view.delegate = self;
- [self.tableView addSubview:view];
- _refreshHeaderView = view;
- _refreshHeaderView.delegate = self;
- }
+ self = [super initWithStyle:style];
+ self.title = @"Accounts";
+ if (self) {
+ if (_refreshHeaderView == nil) {
+ EGORefreshTableHeaderView *view = [[EGORefreshTableHeaderView alloc] initWithFrame:
+ CGRectMake(0.0f,
+ 0.0f - self.tableView.bounds.size.height,
+ self.tableView.frame.size.width,
+ self.tableView.bounds.size.height)];
+ view.delegate = self;
+ [self.tableView addSubview:view];
+ _refreshHeaderView = view;
+ _refreshHeaderView.delegate = self;
+ }
- _imageCache = [[NSCache alloc] init];
- [_imageCache setName:@"TWImageCache"];
- _usernameCache = [[NSCache alloc] init];
- [_usernameCache setName:@"TWUsernameCache"];
- [self fetchData];
- }
- return self;
+ _imageCache = [[NSCache alloc] init];
+ [_imageCache setName:@"TWImageCache"];
+ _usernameCache = [[NSCache alloc] init];
+ [_usernameCache setName:@"TWUsernameCache"];
+ [self fetchData];
+ }
+ return self;
}
- (void)didReceiveMemoryWarning
{
- [_imageCache removeAllObjects];
- [_usernameCache removeAllObjects];
- [super didReceiveMemoryWarning];
+ [_imageCache removeAllObjects];
+ [_usernameCache removeAllObjects];
+ [super didReceiveMemoryWarning];
}
#pragma mark - Data handling
- (void)fetchData
{
- [_refreshHeaderView refreshLastUpdatedDate];
-
- if (_accountStore == nil) {
- self.accountStore = [[ACAccountStore alloc] init];
- if (_accounts == nil) {
- ACAccountType *accountTypeTwitter = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
- [self.accountStore requestAccessToAccountsWithType:accountTypeTwitter withCompletionHandler:^(BOOL granted, NSError *error) {
- if(granted) {
- self.accounts = [self.accountStore accountsWithAccountType:accountTypeTwitter];
- dispatch_sync(dispatch_get_main_queue(), ^{
- [self.tableView reloadData];
- });
+ [_refreshHeaderView refreshLastUpdatedDate];
+
+ if (_accountStore == nil) {
+ self.accountStore = [[ACAccountStore alloc] init];
+ if (_accounts == nil) {
+ ACAccountType *accountTypeTwitter = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
+ [self.accountStore requestAccessToAccountsWithType:accountTypeTwitter withCompletionHandler:^(BOOL granted, NSError *error) {
+ if(granted) {
+ self.accounts = [self.accountStore accountsWithAccountType:accountTypeTwitter];
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ [self.tableView reloadData];
+ });
+ }
+ }];
}
- }];
}
- }
- [self performSelector:@selector(doneLoadingTableViewData) withObject:nil afterDelay:1.0]; // Need a delay here otherwise it gets called to early and never finishes.
+ [self performSelector:@selector(doneLoadingTableViewData)
+ withObject:nil afterDelay:1.0]; // Need a delay here otherwise it gets called to early and never finishes.
}
#pragma mark - View lifecycle
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
- return [self.accounts count];
+ return [self.accounts count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
- static NSString *CellIdentifier = @"Cell";
-
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
- }
-
- // Configure the cell...
- ACAccount *account = [self.accounts objectAtIndex:[indexPath row]];
- cell.textLabel.text = account.username;
- cell.detailTextLabel.text = account.accountDescription;
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
-
- NSString *username = [_usernameCache objectForKey:account.username];
- if (username) {
- cell.textLabel.text = username;
- }
- else {
- TWRequest *fetchAdvancedUserProperties = [[TWRequest alloc]
- initWithURL:[NSURL URLWithString:@"http://api.twitter.com/1/users/show.json"]
- parameters:[NSDictionary dictionaryWithObjectsAndKeys:account.username, @"screen_name", nil]
- requestMethod:TWRequestMethodGET];
- [fetchAdvancedUserProperties performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
- if ([urlResponse statusCode] == 200) {
- NSError *error;
- id userInfo = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&error];
- if (userInfo != nil) {
- dispatch_sync(dispatch_get_main_queue(), ^{
- [_usernameCache setObject:[userInfo valueForKey:@"name"] forKey:account.username];
- [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:NO];
- });
- }
- }
- }];
- }
-
- UIImage *image = [_imageCache objectForKey:account.username];
- if (image) {
- cell.imageView.image = image;
- }
- else {
- TWRequest *fetchUserImageRequest = [[TWRequest alloc]
- initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://api.twitter.com/1/users/profile_image/%@", account.username]]
- parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"bigger", @"size", nil]
- requestMethod:TWRequestMethodGET];
- [fetchUserImageRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
- if ([urlResponse statusCode] == 200) {
- UIImage *image = [UIImage imageWithData:responseData];
- dispatch_sync(dispatch_get_main_queue(), ^{
- [_imageCache setObject:image forKey:account.username];
- [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:NO];
- });
- }
- }];
- }
- return cell;
+ static NSString *CellIdentifier = @"Cell";
+
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ if (cell == nil) {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
+ }
+
+ // Configure the cell...
+ ACAccount *account = [self.accounts objectAtIndex:[indexPath row]];
+ cell.textLabel.text = account.username;
+ cell.detailTextLabel.text = account.accountDescription;
+ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+
+ NSString *username = [_usernameCache objectForKey:account.username];
+ if (username) {
+ cell.textLabel.text = username;
+ }
+ else {
+ TWRequest *fetchAdvancedUserProperties = [[TWRequest alloc]
+ initWithURL:[NSURL URLWithString:@"http://api.twitter.com/1/users/show.json"]
+ parameters:[NSDictionary dictionaryWithObjectsAndKeys:account.username, @"screen_name", nil]
+ requestMethod:TWRequestMethodGET];
+ [fetchAdvancedUserProperties performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
+ if ([urlResponse statusCode] == 200) {
+ NSError *error;
+ id userInfo = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&error];
+ if (userInfo != nil) {
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ [_usernameCache setObject:[userInfo valueForKey:@"name"] forKey:account.username];
+ [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:NO];
+ });
+ }
+ }
+ }];
+ }
+
+ UIImage *image = [_imageCache objectForKey:account.username];
+ if (image) {
+ cell.imageView.image = image;
+ }
+ else {
+ TWRequest *fetchUserImageRequest = [[TWRequest alloc]
+ initWithURL:[NSURL URLWithString:
+ [NSString stringWithFormat:@"http://api.twitter.com/1/users/profile_image/%@",
+ account.username]]
+ parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"bigger", @"size", nil]
+ requestMethod:TWRequestMethodGET];
+ [fetchUserImageRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
+ if ([urlResponse statusCode] == 200) {
+ UIImage *image = [UIImage imageWithData:responseData];
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ [_imageCache setObject:image forKey:account.username];
+ [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:NO];
+ });
+ }
+ }];
+ }
+ return cell;
}
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
- TweetsListViewController *tweetsListViewController = [[TweetsListViewController alloc] init];
- tweetsListViewController.account = [self.accounts objectAtIndex:[indexPath row]];
- [self.navigationController pushViewController:tweetsListViewController animated:TRUE];
+ TweetsListViewController *tweetsListViewController = [[TweetsListViewController alloc] init];
+ tweetsListViewController.account = [self.accounts objectAtIndex:[indexPath row]];
+ [self.navigationController pushViewController:tweetsListViewController animated:TRUE];
}
#pragma mark - Data Source Loading / Reloading Methods
- (void)reloadTableViewDataSource
{
- // We want fresh data (added new account since launch)
- _accountStore = nil;
- _accounts = nil;
+ // We want fresh data (added new account since launch)
+ _accountStore = nil;
+ _accounts = nil;
- _reloading = YES;
- [self fetchData];
+ _reloading = YES;
+ [self fetchData];
}
- (void)doneLoadingTableViewData
{
- // model should call this when its done loading
- _reloading = NO;
- [_refreshHeaderView egoRefreshScrollViewDataSourceDidFinishedLoading:self.tableView];
+ // model should call this when its done loading
+ _reloading = NO;
+ [_refreshHeaderView egoRefreshScrollViewDataSourceDidFinishedLoading:self.tableView];
}
@@ -188,11 +194,11 @@ - (void)doneLoadingTableViewData
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
- [_refreshHeaderView egoRefreshScrollViewDidScroll:scrollView];
+ [_refreshHeaderView egoRefreshScrollViewDidScroll:scrollView];
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
- [_refreshHeaderView egoRefreshScrollViewDidEndDragging:scrollView];
+ [_refreshHeaderView egoRefreshScrollViewDidEndDragging:scrollView];
}
#pragma mark - EGORefreshTableHeaderDelegate Methods
@@ -209,7 +215,7 @@ - (BOOL)egoRefreshTableHeaderDataSourceIsLoading:(EGORefreshTableHeaderView*)vie
- (NSDate*)egoRefreshTableHeaderDataSourceLastUpdated:(EGORefreshTableHeaderView*)view
{
- return [NSDate date]; // should return date data source was last changed
+ return [NSDate date]; // should return date data source was last changed
}
@end
View
4 TwitterClient/AppDelegate.h
@@ -1,9 +1,9 @@
//
-// PFAppDelegate.h
+// AppDelegate.h
// TwitterClient
//
// Created by Peter Friese on 19.09.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import <UIKit/UIKit.h>
View
4 TwitterClient/AppDelegate.m
@@ -1,9 +1,9 @@
//
-// PFAppDelegate.m
+// AppDelegate.m
// TwitterClient
//
// Created by Peter Friese on 19.09.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import "AppDelegate.h"
View
2  TwitterClient/TweetComposeViewController.h
@@ -3,7 +3,7 @@
// TwitterClient
//
// Created by Peter Friese on 15.11.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import <UIKit/UIKit.h>
View
2  TwitterClient/TweetComposeViewController.m
@@ -3,7 +3,7 @@
// TwitterClient
//
// Created by Peter Friese on 15.11.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import "TweetComposeViewController.h"
View
6 TwitterClient/TweetsListViewController.h
@@ -3,7 +3,7 @@
// TwitterClient
//
// Created by Peter Friese on 19.09.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import <UIKit/UIKit.h>
@@ -15,8 +15,8 @@
@interface TweetsListViewController : UITableViewController<TweetComposeViewControllerDelegate, EGORefreshTableHeaderDelegate> {
- EGORefreshTableHeaderView *_refreshHeaderView;
- BOOL _reloading;
+ EGORefreshTableHeaderView *_refreshHeaderView;
+ BOOL _reloading;
}
@property (strong, nonatomic) ACAccount *account;
View
8 TwitterClient/TweetsListViewController.m
@@ -3,7 +3,7 @@
// TwitterClient
//
// Created by Peter Friese on 19.09.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import "TweetsListViewController.h"
@@ -24,7 +24,11 @@ - (id)initWithStyle:(UITableViewStyle)style
if (self) {
if (_refreshHeaderView == nil) {
- EGORefreshTableHeaderView *view = [[EGORefreshTableHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f - self.tableView.bounds.size.height, self.tableView.frame.size.width, self.tableView.bounds.size.height)];
+ EGORefreshTableHeaderView *view = [[EGORefreshTableHeaderView alloc] initWithFrame:
+ CGRectMake(0.0f,
+ 0.0f - self.tableView.bounds.size.height,
+ self.tableView.frame.size.width,
+ self.tableView.bounds.size.height)];
view.delegate = self;
[self.tableView addSubview:view];
_refreshHeaderView = view;
View
2  TwitterClient/main.m
@@ -3,7 +3,7 @@
// TwitterClient
//
// Created by Peter Friese on 19.09.11.
-// Copyright (c) 2011 itemis. All rights reserved.
+// Copyright (c) 2011, 2012 Peter Friese. All rights reserved.
//
#import <UIKit/UIKit.h>
Please sign in to comment.
Something went wrong with that request. Please try again.