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
Related
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.
I'm building an instant messenger app in iOS. In particular I'm implementing the UI for a conversation in the most typical way, that is placing an input bar at the bottom of the view (UICollectionView to be clear) that scrolls above the keyboard.
Now, I'm wondering if I should implement this view as a UIToolbar with UIBarButtonItems instead of a custom UIView with UIButtons. What are the advantages of a UIToolbar?
I don't think there is much difference other than convenience. With a UIToolbar you get the following:
UIBarButton items are arguably simpler to add to a tool bar and the
layout is automatic, whereas it is a bit more complicated adding
buttons to a view.
You can set hidesBottomBarWhenPushed on the view controllers to
hide the bar when a view controller is pushed to the nav stack.
Looks more familiar to other apps, including Apple's own apps.
If you use a UIView with buttons you have more flexibility in the appearance but you have to do a bit more work, but other than that I can't really see much difference.
UIToolbar will provide automatic placing of your buttons, saving you from pain of placing those buttons. It was designed specifically for this reason.
In IOS7, when we pan on the screen edge to right, it will return the previous view controller. Also the transition is interactive, i.e., when we stop panning right, or panning distance is too short, the transition will not finished.
After reading others' blog, I know it can be called interactive pop transition.
The UIPageViewController contains many content ViewControllers, when swiping/panning the screen, we can view the different view controller, but the transition is too simple for me.
And following is my question:
I want to make the transition style in UIPageViewController like the mentioned above (interactive pop transition). They are difference in many ways, for example the previous view controller should be little darker.
And I do not want to custom my own transition style in this way, I just want to use the interactive pop transition in IOS7 default offered.
So maybe I should take some binding work? or assign some transition action in some where?
You should search for the style of interactive pop transition, and follow this custom your own transition.
I am developing an application that requires a scrolling UITabBarController. The customary 5 tab items max with the 5th being the More.. tab just won't do. I have found some pretty great third party classes such as https://github.com/Marxon13/M13InfiniteTabBar and they are great and have the functionality I would like but still, things aren't perfect. When I rotate my device to landscape things become glitchy.
Basically, I am fed up and want to create my own custom UITabBarController with scrolling..how would I go about doing this? I understand I would most likely put a UITabBar within UIScrollView but I am lost without a detailed tutorial of sorts..
Any help would be greatly appreciated! Thanks!!
The way I would approach this is to avoid modifying the UITabBar, since it is highly specialized, and create a UIViewController subclass that will provide this functionality for you. This view controller should have a container view (take a look at this Apple documentation for more detailed information) that will have each child view controller's content view.
For the actual tab bar itself, you have a few options depending on what you similar you want it to the standard UITabBar.
You could have a super basic tab bar that consists of a UIScrollView with standard UIButtons that change/load the correct content view controller. Creating the tab bar would be then easy, simply add the buttons to the scroll view inside some type of loop (you could have the x positions be a multiple of the tab index to make positioning easier). UIButtons have support for a selected button state that you can use. You can change the scroll view's background.
You could have a fancy tab bar which is constructed essentially like the above, but by having a custom UIButton subclass instead of a standard UIButton. This will allow you to implement a more intricate design (i.e. with and more customized touch handling.
Tips:
Use [myImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] to have your tab images tinted like the standard tabs when selected.
Design the basics of your custom view controller in your storyboard. It is really easy to add the child container view and the scroll view this way.
Hope this helps!
Have you used Tinder app?
That app is full of nice effects that makes a great UX experience in my opinion.
Try to open it and you see the launch image with a red flame at the center of the screen.
Seconds after the flame moves itself to the navigation bar to make the app logo.
The animation I am trying to create it exactly that and I can't figured out how to (1) let the navigation bar appear in that way and (2) to transition a custom UIView inside another view.
If I'd find an app to record the screen of my iPhone I will post a video explaining the animation I'm referring to.
In the meanwhile, do you have any ideas?
The animation I am trying to create it exactly that and I can't
figured out how to (1) let the navigation bar appear in that way and
(2) to transition a custom UIView inside another view.
Animation's are often not exactly what they seem to be. For example, when you segue from one view controller to another the animation you see often uses images instead of transforming the actual views.
You can do the same kind of thing for the animation you want. You don't have to actually move a view from one view controller to another -- just create the appearance that you did:
Create an animation that moves the image in question (like the flame) into position on top of the navigation bar.
Set the titleView of the destination view controller's navigation item to include the same image in the same location.
Remove the animated image. The user won't notice a change because the same image is already present at that location.