Permalink
Browse files

Cleaning up the demo a bit

  • Loading branch information...
1 parent c98524f commit 786567963205ad7c82d3fe52cbc4b22b514bec4e @gotosleep committed Oct 23, 2012
@@ -18,6 +18,7 @@
9561AD1B15130F10005889C6 /* JALeftViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9561AD1615130F10005889C6 /* JALeftViewController.m */; };
9561AD1C15130F10005889C6 /* JARightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9561AD1815130F10005889C6 /* JARightViewController.m */; };
9561AD2115130F2A005889C6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9561AD1F15130F2A005889C6 /* main.m */; };
+ 9568132B16373ACB007B3602 /* JADebugViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9568132A16373ACB007B3602 /* JADebugViewController.m */; };
95BCC45A15F081130009F1DA /* UIViewController+JASidePanel.m in Sources */ = {isa = PBXBuildFile; fileRef = 95BCC45915F081130009F1DA /* UIViewController+JASidePanel.m */; };
/* End PBXBuildFile section */
@@ -41,6 +42,8 @@
9561AD1D15130F2A005889C6 /* JASidePanels-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "JASidePanels-Info.plist"; path = "Demo/JASidePanels-Info.plist"; sourceTree = "<group>"; };
9561AD1E15130F2A005889C6 /* JASidePanels-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "JASidePanels-Prefix.pch"; path = "Demo/JASidePanels-Prefix.pch"; sourceTree = "<group>"; };
9561AD1F15130F2A005889C6 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Demo/main.m; sourceTree = "<group>"; };
+ 9568132916373ACB007B3602 /* JADebugViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JADebugViewController.h; path = Demo/JADebugViewController.h; sourceTree = "<group>"; };
+ 9568132A16373ACB007B3602 /* JADebugViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JADebugViewController.m; path = Demo/JADebugViewController.m; sourceTree = "<group>"; };
95BCC45815F081130009F1DA /* UIViewController+JASidePanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+JASidePanel.h"; path = "Source/UIViewController+JASidePanel.h"; sourceTree = "<group>"; };
95BCC45915F081130009F1DA /* UIViewController+JASidePanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+JASidePanel.m"; path = "Source/UIViewController+JASidePanel.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -125,6 +128,8 @@
9561ACB8151286EE005889C6 /* Supporting Files */,
9561AD1115130F10005889C6 /* JAAppDelegate.h */,
9561AD1215130F10005889C6 /* JAAppDelegate.m */,
+ 9568132916373ACB007B3602 /* JADebugViewController.h */,
+ 9568132A16373ACB007B3602 /* JADebugViewController.m */,
9561AD1315130F10005889C6 /* JACenterViewController.h */,
9561AD1415130F10005889C6 /* JACenterViewController.m */,
9561AD1515130F10005889C6 /* JALeftViewController.h */,
@@ -204,6 +209,7 @@
9561AD1C15130F10005889C6 /* JARightViewController.m in Sources */,
9561AD2115130F2A005889C6 /* main.m in Sources */,
95BCC45A15F081130009F1DA /* UIViewController+JASidePanel.m in Sources */,
+ 9568132B16373ACB007B3602 /* JADebugViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -24,8 +24,8 @@
*/
-#import <UIKit/UIKit.h>
+#import "JADebugViewController.h"
-@interface JACenterViewController : UIViewController
+@interface JACenterViewController : JADebugViewController
@end
@@ -48,28 +48,4 @@ - (void)viewDidLoad {
[self.view addSubview:label];
}
-- (void)viewWillAppear:(BOOL)animated {
- NSLog(@"%@ viewWillAppear", self);
-}
-
-- (void)viewDidAppear:(BOOL)animated {
- NSLog(@"%@ viewDidAppear", self);
-}
-
-- (void)viewWillDisappear:(BOOL)animated {
- NSLog(@"%@ viewWillDisappear", self);
-}
-
-- (void)viewDidDisappear:(BOOL)animated {
- NSLog(@"%@ viewDidDisappear", self);
-}
-
-- (void)willMoveToParentViewController:(UIViewController *)parent {
- NSLog(@"%@ willMoveToParentViewController %@", self, parent);
-}
-
-- (void)didMoveToParentViewController:(UIViewController *)parent {
- NSLog(@"%@ didMoveToParentViewController %@", self, parent);
-}
-
@end
@@ -0,0 +1,13 @@
+//
+// JADebugViewController.h
+// JASidePanels
+//
+// Created by Jesse Andersen on 10/23/12.
+//
+//
+
+#import <UIKit/UIKit.h>
+
+@interface JADebugViewController : UIViewController
+
+@end
@@ -0,0 +1,47 @@
+//
+// JADebugViewController.m
+// JASidePanels
+//
+// Created by Jesse Andersen on 10/23/12.
+//
+//
+
+#import "JADebugViewController.h"
+
+@interface JADebugViewController ()
+
+@end
+
+@implementation JADebugViewController
+
+- (void)viewWillAppear:(BOOL)animated {
+ [super viewWillAppear:animated];
+ NSLog(@"%@ viewWillAppear", self);
+}
+
+- (void)viewDidAppear:(BOOL)animated {
+ [super viewDidAppear:animated];
+ NSLog(@"%@ viewDidAppear", self);
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+ [super viewWillDisappear:animated];
+ NSLog(@"%@ viewWillDisappear", self);
+}
+
+- (void)viewDidDisappear:(BOOL)animated {
+ [super viewDidDisappear:animated];
+ NSLog(@"%@ viewDidDisappear", self);
+}
+
+- (void)willMoveToParentViewController:(UIViewController *)parent {
+ [super willMoveToParentViewController:parent];
+ NSLog(@"%@ willMoveToParentViewController %@", self, parent);
+}
+
+- (void)didMoveToParentViewController:(UIViewController *)parent {
+ [super didMoveToParentViewController:parent];
+ NSLog(@"%@ didMoveToParentViewController %@", self, parent);
+}
+
+@end
@@ -24,9 +24,9 @@
*/
-#import <UIKit/UIKit.h>
+#import "JADebugViewController.h"
-@interface JALeftViewController : UIViewController
+@interface JALeftViewController : JADebugViewController
@property (nonatomic, weak, readonly) UILabel *label;
@property (nonatomic, weak, readonly) UIButton *hide;
@@ -102,29 +102,10 @@ - (void)viewDidLoad {
}
- (void)viewWillAppear:(BOOL)animated {
- NSLog(@"%@ viewWillAppear", self);
+ [super viewWillAppear:animated];
self.label.center = CGPointMake(floorf(self.sidePanelController.leftVisibleWidth/2.0f), floorf(self.view.bounds.size.height/2.0f));
}
-- (void)viewDidAppear:(BOOL)animated {
- NSLog(@"%@ viewDidAppear", self);
-}
-
-- (void)viewWillDisappear:(BOOL)animated {
- NSLog(@"%@ viewWillDisappear", self);
-}
-
-- (void)viewDidDisappear:(BOOL)animated {
- NSLog(@"%@ viewDidDisappear", self);
-}
-
-- (void)willMoveToParentViewController:(UIViewController *)parent {
- NSLog(@"%@ willMoveToParentViewController %@", self, parent);
-}
-
-- (void)didMoveToParentViewController:(UIViewController *)parent {
- NSLog(@"%@ didMoveToParentViewController %@", self, parent);
-}
#pragma mark - Button Actions
- (void)_hideTapped:(id)sender {
@@ -31,8 +31,6 @@ this software and associated documentation files (the "Software"), to deal in
@interface JARightViewController ()
-@property (nonatomic, weak) UILabel *label;
-
@end
@implementation JARightViewController
@@ -53,27 +51,8 @@ - (void)viewDidLoad {
}
- (void)viewWillAppear:(BOOL)animated {
- NSLog(@"%@ viewWillAppear", self);
+ [super viewWillAppear:animated];
self.label.center = CGPointMake(floorf((self.view.bounds.size.width - self.sidePanelController.rightVisibleWidth) + self.sidePanelController.rightVisibleWidth/2.0f), floorf(self.view.bounds.size.height/2.0f));
}
-- (void)viewDidAppear:(BOOL)animated {
- NSLog(@"%@ viewDidAppear", self);
-}
-
-- (void)viewWillDisappear:(BOOL)animated {
- NSLog(@"%@ viewWillDisappear", self);
-}
-
-- (void)viewDidDisappear:(BOOL)animated {
- NSLog(@"%@ viewDidDisappear", self);
-}
-
-- (void)willMoveToParentViewController:(UIViewController *)parent {
- NSLog(@"%@ willMoveToParentViewController %@", self, parent);
-}
-
-- (void)didMoveToParentViewController:(UIViewController *)parent {
- NSLog(@"%@ didMoveToParentViewController %@", self, parent);
-}
@end

0 comments on commit 7865679

Please sign in to comment.