-
Notifications
You must be signed in to change notification settings - Fork 658
Conversation
This doesn't actually fix the issue in my environment. Looking over the code, you'd be better off moving your addition into the I tested this fix with my code and it resolves the issue. Code to reproduce (assumes you have a storyboard setup with a PKRevealController VC setup as the root): - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.revealController = (PKRevealController *)self.window.rootViewController; UIViewController *frontViewController = [[UIViewController alloc] initWithNibName:nil bundle:nil]; UIViewController *leftViewController = [[UIViewController alloc] initWithNibName:nil bundle:nil]; [self.revealController setFrontViewController:frontViewController]; [self.revealController setLeftViewController:leftViewController]; return YES; } |
+1 although == nil is valid if you want to be explicit :) In places I worked before, we were pedantic enough to require constants on the left of the comparator, eg. |
I agree. Some things are better left explicit. |
I'm currently slightly too busy to look over most of the things people submitted but nevertheless I'd encourage you to check out the Development branch (Correction: RC Branch name is v2.0) where a 2.0 RC version of the controller is available. Would appreciate it if you could tell me whether it also solves your problems with storyboards. On Aug 8, 2013, at 4:58 PM, Filipe Marques [email protected] wrote:
|
I see that this branch is not working with cocoapods right now. I'll test this as soon as possible but it may take some time. |
@pkluz I pulled in v2.0 and it appears to work without issue. I also updated the podspec so I could utilize cocoapods to test it. PR is here: The way I tested it was to update my local spec to look like this: pod 'PKRevealController', :path => '~/Coding/git_projects/PKRevealController/PKRevealController.podspec' Obviously your path will be different. |
Even easier way to test: pod 'PKRevealController', :git => 'https://github.com/pkluz/PKRevealController.git', :branch => 'v2.0' EDIT the above depends upon my linked PR being merged :) |
Ok so after additional testing, v2.0 branch has got some additional issues that need to be mended before it can actually be used with storyboards. I'll try to figure out a good regression, and open a separate issue / PR. |
@filipemp You know I just took a look at master, and your fix is "in" master. Just the cocoapod tag is earlier than the hash on master. Change your podfile to be |
@awebermatt are you sure? i looked at pkluz master and it doesn't look like it is. |
@filipemp Yeah take a look at commonInitializer in master: - (void)commonInitializer { _controllerOptions = [NSMutableDictionary dictionaryWithCapacity:10]; _frontViewController.revealController = self; _leftViewController.revealController = self; _rightViewController.revealController = self; } It's a little more heavy-handed than your approach, as in the standard initializer _controllerOptions gets over-written. |
@awebermatt oh, yeah, now i see it. |
Hello, there's a problem with using storyboards and the pkrevealcontroller. I had a view controller with the pkrevealcontroller as a custom class and the initializer wasn't setting the self.controllerOptions. If you think this is ok or have any thoughts, feel free to contact me.