Skip to content

Commit c3710ae

Browse files
author
@欧柏泉
committed
为支持CocoaPods做的修改。
1 parent f8687f0 commit c3710ae

10 files changed

+45
-32
lines changed

MyLayout.podspec

+11-11
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Pod::Spec.new do |s|
1515
# summary should be tweet-length, and the description more in depth.
1616
#
1717

18-
s.name = "MyLinearLayout"
19-
s.version = "1.1.0"
20-
s.summary = "一个功能强大的IOS布局类库,可以适配各种屏幕和各种操作系统 ,不需要去学习AutoLayout,不用去学习Size Class。"
18+
s.name = "MyLayout"
19+
s.version = "1.1.2"
20+
s.summary = "A powerful iOS view layout library, suitable for all kinds of screen size. Don't need to learn AutoLayout and SizeClass. "
2121

2222
s.description = <<-DESC
23-
A longer description of MyLinearLayout in Markdown format.
23+
A longer description of MyLayout in Markdown format.
2424
2525
* Think: Why did you write this? What is the focus? What does it do?
2626
* CocoaPods will be using this to generate tags, and improve search results.
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
2929
DESC
3030

3131
s.homepage = "https://github.com/youngsoft/MyLinearLayout"
32-
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
32+
s.screenshots = "http://7xoymz.com1.z0.glb.clouddn.com/mylayout.gif", "http://7xoymz.com1.z0.glb.clouddn.com/sizeClassLayout.gif"
3333

3434

3535
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -39,7 +39,7 @@ Pod::Spec.new do |s|
3939
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
4040
#
4141

42-
s.license = "MIT (example)"
42+
s.license = "MIT"
4343
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
4444

4545

@@ -65,7 +65,7 @@ Pod::Spec.new do |s|
6565
#
6666

6767
# s.platform = :ios
68-
# s.platform = :ios, "5.0"
68+
s.platform = :ios, "7.0"
6969

7070
# When using multiple platforms
7171
# s.ios.deployment_target = "5.0"
@@ -79,7 +79,7 @@ Pod::Spec.new do |s|
7979
# Supports git, hg, bzr, svn and HTTP.
8080
#
8181

82-
s.source = { :git => "https://github.com/youngsoft/MyLinearLayout.git", :tag => "1.1.0" }
82+
s.source = { :git => "https://github.com/youngsoft/MyLinearLayout.git", :tag => "1.1.2" }
8383

8484

8585
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
@@ -90,10 +90,10 @@ Pod::Spec.new do |s|
9090
# Not including the public_header_files will make all headers public.
9191
#
9292

93-
s.source_files = "Classes", "Classes/**/*.{h,m}"
94-
s.exclude_files = "Classes/Exclude"
93+
s.source_files = "MyLayout/Lib/*.{h,m}"
94+
#s.exclude_files = "Classes/Exclude"
9595

96-
# s.public_header_files = "Classes/**/*.h"
96+
s.public_header_files = "MyLayout/Lib/*.h"
9797

9898

9999
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

MyLayout/Lib/MyBaseLayout.h

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Copyright (c) 2015年 欧阳大哥. All rights reserved.
77
//
88

9-
#import <UIKit/UIKit.h>
109
#import "MyLayoutDef.h"
1110
#import "MyLayoutPos.h"
1211
#import "MyLayoutDime.h"

MyLayout/Lib/MyLayoutDime.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
// Copyright (c) 2015年 欧阳大哥. All rights reserved.
77
//
88

9-
#import <Foundation/Foundation.h>
10-
#import <UIKit/UIKit.h>
9+
#import "MyLayoutDef.h"
1110

1211
/**
1312
* 视图在布局中的尺寸对象

MyLayout/Lib/MyLayoutDimeInner.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2015年 欧阳大哥. All rights reserved.
77
//
88

9-
#import "MyLayoutDef.h"
9+
#import "MyLayoutDime.h"
1010

1111

1212
//尺寸对象内部定义
@@ -17,18 +17,18 @@
1717

1818
@property(nonatomic, assign) MyLayoutValueType dimeValType;
1919

20-
@property(nonatomic, readonly) NSNumber *dimeNumVal;
21-
@property(nonatomic, readonly) NSArray *dimeArrVal;
22-
@property(nonatomic, readonly) MyLayoutDime *dimeRelaVal;
20+
@property(nonatomic, readonly, strong) NSNumber *dimeNumVal;
21+
@property(nonatomic, readonly, strong) NSArray *dimeArrVal;
22+
@property(nonatomic, readonly, strong) MyLayoutDime *dimeRelaVal;
2323

2424

2525
//是否跟父视图相关
26-
@property(nonatomic, readonly) BOOL isMatchParent;
26+
@property(nonatomic, readonly,assign) BOOL isMatchParent;
2727

2828
-(BOOL)isMatchView:(UIView*)v;
2929

3030
//只有为数值时才有意义。
31-
@property(nonatomic, readonly) CGFloat measure;
31+
@property(nonatomic, readonly, assign) CGFloat measure;
3232

3333
//有效的尺寸, 有效的尺寸取值 minVal <= measure <= maxVal
3434
-(CGFloat)validMeasure:(CGFloat)measure;

MyLayout/Lib/MyLayoutMeasure.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
// Copyright (c) 2015年 欧阳大哥. All rights reserved.
77
//
88

9-
#import <Foundation/Foundation.h>
10-
#import <UIKit/UIKit.h>
9+
#import "MyLayoutDef.h"
1110
#import "MyLayoutSizeClass.h"
1211

1312

MyLayout/Lib/MyLayoutPos.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
// Copyright (c) 2015年 欧阳大哥. All rights reserved.
77
//
88

9-
#import <Foundation/Foundation.h>
10-
#import <UIKit/UIKit.h>
9+
#import "MyLayoutDef.h"
1110

1211
/**
1312
* 视图在布局中的偏移位置对象

MyLayout/Lib/MyLayoutPosInner.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2015年 欧阳大哥. All rights reserved.
77
//
88

9-
#import "MyLayoutDef.h"
9+
#import "MyLayoutPos.h"
1010

1111

1212
//布局位置内部定义
@@ -18,13 +18,13 @@
1818

1919
@property(nonatomic, assign) MyLayoutValueType posValType;
2020

21-
@property(nonatomic, readonly) NSNumber *posNumVal;
22-
@property(nonatomic, readonly) MyLayoutPos *posRelaVal;
23-
@property(nonatomic, readonly) NSArray *posArrVal;
21+
@property(nonatomic, readonly, strong) NSNumber *posNumVal;
22+
@property(nonatomic, readonly, strong) MyLayoutPos *posRelaVal;
23+
@property(nonatomic, readonly, strong) NSArray *posArrVal;
2424

2525
// minVal <= posNumVal + offsetVal <=maxVal . 注意这个只试用于相对布局。对于线性布局和框架布局来说,因为可以支持相对边距。
2626
// 所以线性布局和框架布局不能使用这个属性。
27-
@property(nonatomic,readonly) CGFloat margin;
27+
@property(nonatomic,readonly, assign) CGFloat margin;
2828

2929
//计算有效的margin值,有效的margin minVal <= margin <=maxVal
3030
-(CGFloat)validMargin:(CGFloat)margin;

MyLayout/Lib/MyLayoutSizeClass.h

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Copyright © 2016年 YoungSoft. All rights reserved.
77
//
88

9-
#import <Foundation/Foundation.h>
109

1110
#import "MyLayoutDef.h"
1211
#import "MyLayoutPos.h"

MyLayout/Lib/MyMaker.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// Copyright (c) 2015年 欧阳大哥. All rights reserved.
77
//
88

9-
#import <Foundation/Foundation.h>
10-
#import <UIKit/UIKit.h>
119
#import "MyLayoutDef.h"
1210

1311

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,29 @@
3737
![演示图](http://7xoymz.com1.z0.glb.clouddn.com/sizeClassLayout.gif)
3838

3939
## 使用方式
40+
### 直接拷贝
4041
1. 将github工程中的Lib文件夹下的所有文件复制到您的工程中。
4142
2.`#import "MyLayout.h"` 头文件放入到您的pch文件中,或者在需要使用界面布局的源代码位置。
4243

44+
### Installation with CocoaPods
45+
46+
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the "Getting Started" guide for more information. You can install it with the following command:
47+
48+
**$ gem install cocoapods**
49+
50+
To integrate MyLayout into your Xcode project using CocoaPods, specify it in your Podfile:
51+
52+
*source 'https://github.com/CocoaPods/Specs.git'*
53+
*platform :ios, '7.0'*
54+
55+
*pod 'MyLayout', '~> 1.1.2'*
56+
57+
58+
Then, run the following command:
59+
60+
**$ pod install**
61+
62+
4363
## V1.1.2版本新功能
4464
1. 全面升级,新增加了对SizeClass的支持,通过SizeClass的功能可以为苹果的不同尺寸的设备提供完美的适配功能,对SizeClass的支持,是在苹果的SizeClass能力上支持的,因此只有iOS8以上的版本才支持SizeClass.
4565
2. 流式布局MyFlowLayout增加了按内容填充约束的方式的布局,当arrangedCount设置为0时则表示按内容约束方式进行布局。

0 commit comments

Comments
 (0)