Permalink
Browse files

Added check for iPad idiom

  • Loading branch information...
1 parent 2fd0be5 commit 0265c4000937de53fa5c31a30176c1b508bd0d28 @jaykz52 committed Nov 27, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 Source/CKSideBarController.m
@@ -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"]];

0 comments on commit 0265c40

Please sign in to comment.