Solved

UITabBar Item changing Detail side of SplitViewController ?

Posted on 2011-09-04
6
958 Views
Last Modified: 2012-06-27
Hello,

I have a UITabBar inside the DetailViewController.Xib (Wich is the Right Pane of the split view controller)

I would like when I press an item that the Detail switch to another xib view controller. The idea then is that I would have in that one a back button to go back to detail view original.

I need to do that because I like the badge that we can update on uiBarItem. So the user knows "Ok I ave 4 items in my cart" so he presses the item then the detail view would change to another window.

any examples?
0
Comment
Question by:PhilippeRenaud
  • 3
  • 3
6 Comments
 
LVL 20

Accepted Solution

by:
darbid73 earned 500 total points
ID: 36482206
I am not sure I have the answer to your question because things may have changed,but I do have the experience of doing this.

The starting point is that you already have a rootviewcontroller (the split view)  thus if you are looking to use a tabview controller as a root view I don't think it is possible with the native apple stuff.  Remember two things 1. there are custom split views now being made 2. I did this about 3 months ago and things can change.

What I did was in the detail view my first view was just a toolbar at the top and tab bar at the bottom.  I then manually set up the tab bar.  Then for the views that tab bar uses I then add them to this view.

"The idea then is that I would have in that one a back button to go back to detail view original."  

By this statement do you mean a BACK button like what a navigation view controller does?  If yes and this is the example/tutorial you would like here is one.

Tutorial on Changing the split view controller
0
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 36484411
Ok alright. Yes my tab Bar is on Detail side so no worries here. I also have a ToolBar at the top (not a Navigation Controller)

When you say  "I then add them to this view"
I already have a Table view between those two but if I youch the tabBar Item at the buttom you are saying that you "add it to this view?"  

By this do yo mean you do a kind of pushViewController or something ?
or do you hide your control then when he touches you hidden = NO and the old one you HIDDEN = Yes??   im not sure what to do ..


For the other question, Yes the BACK would do the same thing as a back navigation but like I said I do not have a Navigation view controller. The idea is just to go back to the other main Detail View... I am gonna see that Tutorial. Meanwhile can you hlep with first statement ?  :) thank you very much
0
 
LVL 20

Expert Comment

by:darbid73
ID: 36490871
The things is that you have to do some serious work to have multiple detail view controllers.  For example you need your detail view controller to have a tool bar so that a button can be added to the top in portrait mode.

So I have 1 detail view and that has only a tool bar at the top and tab bar at the bottom sometimes.  Then I simple build all my other views.  I then use the add view and add them to this detail view controller under the toolbar and tab bar.  

I do not use the navigation or push.  The problem you are going to have is once again with the tool bar and that button in portrait mode.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 36495477
What about this... :

I supress the toolbar at the buttom. I add into the detail view pane a Navigation Controller .. then I will have my bar at the top (wich I think I can add buttons to it like a regular one.. ?) Then If I want to view another "view" I simply pushViewController to the navigation Controller and I will have my Back button also...

I wont have the badge anymore at the buttom but I guess I can arrang that by having a label that has a number increasing...something like that.


What do you think ? Less problem for pushing the views?
0
 
LVL 20

Expert Comment

by:darbid73
ID: 36496792
Have a look at the tutorial then. That should get you started and talk about all the pitfalls.
0
 
LVL 1

Author Closing Comment

by:PhilippeRenaud
ID: 36496838
thanks
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iOS10 Release date 3 52
iOS and VPN 6 163
iOS and Managed domains 2 92
File attachment not working in email on iPhone 7 9 84
Ever wanted to watch videos in your computer from the bed without the need of standing up and shutting down the computer?  Is your computers operating system Windows XP, Windows Vista or Windows 7?  Do you own a iOS device? If all the answers were y…
When Apple released Swift last year, the aim was to introduce a new programming language for Cocoa and Cocoa Touch that was fast, easy and effective, like the name connotes. Apple succeeded. Swift is designed to couple with Objective-C program…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question