English 中文(简体)
导航 Bar isn t show when I put a UINavigationController in a UIPopoverConller
原标题:navigationBar isn t showing when I put a UINavigationController in a UIPopoverController

I m 在UINavigationController上添加了1架IDViewController,然后向UINavigationController提出UIPopoverController的电击。 除我没有把航海排在人满前外,一切都发挥了巨大作用。 我制造这样的一切:

QueryViewController *puvc = [[QueryViewController alloc] autorelease];
UINavigationController *nc = [[UINavigationController alloc] autorelease];
[nc pushViewController:puvc animated:YES];

self.popUp = [[[UIPopoverController alloc] initWithContentViewController:nc] autorelease];
[self.popUp presentPopoverFromBarButtonItem:[self.toolbarItems objectAtIndex:0] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
self.popUp.delegate = self;

我曾试图建立航海BarHidden = NO,但还没有显示。 我认为,这部法典是我的克列斯·洛默勒:

self.contentSizeForViewInPopover = CGSizeMake(500.0, 500.0);
self.title = @"Queries";

是否有东西可以显示航海如何? 我已经参加了由我主屏幕组成的UINavigationController,这能否成为我的问题的一部分?

最佳回答
 QueryViewController *puvc = [[QueryViewController alloc] autorelease];
 UINavigationController *nc = [[UINavigationController alloc] autorelease];

或许你的法典是错误的。 什么是<条码>?

页: 1 QueryViewController和NavigationController。 第二种使用<代码>initWithRootViewController/code>。

QueryViewController *puvc = [[[QueryViewController alloc] init] autorelease];
UINavigationController *nc = [[[UINavigationController alloc]  initWithRootViewController:pucv] autorelease];
//[nc pushViewController:puvc animated:YES];

If you use initWithRootViewController it s not necessary to push puvc instance.

你们也可以尝试这样做(我要明确表达记忆,而不是使用自动释放)。

QueryViewController *puvc = [[QueryViewController alloc] init];
UINavigationController *nc = [[UINavigationController alloc]  initWithRootViewController:pucv];
//[nc pushViewController:puvc animated:YES];

然后,在您的法典结尾处,人们会记得已发布<代码>puvc和nc

[puvc release];
[nc release];

P.S. Check the code because I ve written without XCode.

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签