Skip to content

Commit

Permalink
Added check for iPad idiom
Browse files Browse the repository at this point in the history
  • Loading branch information
jaykz52 committed Nov 27, 2012
1 parent 2fd0be5 commit 0265c40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/CKSideBarController.m
Expand Up @@ -98,6 +98,11 @@ @interface CKSideBarController () <UITableViewDelegate, UITableViewDataSource>
@implementation CKSideBarController

- (id)init {
if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) {
[NSException raise:NSInvalidArgumentException format:@"CKSideBarController is only supported when running under UIUserInterfaceIdiomPad"];
return nil;
}

self = [super init];
if (self) {
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"rough_diagonal.png"]];
Expand Down

0 comments on commit 0265c40

Please sign in to comment.