oliverletterer / anadvancednavigationcontroller Goto Github PK
View Code? Open in Web Editor NEWPretty advanced Navigation Controller for iPad
License: MIT License
Pretty advanced Navigation Controller for iPad
License: MIT License
Make ANAdvancedNavigationController a static Library.
the popViewController method re-use the popViewControllerToViewControl, which lead to this limitation, it does not support pop all of the right view controllers....
instead, i think the popViewControllerToViewControl should re-use code of popViewController method..
(void)popViewController:(UIViewController *)viewController animated:(BOOL)animated {
NSLog(@"%s", PRETTY_FUNCTION);
if (![self.viewControllers containsObject:viewController]) {
NSLog(@"viewController (%@) is not part of the viewController Hierarchy", viewController);
return;
}
// this method re-use the _popViewControllersToViewController, which require at least
// one left size view controller to specify the location to pop, so it does not
// support poping the root right view controller
NSInteger index = [self.viewControllers indexOfObject:viewController]-1; // why
NSLog(@"index: %d", index); ===> if the root right viewcontroller is passed as parameter, the index is -1 here...
if (index >= 0) {
viewController = [self.viewControllers objectAtIndex:index];
[self _popViewControllersToViewController:viewController animated:animated];
}
}
Ok, I'm not sure how much this would blow up the positioning logic, but I need some right side view controllers to be wider than the default. Default works fine for most of my tanle views, but a map view needs to be about 30-40% wider. Maybe 500-550px wide. I haven't looked much into the offset logic but I think it's expecting the default size across all stacked views on the right.
Once I get settled in a little more with a project I'm working on, I'll start issuing pull requests here. But in the interim, I'll post some things that I'm altering and other requests.
Right now you've got hard defaults for leftPanningOffset and leftViewControllerWidth, etc. I'm creating properties for each of these that can be set at runtime.
I'm also writing in a compatibility layer to mimic the method names and functions of the UINavigationController, like popToRootViewController and initWithRootViewController. This makes it easier to pose in hybrid apps.
remove exceptions and implement early returns.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.