vmodena / ICSDrawerController

ICSDrawerController is a left-side drawer controller for iPhone (iOS 7 or later).
MIT License
253 stars 73 forks source link

[self.drawerController open] not working #6

Open mrbagels opened 10 years ago

mrbagels commented 10 years ago

I have created a blank project to test some things out but I cannot get the open method to work properly.

I have adopted the ICSDrawerChild protocol to my center view controller, but it does nothing. If I add a property to the controller, I get errors.

I can show you my project if needed, because I have changed things around a bit and it is kinda complicated to describe via text.

mrbagels commented 10 years ago

As a side note, I am sure that I may be missing something but based on the instruction and what my code has, I don't know what I am doing wrong.

vmodena commented 10 years ago

In order to call [self.drawer open], your center view controller has to adopt the <ICSDrawerControllerChild> protocol and implement the required drawer property:

@interface YourCenterViewController : UIViewController<ICSDrawerControllerChild, ICSDrawerControllerPresenting>

@property(nonatomic, weak) ICSDrawerController *drawer;

@end

In case you have made changes to the drawer controller itself, are you still setting/updating the _centerViewController.drawer property in initWithLeftViewController:centerViewController: and replaceCenterViewControllerWithViewController:?