iOS: Facebook chat heads behaviour and animations - ios

This question is probably a little out of date, but I've been using the new Facebook for iOS with the "chat heads" feature (with the chat heads only present within the app), and was wondering how Facebook went about implementing this? E.g. How did they handle the drag animations for the chat heads, and also (when clicking on the chat head) how did they manage to overlay a UITableView on top of the "base" UIViews in the background?
Is this all part of UIKit, or did they create their own classes to handle this?

To answer #StuartM's question in the comments, in the last couple of months I've had a bit more experience with UIKit, and I think I have a rough idea on how I would implement something like this if I was going to do it.
What I would do is for the chat head, create a styled UIButton and add it as subview to the main Window. For the dragging, I would add a Gesture Recognizer to the UIButton to respond to the drags, and for the "snapping to edges" I would use iOS 7's new UIKit Dynamics (http://www.raywenderlich.com/50197/uikit-dynamics-tutorial).
As for showing the UITableView overlay with the chat history, I would use a Child View Controller (https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html#//apple_ref/doc/uid/TP40007457-CH18-SW6) and as for the popping open animation, I would just use the default UIView animations, maybe using animation transactions as I'm not sure I can do everything with just the implicit animations?
And I think that should be it. To be honest, I think anyone who has a handle on those frameworks should be able to build anything in their iOS apps, and if you were to create a "chat heads" like sample project in your spare time, should give you a pretty indepth knowledge of how those frameworks work.

Related

Replicate iOS Pattern: Instagram Search-Style Swiping Tabs

I'm starting a new iOS project in Swift, and my experience programming native iOS applications is minimal, so please bear with me if I use some whacky terminology or overlook some simple solutions.
I'm looking to replicate a pattern in the Instagram application, as seen here:
Selected Tab
Swiping Transition
For those who don't use Instagram, what's essentially going on here is something like a UIPageViewController (with swiping functionality), but with the tabs on top indicating the selected page.
Like in Instagram, I'm planning to have this functionality within a child UIViewController of a UITabBarController (you can see the "main" tabs on the bottom).
What I started out doing was creating static tabs and adding left and right gesture recognizers to the child UIViewController, which would change the page and update the indicator of the selected page on the tabs.
This works but I'm not really loving the way it looks, nor the way it's written. I don't like the idea of needing 2 instances of the tabs, and that certainly doesn't seem to be the way Instagram is doing it, because as shown in the second image, the indicator slides between the tabs.
I've searched a fair bit, but all references to replicating Instagram patterns seem to be outdated and don't address this specific element. Like I said, though, I haven't been programming native iOS for very long (I'm an Android developer and have used Xamarin for iOS), so it's possible I'm just not using the right keywords.
I'd appreciate any help y'all can offer!
Thanks

What is the animation effect that iOS mailing app is using?

I'm trying to create an APP prototype and I was wondering what is the name of animation/transition effect that you see on top of the mailing app when you click the new message button. It's animation effect where the navigation bar does not fully go to the top of the screen and you can the previous view in the background? And is there way to add that animation effect to my storyboard? If not, is there a easily available library that will
I do believe that is a custom transition for which apple does not provide api.

How do I animate a view on touch?

My scenario is common I think. I want to animate a focus reticle (just like Apple's default app and some of the other camera apps out there). Is this all done in drawRect:? Or can I use the animation framework right from the touch handler?
Following some of the examples around github (and the internet) I went ahead and just subclassed UIView (drawRect:) and a little simplistic "animateWithDuration:".

iOS - What is the control that the Teamviewer app is using called?

I'm using the Teamviewer app for iOS and I notice that they use some-sort of a loading pop-up view while you wait to connect to your computer
Also, when you're about to close the connection, another sort of a popup view appears with a "Close" button.
Are there controls like these included in cocoa touch? If not, how was it done?
The first appears to be an ordinary UIView styled to look like a UIAlertView with UIActivityIndicatorView, UILabel and UIButton subviews. The second looks like a UIActionSheet.
There is no standard system way of presenting a custom alert in Cocoa. You could achieve a similar effect with UIViewControllerAnimatedTransitioning or roll your own solution from the ground up, but then you'd have to manage screen rotation, window level, etc. You may want to take a look at ios-custom-alertview on GitHub.

iOS - View Transition open and close

In the latest Expedia app for iOS, they have a very interesting effect that I am trying to wrap my head around.
When you tap on any tile it flip and zoom animation.
Can you please help me for the same for UIView transition.
I've wanted to use this kind of animations in my app as well, so I have written a simple custom segue that does just that - you can even choose between multiple types of flips!
It's called IBCellFlipSegue, give it a try and let me know what you think!
https://github.com/IBLabs/IBCellFlipSegue

Resources