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
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier | |
{ | |
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | |
if (self) { | |
// Initialization code | |
// Create the top view | |
_topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, 80)]; | |
[_topView setBackgroundColor:[UIColor whiteColor]]; | |
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)didSwipeLeftInCell:(id)sender { | |
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; | |
[UIView animateWithDuration:1.0 animations:^{ | |
[_topView setFrame:CGRectMake(-10, 0, 320, 80)]; | |
} completion:^(BOOL finished) { | |
[UIView animateWithDuration:0.15 animations:^{ | |
[_topView setFrame:CGRectMake(0, 0, 320, 80)]; | |
}]; | |
}]; | |
} |
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)didSwipeLeftInCell:(id)sender { | |
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; | |
[UIView animateWithDuration:1.0 animations:^{ | |
[_topView setFrame:CGRectMake(-10, 0, 320, 80)]; | |
} completion:^(BOOL finished) { | |
[UIView animateWithDuration:0.15 animations:^{ | |
[_topView setFrame:CGRectMake(0, 0, 320, 80)]; | |
}]; | |
}]; | |
} |
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
if(![managedObjectContext save:&error]) { | |
NSLog(@"Failed to save to data store: %@", [error localizedDescription]); | |
NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey]; | |
if(detailedErrors != nil && [detailedErrors count] > 0) { | |
for(NSError* detailedError in detailedErrors) { | |
NSLog(@" DetailedError: %@", [detailedError userInfo]); | |
} | |
} | |
else { | |
NSLog(@" %@", [error userInfo]); |
NewerOlder