├── .gitignore
├── .swift-version
├── LICENSE
├── Note.png
├── README.md
├── README_CN.md
├── YFMoreViewController.png
├── YFMoreViewController.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── YFMoreViewController
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-60.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Small@3x.png
│ │ ├── Icon-Spotlight-40.png
│ │ ├── Icon-Spotlight-40@2x.png
│ │ ├── Icon-Spotlight-40@3x.png
│ │ └── Logo.png
│ ├── Contents.json
│ ├── Pocket.imageset
│ │ ├── Contents.json
│ │ ├── Pocket@2x.png
│ │ └── Pocket@3x.png
│ ├── QQ.imageset
│ │ ├── Contents.json
│ │ ├── QQ@2x.png
│ │ └── QQ@3x.png
│ ├── copy.imageset
│ │ ├── Contents.json
│ │ ├── copy@2x.png
│ │ └── copy@3x.png
│ ├── evernote.imageset
│ │ ├── Contents.json
│ │ ├── evernote@2x.png
│ │ └── evernote@3x.png
│ ├── moments.imageset
│ │ ├── Contents.json
│ │ ├── moments@2x.png
│ │ └── moments@3x.png
│ ├── refresh.imageset
│ │ ├── Contents.json
│ │ ├── refresh@2x.png
│ │ └── refresh@3x.png
│ ├── safari.imageset
│ │ ├── Contents.json
│ │ ├── safari@2x.png
│ │ └── safari@3x.png
│ ├── search.imageset
│ │ ├── Contents.json
│ │ ├── search@2x.png
│ │ └── search@3x.png
│ ├── wechat.imageset
│ │ ├── Contents.json
│ │ ├── wechat@2x.png
│ │ └── wechat@3x.png
│ ├── weibo.imageset
│ │ ├── Contents.json
│ │ ├── weibo@2x.png
│ │ └── weibo@3x.png
│ └── youdao.imageset
│ │ ├── Contents.json
│ │ ├── youdao@2x.png
│ │ └── youdao@3x.png
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── Sources
│ ├── YFMoreItemView.swift
│ ├── YFMoreViewController.swift
│ └── YFMoreViewDelegate.swift
└── ViewController.swift
├── YFMoreViewControllerTests
├── Info.plist
└── YFMoreViewControllerTests.swift
└── YFMoreViewControllerUITests
├── Info.plist
└── YFMoreViewControllerUITests.swift
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | ## Playgrounds
32 | timeline.xctimeline
33 | playground.xcworkspace
34 |
35 | # Swift Package Manager
36 | #
37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38 | # Packages/
39 | # Package.pins
40 | .build/
41 |
42 | # CocoaPods
43 | #
44 | # We recommend against adding the Pods directory to your .gitignore. However
45 | # you should judge for yourself, the pros and cons are mentioned at:
46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
47 | #
48 | # Pods/
49 |
50 | # Carthage
51 | #
52 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
53 | # Carthage/Checkouts
54 |
55 | Carthage/Build
56 |
57 | # fastlane
58 | #
59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
60 | # screenshots whenever they are needed.
61 | # For more information about the recommended setup visit:
62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
63 |
64 | fastlane/report.xml
65 | fastlane/Preview.html
66 | fastlane/screenshots
67 | fastlane/test_output
68 |
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | 3.0
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Fan Ye
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Note.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/Note.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # YFMoreViewController
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Easy More Operation ViewController in swift.
14 |
15 | [中文文档](https://github.com/yeziahehe/YFMoreViewController/blob/master/README_CN.md)
16 |
17 | # Introduction
18 |
19 | More Operation like share and refresh, inspiration comes from Wechat More Operation. You can use YFMoreViewController just to share something, or to oprate webview.
20 |
21 | # Requirements
22 |
23 | - iOS 9.0 and later
24 | - Xcode 9.x and later
25 | - Swift 4.x and later(For Swift 3.x, use version 1.0.2)
26 |
27 | # Installation
28 |
29 | ## CocoaPods
30 |
31 | - Simply add this line to your `Podfile`:
32 | ```
33 | pod 'YFMoreViewController'
34 | ```
35 | - Run `pod install`.
36 | - Include with `import YFMoreViewController` to use it wherever you need.
37 |
38 | ## Manually
39 |
40 | - Add sources floder's files `YFMoreItemView`、`YFMoreViewDelegate`、`YFMoreViewController` to your project (3 files total).
41 | - Include with `import YFMoreViewController` to use it wherever you need.
42 |
43 | # Usage
44 |
45 | ## Preparation
46 |
47 | 
48 |
49 | YFMoreViewController consists of three parts: info, item important and item normal. They can all be empty, it will just show cancel button.
50 |
51 | - info: if you use YFMoreViewController in WebView, here you can show "Powered By website"
52 |
53 | - item important: here always show share platform, just like Wechat etc. If you just use item important, YFMoreViewController may replace your share ViewController
54 |
55 | - item normal: here always show normal operation, you can use with WebView or some other you need
56 |
57 | ## Basic Usage
58 |
59 | You just init YFMoreViewController, then add items and show, it will OK.
60 | ```
61 | let moreViewController = YFMoreViewController.init()
62 | moreViewController.delegate = self
63 |
64 | moreViewController.addInfo("Powered By yeziahehe.com")
65 | moreViewController.addItems(title: "Wechat", image: UIImage(named: "wechat"), type: .important, tag: "wechat")
66 | moreViewController.addItems(title: "Open With Safari", image: UIImage(named: "safari"), type: .normal, tag:"safari")
67 |
68 | moreViewController.showFromBottom()
69 | ```
70 |
71 | Then you need implement protocol.
72 | ```
73 | func moreView(_ moreview: YFMoreViewController, didSelectItemAt tag: String, type: YFMoreItemType) {
74 | switch tag {
75 | case "wechat":
76 | return
77 | case "safari":
78 | UIApplication.shared.open(URL(string: "http://yeziahehe.com")!, options: [:], completionHandler: nil)
79 | print("safari")
80 | return
81 | }
82 | }
83 | ```
84 |
85 | # About
86 |
87 | - [Blog](http://yeziahehe.com/)
88 | - Gmail: yeziahehe@gmail.com
89 |
90 | # License
91 |
92 | YFMoreViewController is available under the MIT license. See the [LICENSE file](https://github.com/yeziahehe/YFMoreViewController/blob/master/LICENSE) for more info.
93 |
--------------------------------------------------------------------------------
/README_CN.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # YFMoreViewController
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Swift 编写的更多操作 ViewController。
14 |
15 | # 介绍
16 |
17 | 仿照微信更多操作,用来分享、网页操作等。你可以使用 YFMoreViewController 只进行分享或者操作网页。
18 |
19 | # 要求
20 |
21 | - iOS 9.0 及以后
22 | - Xcode 9.x 及以后
23 | - Swift 4.x 及以后(Swift 3.x, 使用版本 1.0.2)
24 |
25 | # 安装
26 |
27 | ## CocoaPods
28 |
29 | - 添加如下到 `Podfile`:
30 | ```
31 | pod 'YFMoreViewController'
32 | ```
33 | - Run `pod install`。
34 | - 导入 `import YFMoreViewController` 在任何你需要的地方。
35 |
36 | ## Manually
37 |
38 | - 添加 Sources 文件夹中的三个文件 `YFMoreItemView`、`YFMoreViewDelegate`、`YFMoreViewController` 到项目中。
39 | - 导入 `import YFMoreViewController` 在任何你需要的地方。
40 |
41 | # 用法
42 |
43 | ## 基本概念
44 |
45 | 
46 |
47 | YFMoreViewController 由三个部分组成:info, item important 和 item normal。这三个部分可以都为空,那么只剩下取消按钮,显然是不美观实用。
48 |
49 | - info: 如果你在 WebView 中使用 YFMoreViewController,你可以在这里显示“此网页由 xxx 提供”。
50 |
51 | - item important: 主要展示第三方分享平台,类似于微信、朋友圈等。你可以只使用 item important 这一部分,可以替代你的分享页面。
52 |
53 | - item normal: 主要展示基础操作,可以配合 WebView 使用或者你其他需要使用的场景。
54 |
55 | ## 基本用法
56 |
57 | 初始化 YFMoreViewController, 然后添加 items 并展示。
58 | ```
59 | let moreViewController = YFMoreViewController.init()
60 | moreViewController.delegate = self
61 |
62 | moreViewController.addInfo("Powered By yeziahehe.com")
63 | moreViewController.addItems(title: "Wechat", image: UIImage(named: "wechat"), type: .important, tag: "wechat")
64 | moreViewController.addItems(title: "Open With Safari", image: UIImage(named: "safari"), type: .normal, tag:"safari")
65 |
66 | moreViewController.showFromBottom()
67 | ```
68 |
69 | 接下来实现协议方法。
70 | ```
71 | func moreView(_ moreview: YFMoreViewController, didSelectItemAt tag: String, type: YFMoreItemType) {
72 | switch tag {
73 | case "wechat":
74 | return
75 | case "safari":
76 | UIApplication.shared.open(URL(string: "http://yeziahehe.com")!, options: [:], completionHandler: nil)
77 | print("safari")
78 | return
79 | }
80 | }
81 | ```
82 |
83 | # 关于
84 |
85 | - [博客](http://yeziahehe.com/)
86 | - 邮箱: yeziahehe@gmail.com
87 |
88 | # License
89 |
90 | YFMoreViewController is available under the MIT license. See the [LICENSE file](https://github.com/yeziahehe/YFMoreViewController/blob/master/LICENSE) for more info.
91 |
--------------------------------------------------------------------------------
/YFMoreViewController.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController.png
--------------------------------------------------------------------------------
/YFMoreViewController.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 48;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2CF53F8F1F324703001C3D0A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF53F8E1F324703001C3D0A /* AppDelegate.swift */; };
11 | 2CF53F911F324703001C3D0A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF53F901F324703001C3D0A /* ViewController.swift */; };
12 | 2CF53F941F324703001C3D0A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CF53F921F324703001C3D0A /* Main.storyboard */; };
13 | 2CF53F961F324703001C3D0A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CF53F951F324703001C3D0A /* Assets.xcassets */; };
14 | 2CF53F991F324703001C3D0A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CF53F971F324703001C3D0A /* LaunchScreen.storyboard */; };
15 | 2CF53FA41F324703001C3D0A /* YFMoreViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF53FA31F324703001C3D0A /* YFMoreViewControllerTests.swift */; };
16 | 2CF53FAF1F324703001C3D0A /* YFMoreViewControllerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF53FAE1F324703001C3D0A /* YFMoreViewControllerUITests.swift */; };
17 | 2CF53FBE1F324758001C3D0A /* YFMoreItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF53FBD1F324758001C3D0A /* YFMoreItemView.swift */; };
18 | 2CF53FC01F324799001C3D0A /* YFMoreViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF53FBF1F324799001C3D0A /* YFMoreViewDelegate.swift */; };
19 | 2CF53FC21F324820001C3D0A /* YFMoreViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF53FC11F324820001C3D0A /* YFMoreViewController.swift */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | 2CF53FA01F324703001C3D0A /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = 2CF53F831F324703001C3D0A /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = 2CF53F8A1F324703001C3D0A;
28 | remoteInfo = YFMoreViewController;
29 | };
30 | 2CF53FAB1F324703001C3D0A /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = 2CF53F831F324703001C3D0A /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = 2CF53F8A1F324703001C3D0A;
35 | remoteInfo = YFMoreViewController;
36 | };
37 | /* End PBXContainerItemProxy section */
38 |
39 | /* Begin PBXFileReference section */
40 | 2CF53F8B1F324703001C3D0A /* YFMoreViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YFMoreViewController.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 2CF53F8E1F324703001C3D0A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
42 | 2CF53F901F324703001C3D0A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
43 | 2CF53F931F324703001C3D0A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
44 | 2CF53F951F324703001C3D0A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
45 | 2CF53F981F324703001C3D0A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
46 | 2CF53F9A1F324703001C3D0A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
47 | 2CF53F9F1F324703001C3D0A /* YFMoreViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YFMoreViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
48 | 2CF53FA31F324703001C3D0A /* YFMoreViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YFMoreViewControllerTests.swift; sourceTree = ""; };
49 | 2CF53FA51F324703001C3D0A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
50 | 2CF53FAA1F324703001C3D0A /* YFMoreViewControllerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YFMoreViewControllerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 2CF53FAE1F324703001C3D0A /* YFMoreViewControllerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YFMoreViewControllerUITests.swift; sourceTree = ""; };
52 | 2CF53FB01F324703001C3D0A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | 2CF53FBD1F324758001C3D0A /* YFMoreItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YFMoreItemView.swift; sourceTree = ""; };
54 | 2CF53FBF1F324799001C3D0A /* YFMoreViewDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YFMoreViewDelegate.swift; sourceTree = ""; };
55 | 2CF53FC11F324820001C3D0A /* YFMoreViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YFMoreViewController.swift; sourceTree = ""; };
56 | /* End PBXFileReference section */
57 |
58 | /* Begin PBXFrameworksBuildPhase section */
59 | 2CF53F881F324703001C3D0A /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | );
64 | runOnlyForDeploymentPostprocessing = 0;
65 | };
66 | 2CF53F9C1F324703001C3D0A /* Frameworks */ = {
67 | isa = PBXFrameworksBuildPhase;
68 | buildActionMask = 2147483647;
69 | files = (
70 | );
71 | runOnlyForDeploymentPostprocessing = 0;
72 | };
73 | 2CF53FA71F324703001C3D0A /* Frameworks */ = {
74 | isa = PBXFrameworksBuildPhase;
75 | buildActionMask = 2147483647;
76 | files = (
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | /* End PBXFrameworksBuildPhase section */
81 |
82 | /* Begin PBXGroup section */
83 | 2CF53F821F324703001C3D0A = {
84 | isa = PBXGroup;
85 | children = (
86 | 2CF53F8D1F324703001C3D0A /* YFMoreViewController */,
87 | 2CF53FA21F324703001C3D0A /* YFMoreViewControllerTests */,
88 | 2CF53FAD1F324703001C3D0A /* YFMoreViewControllerUITests */,
89 | 2CF53F8C1F324703001C3D0A /* Products */,
90 | );
91 | sourceTree = "";
92 | };
93 | 2CF53F8C1F324703001C3D0A /* Products */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 2CF53F8B1F324703001C3D0A /* YFMoreViewController.app */,
97 | 2CF53F9F1F324703001C3D0A /* YFMoreViewControllerTests.xctest */,
98 | 2CF53FAA1F324703001C3D0A /* YFMoreViewControllerUITests.xctest */,
99 | );
100 | name = Products;
101 | sourceTree = "";
102 | };
103 | 2CF53F8D1F324703001C3D0A /* YFMoreViewController */ = {
104 | isa = PBXGroup;
105 | children = (
106 | 2CF53FBC1F324728001C3D0A /* Sources */,
107 | 2CF53F8E1F324703001C3D0A /* AppDelegate.swift */,
108 | 2CF53F901F324703001C3D0A /* ViewController.swift */,
109 | 2CF53F921F324703001C3D0A /* Main.storyboard */,
110 | 2CF53F951F324703001C3D0A /* Assets.xcassets */,
111 | 2CF53F971F324703001C3D0A /* LaunchScreen.storyboard */,
112 | 2CF53F9A1F324703001C3D0A /* Info.plist */,
113 | );
114 | path = YFMoreViewController;
115 | sourceTree = "";
116 | };
117 | 2CF53FA21F324703001C3D0A /* YFMoreViewControllerTests */ = {
118 | isa = PBXGroup;
119 | children = (
120 | 2CF53FA31F324703001C3D0A /* YFMoreViewControllerTests.swift */,
121 | 2CF53FA51F324703001C3D0A /* Info.plist */,
122 | );
123 | path = YFMoreViewControllerTests;
124 | sourceTree = "";
125 | };
126 | 2CF53FAD1F324703001C3D0A /* YFMoreViewControllerUITests */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 2CF53FAE1F324703001C3D0A /* YFMoreViewControllerUITests.swift */,
130 | 2CF53FB01F324703001C3D0A /* Info.plist */,
131 | );
132 | path = YFMoreViewControllerUITests;
133 | sourceTree = "";
134 | };
135 | 2CF53FBC1F324728001C3D0A /* Sources */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 2CF53FBD1F324758001C3D0A /* YFMoreItemView.swift */,
139 | 2CF53FBF1F324799001C3D0A /* YFMoreViewDelegate.swift */,
140 | 2CF53FC11F324820001C3D0A /* YFMoreViewController.swift */,
141 | );
142 | path = Sources;
143 | sourceTree = "";
144 | };
145 | /* End PBXGroup section */
146 |
147 | /* Begin PBXNativeTarget section */
148 | 2CF53F8A1F324703001C3D0A /* YFMoreViewController */ = {
149 | isa = PBXNativeTarget;
150 | buildConfigurationList = 2CF53FB31F324703001C3D0A /* Build configuration list for PBXNativeTarget "YFMoreViewController" */;
151 | buildPhases = (
152 | 2CF53F871F324703001C3D0A /* Sources */,
153 | 2CF53F881F324703001C3D0A /* Frameworks */,
154 | 2CF53F891F324703001C3D0A /* Resources */,
155 | );
156 | buildRules = (
157 | );
158 | dependencies = (
159 | );
160 | name = YFMoreViewController;
161 | productName = YFMoreViewController;
162 | productReference = 2CF53F8B1F324703001C3D0A /* YFMoreViewController.app */;
163 | productType = "com.apple.product-type.application";
164 | };
165 | 2CF53F9E1F324703001C3D0A /* YFMoreViewControllerTests */ = {
166 | isa = PBXNativeTarget;
167 | buildConfigurationList = 2CF53FB61F324703001C3D0A /* Build configuration list for PBXNativeTarget "YFMoreViewControllerTests" */;
168 | buildPhases = (
169 | 2CF53F9B1F324703001C3D0A /* Sources */,
170 | 2CF53F9C1F324703001C3D0A /* Frameworks */,
171 | 2CF53F9D1F324703001C3D0A /* Resources */,
172 | );
173 | buildRules = (
174 | );
175 | dependencies = (
176 | 2CF53FA11F324703001C3D0A /* PBXTargetDependency */,
177 | );
178 | name = YFMoreViewControllerTests;
179 | productName = YFMoreViewControllerTests;
180 | productReference = 2CF53F9F1F324703001C3D0A /* YFMoreViewControllerTests.xctest */;
181 | productType = "com.apple.product-type.bundle.unit-test";
182 | };
183 | 2CF53FA91F324703001C3D0A /* YFMoreViewControllerUITests */ = {
184 | isa = PBXNativeTarget;
185 | buildConfigurationList = 2CF53FB91F324703001C3D0A /* Build configuration list for PBXNativeTarget "YFMoreViewControllerUITests" */;
186 | buildPhases = (
187 | 2CF53FA61F324703001C3D0A /* Sources */,
188 | 2CF53FA71F324703001C3D0A /* Frameworks */,
189 | 2CF53FA81F324703001C3D0A /* Resources */,
190 | );
191 | buildRules = (
192 | );
193 | dependencies = (
194 | 2CF53FAC1F324703001C3D0A /* PBXTargetDependency */,
195 | );
196 | name = YFMoreViewControllerUITests;
197 | productName = YFMoreViewControllerUITests;
198 | productReference = 2CF53FAA1F324703001C3D0A /* YFMoreViewControllerUITests.xctest */;
199 | productType = "com.apple.product-type.bundle.ui-testing";
200 | };
201 | /* End PBXNativeTarget section */
202 |
203 | /* Begin PBXProject section */
204 | 2CF53F831F324703001C3D0A /* Project object */ = {
205 | isa = PBXProject;
206 | attributes = {
207 | LastSwiftUpdateCheck = 0900;
208 | LastUpgradeCheck = 0900;
209 | ORGANIZATIONNAME = "Suzhou Coryphaei Information&Technology Co., Ltd";
210 | TargetAttributes = {
211 | 2CF53F8A1F324703001C3D0A = {
212 | CreatedOnToolsVersion = 9.0;
213 | };
214 | 2CF53F9E1F324703001C3D0A = {
215 | CreatedOnToolsVersion = 9.0;
216 | TestTargetID = 2CF53F8A1F324703001C3D0A;
217 | };
218 | 2CF53FA91F324703001C3D0A = {
219 | CreatedOnToolsVersion = 9.0;
220 | TestTargetID = 2CF53F8A1F324703001C3D0A;
221 | };
222 | };
223 | };
224 | buildConfigurationList = 2CF53F861F324703001C3D0A /* Build configuration list for PBXProject "YFMoreViewController" */;
225 | compatibilityVersion = "Xcode 8.0";
226 | developmentRegion = en;
227 | hasScannedForEncodings = 0;
228 | knownRegions = (
229 | en,
230 | Base,
231 | );
232 | mainGroup = 2CF53F821F324703001C3D0A;
233 | productRefGroup = 2CF53F8C1F324703001C3D0A /* Products */;
234 | projectDirPath = "";
235 | projectRoot = "";
236 | targets = (
237 | 2CF53F8A1F324703001C3D0A /* YFMoreViewController */,
238 | 2CF53F9E1F324703001C3D0A /* YFMoreViewControllerTests */,
239 | 2CF53FA91F324703001C3D0A /* YFMoreViewControllerUITests */,
240 | );
241 | };
242 | /* End PBXProject section */
243 |
244 | /* Begin PBXResourcesBuildPhase section */
245 | 2CF53F891F324703001C3D0A /* Resources */ = {
246 | isa = PBXResourcesBuildPhase;
247 | buildActionMask = 2147483647;
248 | files = (
249 | 2CF53F991F324703001C3D0A /* LaunchScreen.storyboard in Resources */,
250 | 2CF53F961F324703001C3D0A /* Assets.xcassets in Resources */,
251 | 2CF53F941F324703001C3D0A /* Main.storyboard in Resources */,
252 | );
253 | runOnlyForDeploymentPostprocessing = 0;
254 | };
255 | 2CF53F9D1F324703001C3D0A /* Resources */ = {
256 | isa = PBXResourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | 2CF53FA81F324703001C3D0A /* Resources */ = {
263 | isa = PBXResourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | );
267 | runOnlyForDeploymentPostprocessing = 0;
268 | };
269 | /* End PBXResourcesBuildPhase section */
270 |
271 | /* Begin PBXSourcesBuildPhase section */
272 | 2CF53F871F324703001C3D0A /* Sources */ = {
273 | isa = PBXSourcesBuildPhase;
274 | buildActionMask = 2147483647;
275 | files = (
276 | 2CF53FBE1F324758001C3D0A /* YFMoreItemView.swift in Sources */,
277 | 2CF53F911F324703001C3D0A /* ViewController.swift in Sources */,
278 | 2CF53F8F1F324703001C3D0A /* AppDelegate.swift in Sources */,
279 | 2CF53FC01F324799001C3D0A /* YFMoreViewDelegate.swift in Sources */,
280 | 2CF53FC21F324820001C3D0A /* YFMoreViewController.swift in Sources */,
281 | );
282 | runOnlyForDeploymentPostprocessing = 0;
283 | };
284 | 2CF53F9B1F324703001C3D0A /* Sources */ = {
285 | isa = PBXSourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 2CF53FA41F324703001C3D0A /* YFMoreViewControllerTests.swift in Sources */,
289 | );
290 | runOnlyForDeploymentPostprocessing = 0;
291 | };
292 | 2CF53FA61F324703001C3D0A /* Sources */ = {
293 | isa = PBXSourcesBuildPhase;
294 | buildActionMask = 2147483647;
295 | files = (
296 | 2CF53FAF1F324703001C3D0A /* YFMoreViewControllerUITests.swift in Sources */,
297 | );
298 | runOnlyForDeploymentPostprocessing = 0;
299 | };
300 | /* End PBXSourcesBuildPhase section */
301 |
302 | /* Begin PBXTargetDependency section */
303 | 2CF53FA11F324703001C3D0A /* PBXTargetDependency */ = {
304 | isa = PBXTargetDependency;
305 | target = 2CF53F8A1F324703001C3D0A /* YFMoreViewController */;
306 | targetProxy = 2CF53FA01F324703001C3D0A /* PBXContainerItemProxy */;
307 | };
308 | 2CF53FAC1F324703001C3D0A /* PBXTargetDependency */ = {
309 | isa = PBXTargetDependency;
310 | target = 2CF53F8A1F324703001C3D0A /* YFMoreViewController */;
311 | targetProxy = 2CF53FAB1F324703001C3D0A /* PBXContainerItemProxy */;
312 | };
313 | /* End PBXTargetDependency section */
314 |
315 | /* Begin PBXVariantGroup section */
316 | 2CF53F921F324703001C3D0A /* Main.storyboard */ = {
317 | isa = PBXVariantGroup;
318 | children = (
319 | 2CF53F931F324703001C3D0A /* Base */,
320 | );
321 | name = Main.storyboard;
322 | sourceTree = "";
323 | };
324 | 2CF53F971F324703001C3D0A /* LaunchScreen.storyboard */ = {
325 | isa = PBXVariantGroup;
326 | children = (
327 | 2CF53F981F324703001C3D0A /* Base */,
328 | );
329 | name = LaunchScreen.storyboard;
330 | sourceTree = "";
331 | };
332 | /* End PBXVariantGroup section */
333 |
334 | /* Begin XCBuildConfiguration section */
335 | 2CF53FB11F324703001C3D0A /* Debug */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | ALWAYS_SEARCH_USER_PATHS = NO;
339 | CLANG_ANALYZER_NONNULL = YES;
340 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
342 | CLANG_CXX_LIBRARY = "libc++";
343 | CLANG_ENABLE_MODULES = YES;
344 | CLANG_ENABLE_OBJC_ARC = YES;
345 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
346 | CLANG_WARN_BOOL_CONVERSION = YES;
347 | CLANG_WARN_COMMA = YES;
348 | CLANG_WARN_CONSTANT_CONVERSION = YES;
349 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
350 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
351 | CLANG_WARN_EMPTY_BODY = YES;
352 | CLANG_WARN_ENUM_CONVERSION = YES;
353 | CLANG_WARN_INFINITE_RECURSION = YES;
354 | CLANG_WARN_INT_CONVERSION = YES;
355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
357 | CLANG_WARN_STRICT_PROTOTYPES = YES;
358 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
359 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
360 | CLANG_WARN_UNREACHABLE_CODE = YES;
361 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
362 | CODE_SIGN_IDENTITY = "iPhone Developer";
363 | COPY_PHASE_STRIP = NO;
364 | DEBUG_INFORMATION_FORMAT = dwarf;
365 | ENABLE_STRICT_OBJC_MSGSEND = YES;
366 | ENABLE_TESTABILITY = YES;
367 | GCC_C_LANGUAGE_STANDARD = gnu11;
368 | GCC_DYNAMIC_NO_PIC = NO;
369 | GCC_NO_COMMON_BLOCKS = YES;
370 | GCC_OPTIMIZATION_LEVEL = 0;
371 | GCC_PREPROCESSOR_DEFINITIONS = (
372 | "DEBUG=1",
373 | "$(inherited)",
374 | );
375 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
376 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
377 | GCC_WARN_UNDECLARED_SELECTOR = YES;
378 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
379 | GCC_WARN_UNUSED_FUNCTION = YES;
380 | GCC_WARN_UNUSED_VARIABLE = YES;
381 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
382 | MTL_ENABLE_DEBUG_INFO = YES;
383 | ONLY_ACTIVE_ARCH = YES;
384 | SDKROOT = iphoneos;
385 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
386 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
387 | };
388 | name = Debug;
389 | };
390 | 2CF53FB21F324703001C3D0A /* Release */ = {
391 | isa = XCBuildConfiguration;
392 | buildSettings = {
393 | ALWAYS_SEARCH_USER_PATHS = NO;
394 | CLANG_ANALYZER_NONNULL = YES;
395 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
397 | CLANG_CXX_LIBRARY = "libc++";
398 | CLANG_ENABLE_MODULES = YES;
399 | CLANG_ENABLE_OBJC_ARC = YES;
400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
401 | CLANG_WARN_BOOL_CONVERSION = YES;
402 | CLANG_WARN_COMMA = YES;
403 | CLANG_WARN_CONSTANT_CONVERSION = YES;
404 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
405 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
406 | CLANG_WARN_EMPTY_BODY = YES;
407 | CLANG_WARN_ENUM_CONVERSION = YES;
408 | CLANG_WARN_INFINITE_RECURSION = YES;
409 | CLANG_WARN_INT_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
415 | CLANG_WARN_UNREACHABLE_CODE = YES;
416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
417 | CODE_SIGN_IDENTITY = "iPhone Developer";
418 | COPY_PHASE_STRIP = NO;
419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
420 | ENABLE_NS_ASSERTIONS = NO;
421 | ENABLE_STRICT_OBJC_MSGSEND = YES;
422 | GCC_C_LANGUAGE_STANDARD = gnu11;
423 | GCC_NO_COMMON_BLOCKS = YES;
424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
426 | GCC_WARN_UNDECLARED_SELECTOR = YES;
427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
428 | GCC_WARN_UNUSED_FUNCTION = YES;
429 | GCC_WARN_UNUSED_VARIABLE = YES;
430 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
431 | MTL_ENABLE_DEBUG_INFO = NO;
432 | SDKROOT = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | VALIDATE_PRODUCT = YES;
435 | };
436 | name = Release;
437 | };
438 | 2CF53FB41F324703001C3D0A /* Debug */ = {
439 | isa = XCBuildConfiguration;
440 | buildSettings = {
441 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
442 | DEVELOPMENT_TEAM = 3WTM5PLDUE;
443 | INFOPLIST_FILE = YFMoreViewController/Info.plist;
444 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
445 | PRODUCT_BUNDLE_IDENTIFIER = com.coryphaei.YFMoreViewController;
446 | PRODUCT_NAME = "$(TARGET_NAME)";
447 | SWIFT_VERSION = 4.2;
448 | TARGETED_DEVICE_FAMILY = "1,2";
449 | };
450 | name = Debug;
451 | };
452 | 2CF53FB51F324703001C3D0A /* Release */ = {
453 | isa = XCBuildConfiguration;
454 | buildSettings = {
455 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
456 | DEVELOPMENT_TEAM = 3WTM5PLDUE;
457 | INFOPLIST_FILE = YFMoreViewController/Info.plist;
458 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
459 | PRODUCT_BUNDLE_IDENTIFIER = com.coryphaei.YFMoreViewController;
460 | PRODUCT_NAME = "$(TARGET_NAME)";
461 | SWIFT_VERSION = 4.2;
462 | TARGETED_DEVICE_FAMILY = "1,2";
463 | };
464 | name = Release;
465 | };
466 | 2CF53FB71F324703001C3D0A /* Debug */ = {
467 | isa = XCBuildConfiguration;
468 | buildSettings = {
469 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
470 | BUNDLE_LOADER = "$(TEST_HOST)";
471 | DEVELOPMENT_TEAM = 3WTM5PLDUE;
472 | INFOPLIST_FILE = YFMoreViewControllerTests/Info.plist;
473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
474 | PRODUCT_BUNDLE_IDENTIFIER = com.coryphaei.YFMoreViewControllerTests;
475 | PRODUCT_NAME = "$(TARGET_NAME)";
476 | SWIFT_VERSION = 4.0;
477 | TARGETED_DEVICE_FAMILY = "1,2";
478 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YFMoreViewController.app/YFMoreViewController";
479 | };
480 | name = Debug;
481 | };
482 | 2CF53FB81F324703001C3D0A /* Release */ = {
483 | isa = XCBuildConfiguration;
484 | buildSettings = {
485 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
486 | BUNDLE_LOADER = "$(TEST_HOST)";
487 | DEVELOPMENT_TEAM = 3WTM5PLDUE;
488 | INFOPLIST_FILE = YFMoreViewControllerTests/Info.plist;
489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
490 | PRODUCT_BUNDLE_IDENTIFIER = com.coryphaei.YFMoreViewControllerTests;
491 | PRODUCT_NAME = "$(TARGET_NAME)";
492 | SWIFT_VERSION = 4.0;
493 | TARGETED_DEVICE_FAMILY = "1,2";
494 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YFMoreViewController.app/YFMoreViewController";
495 | };
496 | name = Release;
497 | };
498 | 2CF53FBA1F324703001C3D0A /* Debug */ = {
499 | isa = XCBuildConfiguration;
500 | buildSettings = {
501 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
502 | DEVELOPMENT_TEAM = 3WTM5PLDUE;
503 | INFOPLIST_FILE = YFMoreViewControllerUITests/Info.plist;
504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
505 | PRODUCT_BUNDLE_IDENTIFIER = com.coryphaei.YFMoreViewControllerUITests;
506 | PRODUCT_NAME = "$(TARGET_NAME)";
507 | SWIFT_VERSION = 4.0;
508 | TARGETED_DEVICE_FAMILY = "1,2";
509 | TEST_TARGET_NAME = YFMoreViewController;
510 | };
511 | name = Debug;
512 | };
513 | 2CF53FBB1F324703001C3D0A /* Release */ = {
514 | isa = XCBuildConfiguration;
515 | buildSettings = {
516 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
517 | DEVELOPMENT_TEAM = 3WTM5PLDUE;
518 | INFOPLIST_FILE = YFMoreViewControllerUITests/Info.plist;
519 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
520 | PRODUCT_BUNDLE_IDENTIFIER = com.coryphaei.YFMoreViewControllerUITests;
521 | PRODUCT_NAME = "$(TARGET_NAME)";
522 | SWIFT_VERSION = 4.0;
523 | TARGETED_DEVICE_FAMILY = "1,2";
524 | TEST_TARGET_NAME = YFMoreViewController;
525 | };
526 | name = Release;
527 | };
528 | /* End XCBuildConfiguration section */
529 |
530 | /* Begin XCConfigurationList section */
531 | 2CF53F861F324703001C3D0A /* Build configuration list for PBXProject "YFMoreViewController" */ = {
532 | isa = XCConfigurationList;
533 | buildConfigurations = (
534 | 2CF53FB11F324703001C3D0A /* Debug */,
535 | 2CF53FB21F324703001C3D0A /* Release */,
536 | );
537 | defaultConfigurationIsVisible = 0;
538 | defaultConfigurationName = Release;
539 | };
540 | 2CF53FB31F324703001C3D0A /* Build configuration list for PBXNativeTarget "YFMoreViewController" */ = {
541 | isa = XCConfigurationList;
542 | buildConfigurations = (
543 | 2CF53FB41F324703001C3D0A /* Debug */,
544 | 2CF53FB51F324703001C3D0A /* Release */,
545 | );
546 | defaultConfigurationIsVisible = 0;
547 | defaultConfigurationName = Release;
548 | };
549 | 2CF53FB61F324703001C3D0A /* Build configuration list for PBXNativeTarget "YFMoreViewControllerTests" */ = {
550 | isa = XCConfigurationList;
551 | buildConfigurations = (
552 | 2CF53FB71F324703001C3D0A /* Debug */,
553 | 2CF53FB81F324703001C3D0A /* Release */,
554 | );
555 | defaultConfigurationIsVisible = 0;
556 | defaultConfigurationName = Release;
557 | };
558 | 2CF53FB91F324703001C3D0A /* Build configuration list for PBXNativeTarget "YFMoreViewControllerUITests" */ = {
559 | isa = XCConfigurationList;
560 | buildConfigurations = (
561 | 2CF53FBA1F324703001C3D0A /* Debug */,
562 | 2CF53FBB1F324703001C3D0A /* Release */,
563 | );
564 | defaultConfigurationIsVisible = 0;
565 | defaultConfigurationName = Release;
566 | };
567 | /* End XCConfigurationList section */
568 | };
569 | rootObject = 2CF53F831F324703001C3D0A /* Project object */;
570 | }
571 |
--------------------------------------------------------------------------------
/YFMoreViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/YFMoreViewController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/YFMoreViewController/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // YFMoreViewController
4 | //
5 | // Created by 叶帆 on 2017/8/3.
6 | // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-Spotlight-40.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-60.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-Small@2x.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-Small@3x.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-Spotlight-40@2x.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-Spotlight-40@3x.png",
37 | "scale" : "3x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-60@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-60@3x.png",
49 | "scale" : "3x"
50 | },
51 | {
52 | "size" : "1024x1024",
53 | "idiom" : "ios-marketing",
54 | "filename" : "Logo.png",
55 | "scale" : "1x"
56 | }
57 | ],
58 | "info" : {
59 | "version" : 1,
60 | "author" : "xcode"
61 | }
62 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-60.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/AppIcon.appiconset/Logo.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/Pocket.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Pocket@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "Pocket@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/Pocket.imageset/Pocket@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/Pocket.imageset/Pocket@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/Pocket.imageset/Pocket@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/Pocket.imageset/Pocket@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/QQ.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "QQ@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "QQ@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/QQ.imageset/QQ@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/QQ.imageset/QQ@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/QQ.imageset/QQ@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/QQ.imageset/QQ@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/copy.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "copy@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "copy@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/copy.imageset/copy@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/copy.imageset/copy@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/copy.imageset/copy@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/copy.imageset/copy@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/evernote.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "evernote@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "evernote@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/evernote.imageset/evernote@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/evernote.imageset/evernote@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/evernote.imageset/evernote@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/evernote.imageset/evernote@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/moments.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "moments@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "moments@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/moments.imageset/moments@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/moments.imageset/moments@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/moments.imageset/moments@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/moments.imageset/moments@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/refresh.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "refresh@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "refresh@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/refresh.imageset/refresh@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/refresh.imageset/refresh@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/refresh.imageset/refresh@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/refresh.imageset/refresh@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/safari.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "safari@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "safari@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/safari.imageset/safari@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/safari.imageset/safari@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/safari.imageset/safari@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/safari.imageset/safari@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/search.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "search@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "search@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/search.imageset/search@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/search.imageset/search@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/search.imageset/search@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/search.imageset/search@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/wechat.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "wechat@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "wechat@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/wechat.imageset/wechat@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/wechat.imageset/wechat@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/wechat.imageset/wechat@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/wechat.imageset/wechat@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/weibo.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "weibo@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "weibo@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/weibo.imageset/weibo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/weibo.imageset/weibo@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/weibo.imageset/weibo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/weibo.imageset/weibo@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/youdao.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "youdao@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "youdao@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/youdao.imageset/youdao@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/youdao.imageset/youdao@2x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Assets.xcassets/youdao.imageset/youdao@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yeziahehe/YFMoreViewController/01f73994458635d51e517b39181fa3639687865e/YFMoreViewController/Assets.xcassets/youdao.imageset/youdao@3x.png
--------------------------------------------------------------------------------
/YFMoreViewController/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/YFMoreViewController/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/YFMoreViewController/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSAppTransportSecurity
24 |
25 | NSAllowsArbitraryLoads
26 |
27 |
28 | UILaunchStoryboardName
29 | LaunchScreen
30 | UIMainStoryboardFile
31 | Main
32 | UIRequiredDeviceCapabilities
33 |
34 | armv7
35 |
36 | UISupportedInterfaceOrientations
37 |
38 | UIInterfaceOrientationPortrait
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationPortraitUpsideDown
46 | UIInterfaceOrientationLandscapeLeft
47 | UIInterfaceOrientationLandscapeRight
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/YFMoreViewController/Sources/YFMoreItemView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YFMoreItemView.swift
3 | // YFMoreViewController
4 | //
5 | // Created by 叶帆 on 2017/8/3.
6 | // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class YFMoreItemView: UIButton {
12 |
13 | var itemType: YFMoreItemType!
14 | var itemTag: String!
15 |
16 | public override init(frame: CGRect) {
17 | super.init(frame: frame)
18 | titleLabel?.numberOfLines = 0
19 | imageView?.backgroundColor = UIColor.clear
20 | contentEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
21 | }
22 |
23 | public required init?(coder aDecoder: NSCoder) {
24 | super.init(coder: aDecoder)
25 | titleLabel?.numberOfLines = 0
26 | imageView?.backgroundColor = UIColor.clear
27 | contentEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
28 | }
29 |
30 | public override func sizeThatFits(_ size: CGSize) -> CGSize {
31 |
32 | var size = size
33 |
34 | if self.bounds.size == size {
35 | size = CGSize.init(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude)
36 | }
37 |
38 | var resultSize = CGSize.zero
39 | let contentLimitSize = size
40 |
41 | let imageLimitWidth = contentLimitSize.width - imageEdgeInsets.top - imageEdgeInsets.bottom
42 | let imageSize = imageView!.sizeThatFits(CGSize(width: imageLimitWidth, height: CGFloat.greatestFiniteMagnitude))
43 |
44 | let titleLimitSize = CGSize(width: contentLimitSize.width - titleEdgeInsets.top - titleEdgeInsets.bottom, height: contentLimitSize.height - imageEdgeInsets.top - imageEdgeInsets.bottom - imageSize.height - titleEdgeInsets.top - titleEdgeInsets.bottom)
45 | var titleSize = titleLabel!.sizeThatFits(titleLimitSize)
46 | titleSize.height = fmin(titleSize.height, titleLimitSize.height)
47 |
48 | resultSize.width = fmax(imageEdgeInsets.left + imageEdgeInsets.right + imageSize.width, titleEdgeInsets.left + titleEdgeInsets.right + titleSize.width)
49 | resultSize.height = imageEdgeInsets.top + imageEdgeInsets.bottom + imageSize.height + titleEdgeInsets.top + titleEdgeInsets.bottom + titleSize.height
50 |
51 | return resultSize
52 | }
53 |
54 | public override func layoutSubviews() {
55 | super.layoutSubviews()
56 |
57 | if bounds.isEmpty {
58 | return
59 | }
60 |
61 | let contentSize = bounds.size
62 |
63 | let imageLimitWidth = contentSize.width - imageEdgeInsets.top - imageEdgeInsets.bottom
64 | let imageSize = imageView!.sizeThatFits(CGSize(width: imageLimitWidth, height: CGFloat.greatestFiniteMagnitude))
65 | var imageFrame = CGRect(x: 0, y: 0, width: imageSize.width, height: imageSize.height)
66 |
67 |
68 | let titleLimitSize = CGSize(width: contentSize.width - titleEdgeInsets.left - titleEdgeInsets.right, height: contentSize.height - imageEdgeInsets.top - imageEdgeInsets.bottom - imageSize.height - titleEdgeInsets.top - titleEdgeInsets.bottom)
69 | var titleSize = titleLabel!.sizeThatFits(titleLimitSize)
70 | titleSize.height = fmin(titleSize.height, titleLimitSize.height)
71 | var titleFrame = CGRect(x: 0, y: 0, width: titleSize.width, height: titleSize.height)
72 |
73 | imageFrame.origin.x = imageEdgeInsets.left + (imageLimitWidth - imageSize.width)/2
74 | titleFrame.origin.x = titleEdgeInsets.left + (titleLimitSize.width - titleSize.width)/2
75 |
76 | let contentHeight = imageFrame.height + imageEdgeInsets.top + imageEdgeInsets.bottom + titleFrame.height + titleEdgeInsets.top + titleEdgeInsets.bottom
77 | let minY = (contentSize.height - contentHeight)/2
78 | imageFrame.origin.y = minY + imageEdgeInsets.top
79 | titleFrame.origin.y = imageFrame.maxY + imageEdgeInsets.bottom + titleEdgeInsets.top
80 |
81 | imageView?.frame = imageFrame
82 | titleLabel?.frame = titleFrame
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/YFMoreViewController/Sources/YFMoreViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YFMoreViewController.swift
3 | // YFMoreViewController
4 | //
5 | // Created by 叶帆 on 2017/8/3.
6 | // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | import Foundation
12 |
13 | public enum YFMoreItemType {
14 | case important // 将item放在第一行显示
15 | case normal // 将item放在第二行显示
16 | }
17 |
18 | public class YFMoreViewController: UIViewController {
19 |
20 | var importantItems: [YFMoreItemView] = []
21 | var normalItems: [YFMoreItemView] = []
22 | public weak var delegate: YFMoreViewDelegate?
23 |
24 | var previousKeyWindow: UIWindow?
25 | var containerWindow: UIWindow?
26 |
27 | fileprivate var maskView: UIControl = {
28 | let maskView = UIControl.init()
29 | maskView.alpha = 0
30 | maskView.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.35)
31 | maskView.addTarget(self, action: #selector(handleMaskControlEvent), for: .touchUpInside)
32 | return maskView
33 | }()
34 |
35 | fileprivate var infoView: UILabel = {
36 | let infoView = UILabel.init()
37 | infoView.isHidden = true
38 | infoView.textColor = UIColor(red: 136/255, green: 136/255, blue: 136/255, alpha: 1)
39 | infoView.backgroundColor = UIColor.clear
40 | infoView.font = UIFont.systemFont(ofSize: 12)
41 | infoView.textAlignment = .center
42 | return infoView
43 | }()
44 |
45 | fileprivate var contentView: UIView = {
46 | let contentView = UIView.init()
47 | contentView.clipsToBounds = true
48 | contentView.backgroundColor = UIColor(red: 246/255, green: 246/255, blue: 246/255, alpha: 1)
49 | return contentView
50 | }()
51 |
52 | fileprivate var containerView: UIView = {
53 | let containerView = UIView.init()
54 | containerView.clipsToBounds = true
55 | containerView.backgroundColor = UIColor.white
56 | return containerView
57 | }()
58 |
59 | fileprivate var importantItemsScrollView: UIScrollView = {
60 | let importantItemsScrollView = UIScrollView.init()
61 | importantItemsScrollView.showsVerticalScrollIndicator = false
62 | importantItemsScrollView.showsHorizontalScrollIndicator = false
63 | return importantItemsScrollView
64 | }()
65 |
66 | fileprivate var normalItemsScrollView: UIScrollView = {
67 | let normalItemsScrollView = UIScrollView.init()
68 | normalItemsScrollView.showsVerticalScrollIndicator = false
69 | normalItemsScrollView.showsHorizontalScrollIndicator = false
70 | normalItemsScrollView.isHidden = true
71 | return normalItemsScrollView
72 | }()
73 |
74 | fileprivate var scrollViewDividingLayer: CALayer = {
75 | let scrollViewDividingLayer = CALayer.init()
76 | scrollViewDividingLayer.isHidden = true
77 | scrollViewDividingLayer.backgroundColor = UIColor(red: 229/255, green: 229/255, blue: 229/255, alpha: 1).cgColor
78 | return scrollViewDividingLayer
79 | }()
80 |
81 | fileprivate var cancelButton: UIButton = {
82 | let cancelButton = UIButton.init()
83 | cancelButton.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
84 | cancelButton.backgroundColor = UIColor.white
85 | cancelButton.setTitle("取消", for: .normal)
86 | cancelButton.setTitleColor(UIColor(red: 34/255, green: 34/255, blue: 34/255, alpha: 1), for: .normal)
87 | cancelButton.setTitleColor(UIColor(red: 34/255, green: 34/255, blue: 34/255, alpha: 0.5), for: .highlighted)
88 | cancelButton.addTarget(self, action: #selector(handleCancelButtonEvent), for: .touchUpInside)
89 | return cancelButton
90 | }()
91 |
92 | fileprivate var cancelButtonDividingLayer: CALayer = {
93 | let cancelButtonDividingLayer = CALayer.init()
94 | cancelButtonDividingLayer.backgroundColor = UIColor.clear.cgColor
95 | return cancelButtonDividingLayer
96 | }()
97 |
98 | deinit {
99 | print("deinit YFMoreViewController")
100 | }
101 |
102 | public override func viewDidLoad() {
103 | super.viewDidLoad()
104 |
105 | view.addSubview(maskView)
106 | view.addSubview(containerView)
107 | containerView.addSubview(contentView)
108 | contentView.layer.addSublayer(scrollViewDividingLayer)
109 | contentView.addSubview(infoView)
110 | contentView.addSubview(importantItemsScrollView)
111 | contentView.addSubview(normalItemsScrollView)
112 | containerView.addSubview(cancelButton)
113 | containerView.layer.addSublayer(cancelButtonDividingLayer)
114 | }
115 |
116 | override public var preferredStatusBarStyle: UIStatusBarStyle {
117 | return UIApplication.shared.statusBarStyle
118 | }
119 |
120 | public override func viewDidLayoutSubviews() {
121 | super.viewDidLayoutSubviews()
122 |
123 | var iPhoneX: Bool {
124 | return UIScreen.main.nativeBounds.height == 2436
125 | }
126 |
127 | maskView.frame = view.bounds
128 |
129 | var layoutOriginY: CGFloat = 0
130 | let contentWidth: CGFloat = view.frame.width
131 |
132 | if infoView.isHidden == false {
133 | infoView.frame = CGRect(x: 0, y: layoutOriginY, width: contentWidth, height: 30)
134 | layoutOriginY = infoView.frame.maxY
135 | }
136 |
137 | let itemWidth: CGFloat = 72
138 | let scrollViewInsets: UIEdgeInsets = UIEdgeInsets(top: 10, left: 9, bottom: 12, right: 9)
139 | var itemMaxHeight: CGFloat = 0
140 | var itemMaxX: CGFloat = 0
141 |
142 | if importantItems.count > 0 {
143 | importantItemsScrollView.isHidden = false
144 | for itemView in importantItems {
145 | itemView.sizeToFit()
146 | itemView.frame = CGRect(x: itemWidth * CGFloat(importantItems.index(of: itemView)!), y: 0, width: itemWidth, height: itemView.bounds.height)
147 | itemMaxX = itemView.frame.maxX
148 | if itemView.bounds.height > itemMaxHeight {
149 | itemMaxHeight = itemView.bounds.height
150 | }
151 | }
152 | importantItemsScrollView.contentSize = CGSize(width: itemMaxX, height: itemMaxHeight)
153 | importantItemsScrollView.contentInset = scrollViewInsets
154 | importantItemsScrollView.contentOffset = CGPoint(x: -importantItemsScrollView.contentInset.left, y: -importantItemsScrollView.contentInset.top)
155 | importantItemsScrollView.frame = CGRect(x: 0, y: layoutOriginY, width: contentWidth, height: importantItemsScrollView.contentInset.top + importantItemsScrollView.contentSize.height + importantItemsScrollView.contentInset.bottom)
156 | layoutOriginY = importantItemsScrollView.frame.maxY
157 | } else {
158 | importantItemsScrollView.isHidden = true
159 | }
160 |
161 | itemMaxHeight = 0
162 | itemMaxX = 0
163 |
164 | if normalItems.count > 0 {
165 | normalItemsScrollView.isHidden = false
166 | scrollViewDividingLayer.isHidden = importantItems.isEmpty
167 | scrollViewDividingLayer.frame = CGRect(x: 15, y: layoutOriginY, width: contentWidth, height: 1/UIScreen.main.scale)
168 | layoutOriginY = scrollViewDividingLayer.frame.maxY
169 | for itemView in normalItems {
170 | itemView.sizeToFit()
171 | itemView.frame = CGRect(x: itemWidth * CGFloat(normalItems.index(of: itemView)!), y: 0, width: itemWidth, height: itemView.bounds.height)
172 | itemMaxX = itemView.frame.maxX
173 | if itemView.bounds.height > itemMaxHeight {
174 | itemMaxHeight = itemView.bounds.height
175 | }
176 | }
177 | normalItemsScrollView.contentSize = CGSize(width: itemMaxX, height: itemMaxHeight)
178 | normalItemsScrollView.contentInset = scrollViewInsets
179 | normalItemsScrollView.contentOffset = CGPoint(x: -normalItemsScrollView.contentInset.left, y: -normalItemsScrollView.contentInset.top)
180 | normalItemsScrollView.frame = CGRect(x: 0, y: layoutOriginY, width: contentWidth, height: normalItemsScrollView.contentInset.top + normalItemsScrollView.contentSize.height + normalItemsScrollView.contentInset.bottom)
181 | layoutOriginY = normalItemsScrollView.frame.maxY
182 | } else {
183 | normalItemsScrollView.isHidden = true
184 | scrollViewDividingLayer.isHidden = true
185 | }
186 |
187 | contentView.frame = CGRect(x: 0, y: 0, width: contentWidth, height: layoutOriginY)
188 | cancelButtonDividingLayer.frame = CGRect(x: 0, y: layoutOriginY, width: contentWidth, height: 1/UIScreen.main.scale)
189 | cancelButton.frame = CGRect(x: 0, y: cancelButtonDividingLayer.frame.minY, width: contentWidth, height: 50)
190 | containerView.frame = CGRect(x: (view.bounds.width - contentWidth)/2, y: iPhoneX ? view.bounds.height - cancelButton.frame.maxY - 20 : view.bounds.height - cancelButton.frame.maxY, width: contentWidth, height: iPhoneX ? cancelButton.frame.maxY + 20 : cancelButton.frame.maxY)
191 | }
192 | }
193 |
194 | extension YFMoreViewController {
195 |
196 | @objc fileprivate func handleMaskControlEvent() {
197 | hideToButtom()
198 | }
199 |
200 | @objc fileprivate func handleCancelButtonEvent() {
201 | hideToButtom()
202 | }
203 |
204 | @objc fileprivate func handleButtonClickEvent(_ sender: Any) {
205 | let item: YFMoreItemView = sender as! YFMoreItemView
206 | if item.superview == importantItemsScrollView {
207 | delegate?.moreview(self, didSelectItemAt: importantItems.index(of: item)!, type: .important)
208 | delegate?.moreView(self, didSelectItemAt: item.itemTag, type: .important)
209 | } else if item.superview == normalItemsScrollView {
210 | delegate?.moreview(self, didSelectItemAt: normalItems.index(of: item)!, type: .normal)
211 | delegate?.moreView(self, didSelectItemAt: item.itemTag, type: .normal)
212 | }
213 | hideToButtom()
214 | }
215 |
216 | public func showFromBottom() {
217 |
218 | previousKeyWindow = UIApplication.shared.keyWindow
219 | containerWindow = UIWindow.init()
220 | containerWindow?.backgroundColor = UIColor.clear
221 | containerWindow?.rootViewController = self
222 | containerWindow?.makeKeyAndVisible()
223 |
224 | containerView.transform = CGAffineTransform(translationX: 0, y: view.bounds.height - contentView.frame.minY)
225 | UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseOut, animations: {
226 | self.maskView.alpha = 1
227 | self.containerView.frame.origin.y = self.view.bounds.height - self.containerView.frame.height
228 | self.containerView.transform = CGAffineTransform.identity
229 | })
230 | }
231 |
232 | public func hideToButtom() {
233 |
234 | UIView.animate(withDuration: 0.25, delay: 0.1, options: .curveEaseOut, animations: {
235 | self.maskView.alpha = 0
236 | self.containerView.frame.origin.y = self.view.bounds.height
237 | }) { (complete) in
238 | if complete {
239 | if UIApplication.shared.keyWindow == self.containerWindow {
240 | self.previousKeyWindow?.makeKey()
241 | }
242 | self.containerWindow?.isHidden = true
243 | self.containerWindow?.rootViewController = nil
244 | self.previousKeyWindow = nil
245 | }
246 | }
247 |
248 | }
249 |
250 | public func addInfo(_ info: String) {
251 | infoView.isHidden = false
252 | infoView.text = info
253 | }
254 |
255 | public func addItems(title: String, selectedTitle: String, image: UIImage, selectedImage: UIImage, type: YFMoreItemType, tag: String) {
256 | let itemView: YFMoreItemView = createItem(title: title, selectedTitle: selectedTitle, image: image, selectedImage: selectedImage, type: type, tag: tag)
257 | if itemView.itemType == .important {
258 | insertItem(itemView, at: importantItems.count)
259 | } else if itemView.itemType == .normal {
260 | insertItem(itemView, at: normalItems.count)
261 | }
262 | }
263 |
264 | public func addItems(title: String, image: UIImage, type: YFMoreItemType, tag: String) {
265 | addItems(title: title, selectedTitle: title, image: image, selectedImage: image, type: type, tag: tag)
266 | }
267 |
268 | fileprivate func createItem(title: String, selectedTitle: String, image: UIImage, selectedImage: UIImage, type: YFMoreItemType, tag: String) -> YFMoreItemView {
269 | let itemView: YFMoreItemView = YFMoreItemView.init()
270 | itemView.itemType = type
271 | itemView.itemTag = tag
272 | itemView.titleLabel?.font = UIFont.systemFont(ofSize: 11)
273 | itemView.titleEdgeInsets = UIEdgeInsets(top: 8, left: 0, bottom: 0, right: 0)
274 | itemView.setImage(image, for: .normal)
275 | itemView.setImage(selectedImage, for: .selected)
276 | itemView.setTitle(title, for: .normal)
277 | itemView.setTitle(selectedTitle, for: .selected)
278 | itemView.setTitleColor(UIColor(red: 136/255, green: 136/255, blue: 136/255, alpha: 1), for: .normal)
279 | itemView.imageView?.backgroundColor = UIColor.clear
280 | itemView.addTarget(self, action: #selector(handleButtonClickEvent(_:)), for: .touchUpInside)
281 | return itemView
282 | }
283 |
284 | fileprivate func insertItem(_ itemView: YFMoreItemView, at index: Int) {
285 | if itemView.itemType == .important {
286 | importantItems.insert(itemView, at: index)
287 | importantItemsScrollView.addSubview(itemView)
288 | } else if itemView.itemType == .normal {
289 | normalItems.insert(itemView, at: index)
290 | normalItemsScrollView.addSubview(itemView)
291 | }
292 | }
293 |
294 | public func itemAtTag(_ tag: String) -> YFMoreItemView{
295 | var itemView = viewWithTag(importantItems, tag: tag)
296 |
297 | guard itemView != nil else {
298 | itemView = viewWithTag(normalItems, tag: tag)
299 | return itemView!
300 | }
301 |
302 | return itemView!
303 | }
304 |
305 | private func viewWithTag(_ array: [YFMoreItemView], tag: String) -> YFMoreItemView? {
306 | for item in array {
307 | if item.itemTag == tag {
308 | return item
309 | }
310 | }
311 | return nil
312 | }
313 | }
314 |
--------------------------------------------------------------------------------
/YFMoreViewController/Sources/YFMoreViewDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YFMoreViewDelegate.swift
3 | // YFMoreViewController
4 | //
5 | // Created by 叶帆 on 2017/8/3.
6 | // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public protocol YFMoreViewDelegate: class {
12 |
13 | func moreview(_ moreview: YFMoreViewController, didSelectItemAt index: Int, type: YFMoreItemType)
14 |
15 | func moreView(_ moreview: YFMoreViewController, didSelectItemAt tag: String, type: YFMoreItemType)
16 | }
17 |
18 | public extension YFMoreViewDelegate {
19 | func moreview(_ moreview: YFMoreViewController, didSelectItemAt index: Int, type: YFMoreItemType) {
20 |
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/YFMoreViewController/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // YFMoreViewController
4 | //
5 | // Created by 叶帆 on 2017/8/3.
6 | // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import WebKit
11 |
12 | class ViewController: UIViewController, WKNavigationDelegate {
13 |
14 | var webView: WKWebView!
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 | // Do any additional setup after loading the view, typically from a nib.
19 | let webConfiguration = WKWebViewConfiguration()
20 | webView = WKWebView.init(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height), configuration: webConfiguration)
21 | webView.sizeToFit()
22 | webView.navigationDelegate = self
23 | view.addSubview(webView)
24 |
25 | let myURL = URL(string: "http://yeziahehe.com")
26 | let myRequest = URLRequest(url: myURL!)
27 | webView.load(myRequest)
28 | }
29 |
30 | @IBAction func showMore(_ sender: Any) {
31 |
32 | let moreViewController = YFMoreViewController.init()
33 | moreViewController.delegate = self
34 |
35 | moreViewController.addInfo("此网页由 yeziahehe.com 提供")
36 | moreViewController.addItems(title: "微信", image: #imageLiteral(resourceName: "wechat"), type: .important, tag: "wechat")
37 | moreViewController.addItems(title: "朋友圈", image: #imageLiteral(resourceName: "moments"), type: .important, tag: "moments")
38 | moreViewController.addItems(title: "微博", image: #imageLiteral(resourceName: "weibo"), type: .important, tag: "weibo")
39 | moreViewController.addItems(title: "QQ", image: #imageLiteral(resourceName: "QQ"), type: .important, tag: "QQ")
40 | moreViewController.addItems(title: "印象笔记", image: #imageLiteral(resourceName: "evernote"), type: .important, tag: "evernote")
41 | moreViewController.addItems(title: "Pocket", image: #imageLiteral(resourceName: "Pocket"), type: .important, tag: "Pocket")
42 | moreViewController.addItems(title: "有道云笔记", image: #imageLiteral(resourceName: "youdao"), type: .important, tag:"youdao")
43 | moreViewController.addItems(title: "Safari打开", image: #imageLiteral(resourceName: "safari"), type: .normal, tag:"safari")
44 | moreViewController.addItems(title: "复制链接", image: #imageLiteral(resourceName: "copy"), type: .normal, tag:"copylink")
45 | moreViewController.addItems(title: "刷新", image: #imageLiteral(resourceName: "refresh"), type: .normal, tag:"refresh")
46 | moreViewController.addItems(title: "搜索页面内容", image: #imageLiteral(resourceName: "search"), type: .normal, tag:"search")
47 |
48 | moreViewController.showFromBottom()
49 | }
50 |
51 | override func didReceiveMemoryWarning() {
52 | super.didReceiveMemoryWarning()
53 | // Dispose of any resources that can be recreated.
54 | }
55 |
56 | }
57 |
58 | extension ViewController: YFMoreViewDelegate {
59 |
60 | func moreView(_ moreview: YFMoreViewController, didSelectItemAt tag: String, type: YFMoreItemType) {
61 | switch tag {
62 | case "wechat":
63 | return
64 | case "safari":
65 | UIApplication.shared.open(URL(string: "http://yeziahehe.com")!, options: [:], completionHandler: nil)
66 | print("safari")
67 | return
68 | case "copylink":
69 | return
70 | case "refresh":
71 | webView.load(URLRequest(url: URL(string: "http://yeziahehe.com")!))
72 | print("refresh")
73 | return
74 | default:
75 | return
76 | }
77 | }
78 | }
79 |
80 |
--------------------------------------------------------------------------------
/YFMoreViewControllerTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/YFMoreViewControllerTests/YFMoreViewControllerTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YFMoreViewControllerTests.swift
3 | // YFMoreViewControllerTests
4 | //
5 | // Created by 叶帆 on 2017/8/3.
6 | // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import YFMoreViewController
11 |
12 | class YFMoreViewControllerTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | // Use XCTAssert and related functions to verify your tests produce the correct results.
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measure {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/YFMoreViewControllerUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/YFMoreViewControllerUITests/YFMoreViewControllerUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YFMoreViewControllerUITests.swift
3 | // YFMoreViewControllerUITests
4 | //
5 | // Created by 叶帆 on 2017/8/3.
6 | // Copyright © 2017年 Suzhou Coryphaei Information&Technology Co., Ltd. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class YFMoreViewControllerUITests: XCTestCase {
12 |
13 | override func setUp() {
14 | super.setUp()
15 |
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 |
18 | // In UI tests it is usually best to stop immediately when a failure occurs.
19 | continueAfterFailure = false
20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
21 | XCUIApplication().launch()
22 |
23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
24 | }
25 |
26 | override func tearDown() {
27 | // Put teardown code here. This method is called after the invocation of each test method in the class.
28 | super.tearDown()
29 | }
30 |
31 | func testExample() {
32 | // Use recording to get started writing UI tests.
33 | // Use XCTAssert and related functions to verify your tests produce the correct results.
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------