myLauncher inside another window

44 views
Skip to first unread message

Caleb_Bredlow

unread,
May 1, 2012, 2:25:20 PM5/1/12
to myLauncher
Hello, I have a small question about using the myLauncher within
another window. Right now, my application implements myLauncher, but
has the navigation bar disabled by the appdelegate (it isn't used by
any other windows). I would like to add in a toolbar, and a search
bar. I did this by creating a xib file, and I added in a smaller view
that I want the launcher view to use. I've tried editing my root
controller file to force it into the smaller window, but all I get is
black.

Here is my root controller method that has the window in it:

-(void)loadView {
[super loadView];
self.launch = [self.launch initWithFrame:CGRectMake(0, 44,
self.view.bounds.size.width,self.view.bounds.size.height-44)];
[self setLauncherView:[[MyLauncherView alloc]
initWithFrame:self.launch.bounds]];
[self.launcherView setBackgroundColor:[UIColor
scrollViewTexturedBackgroundColor]];
[self.launcherView setDelegate:self];
//rest of code omitted,
}

Jarada

unread,
May 2, 2012, 6:18:56 AM5/2/12
to mylau...@googlegroups.com
Hi Caleb,

Your code is missing the addition of the launcher view as a subview of the launch view:

[self.launch addSubview:self.launcherView];

Try that and see if that helps?

It can be done, I've built numerous applications in a similar fashion.

Cheers,

Jarada

Caleb_Bredlow

unread,
May 2, 2012, 9:54:35 AM5/2/12
to mylau...@googlegroups.com
Yes it did, still getting used to programming in objective-c and building UI's.  Works fine, just having some rotation issues, all the views and bars/buttons won't rotate to the user interface.
Reply all
Reply to author
Forward
0 new messages