Permalink
Browse files

Check if view is loaded before checking

  • Loading branch information...
steipete committed Jul 16, 2013
1 parent bc79b0d commit fdaed7333e7db5ced4342a3edd3181d6dbf936da
Showing with 1 addition and 1 deletion.
  1. +1 −1 PSTCollectionView/PSTCollectionViewController.m
@@ -110,7 +110,7 @@ - (PSTCollectionView *)collectionView {
_collectionView.dataSource = self;
// If the collection view isn't the main view, add it.
- if (self.view != self.collectionView) {
+ if (self.isViewLoaded && self.view != self.collectionView) {
[self.view addSubview:self.collectionView];
self.collectionView.frame = self.view.bounds;
self.collectionView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;

0 comments on commit fdaed73

Please sign in to comment.