Permalink
Browse files

Added basic interface builder support.

  • Loading branch information...
1 parent 47d554f commit 897f2aaa9f6f6021c3fdd4aaf887c8af5d0d048c @matej committed Mar 29, 2013
Showing with 18 additions and 6 deletions.
  1. +18 −6 MBPullDownController/MBPullDownController.m
@@ -39,16 +39,28 @@ - (id)initWithFrontController:(UIViewController *)front backController:(UIViewCo
if (self) {
_frontController = front;
_backController = back;
- _pullToToggleEnabled = YES;
- _closedTopOffset = kDefaultClosedTopOffset;
- _openBottomOffset = kDefaultOpenBottomOffset;
- _openDragOffset = kDefaultOpenDragOffset;
- _closeDragOffset = kDefaultCloseDragOffset;
- _backgroundView = [MBPullDownControllerBackgroundView new];
+ [self sharedInitialization];
}
return self;
}
+- (id)initWithCoder:(NSCoder *)aDecoder {
+ self = [super initWithCoder:aDecoder];
+ if (self) {
+ [self sharedInitialization];
+ }
+ return self;
+}
+
+- (void)sharedInitialization {
+ _pullToToggleEnabled = YES;
+ _closedTopOffset = kDefaultClosedTopOffset;
+ _openBottomOffset = kDefaultOpenBottomOffset;
+ _openDragOffset = kDefaultOpenDragOffset;
+ _closeDragOffset = kDefaultCloseDragOffset;
+ _backgroundView = [MBPullDownControllerBackgroundView new];
+}
+
- (void)viewDidLoad {
[super viewDidLoad];
[self changeBackControllerFrom:nil to:self.backController];

0 comments on commit 897f2aa

Please sign in to comment.