Skip to content

Commit

Permalink
Release v1.1.2 and support iOS11 and support iPhoneX
Browse files Browse the repository at this point in the history
  • Loading branch information
欧柏泉 committed Sep 23, 2017
1 parent c827e82 commit e002e3d
Show file tree
Hide file tree
Showing 52 changed files with 903 additions and 551 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@

---

## [V1.1.2](https://github.com/youngsoft/TangramKit/releases/tag/1.1.2)(2017/9/23)

#### Added
1. 添加对Swift4的兼容支持
2. 添加适配iOS11的能力以及**iPhoneX**的方法。基本不需要改动当前代码。如果需要改动只需要设置根布局视图的一些属性即可。
1. 新增布局视图属性:`tg_insetsPaddingFromSafeArea`用来设置在哪个方向缩进对应方向的安全区域。
2. 新增布局视图属性:`tg_insetLandscapeFringePadding`用来设置当支持横屏时,并且tg_insetsPaddingFromSafeArea设置为左右缩进时,是否只缩进有刘海的那一边。这个属性默认设置为NO,表示两边都缩进。您可以在特殊需要时将这个属性设置为YES表示只缩进刘海那一边,非刘海那一边则不缩进。具体参考使用DEMO:[LLTest1ViewController](https://github.com/youngsoft/TangramKit/blob/master/TangramKitDemo/linerLayoutDemo/LLTest1ViewController.swift)

3. 表格布局TGTableLayout添加了`tg_addRow:colCount:`方法,目的是为了支持那些列数固定并且宽度固定的需求,具体例子见DEMO:[TLTest1ViewController](https://github.com/youngsoft/TangramKit/blob/master/TangramKitDemo/TableLayoutDemo/TLTest1ViewController.swift)中的第五行的代码。
4. 添加了布局视图的高度等于非布局父视图宽度以及布局视图宽度等于非布局父视图高度的支持,目的是为了支持对布局视图进行旋转`transform`的支持。
5. 添加了框架布局MyFrameLayout中子视图的高度等于另外视图宽度以及宽度等于另外视图高度的支持。
6. 下一个版本将会有重大功能的添加:栅格布局的支持、基线对齐的支持、均分的再次优化等等功能,敬请期待吧。。



#### Fixed
1. 修复了流式布局`MyFlowLayout`中当使用`pageCount`设置分页而里面的子视图是布局视图并设置了wrapContentHeight或wrapContentWidth方法时有可能会导致约束冲突而产生死循环的问题。

2. 修复了线性布局中的子视图设置为weight=1来均分布局视图的尺寸时,有可能导致产生中间缝隙的BUG。以及子视图的总尺寸和布局视图尺寸不相等的BUG。
3. 修复了当对布局视图进行多点触摸且设置了布局视图的触摸事件时,有可能会对对应的触摸动作不调用而产生触摸状态无法被恢复的问题。
4. 调整了将原始逻辑点转化为可显示逻辑点的算法,老算法计算可能不精确。



## [V1.1.1](https://github.com/youngsoft/TangramKit/releases/tag/1.1.1)(2017/6/22)
#### Fixed
1. 修复了布局视图套布局视图,并且尺寸是.wrap时界面有可能进入死循环的问题,尤其是iPhonePlus设备。
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ To integrate TangramKit into your Xcode project using CocoaPods, specify it in y
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'TangramKit', '~> 1.1.1'
pod 'TangramKit', '~> 1.1.2'
```

Then, run the following command:
Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ $ gem install cocoapods
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'TangramKit', '~> 1.1.1'
pod 'TangramKit', '~> 1.1.2'
```

然后运行如下命令:
Expand Down
49 changes: 2 additions & 47 deletions TangramKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "TangramKit"
s.version = "1.1.1"
s.version = "1.1.2"
s.summary = "TangramKit is A powerful iOS UI framework. It integrated the Android layout,AutoLayout,SizeClass, HTML/CSS float and flexbox functions."

s.description = <<-DESC
Expand Down Expand Up @@ -67,19 +67,14 @@ Pod::Spec.new do |s|
# s.platform = :ios
s.platform = :ios, "8.0"

# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# s.watchos.deployment_target = "2.0"


# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/youngsoft/TangramKit.git", :tag => "1.1.1" }
s.source = { :git => "https://github.com/youngsoft/TangramKit.git", :tag => s.version }


# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
Expand All @@ -93,45 +88,5 @@ Pod::Spec.new do |s|
s.source_files = "TangramKit/*.{swift}"
#s.exclude_files = "Classes/Exclude"

#s.public_header_files = "TangramKit/Lib/*.h"


# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#

# s.resource = "icon.png"
# s.resources = "Resources/*.png"

# s.preserve_paths = "FilesToSave", "MoreFilesToSave"


# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#

# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"

# s.library = "iconv"
# s.libraries = "iconv", "xml2"


# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.

# s.requires_arc = true

# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"

end
37 changes: 21 additions & 16 deletions TangramKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@
681BD9011E0B92E100403A1F /* TangramKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TangramKit.swift; sourceTree = "<group>"; };
681BD9021E0B92E100403A1F /* TGBaseLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TGBaseLayout.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
681BD9031E0B92E100403A1F /* TGDimeAdapter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGDimeAdapter.swift; sourceTree = "<group>"; };
681BD9041E0B92E100403A1F /* TGFloatLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGFloatLayout.swift; sourceTree = "<group>"; };
681BD9051E0B92E100403A1F /* TGFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGFlowLayout.swift; sourceTree = "<group>"; };
681BD9061E0B92E100403A1F /* TGFrameLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGFrameLayout.swift; sourceTree = "<group>"; };
681BD9041E0B92E100403A1F /* TGFloatLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TGFloatLayout.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
681BD9051E0B92E100403A1F /* TGFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TGFlowLayout.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
681BD9061E0B92E100403A1F /* TGFrameLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TGFrameLayout.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
681BD9071E0B92E100403A1F /* TGLayoutPos.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TGLayoutPos.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
681BD9081E0B92E100403A1F /* TGLayoutSize.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TGLayoutSize.swift; sourceTree = "<group>"; };
681BD9091E0B92E100403A1F /* TGLayoutSizeClass.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TGLayoutSizeClass.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
Expand Down Expand Up @@ -444,12 +444,15 @@
TargetAttributes = {
18270C231C954B3C00CBCC92 = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = Q5MFLFRY64;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
};
};
};
681BD8DA1E0B91A500403A1F = {
CreatedOnToolsVersion = 8.2;
DevelopmentTeam = Q5MFLFRY64;
LastSwiftMigration = 0820;
ProvisioningStyle = Automatic;
};
Expand Down Expand Up @@ -726,18 +729,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = Q5MFLFRY64;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TangramKit/TangramKitDemo/TangramKitPrefix.pch;
INFOPLIST_FILE = "$(SRCROOT)/TangramKitDemo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bbae.anno.dev;
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.TangramKit.demo;
PRODUCT_NAME = TangramKitDemo;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -746,18 +750,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = Q5MFLFRY64;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TangramKit/TangramKitDemo/TangramKitPrefix.pch;
INFOPLIST_FILE = "$(SRCROOT)/TangramKitDemo/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.bbae.anno.dev;
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.TangramKit.demo;
PRODUCT_NAME = TangramKitDemo;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -770,7 +775,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = Q5MFLFRY64;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -779,7 +784,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = mh_dylib;
PRODUCT_BUNDLE_IDENTIFIER = com.hanwp.TangramKit;
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.TangramKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
Expand All @@ -799,7 +804,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = Q5MFLFRY64;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -808,7 +813,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = mh_dylib;
PRODUCT_BUNDLE_IDENTIFIER = com.hanwp.TangramKit;
PRODUCT_BUNDLE_IDENTIFIER = com.youngsoft.TangramKit;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
2 changes: 1 addition & 1 deletion TangramKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.1</string>
<string>1.1.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
Loading

0 comments on commit e002e3d

Please sign in to comment.