How to use hero animation between TabBar views? - dart

I had three routes and many hero animations in my project. Now, I want to use a route with three tabs to swipe easily between pages, But these changes disabled all of my hero animations. I used TabBarView and TabController like all of the other examples of material TabBar implementation.
Is there any solution for this problem?

Related

How do I create custom transition animations similar to Snapchat in Swift on iOS

We're creating an application with a design concept similar to Snapchat. On the base level, we have three Views that are supposed to be horizontally swipeable, with the camera view being in the middle.
The Views are also supposed to be selectable via a Tab Bar. While the views are being swiped, the transition should also manipulate the color of the Tab Bar aswell as the size of some elements on the Tab Bar, similar to how Snapchat does it:
Our UI Designer made a mockup for our specific application in Adobe XD:
The button has been made independent from the Tab Bar, as it is supposed to do some interaction with the controller beneath, even if the Tab Bar disappears.
I've been trying to figure out how to best implement a navigation like this for about 10 hours now. I've come as far as trying to create my own AnimationController for animating between Tabs coupled with a custom InteractionController, but those have been unsafe and buggy at best, and I still haven't figured out how to animate the button at the same time as the views.
Has anyone tried to implement a design similar to this and succeeded? Could you lead me in the right direction of which methodology to use to achieve a design like this?
Thanks in advance everyone.

Flutter: Tabbar vs BottomNavigationBar

I'm trying to figure out the best way for bottom navigation with swipe enabled. I found two promising widgets: Tabbar (with TabBarView) and BottomNavigationBar. The tabbar is easy to use and has a controller property which allows swiping between tabs easily. But there is no way to set the backgroundcolor (or am I wrong?). The bottomnavigationbar allows customizability outside of the appBar but doesn't work with controllers. So how would I work with the bottomnavigationbar? Should I manually show and hide the page/widget?
Setting the background color on a TabBar can be done by wrapping it in a Material of the color you want. It's unusual to have one of these at the bottom of the screen though.
You could use the BottomNavigationBar's onTap to trigger page changes in a PageView if you want the views to be swipeable.

How to make SWRevealViewController slide "over" the main view controller not "push" it out?

I'm using SWRevealController with swift and it is working how it is suppose to but I would like to tweak it a little.
When you bring out the menu, by either sliding or pressing the button, the new view comes out while pushing the main view controller to the side.
What I would like to have it do is slide over the main view controller so the main view controller stays where it is with the new view controller sliding over top of it.
Does that make sense? The only example I can think of is on the Reddit News app for Android. The slide out menu doesnt effect the main view controller it just slides out on top of it. (I know its different in Android)
Is this possible to do while using the SWRevealViewController class?
what you're trying to do isn't the expected behavior of SWRevealViewController and thus it would require some low level coding for you to tweak an animation the way you're describing.
However i'd recommend using this pod instead https://github.com/jonkykong/SideMenu. It's an updated version and as you can see it provides several animations for you to choose from, the one you're looking for is Slide in. It's all really well documented.

Expand/collapse UITableViewCell to achieve Evernote-like transition

I'm interested in achieving a transition between view controllers very similar to the transition in Evernote's iOS app:
When "Places" is tapped, it smoothly expands into what looks like UINavigationController with a green border around it. To collapse it, I can either tap "Back" or swipe from the left side of the screen to gradually transition to the home screen.
I'm not looking for exact code samples to copy-paste, bur rather for high-level guidance on which concepts and Apple APIs to leverage. More specifically,
Which transition/animation APIs does this likely use?
How can I achieve the green border around the entire view controller once "Places" is expanded?
I think it uses a custom transition for the zoom in effect. It can be achieved by using this 3rd party framework: https://github.com/mluisbrown/LCZoomTransition as a pattern since the destination view controller looks like a modal and not a destination view controller.
An approach to consider: you can use a UICollectionView with two different layouts. The unexpanded layout can just be a UICollectionViewFlowLayout and the expanded layout can be a subclass that shrinks/fades all the cells except the one you want expanded. Then you can use setCollectionViewLayout:animated: to switch between them.
The green border would just be the background of the parent view, since this wouldn't involve a UINavigationController.
And if you want the interactive swipe gesture for going back from the expanded layout, you hook up a UIScreenEdgePanGestureRecognizer to an interactive collection view layout animation (see startInteractiveTransitionToCollectionViewLayout:completion:).
Judging by that border around places in full screen I would say it's not a UINavigationController but rather two view controllers with custom transition between them.
This was introduced with iOS7 and you can find few tutorials online to implement any custom transitions:
http://www.objc.io/issue-12/custom-container-view-controller-transitions.html
https://developer.apple.com/library/IOs/documentation/UIKit/Reference/UIViewControllerTransitioningDelegate_protocol/index.html

master controller with buttons needs to load pageviewcontroller. master buttons not accessible after first load

I am new to xcode and IOS (and this board. First post).
I am completely flummoxed by a design problem and unsure how to approach.
I have three buttons, each of which calls a new array of pages that need to navigate horizontally with swipe gestures and have their own buttons.
The three buttons in the parent work exactly like a tab bar except they have to be bigger and higher than a tab bar would be. The called page arrays mostly work like a pageviewcontroller except that the pages need to have a button/indicator below to allow non sequential navigation. The target HAS TO LOAD WITH A SEGUE.
The problem I'm encountering is that using a modal segue to load a pageviewcontroller and prepareForSegue to keep the master/parent view controller visible results in my buttons being inaccessible. I assume its because I cant click thought the child view controller.
Secondly, I don't know if its possible to customize the page indicator dots of a pageviewcontroller so they can look like a bar with graphics.
Here are my specific questions:
Is it possible to load a view controller with a modal segue and still access my buttons? Can the child be resized?
can i customize the buttons/indicators in a pageviewcontroller. Can you point me to some code?
should navigation like this be done with some completely different approach? What about a view controller container?
Here's a diagram (cant post images directly yet)
I've found the answer to my second question: It seems that pageViewController's indicators are not customizable in any way. This rules out pageViewController for what I need.
9 Views in 10 hours. Is this not the best forum for questions like this or is there something wrong with my post?

Resources