0

I am in a situation where I'm customizing a existing project. When trying to create a UIToolBar in Interface Builder it appears.

Once I press Run and Build and the app runs, There is just a blank screen.

Any ideas on how I can get the UIToolbar to appear in the foreground.

Any help is appreciated

jMelnik
  • 1,055
  • 2
  • 15
  • 26
r31s
  • 1

2 Answers2

0

Without looking at some code, there are many reasons why it would not show up. My best guess is that you are not actually loading the UIView that you think you are loading. Have you set the Outlets for the UIViewController's view? Are you adding the new view to an existing view with [view addSubview:newView]? IS the Tabbar nested (a child) of the new view in IB or is it on the same level?

cdasher
  • 3,083
  • 1
  • 19
  • 20
  • I'm trying to load a UIWindow not a UIView. If the problem is based on the views being on the same level, how would I change the hierarchy of the UIToolBar to reflect the different levels? Many thanks for your help. – r31s Aug 25 '11 at 14:26
0

You can add code in your AppDelegate to add the UIToolbar subview to your window.

[self.window addSubview:toolbarName];

If customizing the toolbar in IB, you can still do this, just add the toolbar to your AppDelegate as an IBOutlet and connect it in IB.

superjessi
  • 1,790
  • 10
  • 17
  • I created a IBOutlet for a UIToolbar *toolbar; under the interface in AppDelegate .h, then under the .m of the AppDelegate under - (void)applicationDidFinishLaunching:(UIApplication *)application { I put in [self.window addSubview:toolbar]; and it still hasn't worked. Any ideas? – r31s Aug 31 '11 at 11:21
  • Are you alloc and init'ing it anywhere? – superjessi Sep 01 '11 at 03:05