Skip to content

Commit dc8e206

Browse files
committed
重构精准适配 支持更多纬度匹配, Inch改为Screen
1 parent 59d4d72 commit dc8e206

File tree

11 files changed

+362
-289
lines changed

11 files changed

+362
-289
lines changed

AutoInch.podspec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Pod::Spec.new do |s|
22

33
s.name = "AutoInch"
4-
s.version = "1.3.2"
5-
s.summary = "优雅的iPhone 等比例/全尺寸 适配工具"
4+
s.version = "2.0.0"
5+
s.summary = "优雅的iPhone 等比例/精准 适配工具"
66

77
s.homepage = "https://github.com/lixiang1994/AutoInch"
88

@@ -20,7 +20,6 @@ s.requires_arc = true
2020

2121
s.frameworks = "UIKit", "Foundation"
2222

23-
s.swift_version = "4.2"
24-
s.swift_versions = ["4.2", "5.0"]
23+
s.swift_versions = ["5.0"]
2524

2625
end

Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:Demo.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:Demo.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

Demo/Demo/Base.lproj/LaunchScreen.storyboard

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina5_9" orientation="portrait" appearance="light"/>
34
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
57
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
68
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
79
</dependencies>
@@ -11,10 +13,10 @@
1113
<objects>
1214
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
1315
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
16+
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
1517
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16-
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
1718
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
19+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
1820
</view>
1921
</viewController>
2022
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>

Demo/Demo/Base.lproj/Main.storyboard

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="WXh-D8-1rU">
3-
<device id="retina4_7" orientation="portrait">
4-
<adaptation id="fullscreen"/>
5-
</device>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="WXh-D8-1rU">
3+
<device id="retina5_9" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
97
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
108
</dependencies>
119
<scenes>
@@ -14,21 +12,21 @@
1412
<objects>
1513
<tableViewController id="kPc-c3-SDG" customClass="ViewController" customModule="Demo" customModuleProvider="target" sceneMemberID="viewController">
1614
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="baL-qc-Lbj">
17-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
1816
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19-
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
17+
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
2018
<sections>
2119
<tableViewSection id="rsP-GX-G3H">
2220
<cells>
2321
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="KJS-GN-qGl" style="IBUITableViewCellStyleDefault" id="MQ8-2c-aqh">
24-
<rect key="frame" x="0.0" y="35" width="375" height="44"/>
22+
<rect key="frame" x="0.0" y="18" width="375" height="44"/>
2523
<autoresizingMask key="autoresizingMask"/>
2624
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="MQ8-2c-aqh" id="eI6-Vx-ROX">
27-
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/>
25+
<rect key="frame" x="0.0" y="0.0" width="347.66666666666669" height="44"/>
2826
<autoresizingMask key="autoresizingMask"/>
2927
<subviews>
3028
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="TikTok Login Demo" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="KJS-GN-qGl">
31-
<rect key="frame" x="16" y="0.0" width="324" height="43.5"/>
29+
<rect key="frame" x="16" y="0.0" width="323.66666666666669" height="44"/>
3230
<autoresizingMask key="autoresizingMask"/>
3331
<fontDescription key="fontDescription" type="system" pointSize="17"/>
3432
<nil key="textColor"/>
@@ -41,14 +39,14 @@
4139
</connections>
4240
</tableViewCell>
4341
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="fV0-rt-1A7" style="IBUITableViewCellStyleDefault" id="43C-SB-fcq">
44-
<rect key="frame" x="0.0" y="79" width="375" height="44"/>
42+
<rect key="frame" x="0.0" y="62" width="375" height="44"/>
4543
<autoresizingMask key="autoresizingMask"/>
4644
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="43C-SB-fcq" id="9m2-f0-fZs">
47-
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
45+
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
4846
<autoresizingMask key="autoresizingMask"/>
4947
<subviews>
5048
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Coming Soon... 🌺" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fV0-rt-1A7">
51-
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
49+
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
5250
<autoresizingMask key="autoresizingMask"/>
5351
<fontDescription key="fontDescription" type="system" pointSize="17"/>
5452
<nil key="textColor"/>
@@ -58,14 +56,14 @@
5856
</tableViewCellContentView>
5957
</tableViewCell>
6058
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="lYa-Ob-oCB" style="IBUITableViewCellStyleDefault" id="vLt-qm-DFu">
61-
<rect key="frame" x="0.0" y="123" width="375" height="44"/>
59+
<rect key="frame" x="0.0" y="106" width="375" height="44"/>
6260
<autoresizingMask key="autoresizingMask"/>
6361
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="vLt-qm-DFu" id="NnP-T9-fou">
64-
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
62+
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
6563
<autoresizingMask key="autoresizingMask"/>
6664
<subviews>
6765
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Coming Soon... 🌺" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="lYa-Ob-oCB">
68-
<rect key="frame" x="16" y="0.0" width="343" height="43.5"/>
66+
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
6967
<autoresizingMask key="autoresizingMask"/>
7068
<fontDescription key="fontDescription" type="system" pointSize="17"/>
7169
<nil key="textColor"/>
@@ -102,7 +100,7 @@
102100
<navigationController storyboardIdentifier="NavigationController" automaticallyAdjustsScrollViewInsets="NO" id="WXh-D8-1rU" customClass="NavigationController" customModule="Demo" customModuleProvider="target" sceneMemberID="viewController">
103101
<toolbarItems/>
104102
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="ooo-eW-xj6">
105-
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
103+
<rect key="frame" x="0.0" y="44" width="375" height="44"/>
106104
<autoresizingMask key="autoresizingMask"/>
107105
</navigationBar>
108106
<nil name="viewControllers"/>
@@ -115,4 +113,9 @@
115113
<point key="canvasLocation" x="317.60000000000002" y="124.58770614692655"/>
116114
</scene>
117115
</scenes>
116+
<resources>
117+
<systemColor name="groupTableViewBackgroundColor">
118+
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
119+
</systemColor>
120+
</resources>
118121
</document>

0 commit comments

Comments
 (0)