UISearchController Scope Bar (Instagram's way) - ios

I am currently recreating an Instagram app. (For learning purposes.)
But I am stuck recreating the search bar in the Search page.
Instagram's Search Bar
So far my implementation of UISearchController displays a segment controller with buttons. But is not close to Instagrams. Or any other animation similar to it that will lead me on the right direction will be greatly appreciated it.

This works for copying that kind of tab view controller. Here is a picture of it.

Check out this Github page. They have created a segmented controller just like instagram's, and if you scroll down you can see images of it.

Related

Implementing a back button without navigation controller

I'm kind of new to programming in swift and in general in xcode. I'm creating my first app and i've run into this issue that i cant seem to find a fix for online..
my first scene is a view controller with two buttons where you pick a language and it redirects you to the appropriate tab controller in that language.. now I'd like to add a back button to those tab controllers in order to go back in case you picked the wrong language.
what I've tried so far doesn't really work..
I have tried using a navigation controller but they dont show on the first view controller so that doesnt help me, ive tried putting just a navigation bar and adding a navigation item (see pictures below) but the back button isnt rendered correctly and cannot be reached..
help is much appreciated !!
You can use first UIView and set top constraint 0 with safe area. See image
Hope it helps.

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.

Embed Search bar controller in navbar

I am looking to create something similar to this, where there is a search bar in the Navigation bar. The photo below displays what I currently have in my storyboard. I would like for it to look something like the photo below that, without the customizations to the UI. I have tried placing the search bar below the navigation bar but it takes up more space that I would like and looks cluttered and unprofessional, can anybody help me here?
There are several links on SO explaining how to do this already. Check out the following: UISearchBar in navigationbar, Displaying search bar in navigation bar in iOS 8. If neither of those seem to work for your situation explain 1) What method you tried and 2) Why it's not working. You may even add some of your sample code to show how you are attempting to integrate a solution and that it's not working.
You should add tableview and search bar programmatically. By doing so, search bar does not scroll while your tableview scrolls up and down.

Yelp Middle UITabBar Navigation

I am trying to do a UX like Yelp's middle UITabBar item with navigation. I saw https://github.com/BasheerSience/BROptionsButton and am using it to get the pop-up UIButtons. However, when I try to navigate to other view controllers from the buttons I can't get anything working. Note, I am using the storyboard. I need a navigation controller since each of the pop-up buttons will navigate to separate VCs. I am probably missing something very basic, but am not seeing it. Thanks!!
I finally came back to this. I ended up using a container view where the ...didSelectItem:(BROptionItem*)item method dictates which child view to navigate to.
I found this to be the most helpful for my situation:
https://github.com/mluton/EmbeddedSwapping

iOS load view from specific position

Hei guys.
What I am trying to achieve is have my search bar behind the navigation controller just like in the sparrow app. So when you scroll down the search bar is basically part of the view.
The first picture is the view when it's first loaded. The second one is after I scrolled down.
Do you know any way I can achieve this? I was thinking of having the search bar as part of the view and just load the view form the point that's just under the search bar. But I don't know how to do that. Any help would be much appreciated. Thanks.
I agree with #holex's comment if you're using a tableview. Seems silly to re-implement.
However, in the unlikely event you're not. You could just use a UIScrollView for your content and place the search bar at the top, and adjust the content offset accordingly. So it would appear as if the search bar has animated from under your navigation bar.
Here's a link to the UIScrolView class page on the dev site

Resources