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

  • 相关阅读:
    数据压缩和归档
    数据持久化
    文件和目录的使用
    数据及数据处理
    data types
    string services
    logging模块
    指导
    比较两个NSDate类型的参数相差的时间差
    推送 iOS 10
  • 原文地址:https://www.cnblogs.com/iOS-mt/p/5442563.html
Copyright © 2011-2022 走看看