Skip to content

Commit

Permalink
QuestionViewController: Resize in response to rotation.
Browse files Browse the repository at this point in the history
Otherwise, the QuestionAnswersCollectionView uses cell sizes still
based on the portrait mode, when switching to landscape mode,
for instance.
This should fix this bug:
#10
  • Loading branch information
murraycu committed Sep 4, 2015
1 parent 1e518e1 commit 1b1ffe8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ios-galaxyzoo/UI/Classify/QuestionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,21 @@ - (void)storeAnswer:(NSString *)answerId
classificationQuestion.classification = _classificationInProgress;
}

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator
:(id<UIViewControllerTransitionCoordinator>)coordinator
{
[super viewWillTransitionToSize:size
withTransitionCoordinator:coordinator];

[coordinator animateAlongsideTransition:nil
completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
// Code here will execute after the rotation has finished.
[self updateUI];
}
];
}


/*
#pragma mark - Navigation
Expand Down

0 comments on commit 1b1ffe8

Please sign in to comment.