Implement custom tab bar in flutter - flutter

How do I implement this kind of tab bar and tab bar view in flutter. When user swipe left the tab change to dog and the dog product get bigger.

I would say the easier way to accomplish that design is to couple a slider with a top bar and bind the indexes.
You could start by using a slider package, customize it to look exactly like your design.
Then you add a Row on top of it with your categories and bind the onPressed from this row of buttons to jump on the desired index in the slider.

Related

How to reduce spacing between items in Navigation Bar?

In my Swift project I have 2 items on Right Bar but I see that spacing between them is too big. How to reduce it? Or how to move pen icon closer to time icon?
You're not in control of the spacing of separate bar button items. You could make a single bar button item containing a custom view holding two buttons, and then you would be in control of their spacing.

How to Create Slide Up From Bottom Menu With Overlay Swift

I'm building an iPhone app in Swift. I would like my users to have a menu slide up from the bottom when they tap a button on the table view. Instagram has a very good example of what I am trying to do:
You see how when the user taps the button, the menu slides up from the bottom, and the rest of the table view has a black overlay with a low alpha (it's see through)? This is what I would like to implement, but I have no idea how to do it. Do I add two views to my table view, one for the overlay, and one for the menu, and animate them to appear on the button tap? How would I get the views to "Float" above the table view? Or, do I need to add another View Controller and have it partially transition with some sort of custom segue? I'm fairly new to programming so I'm not sure how to go about this. What do I do?
Do you mean just a UIAlertController? If so, refer to https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAlertController_class/
Here's a tutorial on using a UIAlertController:
http://nshipster.com/uialertcontroller/

What options do I have to provide a feature to allow sorting of a UITableView?

I'm quite short on space. My navigation bar is full. Ideally I'm looking for something below the navigation bar which once tapped will change the sort order of the rows in my uitableview.
I'm looking for options ?
One option is to add tableHeaderView to the table view with the buttons which trigger the sorting action. If your table view contains only one section you can add it as section header(better use tableHeaderView).
Adding UISegmentedControl with the segments(for different types of sorting) as the tableHeaderView is an elegant way.
One option (although much less discoverable than items on the navbar) would be to re-sort when components of the cell are tapped. For example, let's say the cell had a picture on the left of a user, a title and a score. As you tapped on each component of the cell, it would sort by that component. Repeated taps on the same cell component would toggle between ascending and descending. That has the downside of intercepting the cell tap and you would only drill in when tapping on an area of the cell that you're not sorting by.
You could create a really snazzy custom toolbar that appears by tapping a gear shaped button on the navigation bar. It could slide down from under the navigation bar and sit there right below it, and when you finish with it you could send it right back under the navigation bar, hidden.
The advantage of that is your app has a really cool custom toolbar, and all of your buttons are secreted away in a single organized toolbar - the disadvantage being that you actually have to invent one of these.
As I'm thinking about it though, if you have buttons that are navigation related taking up all the space - not ones that do stuff - then this probably won't work.

How could I create a custom tabbar similar to this

How could I create this custom tabbar and what does it consist of?
On cocoacontrols.com you can find several TabBar implementations similar to this.
iOS 5 now allows to change the background image of the tabbar but this kind of custom control is much more complex.
You would basically need to write your own view and controller that would change between views, move the arrow accordingly and activate/deactivate the buttons.
As of the elements it consists of, i would say
One background image used for every element
The different icons in normal and selected state
A UILabel for every element
The blue divider
The arrow, separate from the divider to simplify the animations...
To see how a tabbar with an indicator could be coded check out this project on GitHub for a Twitter-like tabbar.

How to implement this UI

Just curious if the tab bar UI element in screenshots is some built in class or customized.
If it is customized, then please give me a hint on what classes I might check to have something like that.
The first screenshot is initial tab bar. When I tap on the last icon the tab bar smoothly(animated) resize itself as on second screenshot. If I press the edit button the icons are shaking(as on iPhone home) and I'm able to arrange them.
first
tab bar http://img686.imageshack.us/img686/3899/photo2aw.jpg
second
more buttons http://img38.imageshack.us/img38/5673/photo3kq.jpg
The tabbar in the top image could just be a standard tabbar with a non-standard color scheme.
The bottom image is a custom element most likely implemented in an UIActionSheet.
Gotta say, this is a butt ugly UI using non-standard (and therefore confusing) elements. I wouldn't suggest trying to emulate it.
Looks like it's custom. You might just want to look at subclassing UIView and putting a bunch of buttons it stored in a NSArray. That way, when you re-arange them, you just have to move the objects to a new position in the array.
You should be able to achieve the shaking by using simple UIView animations.