zoukankan      html  css  js  c++  java
  • 布局类别

    #define VFL(ARRAY,VIEWS) ([NSLayoutConstraint constraintsWithVisualFormatsArray:(ARRAY) views:(VIEWS)])

    @interface NSLayoutConstraint (NSArray)

    + (NSArray *)constraintsWithVisualFormat:(NSString *)format views:(NSDictionary*)dicViews;

    + (NSArray *)constraintsWithVisualFormatsArray:(NSArray *)aryFormats views:(NSDictionary*)dicViews;

    @end

    #import "NSLayoutConstraint+NSArray.h"

    @implementation NSLayoutConstraint (NSArray)

    + (NSArray *)constraintsWithVisualFormat:(NSString *)format views:(NSDictionary*)dicViews

    {

        return [self constraintsWithVisualFormat:format options:0 metrics:nil views:dicViews];

    }

    +(NSArray*)constraintsWithVisualFormatsArray:(NSArray *)aryFormats views:(NSDictionary *)dicViews

    {

        NSMutableArray* ary=[[NSMutableArray alloc] init];

        for (NSString* strVFL in aryFormats) {

            [ary addObjectsFromArray:[self constraintsWithVisualFormat:strVFL views:dicViews]];

        }

        return ary;

    }

    @end

  • 相关阅读:
    143. Reorder List
    圆圈中最后剩下的数
    求1+2+3+...+n
    不用加减乘除做加法
    构建乘积数组
    199. Binary Tree Right Side View
    把字符串转换成整数
    java stream
    物流运费的维护架构
    9、定义类与方法
  • 原文地址:https://www.cnblogs.com/iOS-mt/p/5442563.html
Copyright © 2011-2022 走看看