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

如何与Masonry自动布局一起使用?用Masonry布局后不能显示SDCycleScrollView。 #166

Open
penguin1214 opened this issue May 18, 2016 · 1 comment

Comments

@penguin1214
Copy link

penguin1214 commented May 18, 2016

手动代码布局,使用Masonry库,不能显示。

    NSArray* imageNames = @[@"checked", @"test1"];
    _vCycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, 180) imageNamesGroup:imageNames];
    [self.view addSubview:_vCycleScrollView];
    [_vCycleScrollView mas_makeConstraints:^(MASConstraintMaker* make){
        make.top.equalTo(self.view);
        make.left.equalTo(self.view);
        make.right.equalTo(self.view);
        make.height.mas_equalTo(300);
        make.width.equalTo(self.view.mas_width);
    }];

    _vCategoryTableView = [[UITableView alloc] init];
    _vCategoryTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    _vCategoryTableView.delegate = self;
    _vCategoryTableView.dataSource = self;
    [self.view addSubview:_vCategoryTableView];
    [_vCategoryTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view);
        make.top.equalTo(_vCycleScrollView).with.offset(10);
        make.width.mas_equalTo(self.view.mas_width);
        make.height.equalTo(self.view);
    }];

这样写轮播器会显示不出来。

@huqiji
Copy link

huqiji commented Feb 11, 2017

哈哈,我也遇到这个问题。我是调试程序能显示,但是发布App Store后显示不了,我也是醉了。

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

2 participants