I have a bit of complex issue with a UITabBarItem
it's UIViewController
.
Basically I have a series of UIButtons
which is a layer on top of UITabBar, if the a UIButton
is selected the right UITabBarItem
is selected.
The complex issue starts when I have a UIViewController
that is displayed when one of the UITabBarItem
is pressed this takes the whole screen and displays a series of UIButtons
. Once you press a button it returns back to the UITabBarItem
selected but what I want in the UIViewcontroller
is to have a dynamic UIView
. I can get everything else working except that because the viewDidLoad
is pre-loaded within that view.
Any suggestions. Sorry if that was a mouthful!
Asked
Active
Viewed 261 times
0

Mush
- 185
- 1
- 2
- 12
-
are you creating `UIView`'s dynamically or in the same interface builder? – Wasim Aug 07 '11 at 12:28
-
I tried both ways but It doesn't work. I have is a value (for which button is pressed) that is being passed to the UIViewcontroller to displayed the dynamic UIViews but since it thing is viewDidLoad it is always zero. I have tried other methods and loadView also. I really need help in this. – Mush Aug 07 '11 at 12:38
-
I usually dont suggest `UITabBar` for this kind of use, you can better use `UISegmented` for the tabs effect. Well if you still want the help in the same `UITabBar` scenario then kindly post your code here or mail me personally so we can help you more accordingly. – Wasim Aug 07 '11 at 12:48
-
You have totally gone of the point. Let me put it to in a simple way so you understand. I have 5 Tab Bars. When I click the last one it displays a view with a series of buttons, which is basically like menu. What I actually want is if I click on one of those buttons the View inside the Tab to change. Something like this app: uk.westfield.com/london/offers-events/iphone – Mush Aug 08 '11 at 07:12
1 Answers
0
Now that I understand what you are asking, it seems that you need the view within the fifth tab to change based on what button is pressed - you can achieve this by making a bunch of graphic buttons to fill the view, then to have the fullscreen overlay you need to have your view present the new view as a modal view controller.
[self presentModalViewController:controllerForButton1 animated:NO]
This actually doesn't have much to with tab bars, this just happens to be within a tab bar controller, and they used the fifth view to hold a big menu, because there weren't enough tabs to suit their need.

Alex Gosselin
- 2,942
- 21
- 37
-
-
Ok well tell us what you want then? What exactly is a "dynamic UIView" to you? Dynamic is a broad term when you're programming in objective-c, I would say that 100% of my views are dynamic in that they don't always display the exact same content, some less dynamic in that they reuse the same set of subviews. – Alex Gosselin Aug 07 '11 at 15:01
-
Let me put it to in a simple way so you understand. I have 5 Tab Bars. When I click the last one it displays a view with a series of buttons, which is basically like menu. What I actually want is if I click on one of those buttons the View inside the Tab to change. Something like this app: http://uk.westfield.com/london/offers-events/iphone/ – Mush Aug 08 '11 at 07:11