Skip to content

Commit 938710b

Browse files
committed
Update for Xcode 11, Swift 5
1 parent bb3b5e0 commit 938710b

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

TableHeader/TableHeaderObjC/TableHeaderObjC/Base.lproj/Main.storyboard

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="hyU-vx-C4d">
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="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="hyU-vx-C4d">
3+
<device id="retina4_7" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
9-
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/>
107
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
118
</dependencies>
129
<scenes>
1310
<!--Table Header-->
1411
<scene sceneID="L3t-as-2dp">
1512
<objects>
1613
<tableViewController id="8df-4C-wQW" customClass="ListTableViewController" sceneMemberID="viewController">
17-
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="56" sectionHeaderHeight="28" sectionFooterHeight="28" id="hFf-XJ-Hvc">
14+
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="hFf-XJ-Hvc">
1815
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1916
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2017
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -43,14 +40,14 @@
4340
</view>
4441
<prototypes>
4542
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="DataCell" id="K5N-sZ-EpZ" customClass="DataCell">
46-
<rect key="frame" x="0.0" y="228" width="375" height="56"/>
43+
<rect key="frame" x="0.0" y="228" width="375" height="43"/>
4744
<autoresizingMask key="autoresizingMask"/>
4845
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="K5N-sZ-EpZ" id="RPa-du-ar5">
49-
<rect key="frame" x="0.0" y="0.0" width="375" height="55"/>
46+
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
5047
<autoresizingMask key="autoresizingMask"/>
5148
<subviews>
5249
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rAf-cH-mvy">
53-
<rect key="frame" x="8" y="8" width="359" height="39.5"/>
50+
<rect key="frame" x="16" y="11" width="343" height="21"/>
5451
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
5552
<nil key="textColor"/>
5653
<nil key="highlightedColor"/>

TableHeader/TableHeaderObjC/TableHeaderObjC/ListTableViewController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ - (void)viewDidLoad {
4646
self.listDataSource = [[ListDataSource alloc] init:self.tableView];
4747
self.tableView.dataSource = self.listDataSource;
4848
self.tableView.rowHeight = UITableViewAutomaticDimension;
49-
self.tableView.estimatedRowHeight = 56.0;
49+
self.tableView.estimatedRowHeight = UITableViewAutomaticDimension;
5050

5151
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(contentSizeDidChange:) name:UIContentSizeCategoryDidChangeNotification object:nil];
5252
}

TableHeader/TableHeaderSwift/TableHeader/Base.lproj/Main.storyboard

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="gmp-jq-hW1">
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="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="gmp-jq-hW1">
3+
<device id="retina4_7" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
9-
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/>
107
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
118
</dependencies>
129
<scenes>
1310
<!--Table Header-->
1411
<scene sceneID="QDj-eu-VKK">
1512
<objects>
1613
<tableViewController id="dkp-Of-qmW" customClass="ListTableViewController" customModule="TableHeader" customModuleProvider="target" sceneMemberID="viewController">
17-
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="dTh-W3-V8b">
14+
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="dTh-W3-V8b">
1815
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1916
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2017
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -43,14 +40,14 @@
4340
</view>
4441
<prototypes>
4542
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="DataCell" id="1R2-oK-DDi" customClass="DataCell" customModule="TableHeader" customModuleProvider="target">
46-
<rect key="frame" x="0.0" y="228" width="375" height="44"/>
43+
<rect key="frame" x="0.0" y="228" width="375" height="43"/>
4744
<autoresizingMask key="autoresizingMask"/>
4845
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1R2-oK-DDi" id="dCR-N6-lAQ">
4946
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
5047
<autoresizingMask key="autoresizingMask"/>
5148
<subviews>
5249
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dxw-Py-lpg">
53-
<rect key="frame" x="8" y="8" width="359" height="27.5"/>
50+
<rect key="frame" x="16" y="11" width="343" height="21"/>
5451
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
5552
<nil key="textColor"/>
5653
<nil key="highlightedColor"/>

TableHeader/TableHeaderSwift/TableHeader/ListTableViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ final class ListTableViewController: UITableViewController {
4141
listDataSource = ListDataSource(tableView: tableView)
4242
tableView.dataSource = listDataSource
4343
tableView.rowHeight = UITableView.automaticDimension
44-
tableView.estimatedRowHeight = 56
44+
tableView.estimatedRowHeight = UITableView.automaticDimension
4545

4646
guard #available(iOS 10.0, *) else {
4747
// Manually observe the UIContentSizeCategoryDidChange

0 commit comments

Comments
 (0)