美文网首页
7-4 xib self.view.frame的宽高 {600,

7-4 xib self.view.frame的宽高 {600,

作者: RBNote | 来源:发表于2017-07-04 09:50 被阅读89次

    大前提:我用的是Xcode8.3

    一:问题描述

    我的代码:

      RBGesturePwdView *pwdView = [[RBGesturePwdView alloc] initWithFrame:self.view.frame];
        [self.view addSubview: pwdView];  RBGesturePwdView *pwdView = [[RBGesturePwdView alloc] initWithFrame:self.view.frame];
        [self.view addSubview: pwdView];
    

    效果图:


    1. xib frame 600*600问题.png

    二: 解决办法:

    取消勾选 Use Trait Variations

    3.取消勾选.png

    解决后的效果图:

    2. 解决后的效果图.png

    三:参考 !ios - UIView in XIB using Autolayout is always 600x600 - ...

    相关文章

      网友评论

          本文标题:7-4 xib self.view.frame的宽高 {600,

          本文链接:https://www.haomeiwen.com/subject/lmythxtx.html