Skip to content

关于使用xib自定义actionSheet样式modal出来的xib中用约束设置的控件位置错乱的问题 #25

@jniosdeveloper

Description

@jniosdeveloper

我在自定义了一个xib,xib高度165,底部有一个UIView高度44,然后上面有5个UIView等宽等高,然后我使用下面的代码将其弹出:

JNShopDetailAlertView *settingModelView = [JNShopDetailAlertView createShopDetailAlertView];
settingModelView.frame = CGRectMake(0,0,JNScreen,165);
TYAlertController *alertController = [TYAlertController alertControllerWithAlertView:settingModelView preferredStyle:TYAlertControllerStyleActionSheet];
        alertController.backgoundTapDismissEnable = NO;
        settingModelView.clickCancelBlock = ^{
            [alertController dismissViewControllerAnimated:YES];
        };
        [self presentViewController:alertController animated:YES completion:nil];

但是,发现xib中的平均分的5个UIView的位置完全不对,而后我自己写了一个弹出动画加载同一个xib效果是对的,请问一下,如果自定义的xib中的涉及到均分很多的view为啥model出来之后里面的位置完全不对呢,但是我发现如果xib中的样式比较简单,那么modal出来的位置就是对的,请问作者这是为啥呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions