Comments (6)
I'm using the component in a storyboard without issues.
Here's how you can do it.
Create a MBPullDownController subclass and use that as the storyboard's
view controller class. Create two additional view controllers in the
storybard and assign unique storyboard ids to them.
You can't connect the controllers in the storyboard editor (storyboard
limitation), but you can do it in code.
In the MBPullDownController subclass do the following:
- (void)awakeFromNib {
[self
frontController:[self.storyboard instantiateViewControllerWithIdentifier:@
"frontControllerID"]];
[self backController:[self.storyboard instantiateViewControllerWithIdentifier:@
"backControllerID"]];
}
That's it.
On 29. jun. 2013, at 07:21, Alex Saidani [email protected] wrote:
Major issues when trying to get this to work with storyboards, anyone
managed it?
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/14
.
from mbpulldowncontroller.
And you don't have to stick anything in the AppDelegate when doing this? It just doesn't seem to want to work for me, have you got an example project using storyboards?
from mbpulldowncontroller.
I've managed to get it working but in a completely different way, it also doesn't work so well. I've created a FrontViewController as a subclass of UITableViewController and a BackViewController also as a subclass of UITableViewController, there are two corresponding view controllers in the storyboard that have the class of each of these. Then in the app delegate i've put:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = [self setUpViewControllerHierarchy];
[self.window makeKeyAndVisible];
return YES;
} - (UIViewController *)setUpViewControllerHierarchy {
FrontViewController *front = [[FrontViewController alloc] init];
BackViewController *back = [[BackViewController alloc] init];
MBPullDownController *pullDownController = [[MBPullDownController alloc] initWithFrontController:front backController:back];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:pullDownController];
navigationController.navigationBarHidden = YES;
return navigationController;
}
But whilst this works, it doesn't work well at all, I don't actually think it makes use of the storyboard file whatsoever and is all created by code. Is there a better method of doing this that'll allow me to make use of the storyboard document?
from mbpulldowncontroller.
I've just tried this again and your method of implementing it with storyboards just doesn't work for me.
from mbpulldowncontroller.
Are you able to upload a sample project working with storyboards? That'd be awesome.
from mbpulldowncontroller.
See #16.
from mbpulldowncontroller.
Related Issues (20)
- Some correction in NSAssert condition of MBPullDownController.m HOT 2
- Rotation doesn't work properly on iPad when "opened" HOT 2
- Dont Work in ios7. HOT 1
- -[UIWindow _MB_PullDownControllerHitTest:withEvent:]: Unrecognized selector sent to instance under iOS7 HOT 1
- Not Working With TabBarController HOT 1
- Ho to use with Storyboards HOT 12
- UICollectionView hiding under the UINavigationBar when using with Storyboards HOT 2
- same backgroundColor HOT 3
- Make BackController scrollable, please.
- Table view scrolling issue HOT 3
- Regarding TabbarController on Front View
- Delegate method for adding action once the front has opened or closed
- Images
- Quickly toggling the open state leaves the controller in an invalid position
- Nesting multiple pull down controllers not working - why? HOT 2
- erreur pls help me HOT 1
- erreur pls help me HOT 1
- Is it possible to swap out the front view after didSelecting a table cell in the back view? HOT 4
- Fixed Header Menu Improvement HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbpulldowncontroller.