any luck with IB/Storyboard for defining views?
first, love the fold control... can't wait to use it.
i'm trying to figure out how to use my existing project defined using IB/Storyboard for each view and it is crashing when trying to setRightFoldContentView. i think it's because the view is already added as a subview. i've tried removing from superview first, but still crashes/traps.
the exact errors are:
coming from MultiFoldView.m in setScreenshotImage on the CFRelease(imageRef)
i think i got it...
I changed the AppDelegate.m to have:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RightViewController *rvc = [self.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:@"rightViewID"];
LeftViewController *lvc = [self.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:@"leftViewID"];
PaperFoldNavigationController *paperFoldNavController = [[PaperFoldNavigationController alloc] initWithRootViewController:self.window.rootViewController];
[self.window setRootViewController:paperFoldNavController];
[paperFoldNavController setLeftViewController:lvc width:150];
[paperFoldNavController setRightViewController:rvc width:320.0 rightViewFoldCount:3 rightViewPullFactor:0.9];
return YES;
}
So this is working now? Thanks for letting me know.
yes... great control... thanks
Thanks
I subclassed nav controller to set side view controllers, view widths, and fold counts in IB interconnecting in storyboards them with custom segues. It probably wouldn't be too hard to encapsulate top and bottom folds too.
Hi, I really cant get PaperFold to work with storyboard. Any help or a tutorial would be great!
Thanks in advance, Luca
Which class are you using and what problem are you running into?
I have a blank project just to test and build a solid prototype before implement into my def app. So my setup: storyboard with 2 tab and navigation control.
Now how can I implement PaperFold to whole app and slide a view from storyboard?
- Subclass
PaperFoldNavigationController - Add properties like
@property (nonatomic, copy, readonly) NSString *rootViewControllerID, *leftViewControllerID, *rightViewControllerID; - Override
-awakeFromNiblike:
- (void)awakeFromNib {
[super awakeFromNib];
if (self.rootViewControllerID) {
self.rootViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.rootViewControllerID];
}
if (self.leftViewControllerID) {
self.leftViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.leftViewControllerID];
}
if (self.rightViewControllerID) {
self.rightViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.rightViewControllerID];
}
}
- Give the view controllers you want to embed
Storyboard IDs - Add your custom
PaperFoldNavigationControllerto the storyboard - Add
User Defined Runtime Attributeslinking yourStoryboard IDs to your custom properties
This should get you mostly working?
@honcheng Would you be interested in a PR to improve storyboard integration?
Hi Jonathan,
What do you mean by PR?
On 26 Jan, 2013, at 12:34 PM, Jonathan Toland [email protected] wrote:
Subclass PaperFoldNavigationController Add properties like @property (nonatomic, copy, readonly) NSString *rootViewControllerID, *leftViewControllerID, *rightViewControllerID; Override -awakeFromNib like:
- (void)awakeFromNib { [super awakeFromNib]; if (self.rootViewControllerID) { self.rootViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.rootViewControllerID]; } if (self.leftViewControllerID) { self.leftViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.leftViewControllerID]; } if (self.rightViewControllerID) { self.rightViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.rightViewControllerID]; } } Give the view controllers you want to embed Storyboard IDs Add your custom PaperFoldNavigationController to the storyboard Add User Defined Runtime Attributes linking your Storyboard IDs to your custom properties This should get you mostly working?
@honcheng Would you be interested in a PR to improve storyboard integration?
— Reply to this email directly or view it on GitHub.
@honcheng Pull Request :neckbeard: I didn't know if you'd prefer to keep PaperfoldNavigationController simple. I also think PaperfoldMenuController should extend it. @lucalodi Any luck?
hello guys, having a little trouble trying to get it going into storyboard
Hey guys - can anybody post up there working version of this with storyboards? I've tried countless times to get this working with my storyboards, but it just isn't working. Any help would be GREATLY appreciated! :)
Hello ,i'm still having a little trouble as well . Would love to get some help also.
On Mar 17, 2013, at 9:13 PM, seanherman [email protected] wrote:
Hey guys - can anybody post up there working version of this with storyboards? I've tried countless times to get this working with my storyboards, but it just isn't working. Any help would be GREATLY appreciated! :)
— Reply to this email directly or view it on GitHub.
why the content of left and right didn't appear while I see in the log that the views opened