• 布局类别


    #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

  • 相关阅读:
    数据库操作--获取空数据
    常用的css属性
    有序列表与无序列表
    表格标签table
    Div 块 盒子
    border边框 css属性
    IMG
    html中a标签与img标签
    CSS
    css 网页中如何嵌套style样式?
  • 原文地址:https://www.cnblogs.com/iOS-mt/p/5442563.html
Copyright © 2020-2023  润新知