Skip to content

Commit 9a596f8

Browse files
authored
Merge pull request #4 from tichise/xcode10
Support for xcode 10 & swift 4.2 compatible
2 parents acb7fbd + 1cd2773 commit 9a596f8

File tree

4 files changed

+16
-56
lines changed

4 files changed

+16
-56
lines changed

PopOverAlert.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'PopOverAlert'
3-
s.version = '1.1.0'
3+
s.version = '1.2.0'
44
s.license = 'MIT'
55
s.summary = 'PopOverAlert is a PopOver style alert view.'
66
s.homepage = 'https://github.com/tichise/PopOverAlert'
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
1414
s.requires_arc = true
1515

1616
s.resource_bundles = {
17-
'Storyboards' => [
17+
'PopOverAlertStoryboards' => [
1818
'Storyboards/*.storyboard'
1919
]
2020
}

Sample/Sample.xcodeproj/project.pbxproj

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
798268F71F1F269B0090613B /* Frameworks */,
170170
798268F81F1F269B0090613B /* Resources */,
171171
B5BA601D012F9CC7580E859B /* [CP] Embed Pods Frameworks */,
172-
E9FCBD9839B0AE4437A3DA96 /* [CP] Copy Pods Resources */,
173172
);
174173
buildRules = (
175174
);
@@ -188,8 +187,6 @@
188187
7982690A1F1F269B0090613B /* Sources */,
189188
7982690B1F1F269B0090613B /* Frameworks */,
190189
7982690C1F1F269B0090613B /* Resources */,
191-
7A93836D815B6056D83947BC /* [CP] Embed Pods Frameworks */,
192-
4F0B606A4E1A70D8FCAA653C /* [CP] Copy Pods Resources */,
193190
);
194191
buildRules = (
195192
);
@@ -316,36 +313,6 @@
316313
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
317314
showEnvVarsInLog = 0;
318315
};
319-
4F0B606A4E1A70D8FCAA653C /* [CP] Copy Pods Resources */ = {
320-
isa = PBXShellScriptBuildPhase;
321-
buildActionMask = 2147483647;
322-
files = (
323-
);
324-
inputPaths = (
325-
);
326-
name = "[CP] Copy Pods Resources";
327-
outputPaths = (
328-
);
329-
runOnlyForDeploymentPostprocessing = 0;
330-
shellPath = /bin/sh;
331-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-resources.sh\"\n";
332-
showEnvVarsInLog = 0;
333-
};
334-
7A93836D815B6056D83947BC /* [CP] Embed Pods Frameworks */ = {
335-
isa = PBXShellScriptBuildPhase;
336-
buildActionMask = 2147483647;
337-
files = (
338-
);
339-
inputPaths = (
340-
);
341-
name = "[CP] Embed Pods Frameworks";
342-
outputPaths = (
343-
);
344-
runOnlyForDeploymentPostprocessing = 0;
345-
shellPath = /bin/sh;
346-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SampleTests/Pods-SampleTests-frameworks.sh\"\n";
347-
showEnvVarsInLog = 0;
348-
};
349316
B5BA601D012F9CC7580E859B /* [CP] Embed Pods Frameworks */ = {
350317
isa = PBXShellScriptBuildPhase;
351318
buildActionMask = 2147483647;
@@ -382,21 +349,6 @@
382349
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
383350
showEnvVarsInLog = 0;
384351
};
385-
E9FCBD9839B0AE4437A3DA96 /* [CP] Copy Pods Resources */ = {
386-
isa = PBXShellScriptBuildPhase;
387-
buildActionMask = 2147483647;
388-
files = (
389-
);
390-
inputPaths = (
391-
);
392-
name = "[CP] Copy Pods Resources";
393-
outputPaths = (
394-
);
395-
runOnlyForDeploymentPostprocessing = 0;
396-
shellPath = /bin/sh;
397-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh\"\n";
398-
showEnvVarsInLog = 0;
399-
};
400352
/* End PBXShellScriptBuildPhase section */
401353

402354
/* Begin PBXSourcesBuildPhase section */
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Sources/PopOverAlertViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ open class PopOverAlertViewController: UITableViewController, UIAdaptivePresenta
1717

1818
@objc open var completionHandler: (() -> Void)?
1919

20-
private var separatorStyle: UITableViewCellSeparatorStyle = UITableViewCellSeparatorStyle.none
20+
private var separatorStyle: UITableViewCell.SeparatorStyle = UITableViewCell.SeparatorStyle.none
2121
private var showsVerticalScrollIndicator:Bool = false
2222

23-
@objc open static func instantiate() -> PopOverAlertViewController {
23+
@objc public static func instantiate() -> PopOverAlertViewController {
2424
let storyboardsBundle = getStoryboardsBundle()
2525
let storyboard:UIStoryboard = UIStoryboard(name: "PopOverAlert", bundle: storyboardsBundle)
2626
let popOverAlertViewController = storyboard.instantiateViewController(withIdentifier: "PopOverAlertViewController") as! PopOverAlertViewController
@@ -37,7 +37,7 @@ open class PopOverAlertViewController: UITableViewController, UIAdaptivePresenta
3737
override open func viewDidLoad() {
3838
super.viewDidLoad()
3939

40-
tableView.rowHeight = UITableViewAutomaticDimension
40+
tableView.rowHeight = UITableView.automaticDimension
4141
tableView.estimatedRowHeight = 45
4242
tableView.showsHorizontalScrollIndicator = false
4343
tableView.showsVerticalScrollIndicator = showsVerticalScrollIndicator
@@ -55,7 +55,7 @@ open class PopOverAlertViewController: UITableViewController, UIAdaptivePresenta
5555
super.viewWillLayoutSubviews()
5656

5757
if let footerView = tableView.tableFooterView {
58-
let height = footerView.systemLayoutSizeFitting(UILayoutFittingCompressedSize).height
58+
let height = footerView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height
5959

6060
if height != footerView.frame.size.height {
6161
tableView.tableFooterView?.frame.size.height = height
@@ -95,7 +95,7 @@ open class PopOverAlertViewController: UITableViewController, UIAdaptivePresenta
9595
self.buttonTextColor = buttonTextColor
9696
}
9797

98-
@objc open func setSeparatorStyle(_ separatorStyle:UITableViewCellSeparatorStyle) {
98+
@objc open func setSeparatorStyle(_ separatorStyle:UITableViewCell.SeparatorStyle) {
9999
self.separatorStyle = separatorStyle
100100
}
101101

@@ -105,7 +105,7 @@ open class PopOverAlertViewController: UITableViewController, UIAdaptivePresenta
105105

106106
static func getStoryboardsBundle() -> Bundle {
107107
let podBundle = Bundle(for: PopOverAlertViewController.self)
108-
let bundleURL = podBundle.url(forResource: "Storyboards", withExtension: "bundle")
108+
let bundleURL = podBundle.url(forResource: "PopOverAlertStoryboards", withExtension: "bundle")
109109
let bundle = Bundle(url: bundleURL!)!
110110

111111
return bundle

0 commit comments

Comments
 (0)