zoukankan      html  css  js  c++  java
  • 第十八篇、OC_使用OAStackView FDStackView (第三方框架)可以使用在ios 7及以上的版本

    UILabel *view1 = [[UILabel alloc]init];
        view1.text = @"Label1";
        view1.backgroundColor = [UIColor redColor];
        
        UILabel *view2 = [UILabel new];
         view2.text = @"";
        view2.backgroundColor = [UIColor grayColor];
        
        UILabel *view3 = [UILabel new];
        view3.text = @"Label2";
        view3.backgroundColor = [UIColor grayColor];
        
        OAStackView *stackView = [[OAStackView alloc]initWithArrangedSubviews:@[view1,view2,view3]];
        stackView.axis = UILayoutConstraintAxisHorizontal; // 排列方向
        stackView.spacing = 20; // 控件的间距
        // 等分
        stackView.distribution =  OAStackViewDistributionFillEqually;
        [self.view addSubview:stackView];
        [stackView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
    
  • 相关阅读:
    [HNOI2008] Cards
    loj #136
    a problem
    dp * 3
    STL
    套题1
    luogu 4211
    loj #2319
    loj #2316
    luogu 1144
  • 原文地址:https://www.cnblogs.com/HJQ2016/p/6288786.html
Copyright © 2011-2022 走看看