Skip to content

Commit

Permalink
move to adding pulltoRefresh Handler method from viewWillAppear to vi…
Browse files Browse the repository at this point in the history
…ewDidAppear iOS8 SDK Support.
  • Loading branch information
uzysjung committed Dec 8, 2014
1 parent 50215cf commit 726e3e6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@
LastUpgradeCheck = 0510;
ORGANIZATIONNAME = Uzys;
TargetAttributes = {
95F0EA8F18F3906E00EB27DF = {
DevelopmentTeam = MHWCC4PMZP;
};
95F0EAB018F3906E00EB27DF = {
TestTargetID = 95F0EA8F18F3906E00EB27DF;
};
Expand Down Expand Up @@ -751,7 +754,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Jaehoon JUNG (374MYQPNK3)";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
Expand Down Expand Up @@ -811,11 +814,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Jaehoon JUNG (374MYQPNK3)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "UzysAnimatedGifPullToRefresh/UzysAnimatedGifPullToRefresh-Prefix.pch";
INFOPLIST_FILE = "UzysAnimatedGifPullToRefresh/UzysAnimatedGifPullToRefresh-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -826,11 +832,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "UzysAnimatedGifPullToRefresh/UzysAnimatedGifPullToRefresh-Prefix.pch";
INFOPLIST_FILE = "UzysAnimatedGifPullToRefresh/UzysAnimatedGifPullToRefresh-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,13 @@ - (void)viewDidLoad
self.tableView.dataSource = self;
self.tableView.backgroundColor = [UIColor clearColor];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CELLIDENTIFIER];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];


__weak typeof(self) weakSelf =self;
[self.tableView addPullToRefreshActionHandler:^{
[weakSelf insertRowAtTop];

} ProgressImagesGifName:@"spinner_dropbox@2x.gif" LoadingImagesGifName:@"run@2x.gif" ProgressScrollThreshold:70 LoadingImageFrameRate:30];

// If you did not change scrollview inset, you don't need code below.
if(IS_IOS7)
[self.tableView addTopInsetInPortrait:64 TopInsetInLandscape:52];
Expand All @@ -67,6 +57,19 @@ -(void)viewWillAppear:(BOOL)animated
landscapeTopInset = 44.0;
[self.tableView addTopInsetInPortrait:64 TopInsetInLandscape:landscapeTopInset];
}


}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];

}
- (void)viewDidAppear:(BOOL)animated
{
Expand Down

0 comments on commit 726e3e6

Please sign in to comment.