Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jniosdeveloper opened this issue Feb 12, 2018 · 0 comments

Comments

@jniosdeveloper
Copy link

我在自定义了一个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出来的位置就是对的,请问作者这是为啥呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant