andresbrun / abcustomuinavigationcontroller Goto Github PK
View Code? Open in Web Editor NEWCustom UINavigationController. SquaresFlips and Cube effects
License: Other
Custom UINavigationController. SquaresFlips and Cube effects
License: Other
Hi,
UITransitionContextToViewKey and UITransitionContextFromViewKey are only available from ios8.
so this library only works on ios8 and later?
Not quite similar with Github, not entirely sure where to put this. I got an issue where the screen will drop 20px when pushing a ViewController so i added couple lines and this makes it compatible with version below iOS7. Basically it only reposition y when iOS version is below 7
(NSInteger)OSVersion
{
static NSUInteger _deviceSystemMajorVersion = -1;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_deviceSystemMajorVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] intValue];
});
return _deviceSystemMajorVersion;
}
(float) calculateYPosition
{
float yPosition=0;
UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];
if ([self OSVersion] < 7) {
if (!self.navigationBarHidden) {
if (UIInterfaceOrientationIsPortrait(interfaceOrientation)){
yPosition += self.navigationBar.frame.size.height;
}else{
yPosition += self.navigationBar.frame.size.width;
}
}
if (![UIApplication sharedApplication].statusBarHidden){
if (UIInterfaceOrientationIsPortrait(interfaceOrientation)){
yPosition += [UIApplication sharedApplication].statusBarFrame.size.height;
}else{
yPosition += [UIApplication sharedApplication].statusBarFrame.size.width;
}
}
}
return yPosition;
}
Hi,
I just updated the XCode and as i was pushing animated value is YES the overrided function in CubeNavigationController gets the value is NO
Here is what i do in a View Controller under CubeNavigationController
MSArticleViewController *article = [[MSArticleViewController alloc] initWithNibName:nil bundle:nil];
[self.navigationController pushViewController:article animated:YES];
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated <--- this is NO
{
pushingVC=YES;
if (animated) {
//...
}
Hi, images of views are blurred. How to remove this blur and get high quality images during transitions?
You'll want to make sure to switch over to this in your "imageWithView" method for rendering your image when you can:
UIGraphicsBeginImageContextWithOptions(view.frame.size, NO, 0.0f);
[view drawViewHierarchyInRect:CGRectMake(0, 0, view.bounds.size.width, view.bounds.size.height)];
UIImage *layerImage = UIGraphicsGetImageFromCurrentImageContext();
This will work on better because it will allow you to capture 3D transforms, which are not rendered into an image by renderInContext:
I want to add a function - (NSMutableArray *) sortFrom: (BOOL) topToBottom array: (NSMutableArray *) array;
Could you give me some advice on "int auxPos = ((index%SQUARE_COLUMNS)*SQUARE_ROWS) + index/SQUARE_COLUMNS; "?
Hi,
So, I'm very happy with how the push functions work. They look exactly the same as the demo. However, the pop functions don't look at all the same in behavior. We like how the demo behaves. We don't like how the library pop functions behave in our software. Would you be willing to fix the library so that the behavior of the library (the pod) matches the behavior of the demo?
Let me know if you need a video of the behavior so we can further clarify what we are talking about.
Thanks,
Sean
snapshotAfterScreenUpdates:YES
is creating an small glitch before every transition on iPhones 6 and 6+. It is described as a Apple library issue so the solution has to be a workaround.
I am trying to start some animations after the view has finished animating in the cube but the viewdidappear gets called just after the animation start. Is there any other method that i should use or any other workaround?
if I turn on autolayout that I can see some views are flashing at the time the transition is completed.
I am using M13ProgressSuite ( https://github.com/Marxon13/M13ProgressSuite?source=c ) in a view controller and the viewcontroller is added to ABCustomUINavigationController . The M13ProgressSuite is showing when used normally but not using This control. Can you suggest something why this might be hapenning? because i want to use both .
Cocoapods are awesome and your project is as well, let's combine these two? :)
Things I'd like if you're adding tests for this project:
Tooling: Kiwi/ Huxley(for UI testing)
Areas to look at:
NSArrayMatrix
should be tested. Mainly sorts methodsUIView+ABExtras
should be tested checking if output views are valid.Notes
This project is based mostly on visual stuffs and animation which are hard to test, so maybe the best is to focus in testing initial state and final state of transitions.
Hi,
I've implemented your cube navigation controller just like in the demo. It seems like the software is written so it will be used throughout the software, not just in a portion of the software- is this correct? In the AppDelegate file I have:
var navigationController: CubeNavigationController!
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
loadData()
let myViewController = ViewController(nibName: "ViewController", bundle: nil)
navigationController = CubeNavigationController(rootViewController: myViewController)
return true
}
Then in the initial viewcontroller I have:
@IBAction func segueToCreateNew(_ sender: UIButton)
{
var createNewAccountViewController = NewAccountCreationViewController(nibName: "NewAccountCreationViewController", bundle: nil)
self.navigationController?.pushViewController(createNewAccountViewController, animated: true)
}
This doesn't seem to work. What am I doing wrong?
Thanks,
Sean
Have you tried this animation when navigation bar is visible for each transitioned viewcontroller? I have ugly image jumps before/after transitions. Trying but still can't fix that behavior.
Please advice.
It seems that the demo does not work well( have no effect ) when using ' CubeNavigationController ' .
Can you please help?
in <AppDelegate.m>
//This works well , awesome !
self.window.rootViewController = [[FlipSquaresNavigationController alloc] initWithRootViewController:self.viewController];
//But this does not ,when change to use the code below , Black screen was occurred after press push button
// self.window.rootViewController = [[CubeNavigationController alloc] initWithRootViewController:self.viewController];
Have you tried this animation when opening the media picker? I imagine this would look very cool. Let me know if this works!
Awesome project!
Hi,
It's a bit unclear how to use the library in a Swift environment. Would you post directions on how to use it in that situation? It looks fairly straightforward to use in Objective C, but a lot of people are using Swift now, and it would be nice to be able to use your library in Swift. Thanks.
Sincerely,
Sean
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.