Skip to content

Commit

Permalink
more animation cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
brung committed Feb 25, 2015
1 parent 9260056 commit 83ea767
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion unnamed/DetailQuestionCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
@property (weak, nonatomic) IBOutlet ProfileImageView *profileImageView;

- (void) initWithQuestion:(Question *)question user:(User *)user totalCount:(NSInteger)count;

@end
4 changes: 0 additions & 4 deletions unnamed/DetailQuestionCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,4 @@ - (void) initWithQuestion:(Question *)question user:(User *)user totalCount:(NSI
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
}

- (CGRect)profileImageviewFrame {
return self.profileImageView.frame;
}

@end
2 changes: 2 additions & 0 deletions unnamed/HomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[tableView deselectRowAtIndexPath:indexPath animated:YES];
SurveyViewController *vc = [[SurveyViewController alloc] init];
vc.survey = self.surveys[indexPath.row];
vc.view.frame = self.view.frame;
self.transitionAnimation.selectedCell = (SurveyViewCell *)[self.tableView cellForRowAtIndexPath:indexPath];
[self.navigationController pushViewController:vc animated:YES];
}

Expand Down
6 changes: 5 additions & 1 deletion unnamed/ProfileViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil

- (void)viewDidLoad {
[super viewDidLoad];
self.navigationController.modalPresentationStyle = UIModalPresentationNone;


self.isInsertingNewPost = NO;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onNewPost:) name:UserDidPostNewSurveyNotification object:nil];

Expand Down Expand Up @@ -179,12 +182,13 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[tableView deselectRowAtIndexPath:indexPath animated:YES];
SurveyViewController *vc = [[SurveyViewController alloc] init];
vc.survey = self.surveys[indexPath.row];
vc.view.frame = self.view.frame;
[self.navigationController pushViewController:vc animated:YES];
}

#pragma mark - Animation
- (ProfileImageView *)getMainProfileImageView {
ProfileCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
ProfileCell *cell = (ProfileCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
return cell.profileImageView;
}

Expand Down
4 changes: 2 additions & 2 deletions unnamed/SurveyViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ - (void)viewDidLoad {
self.tableView.delegate = self;
[self.tableView registerNib:[UINib nibWithNibName:AnswerCellNib bundle:nil] forCellReuseIdentifier:AnswerCellNib];
[self.tableView registerNib:[UINib nibWithNibName:QuestionCellNib bundle:nil] forCellReuseIdentifier:QuestionCellNib];
\

[self.tableView reloadData];
}

Expand Down Expand Up @@ -130,7 +130,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}

- (UIImageView *)getMainProfileImageView {
DetailQuestionCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
DetailQuestionCell *cell = (DetailQuestionCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
return cell.profileImageView;
}

Expand Down

0 comments on commit 83ea767

Please sign in to comment.