Skip to content

Commit 1522f20

Browse files
committed
OSSのforkingdog/FDFullscreenPopGestureを利用して、UINavigationControllerで画面のどこをスワイプしても戻れるように対応
1 parent bc9cfe3 commit 1522f20

File tree

9 files changed

+160
-1
lines changed

9 files changed

+160
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ playground.xcworkspace
4545
# you should judge for yourself, the pros and cons are mentioned at:
4646
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
4747
#
48-
# Pods/
48+
Pods/
4949

5050
# Carthage
5151
#

GitHubMobile.xcodeproj/project.pbxproj

+72
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
054D105E1FF8EA1100F01B45 /* SkeletonLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 054D105D1FF8EA1100F01B45 /* SkeletonLabel.swift */; };
3131
056205E31FF62B510044CB85 /* RepositoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 056205E11FF62B510044CB85 /* RepositoryCell.swift */; };
3232
056205E61FF6329E0044CB85 /* RepositoryTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 056205E51FF6329E0044CB85 /* RepositoryTableViewController.swift */; };
33+
1FADD64A73BB6470BC0A2581 /* Pods_GitHubMobile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A144CE86DAB16C15319AE0C /* Pods_GitHubMobile.framework */; };
3334
/* End PBXBuildFile section */
3435

3536
/* Begin PBXContainerItemProxy section */
@@ -92,6 +93,9 @@
9293
056205DA1FF60ECF0044CB85 /* Apollo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Apollo.framework; path = Carthage/Build/iOS/Apollo.framework; sourceTree = "<group>"; };
9394
056205E11FF62B510044CB85 /* RepositoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepositoryCell.swift; sourceTree = "<group>"; };
9495
056205E51FF6329E0044CB85 /* RepositoryTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepositoryTableViewController.swift; sourceTree = "<group>"; };
96+
1AE25C49D2BEE304D3551EC2 /* Pods-GitHubMobile.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GitHubMobile.release.xcconfig"; path = "Pods/Target Support Files/Pods-GitHubMobile/Pods-GitHubMobile.release.xcconfig"; sourceTree = "<group>"; };
97+
8A144CE86DAB16C15319AE0C /* Pods_GitHubMobile.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GitHubMobile.framework; sourceTree = BUILT_PRODUCTS_DIR; };
98+
8FA39E4626DF1D614F250E65 /* Pods-GitHubMobile.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GitHubMobile.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GitHubMobile/Pods-GitHubMobile.debug.xcconfig"; sourceTree = "<group>"; };
9599
/* End PBXFileReference section */
96100

97101
/* Begin PBXFrameworksBuildPhase section */
@@ -105,6 +109,7 @@
105109
053075461FF67B9900489708 /* AlamofireImage.framework in Frameworks */,
106110
052F4CF01FF8CD52009D8C66 /* Apollo.framework in Frameworks */,
107111
0530754F1FF70BF700489708 /* SkeletonView.framework in Frameworks */,
112+
1FADD64A73BB6470BC0A2581 /* Pods_GitHubMobile.framework in Frameworks */,
108113
);
109114
runOnlyForDeploymentPostprocessing = 0;
110115
};
@@ -133,6 +138,7 @@
133138
0541D3B91FF3AB9A006DED14 /* GitHubMobileUITests */,
134139
05D975851FF60E3600616E07 /* Frameworks */,
135140
0541D3981FF3AB9A006DED14 /* Products */,
141+
82768204D37D567D67519905 /* Pods */,
136142
);
137143
sourceTree = "<group>";
138144
};
@@ -190,22 +196,35 @@
190196
053075481FF67DF700489708 /* Alamofire.framework */,
191197
053075441FF67B8F00489708 /* AlamofireImage.framework */,
192198
0530754E1FF70BF700489708 /* SkeletonView.framework */,
199+
8A144CE86DAB16C15319AE0C /* Pods_GitHubMobile.framework */,
193200
);
194201
name = Frameworks;
195202
sourceTree = "<group>";
196203
};
204+
82768204D37D567D67519905 /* Pods */ = {
205+
isa = PBXGroup;
206+
children = (
207+
8FA39E4626DF1D614F250E65 /* Pods-GitHubMobile.debug.xcconfig */,
208+
1AE25C49D2BEE304D3551EC2 /* Pods-GitHubMobile.release.xcconfig */,
209+
);
210+
name = Pods;
211+
sourceTree = "<group>";
212+
};
197213
/* End PBXGroup section */
198214

199215
/* Begin PBXNativeTarget section */
200216
0541D3961FF3AB9A006DED14 /* GitHubMobile */ = {
201217
isa = PBXNativeTarget;
202218
buildConfigurationList = 0541D3BF1FF3AB9A006DED14 /* Build configuration list for PBXNativeTarget "GitHubMobile" */;
203219
buildPhases = (
220+
E8A455E1D39A9826AEE6B92D /* [CP] Check Pods Manifest.lock */,
204221
053075541FF8686F00489708 /* Run Script (License Plist) */,
205222
0541D3931FF3AB9A006DED14 /* Sources */,
206223
0541D3941FF3AB9A006DED14 /* Frameworks */,
207224
0541D3951FF3AB9A006DED14 /* Resources */,
208225
056205E01FF60EE80044CB85 /* Embed Frameworks */,
226+
F5CE7D8849891F54DADF0341 /* [CP] Embed Pods Frameworks */,
227+
D17C3A15C7B857EF8B070296 /* [CP] Copy Pods Resources */,
209228
);
210229
buildRules = (
211230
);
@@ -341,6 +360,57 @@
341360
shellPath = /bin/sh;
342361
shellScript = "if [ $CONFIGURATION = \"Debug\" ] && [ -e /usr/local/bin/license-plist ]; then\n/usr/local/bin/license-plist --output-path $PRODUCT_NAME/Settings.bundle --github-token 48260fb231e733ce5dde9fc26aa6b1f6ec3714a7 --suppress-opening-directory\nfi";
343362
};
363+
D17C3A15C7B857EF8B070296 /* [CP] Copy Pods Resources */ = {
364+
isa = PBXShellScriptBuildPhase;
365+
buildActionMask = 2147483647;
366+
files = (
367+
);
368+
inputPaths = (
369+
);
370+
name = "[CP] Copy Pods Resources";
371+
outputPaths = (
372+
);
373+
runOnlyForDeploymentPostprocessing = 0;
374+
shellPath = /bin/sh;
375+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GitHubMobile/Pods-GitHubMobile-resources.sh\"\n";
376+
showEnvVarsInLog = 0;
377+
};
378+
E8A455E1D39A9826AEE6B92D /* [CP] Check Pods Manifest.lock */ = {
379+
isa = PBXShellScriptBuildPhase;
380+
buildActionMask = 2147483647;
381+
files = (
382+
);
383+
inputPaths = (
384+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
385+
"${PODS_ROOT}/Manifest.lock",
386+
);
387+
name = "[CP] Check Pods Manifest.lock";
388+
outputPaths = (
389+
"$(DERIVED_FILE_DIR)/Pods-GitHubMobile-checkManifestLockResult.txt",
390+
);
391+
runOnlyForDeploymentPostprocessing = 0;
392+
shellPath = /bin/sh;
393+
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";
394+
showEnvVarsInLog = 0;
395+
};
396+
F5CE7D8849891F54DADF0341 /* [CP] Embed Pods Frameworks */ = {
397+
isa = PBXShellScriptBuildPhase;
398+
buildActionMask = 2147483647;
399+
files = (
400+
);
401+
inputPaths = (
402+
"${SRCROOT}/Pods/Target Support Files/Pods-GitHubMobile/Pods-GitHubMobile-frameworks.sh",
403+
"${BUILT_PRODUCTS_DIR}/FDFullscreenPopGesture/FDFullscreenPopGesture.framework",
404+
);
405+
name = "[CP] Embed Pods Frameworks";
406+
outputPaths = (
407+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FDFullscreenPopGesture.framework",
408+
);
409+
runOnlyForDeploymentPostprocessing = 0;
410+
shellPath = /bin/sh;
411+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GitHubMobile/Pods-GitHubMobile-frameworks.sh\"\n";
412+
showEnvVarsInLog = 0;
413+
};
344414
/* End PBXShellScriptBuildPhase section */
345415

346416
/* Begin PBXSourcesBuildPhase section */
@@ -508,6 +578,7 @@
508578
};
509579
0541D3C01FF3AB9A006DED14 /* Debug */ = {
510580
isa = XCBuildConfiguration;
581+
baseConfigurationReference = 8FA39E4626DF1D614F250E65 /* Pods-GitHubMobile.debug.xcconfig */;
511582
buildSettings = {
512583
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
513584
CODE_SIGN_STYLE = Automatic;
@@ -527,6 +598,7 @@
527598
};
528599
0541D3C11FF3AB9A006DED14 /* Release */ = {
529600
isa = XCBuildConfiguration;
601+
baseConfigurationReference = 1AE25C49D2BEE304D3551EC2 /* Pods-GitHubMobile.release.xcconfig */;
530602
buildSettings = {
531603
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
532604
CODE_SIGN_STYLE = Automatic;

GitHubMobile.xcworkspace/contents.xcworkspacedata

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GitHubMobile/RepositoryTableViewController.swift

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import UIKit
1010
import GitHubClient
1111
import AlamofireImage
12+
import FDFullscreenPopGesture
1213

1314
class RepositoryTableViewController: UITableViewController {
1415

@@ -21,6 +22,7 @@ class RepositoryTableViewController: UITableViewController {
2122

2223
override func viewDidLoad() {
2324
super.viewDidLoad()
25+
navigationController?.fd_fullscreenPopGestureRecognizer.isEnabled = true
2426
setNavigationBarTitle()
2527

2628
repositories = [GitHubRepository](repeating: GitHubRepository(), count: firstPageSize)

GitHubMobile/Settings.bundle/com.mono0926.LicensePlist.latest_result.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
name: FDFullscreenPopGesture, nameSpecified:
2+
body: The MIT License (MIT…
3+
version: 1.1
4+
15
name: LicensePlist, nameSpecified: License Plist, owner: mono0926, version: 1.8.2
26

37
name: HtmlLabel, nameSpecified: Html Label, owner: saku, version:

GitHubMobile/Settings.bundle/com.mono0926.LicensePlist.plist

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
<key>Type</key>
2929
<string>PSChildPaneSpecifier</string>
3030
</dict>
31+
<dict>
32+
<key>File</key>
33+
<string>com.mono0926.LicensePlist/FDFullscreenPopGesture</string>
34+
<key>Title</key>
35+
<string>FDFullscreenPopGesture</string>
36+
<key>Type</key>
37+
<string>PSChildPaneSpecifier</string>
38+
</dict>
3139
<dict>
3240
<key>File</key>
3341
<string>com.mono0926.LicensePlist/HtmlLabel</string>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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>PreferenceSpecifiers</key>
6+
<array>
7+
<dict>
8+
<key>FooterText</key>
9+
<string>The MIT License (MIT)
10+
11+
Copyright (c) 2015
12+
13+
Permission is hereby granted, free of charge, to any person obtaining a copy
14+
of this software and associated documentation files (the "Software"), to deal
15+
in the Software without restriction, including without limitation the rights
16+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17+
copies of the Software, and to permit persons to whom the Software is
18+
furnished to do so, subject to the following conditions:
19+
20+
The above copyright notice and this permission notice shall be included in all
21+
copies or substantial portions of the Software.
22+
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29+
SOFTWARE.
30+
31+
</string>
32+
<key>Type</key>
33+
<string>PSGroupSpecifier</string>
34+
</dict>
35+
</array>
36+
</dict>
37+
</plist>

Podfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Uncomment the next line to define a global platform for your project
2+
platform :ios, '10.0'
3+
4+
target 'GitHubMobile' do
5+
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6+
use_frameworks!
7+
8+
# Pods for GitHubMobile
9+
pod 'FDFullscreenPopGesture', '1.1'
10+
11+
# target 'GitHubMobileTests' do
12+
# inherit! :search_paths
13+
# # Pods for testing
14+
# end
15+
16+
# target 'GitHubMobileUITests' do
17+
# inherit! :search_paths
18+
# # Pods for testing
19+
# end
20+
21+
end

Podfile.lock

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
PODS:
2+
- FDFullscreenPopGesture (1.1)
3+
4+
DEPENDENCIES:
5+
- FDFullscreenPopGesture (= 1.1)
6+
7+
SPEC CHECKSUMS:
8+
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
9+
10+
PODFILE CHECKSUM: 11c142628f9b9316170dae586d94578c3a25b0a3
11+
12+
COCOAPODS: 1.3.1

0 commit comments

Comments
 (0)