English 中文(简体)
目前的“ModalViewController” view倒了一种新观点,超越了屏幕的顶端。
原标题:presentModalViewController slides a new view too far up and goes above the top of the screen
-(void)reviewClicked:(id)sender
{
    ReviewViewController *newView = [[ReviewViewController alloc] init];
    newView.delegate = self;
    UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:newView];
    [self presentModalViewController:navCon animated:YES];
}

我有一分为二的书记员,这可能造成一些问题。 在详细查看控制器时,我有一顿,在点击上述代码时。

目的是从屏幕底部向上 view一眼,以便用户能够审查他们的选择,然后点击子回到原来的详细观点。 该守则正在发挥作用,你可以在模式观点和原始细节观点之间重新点击。

The problem is, after it slides up the screen, it continues sliding past where it should stop, and finally stops a good 10-15 pixels too far up. Basically, this modal view slides in so far up that a good chunk of the view goes above the top of the screen. Meanwhile, that same amount of space is "empty black space" at the bottom of the screen, just further suggesting that the view just simply moved too far up.

它把问题混在一起,在地貌模式中只字不提。

因此,没有人知道,为什么出现这种 b,使模式观点过于 far,过去是屏幕上的顶端?

-=-=-=-=-=-=-

Edit: Sorry about that, I meant to type navCon in that spot. I fixed it above.

-=-=-=-=-=-=-

解决办法:

-(void)reviewClicked:(id)sender
{
    ReviewViewController *newView = [[ReviewViewController alloc] init];
    newView.delegate = self;
    UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:newView];
    navCon.view.frame = CGRectMake(0, 0, 768, 1080);
    [self presentModalViewController:navCon animated:YES];
}

在经过一些审判和错误之后,我认识到,我从未实际确定观点的框架! 简单的解决办法...... 我一直通过包括轴心档案在内的实例,由于这些档案自动建立了框架,我完全忽视了这一框架!

想到的是,今后会考虑这一点的人。 这一框架仅用于 por形。 如果你们想要的是地貌模式,那么只相应修改框架:

navCon.view.frame = CGRectMake(0, 0, 1080, 768);
最佳回答

尽管我找到了该问题的迅速解决办法。 事实上,仍然存在许多问题。 在进行进一步检查后,我呼吁评价者称这些方法:

[self.splitViewController presentModalViewController:navCon animated:YES];
[self.splitViewController dismissModalViewControllerAnimated:YES];

基本上,我有根本观点,即模式观点,解决了我的所有问题。 从详细来看,从零敲碎打的角度简单地讲,NOT与从根本观点(有时是分立的书记员)的角度看待模式一样。 我希望这有助于今后的任何人。 乘客。

-=-=-===-=-=-=-

详见我这一职务:

- 粉碎 观点

问题回答

暂无回答




相关问题
Asynchronous request to the server from background thread

I ve got the problem when I tried to do asynchronous requests to server from background thread. I ve never got results of those requests. Simple example which shows the problem: @protocol ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

iPhone numberpad with decimal point

I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values ...

热门标签