Skip to content

Commit

Permalink
Make CRToast support autorotation by default. It fixes subtle issue w…
Browse files Browse the repository at this point in the history
…hen a notification is displayed from landscape or upside-down orientation.
  • Loading branch information
iostaf committed Jul 3, 2014
1 parent 4fca8e8 commit 1181190
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CRToast/CRToast.m
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,14 @@ @implementation CRToastViewController

UIStatusBarStyle statusBarStyle;

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
_autorotate = YES;
}
return self;
}

- (BOOL)prefersStatusBarHidden {
return [UIApplication sharedApplication].statusBarHidden;
}
Expand Down

0 comments on commit 1181190

Please sign in to comment.