Skip to content

Commit

Permalink
Check if view is loaded before checking
Browse files Browse the repository at this point in the history
  • Loading branch information
steipete committed Jul 16, 2013
1 parent bc79b0d commit fdaed73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PSTCollectionView/PSTCollectionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fdaed73

Please sign in to comment.