iOS Custom Tab Bar - uitabbarcontroller

I am looking to implement a custom Tab Bar in iOS where selected item is bigger size than the rest of the tabs and peeks out over the content similar to this screenshot.
Could someone point to a tutorial of how to accomplish this preferably in Swift?

I faced with this task several times. I found a lot of tutorials but I've never found one that gives the ability to create a center button that part of it is out of the tab bar.
At the end, I created an approach to have it done correctly. I implemented a simple example project with instructions how to do that. Please check my Custom Tabbar Center Button repo as an example.
One more benefit of it it's center button hides correctly with the tab bar when you use Hide Button Bar on Push property.

A UITabBar contains an array of UITabBarItems, which inherit from
UIBarItem. But unlike UIBarButtonItem that also inherits from
UIBarItem, there is no API to create a UITabBarItem with a customView.
So instead of trying to create a custom UITabBarItem, we’ll just
create a regular one and then put the custom UIButton on top of the
UITabBar
Not swift, but should be easily translated.
https://github.com/boctor/idev-recipes/tree/master/RaisedCenterTabBar
This one is Swift:
https://github.com/itsKaynine/SwiftRaisedTab
Source code for a similar question, using Swift 3:
https://stackoverflow.com/a/36016377/300897

Related

MFC Tabbed Views

I need a basic on how to declare/implement and use the CTabView class for an MFC SDI. I have searched in vain for samples and reference. I assume because MFC is not the most current foundation information is hard to find on certain topics, anything about tabs in particular. How declare an create the tabbed view object? When using add/delete view in the control, is the control creating the view or adding a tab to a view that is already created. Moving and Sizing? Truly appreciate any help. Need native C++ in this app, so answers that tell me how much easier in C# with a different foundation do not help.
Simply derive your view class from CTabView.
You can add as many tabs as you need by calling:
AddView(RUNTIME_CLASS(CMyView),_T("Tab1"));
AddView(RUNTIME_CLASS(CMyView),_T("Tab2"));
AddView(RUNTIME_CLASS(CMyView),_T("Tab3"));
You can also customize the location and other things of tab control by calling:
GetTabControl().SetLocation(CMFCBaseTabCtrl::LOCATION_BOTTOM);
GetTabControl().ModifyTabStyle(CMFCTabCtrl::STYLE_3D_ONENOTE);
GetTabControl().EnableTabDocumentsMenu(TRUE);
GetTabControl().EnableActiveTabCloseButton(TRUE);
GetTabControl().EnableTabSwap(TRUE);
from int CMyTabView::OnCreate(LPCREATESTRUCT lpCreateStruct)

Is is possible to create a tabbarcontroller that does not have elements hidden within "More" section?

I'm currently running into issues similar to the ones described in this post and am wondering if it is possible in a tabbarcontroller to not show the "More" icon and display all of the view controllers in the tab bar?
The issue of reconciling the show and hide becomes problematic if I assume that some views have navigation bars and that a user may change the order of the tabs, so hiding and showing tab bars becomes another facet of the project I will need to keep track of in appearance and disappearance methods.
Per Apple's documentation, the morenavigationcontroller is something that does not is set in the tabbar's vc array, but is merely a property

GDK : How to show status similar to 'Recording" and 'Complete"

I'm developing a GDK app where I need to provide an user experience to display status text similar to video recording status that Glass provides ( displaying "Recording" status then displaying progress indicator and finally showing 'Complete' text ). Appreciate your input.
Right now, you'll need to write your own UI logic to do this (perhaps by using a Dialog with a custom layout that has the appropriate centered label and icon, with a progress bar at the bottom, and changing the label and dismissing the dialog when the action is complete).
You may want to follow issue 271 in our issue tracker, which covers the progress indicator part of this flow.
Tony is right. There is no way to do this naively but you can build it yourself. You can create a layout that is build exactly like the menu is built in the GDK, and then just update the setcontentview() with a new layout each time you want to move to the next card. Also you can build a layout with the holo horizontal progressbar to get the general idea but it won't be like the one Google uses.
Also wanted to add that I have built a repo that you can drop into your project for this. Here is the link: https://github.com/w9jds/GDK-ProgressBar

How Can i put more of 5 tabs in a Tab Bar Controller?

:D
i'm have a storyboard with a TabBarController but when i do the relationship with my others seven view controllers in mi tab bar appears a "more" Tab, How can i put this seven tabs in one tabbar?
I´ll have to do manually? with a tabbarcontroller class? or implementing Tabbar Delegate in a uiviewcontroller, But i dont have any idea how to do this.
Thank You Soo much!
Please Help Me.
Thanks Again.
I believe Apple actively discourages people from doing this in their apps, and so do I. It is never done in the iOS itself, and I have never seen it in any third-party apps either, so users will probably be confused.
If you add more than five items to the viewControllers property, the
tab bar controller automatically inserts a special view controller
(called the More view controller) to handle the display of the
additional items. The More view controller provides a custom interface
that lists the additional view controllers in a table, which can
expand to accommodate any number of view controllers. The More view
controller cannot be customized or selected and does not appear in any
of the view controller lists managed by the tab bar controller. For
the most part, it appears automatically when it is needed and is
separate from your custom content. You can get a reference to it
though by accessing the moreNavigationController property of
UITabBarController.
Also refer this link for a possible workaround!
You can use any open source custom UITabbarControler or can create your own.
As created in this open source code. JFTabBarController a custom tabbar controller on Cocoa Controls

Does MFC have a built in grid control?

First what I want: The ability to display a grid with multiple columns, each cell having a custom render callback. So you might use such a control to display your inventory in a game, or something like the behaviour in Google Chrome where it shows a grid of popular pages you visit.
I've been playing with CListCtrl and while I can get custom rendering ability on each item, I can't get it work with columns - having say 3 items per row. The control has column-related methods but I think these are specifically for the built-in functionality where different attributes of an item are shown automatically in each column... not for providing a generic grid control.
So, does such functionality exist in MFC? If not then I wonder if the easiest approach is for me to actually insert each of the rows as an Item... and then the custom rendering draws the multiple cells in the row, I could also do custom UI to support clicking on the cells.
But what I really want is to be able to create a custom control, and add this as an item to a list - like in Flex for instance - so I/O etc is automatically handled.
Any advice/information welcome...
Dundas has thrown some of its (excellent) components in the public domain. Their Ultimate Grid is available on CodeProject.
I'm not aware of a built-in control, but I think you should take a look at this.
The article is describing in detail the functionality of a fully featured MFC grid control, derived from CWnd, for displaying tabular data.
YOUR_LIST_CONTROL.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_INFOTIP|LVS_EX_GRIDLINES);
I think it will help you (SetExtendedStyle).
I suggest this one:
https://code.google.com/p/cgridlistctrlex/
very complete