以下是我的viewcontroller,它在带有缺口显示的手机中从上到下有余量。需要做什么?

问题描述 投票:0回答:1

Image Of the View Controller On Phone 我尝试将modalPresentationStyle设置为全屏,但没有用。它在没有槽口显示的设备上运行良好。在Storyboard中,将viewcontroller的显示方式更改为全屏显示,但仍然无法正常工作。

#import "DocumentServicesViewController.h"
#import "SendItToUsViewController.h"

@interface DocumentServicesViewController ()
{
    NSMutableDictionary *getMyRecordDataDict;
    BOOL  IsGetMyRecordsServiceAvailable, IsScanAtHomeServiceAvailable;
}
@end

@implementation DocumentServicesViewController
@synthesize alertClassObject,FromPushNotification;

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setImages];
    [self allocAllObjects];
    if (!FromPushNotification)
    {
        [self getDocumentMenuDetails];
    }
    else
    {
        ScanAtHomeViewController *scanObject = [[ScanAtHomeViewController alloc] initWithNibName:@"ScanAtHomeViewController" bundle:nil];
        scanObject.FromPushNotification = YES;
        [self.navigationController pushViewController:scanObject animated:YES];

    }

    if([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPhone) {
        if(((int)[[UIScreen mainScreen] nativeBounds].size.height)==2436) {
            [self setStatusBarView];
        }
    }

    // Do any additional setup after loading the view from its nib.
}[Sample image of viewcontroller][1]
iphone uiviewcontroller viewcontroller ios13
1个回答
0
投票

我不知道您的布局,也不知道预期的结果,我可能会想,如果您想要浅灰色的状态栏,则可能需要以20pt常量常量进行超级视图约束。如果我没错,请删除此约束,并使用0pt常量将另一个约束添加到safearea顶部。

阅读有关安全区域here的更多信息

© www.soinside.com 2019 - 2024. All rights reserved.