Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-18-2011, 09:39 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Question Navigation bar size not in layout?

This is my first time creating a default Navigator-based project in XCode4, and I set the statusbar
to be initially hidden in the info.plist file. When the program runs, it shows only the navbar, and the view.
Which is good so far.

I want to know the size of the default view, so I call (in viewDidLoad, RootViewController.m):
CGRect rect = self.view.bounds;

However, it says the size of the view is 480 pixels high (iPhone), the same as a full screen view,
which is not correct.

Why isn't the navbar size included here by default?
What do I need to do to add the navbar size, when the view is first created?
samurle is offline   Reply With Quote
Old 09-18-2011, 09:46 PM   #2 (permalink)
Just helping out.
 
Domele's Avatar
 
Join Date: Feb 2011
Posts: 2,565
Domele is on a distinguished road
Default

How are you adding your navbar? Is it part of a UINavigationController? If you just added it manually, it's going to get included into the size of your view. By included, I mean the area it is occupying is going to count towards the total size.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.

New app - See screenshots and details at www.globaclock.com.

If you want to thank me, click the link. Every click counts. If you want to do more, buy my app. A link is available on my website. Thanks.
Domele is offline   Reply With Quote
Old 09-18-2011, 10:10 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Default

Quote:
Originally Posted by Domele View Post
How are you adding your navbar? Is it part of a UINavigationController? If you just added it manually, it's going to get included into the size of your view. By included, I mean the area it is occupying is going to count towards the total size.
I'm using the default Navigator-based project from XCode4, and have not made many changes.

In AppDelegate.m, it calls these two lines:

Code:
self.window.rootViewController = self.navigatorController;
[self.window makeKeyAndVisible];
The sizes of navigation bar/toolbar are not included in the view?
The view reports to be full-screen, which is not correct.
samurle is offline   Reply With Quote
Old 09-18-2011, 10:29 PM   #4 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 245
samurle is on a distinguished road
Question

Perhaps I'm confused as to how to access the "navigation view"?

Is there more than one view in a Navigation-based project?
Is the "window view" and "navigation view" the same entity?

I'm calling (in RootViewController.m):
Code:
CGRect rect = self.view.bounds;
This is the "navigation view", correct?

Is self.navigationController.view the same as self.view?
Because they are both returning full screen for me.

Last edited by samurle; 09-18-2011 at 10:44 PM.
samurle is offline   Reply With Quote
Reply

Bookmarks

Tags
layout, navbar, navigation bar, view

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 399
16 members and 383 guests
7twenty7, Eclectic, eski, EvilElf, fiftysixty, HemiMG, iOS.Lover, JackReidy, jarv, pbart, Pudding, sacha1996, teebee74, UMAD, VinceYuan, yuncarl28
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,672
Threads: 94,121
Posts: 402,905
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yuncarl28
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:11 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0