├── .gitignore
├── .swift-version
├── Example
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── ContentCell.swift
├── ContentDataSource.swift
├── Info.plist
└── MainViewController.swift
├── LICENSE
├── PagingTableView.podspec
├── PagingTableView.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── README.md
├── Sources
├── Info.plist
├── PagingTableView.h
├── PagingTableView.swift
└── PagingTableViewDelegate.swift
├── Tests
├── Info.plist
└── PagingTableViewTests.swift
└── etc
├── example.gif
└── usage1.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata/
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # Bundler
23 | .bundle
24 |
25 | Carthage
26 | Podfile.lock
27 | Pods
28 |
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | echo "3.1" > .swift-version
--------------------------------------------------------------------------------
/Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Example
4 | //
5 | // Created by InJung Chung on 2017. 4. 16..
6 | // Copyright © 2017 InJung Chung. 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: [UIApplicationLaunchOptionsKey: 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 |
--------------------------------------------------------------------------------
/Example/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | }
88 | ],
89 | "info" : {
90 | "version" : 1,
91 | "author" : "xcode"
92 | }
93 | }
--------------------------------------------------------------------------------
/Example/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 |
--------------------------------------------------------------------------------
/Example/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 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/Example/ContentCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentCell.swift
3 | // PagingTableView
4 | //
5 | // Created by InJung Chung on 2017. 4. 16..
6 | // Copyright © 2017 InJung Chung. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ContentCell: UITableViewCell {
12 |
13 | @IBOutlet weak var contentLbl: UILabel!
14 |
15 | var content: String = "" {
16 | didSet {
17 | contentLbl.text = content
18 | }
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/Example/ContentDataSource.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentDataSource.swift
3 | // PagingTableView
4 | //
5 | // Created by InJung Chung on 2017. 4. 16..
6 | // Copyright © 2017 InJung Chung. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class ContentDataSource {
12 |
13 | let data = [
14 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
15 | "Morbi blandit at sapien ac convallis",
16 | "Nullam odio odio, venenatis vel placerat id, faucibus et sem",
17 | "Morbi lorem neque, lobortis sit amet ex id, maximus sodales libero",
18 | "Fusce molestie vel nunc sit amet rutrum",
19 | "Donec eleifend, neque ac pharetra varius, odio lectus condimentum erat, vel lobortis purus purus ac purus",
20 | "Curabitur venenatis urna lacus, nec tincidunt est ornare et",
21 | "Nunc gravida facilisis mi ut elementum",
22 | "Aenean ultricies cursus ex",
23 | "Vestibulum elementum diam risus, eget molestie nisl iaculis et",
24 | "Vivamus eget magna et leo efficitur facilisis",
25 | "Aenean a dapibus ligula",
26 | "In massa sapien, faucibus vestibulum est non, placerat congue lectus",
27 | "Duis ut nulla sit amet enim maximus pharetra vitae vitae elit",
28 | "Ut malesuada sit amet lorem eu aliquet",
29 | "Nunc accumsan mattis pellentesque",
30 | "Proin faucibus velit nec enim aliquam mattis",
31 | "In hac habitasse platea dictumst",
32 | "Praesent sollicitudin, turpis ut volutpat tempor, urna sapien egestas quam, vitae scelerisque tellus sem non orci",
33 | "Etiam ut tellus lacinia tellus vestibulum tempor",
34 | "Nunc ornare ultrices sapien, in gravida augue",
35 | "Quisque eget lobortis dolor, sit amet posuere nisi",
36 | "Vestibulum ipsum libero, pulvinar vulputate leo eleifend, dapibus tempor enim",
37 | "Nam bibendum dictum odio, eget vehicula elit vehicula in",
38 | "Sed a risus a erat egestas ullamcorper vitae id massa",
39 | "Morbi blandit ligula sit amet sodales efficitur",
40 | "Quisque vulputate vulputate cursus",
41 | "Quisque tristique feugiat porta",
42 | "Sed auctor erat ac elementum interdum",
43 | "In sagittis lacus nec augue laoreet, id ornare nisl auctor",
44 | "Aenean dolor diam, rhoncus id commodo nec, bibendum et risus",
45 | "Morbi porttitor velit id consectetur placerat",
46 | "Sed vehicula diam augue, ut venenatis est ullamcorper nec",
47 | "Quisque accumsan dui non metus molestie, vitae commodo mi interdum",
48 | "Nam dapibus lacinia convallis",
49 | "Morbi ornare dictum nulla, ut fringilla risus eleifend vitae"
50 | ]
51 | let numberOfItemsPerPage = 10
52 |
53 | func loadData(at page: Int, onComplete: @escaping ([String]) -> Void) {
54 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
55 | let firstIndex = page * self.numberOfItemsPerPage
56 | guard firstIndex < self.data.count else {
57 | onComplete([])
58 | return
59 | }
60 | let lastIndex = (page + 1) * self.numberOfItemsPerPage < self.data.count ?
61 | (page + 1) * self.numberOfItemsPerPage : self.data.count
62 | onComplete(Array(self.data[firstIndex ..< lastIndex]))
63 | }
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Example/MainViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Example
4 | //
5 | // Created by InJung Chung on 2017. 4. 16..
6 | // Copyright © 2017 InJung Chung. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import PagingTableView
11 |
12 | class MainViewController: UIViewController {
13 |
14 | @IBOutlet weak var contentTable: PagingTableView!
15 |
16 | let contentDataSource = ContentDataSource()
17 | var contents: [String] = []
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 | contentTable.dataSource = self
22 | contentTable.pagingDelegate = self
23 | }
24 |
25 | }
26 |
27 | extension MainViewController: UITableViewDataSource {
28 |
29 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
30 | return contents.count
31 | }
32 |
33 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
34 | let cell = tableView.dequeueReusableCell(withIdentifier: "ContentCell", for: indexPath) as! ContentCell
35 | guard contents.indices.contains(indexPath.row) else { return cell }
36 | cell.content = contents[indexPath.row]
37 | return cell
38 | }
39 |
40 | }
41 |
42 | extension MainViewController: PagingTableViewDelegate {
43 |
44 | func paginate(_ tableView: PagingTableView, to page: Int) {
45 | contentTable.isLoading = true
46 | contentDataSource.loadData(at: page) { contents in
47 | self.contents.append(contentsOf: contents)
48 | self.contentTable.isLoading = false
49 | }
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2017 mu29
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/PagingTableView.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "PagingTableView"
3 | s.version = "0.1.0"
4 | s.summary = "The simplest way to make your table view paginable"
5 | s.homepage = "https://github.com/mu29/PagingTableView"
6 |
7 | s.license = { :type => 'MIT', :file => 'LICENSE' }
8 | s.author = { "InJung Chung" => "mu29@yeoubi.net" }
9 | s.source = { :git => 'https://github.com/mu29/PagingTableView.git', :tag => s.version.to_s }
10 |
11 | s.ios.deployment_target = '8.0'
12 |
13 | s.source_files = 'Sources'
14 | s.frameworks = 'UIKit', 'Foundation'
15 | end
16 |
--------------------------------------------------------------------------------
/PagingTableView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5B3847B81EA320AB00BC87B4 /* ContentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B3847B71EA320AB00BC87B4 /* ContentCell.swift */; };
11 | 5B7DF7EB1EA3102300D38577 /* PagingTableView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B7DF7E11EA3102300D38577 /* PagingTableView.framework */; };
12 | 5B7DF7F01EA3102300D38577 /* PagingTableViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7DF7EF1EA3102300D38577 /* PagingTableViewTests.swift */; };
13 | 5B7DF7F21EA3102300D38577 /* PagingTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B7DF7E41EA3102300D38577 /* PagingTableView.h */; settings = {ATTRIBUTES = (Public, ); }; };
14 | 5B7DF8031EA310DE00D38577 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7DF8021EA310DE00D38577 /* AppDelegate.swift */; };
15 | 5B7DF8051EA310DE00D38577 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7DF8041EA310DE00D38577 /* MainViewController.swift */; };
16 | 5B7DF8081EA310DE00D38577 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5B7DF8061EA310DE00D38577 /* Main.storyboard */; };
17 | 5B7DF80A1EA310DE00D38577 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5B7DF8091EA310DE00D38577 /* Assets.xcassets */; };
18 | 5B7DF80D1EA310DE00D38577 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5B7DF80B1EA310DE00D38577 /* LaunchScreen.storyboard */; };
19 | 5B7DF8131EA310EF00D38577 /* PagingTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7DF8121EA310EF00D38577 /* PagingTableView.swift */; };
20 | 5B7DF8151EA312F300D38577 /* PagingTableViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7DF8141EA312F300D38577 /* PagingTableViewDelegate.swift */; };
21 | 5B7DF8171EA31AF700D38577 /* ContentDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B7DF8161EA31AF700D38577 /* ContentDataSource.swift */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXContainerItemProxy section */
25 | 5B7DF7EC1EA3102300D38577 /* PBXContainerItemProxy */ = {
26 | isa = PBXContainerItemProxy;
27 | containerPortal = 5B7DF7D81EA3102300D38577 /* Project object */;
28 | proxyType = 1;
29 | remoteGlobalIDString = 5B7DF7E01EA3102300D38577;
30 | remoteInfo = PagingTableView;
31 | };
32 | /* End PBXContainerItemProxy section */
33 |
34 | /* Begin PBXFileReference section */
35 | 5B3847B71EA320AB00BC87B4 /* ContentCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentCell.swift; sourceTree = ""; };
36 | 5B7DF7E11EA3102300D38577 /* PagingTableView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PagingTableView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
37 | 5B7DF7E41EA3102300D38577 /* PagingTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PagingTableView.h; sourceTree = ""; };
38 | 5B7DF7E51EA3102300D38577 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
39 | 5B7DF7EA1EA3102300D38577 /* PagingTableViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PagingTableViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
40 | 5B7DF7EF1EA3102300D38577 /* PagingTableViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PagingTableViewTests.swift; sourceTree = ""; };
41 | 5B7DF7F11EA3102300D38577 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | 5B7DF8001EA310DE00D38577 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 5B7DF8021EA310DE00D38577 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 5B7DF8041EA310DE00D38577 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; };
45 | 5B7DF8071EA310DE00D38577 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
46 | 5B7DF8091EA310DE00D38577 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
47 | 5B7DF80C1EA310DE00D38577 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
48 | 5B7DF80E1EA310DE00D38577 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
49 | 5B7DF8121EA310EF00D38577 /* PagingTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagingTableView.swift; sourceTree = ""; };
50 | 5B7DF8141EA312F300D38577 /* PagingTableViewDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagingTableViewDelegate.swift; sourceTree = ""; };
51 | 5B7DF8161EA31AF700D38577 /* ContentDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentDataSource.swift; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | 5B7DF7DD1EA3102300D38577 /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | 5B7DF7E71EA3102300D38577 /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 5B7DF7EB1EA3102300D38577 /* PagingTableView.framework in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | 5B7DF7FD1EA310DE00D38577 /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | );
75 | runOnlyForDeploymentPostprocessing = 0;
76 | };
77 | /* End PBXFrameworksBuildPhase section */
78 |
79 | /* Begin PBXGroup section */
80 | 5B7DF7D71EA3102300D38577 = {
81 | isa = PBXGroup;
82 | children = (
83 | 5B7DF7E31EA3102300D38577 /* Sources */,
84 | 5B7DF7EE1EA3102300D38577 /* Tests */,
85 | 5B7DF8011EA310DE00D38577 /* Example */,
86 | 5B7DF7E21EA3102300D38577 /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 5B7DF7E21EA3102300D38577 /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 5B7DF7E11EA3102300D38577 /* PagingTableView.framework */,
94 | 5B7DF7EA1EA3102300D38577 /* PagingTableViewTests.xctest */,
95 | 5B7DF8001EA310DE00D38577 /* Example.app */,
96 | );
97 | name = Products;
98 | sourceTree = "";
99 | };
100 | 5B7DF7E31EA3102300D38577 /* Sources */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 5B7DF7E41EA3102300D38577 /* PagingTableView.h */,
104 | 5B7DF8121EA310EF00D38577 /* PagingTableView.swift */,
105 | 5B7DF8141EA312F300D38577 /* PagingTableViewDelegate.swift */,
106 | 5B7DF7E51EA3102300D38577 /* Info.plist */,
107 | );
108 | path = Sources;
109 | sourceTree = "";
110 | };
111 | 5B7DF7EE1EA3102300D38577 /* Tests */ = {
112 | isa = PBXGroup;
113 | children = (
114 | 5B7DF7EF1EA3102300D38577 /* PagingTableViewTests.swift */,
115 | 5B7DF7F11EA3102300D38577 /* Info.plist */,
116 | );
117 | path = Tests;
118 | sourceTree = "";
119 | };
120 | 5B7DF8011EA310DE00D38577 /* Example */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 5B7DF8021EA310DE00D38577 /* AppDelegate.swift */,
124 | 5B7DF8041EA310DE00D38577 /* MainViewController.swift */,
125 | 5B7DF8161EA31AF700D38577 /* ContentDataSource.swift */,
126 | 5B7DF8061EA310DE00D38577 /* Main.storyboard */,
127 | 5B7DF8091EA310DE00D38577 /* Assets.xcassets */,
128 | 5B7DF80B1EA310DE00D38577 /* LaunchScreen.storyboard */,
129 | 5B7DF80E1EA310DE00D38577 /* Info.plist */,
130 | 5B3847B71EA320AB00BC87B4 /* ContentCell.swift */,
131 | );
132 | path = Example;
133 | sourceTree = "";
134 | };
135 | /* End PBXGroup section */
136 |
137 | /* Begin PBXHeadersBuildPhase section */
138 | 5B7DF7DE1EA3102300D38577 /* Headers */ = {
139 | isa = PBXHeadersBuildPhase;
140 | buildActionMask = 2147483647;
141 | files = (
142 | 5B7DF7F21EA3102300D38577 /* PagingTableView.h in Headers */,
143 | );
144 | runOnlyForDeploymentPostprocessing = 0;
145 | };
146 | /* End PBXHeadersBuildPhase section */
147 |
148 | /* Begin PBXNativeTarget section */
149 | 5B7DF7E01EA3102300D38577 /* PagingTableView */ = {
150 | isa = PBXNativeTarget;
151 | buildConfigurationList = 5B7DF7F51EA3102300D38577 /* Build configuration list for PBXNativeTarget "PagingTableView" */;
152 | buildPhases = (
153 | 5B7DF7DC1EA3102300D38577 /* Sources */,
154 | 5B7DF7DD1EA3102300D38577 /* Frameworks */,
155 | 5B7DF7DE1EA3102300D38577 /* Headers */,
156 | 5B7DF7DF1EA3102300D38577 /* Resources */,
157 | );
158 | buildRules = (
159 | );
160 | dependencies = (
161 | );
162 | name = PagingTableView;
163 | productName = PagingTableView;
164 | productReference = 5B7DF7E11EA3102300D38577 /* PagingTableView.framework */;
165 | productType = "com.apple.product-type.framework";
166 | };
167 | 5B7DF7E91EA3102300D38577 /* PagingTableViewTests */ = {
168 | isa = PBXNativeTarget;
169 | buildConfigurationList = 5B7DF7F81EA3102300D38577 /* Build configuration list for PBXNativeTarget "PagingTableViewTests" */;
170 | buildPhases = (
171 | 5B7DF7E61EA3102300D38577 /* Sources */,
172 | 5B7DF7E71EA3102300D38577 /* Frameworks */,
173 | 5B7DF7E81EA3102300D38577 /* Resources */,
174 | );
175 | buildRules = (
176 | );
177 | dependencies = (
178 | 5B7DF7ED1EA3102300D38577 /* PBXTargetDependency */,
179 | );
180 | name = PagingTableViewTests;
181 | productName = PagingTableViewTests;
182 | productReference = 5B7DF7EA1EA3102300D38577 /* PagingTableViewTests.xctest */;
183 | productType = "com.apple.product-type.bundle.unit-test";
184 | };
185 | 5B7DF7FF1EA310DE00D38577 /* Example */ = {
186 | isa = PBXNativeTarget;
187 | buildConfigurationList = 5B7DF80F1EA310DE00D38577 /* Build configuration list for PBXNativeTarget "Example" */;
188 | buildPhases = (
189 | 5B7DF7FC1EA310DE00D38577 /* Sources */,
190 | 5B7DF7FD1EA310DE00D38577 /* Frameworks */,
191 | 5B7DF7FE1EA310DE00D38577 /* Resources */,
192 | );
193 | buildRules = (
194 | );
195 | dependencies = (
196 | );
197 | name = Example;
198 | productName = Example;
199 | productReference = 5B7DF8001EA310DE00D38577 /* Example.app */;
200 | productType = "com.apple.product-type.application";
201 | };
202 | /* End PBXNativeTarget section */
203 |
204 | /* Begin PBXProject section */
205 | 5B7DF7D81EA3102300D38577 /* Project object */ = {
206 | isa = PBXProject;
207 | attributes = {
208 | LastSwiftUpdateCheck = 0830;
209 | LastUpgradeCheck = 0830;
210 | ORGANIZATIONNAME = "InJung Chung";
211 | TargetAttributes = {
212 | 5B7DF7E01EA3102300D38577 = {
213 | CreatedOnToolsVersion = 8.3.1;
214 | LastSwiftMigration = 0830;
215 | ProvisioningStyle = Automatic;
216 | };
217 | 5B7DF7E91EA3102300D38577 = {
218 | CreatedOnToolsVersion = 8.3.1;
219 | ProvisioningStyle = Automatic;
220 | };
221 | 5B7DF7FF1EA310DE00D38577 = {
222 | CreatedOnToolsVersion = 8.3.1;
223 | ProvisioningStyle = Automatic;
224 | };
225 | };
226 | };
227 | buildConfigurationList = 5B7DF7DB1EA3102300D38577 /* Build configuration list for PBXProject "PagingTableView" */;
228 | compatibilityVersion = "Xcode 3.2";
229 | developmentRegion = English;
230 | hasScannedForEncodings = 0;
231 | knownRegions = (
232 | en,
233 | Base,
234 | );
235 | mainGroup = 5B7DF7D71EA3102300D38577;
236 | productRefGroup = 5B7DF7E21EA3102300D38577 /* Products */;
237 | projectDirPath = "";
238 | projectRoot = "";
239 | targets = (
240 | 5B7DF7E01EA3102300D38577 /* PagingTableView */,
241 | 5B7DF7E91EA3102300D38577 /* PagingTableViewTests */,
242 | 5B7DF7FF1EA310DE00D38577 /* Example */,
243 | );
244 | };
245 | /* End PBXProject section */
246 |
247 | /* Begin PBXResourcesBuildPhase section */
248 | 5B7DF7DF1EA3102300D38577 /* Resources */ = {
249 | isa = PBXResourcesBuildPhase;
250 | buildActionMask = 2147483647;
251 | files = (
252 | );
253 | runOnlyForDeploymentPostprocessing = 0;
254 | };
255 | 5B7DF7E81EA3102300D38577 /* Resources */ = {
256 | isa = PBXResourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | 5B7DF7FE1EA310DE00D38577 /* Resources */ = {
263 | isa = PBXResourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | 5B7DF80D1EA310DE00D38577 /* LaunchScreen.storyboard in Resources */,
267 | 5B7DF80A1EA310DE00D38577 /* Assets.xcassets in Resources */,
268 | 5B7DF8081EA310DE00D38577 /* Main.storyboard in Resources */,
269 | );
270 | runOnlyForDeploymentPostprocessing = 0;
271 | };
272 | /* End PBXResourcesBuildPhase section */
273 |
274 | /* Begin PBXSourcesBuildPhase section */
275 | 5B7DF7DC1EA3102300D38577 /* Sources */ = {
276 | isa = PBXSourcesBuildPhase;
277 | buildActionMask = 2147483647;
278 | files = (
279 | 5B7DF8151EA312F300D38577 /* PagingTableViewDelegate.swift in Sources */,
280 | 5B7DF8131EA310EF00D38577 /* PagingTableView.swift in Sources */,
281 | );
282 | runOnlyForDeploymentPostprocessing = 0;
283 | };
284 | 5B7DF7E61EA3102300D38577 /* Sources */ = {
285 | isa = PBXSourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 5B7DF7F01EA3102300D38577 /* PagingTableViewTests.swift in Sources */,
289 | );
290 | runOnlyForDeploymentPostprocessing = 0;
291 | };
292 | 5B7DF7FC1EA310DE00D38577 /* Sources */ = {
293 | isa = PBXSourcesBuildPhase;
294 | buildActionMask = 2147483647;
295 | files = (
296 | 5B7DF8171EA31AF700D38577 /* ContentDataSource.swift in Sources */,
297 | 5B7DF8051EA310DE00D38577 /* MainViewController.swift in Sources */,
298 | 5B7DF8031EA310DE00D38577 /* AppDelegate.swift in Sources */,
299 | 5B3847B81EA320AB00BC87B4 /* ContentCell.swift in Sources */,
300 | );
301 | runOnlyForDeploymentPostprocessing = 0;
302 | };
303 | /* End PBXSourcesBuildPhase section */
304 |
305 | /* Begin PBXTargetDependency section */
306 | 5B7DF7ED1EA3102300D38577 /* PBXTargetDependency */ = {
307 | isa = PBXTargetDependency;
308 | target = 5B7DF7E01EA3102300D38577 /* PagingTableView */;
309 | targetProxy = 5B7DF7EC1EA3102300D38577 /* PBXContainerItemProxy */;
310 | };
311 | /* End PBXTargetDependency section */
312 |
313 | /* Begin PBXVariantGroup section */
314 | 5B7DF8061EA310DE00D38577 /* Main.storyboard */ = {
315 | isa = PBXVariantGroup;
316 | children = (
317 | 5B7DF8071EA310DE00D38577 /* Base */,
318 | );
319 | name = Main.storyboard;
320 | sourceTree = "";
321 | };
322 | 5B7DF80B1EA310DE00D38577 /* LaunchScreen.storyboard */ = {
323 | isa = PBXVariantGroup;
324 | children = (
325 | 5B7DF80C1EA310DE00D38577 /* Base */,
326 | );
327 | name = LaunchScreen.storyboard;
328 | sourceTree = "";
329 | };
330 | /* End PBXVariantGroup section */
331 |
332 | /* Begin XCBuildConfiguration section */
333 | 5B7DF7F31EA3102300D38577 /* Debug */ = {
334 | isa = XCBuildConfiguration;
335 | buildSettings = {
336 | ALWAYS_SEARCH_USER_PATHS = NO;
337 | CLANG_ANALYZER_NONNULL = YES;
338 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
339 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
340 | CLANG_CXX_LIBRARY = "libc++";
341 | CLANG_ENABLE_MODULES = YES;
342 | CLANG_ENABLE_OBJC_ARC = YES;
343 | CLANG_WARN_BOOL_CONVERSION = YES;
344 | CLANG_WARN_CONSTANT_CONVERSION = YES;
345 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
346 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
352 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
353 | CLANG_WARN_UNREACHABLE_CODE = YES;
354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
355 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
356 | COPY_PHASE_STRIP = NO;
357 | CURRENT_PROJECT_VERSION = 1;
358 | DEBUG_INFORMATION_FORMAT = dwarf;
359 | ENABLE_STRICT_OBJC_MSGSEND = YES;
360 | ENABLE_TESTABILITY = YES;
361 | GCC_C_LANGUAGE_STANDARD = gnu99;
362 | GCC_DYNAMIC_NO_PIC = NO;
363 | GCC_NO_COMMON_BLOCKS = YES;
364 | GCC_OPTIMIZATION_LEVEL = 0;
365 | GCC_PREPROCESSOR_DEFINITIONS = (
366 | "DEBUG=1",
367 | "$(inherited)",
368 | );
369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
370 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
371 | GCC_WARN_UNDECLARED_SELECTOR = YES;
372 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
373 | GCC_WARN_UNUSED_FUNCTION = YES;
374 | GCC_WARN_UNUSED_VARIABLE = YES;
375 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
376 | MTL_ENABLE_DEBUG_INFO = YES;
377 | ONLY_ACTIVE_ARCH = YES;
378 | SDKROOT = iphoneos;
379 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
380 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
381 | TARGETED_DEVICE_FAMILY = "1,2";
382 | VERSIONING_SYSTEM = "apple-generic";
383 | VERSION_INFO_PREFIX = "";
384 | };
385 | name = Debug;
386 | };
387 | 5B7DF7F41EA3102300D38577 /* Release */ = {
388 | isa = XCBuildConfiguration;
389 | buildSettings = {
390 | ALWAYS_SEARCH_USER_PATHS = NO;
391 | CLANG_ANALYZER_NONNULL = YES;
392 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BOOL_CONVERSION = YES;
398 | CLANG_WARN_CONSTANT_CONVERSION = YES;
399 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
400 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
401 | CLANG_WARN_EMPTY_BODY = YES;
402 | CLANG_WARN_ENUM_CONVERSION = YES;
403 | CLANG_WARN_INFINITE_RECURSION = YES;
404 | CLANG_WARN_INT_CONVERSION = YES;
405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
406 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
407 | CLANG_WARN_UNREACHABLE_CODE = YES;
408 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
409 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
410 | COPY_PHASE_STRIP = NO;
411 | CURRENT_PROJECT_VERSION = 1;
412 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
413 | ENABLE_NS_ASSERTIONS = NO;
414 | ENABLE_STRICT_OBJC_MSGSEND = YES;
415 | GCC_C_LANGUAGE_STANDARD = gnu99;
416 | GCC_NO_COMMON_BLOCKS = YES;
417 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
418 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
419 | GCC_WARN_UNDECLARED_SELECTOR = YES;
420 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
421 | GCC_WARN_UNUSED_FUNCTION = YES;
422 | GCC_WARN_UNUSED_VARIABLE = YES;
423 | IPHONEOS_DEPLOYMENT_TARGET = 10.3;
424 | MTL_ENABLE_DEBUG_INFO = NO;
425 | SDKROOT = iphoneos;
426 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
427 | TARGETED_DEVICE_FAMILY = "1,2";
428 | VALIDATE_PRODUCT = YES;
429 | VERSIONING_SYSTEM = "apple-generic";
430 | VERSION_INFO_PREFIX = "";
431 | };
432 | name = Release;
433 | };
434 | 5B7DF7F61EA3102300D38577 /* Debug */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | CLANG_ENABLE_MODULES = YES;
438 | CODE_SIGN_IDENTITY = "";
439 | DEFINES_MODULE = YES;
440 | DYLIB_COMPATIBILITY_VERSION = 1;
441 | DYLIB_CURRENT_VERSION = 1;
442 | DYLIB_INSTALL_NAME_BASE = "@rpath";
443 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
444 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
446 | PRODUCT_BUNDLE_IDENTIFIER = net.yeoubi.PagingTableView;
447 | PRODUCT_NAME = "$(TARGET_NAME)";
448 | SKIP_INSTALL = YES;
449 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
450 | SWIFT_VERSION = 3.0;
451 | };
452 | name = Debug;
453 | };
454 | 5B7DF7F71EA3102300D38577 /* Release */ = {
455 | isa = XCBuildConfiguration;
456 | buildSettings = {
457 | CLANG_ENABLE_MODULES = YES;
458 | CODE_SIGN_IDENTITY = "";
459 | DEFINES_MODULE = YES;
460 | DYLIB_COMPATIBILITY_VERSION = 1;
461 | DYLIB_CURRENT_VERSION = 1;
462 | DYLIB_INSTALL_NAME_BASE = "@rpath";
463 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
464 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
465 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
466 | PRODUCT_BUNDLE_IDENTIFIER = net.yeoubi.PagingTableView;
467 | PRODUCT_NAME = "$(TARGET_NAME)";
468 | SKIP_INSTALL = YES;
469 | SWIFT_VERSION = 3.0;
470 | };
471 | name = Release;
472 | };
473 | 5B7DF7F91EA3102300D38577 /* Debug */ = {
474 | isa = XCBuildConfiguration;
475 | buildSettings = {
476 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
477 | INFOPLIST_FILE = PagingTableViewTests/Info.plist;
478 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
479 | PRODUCT_BUNDLE_IDENTIFIER = net.yeoubi.PagingTableViewTests;
480 | PRODUCT_NAME = "$(TARGET_NAME)";
481 | SWIFT_VERSION = 3.0;
482 | };
483 | name = Debug;
484 | };
485 | 5B7DF7FA1EA3102300D38577 /* Release */ = {
486 | isa = XCBuildConfiguration;
487 | buildSettings = {
488 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
489 | INFOPLIST_FILE = PagingTableViewTests/Info.plist;
490 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
491 | PRODUCT_BUNDLE_IDENTIFIER = net.yeoubi.PagingTableViewTests;
492 | PRODUCT_NAME = "$(TARGET_NAME)";
493 | SWIFT_VERSION = 3.0;
494 | };
495 | name = Release;
496 | };
497 | 5B7DF8101EA310DE00D38577 /* Debug */ = {
498 | isa = XCBuildConfiguration;
499 | buildSettings = {
500 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
501 | INFOPLIST_FILE = Example/Info.plist;
502 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
503 | PRODUCT_BUNDLE_IDENTIFIER = net.yeoubi.Example;
504 | PRODUCT_NAME = "$(TARGET_NAME)";
505 | SWIFT_VERSION = 3.0;
506 | };
507 | name = Debug;
508 | };
509 | 5B7DF8111EA310DE00D38577 /* Release */ = {
510 | isa = XCBuildConfiguration;
511 | buildSettings = {
512 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
513 | INFOPLIST_FILE = Example/Info.plist;
514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
515 | PRODUCT_BUNDLE_IDENTIFIER = net.yeoubi.Example;
516 | PRODUCT_NAME = "$(TARGET_NAME)";
517 | SWIFT_VERSION = 3.0;
518 | };
519 | name = Release;
520 | };
521 | /* End XCBuildConfiguration section */
522 |
523 | /* Begin XCConfigurationList section */
524 | 5B7DF7DB1EA3102300D38577 /* Build configuration list for PBXProject "PagingTableView" */ = {
525 | isa = XCConfigurationList;
526 | buildConfigurations = (
527 | 5B7DF7F31EA3102300D38577 /* Debug */,
528 | 5B7DF7F41EA3102300D38577 /* Release */,
529 | );
530 | defaultConfigurationIsVisible = 0;
531 | defaultConfigurationName = Release;
532 | };
533 | 5B7DF7F51EA3102300D38577 /* Build configuration list for PBXNativeTarget "PagingTableView" */ = {
534 | isa = XCConfigurationList;
535 | buildConfigurations = (
536 | 5B7DF7F61EA3102300D38577 /* Debug */,
537 | 5B7DF7F71EA3102300D38577 /* Release */,
538 | );
539 | defaultConfigurationIsVisible = 0;
540 | defaultConfigurationName = Release;
541 | };
542 | 5B7DF7F81EA3102300D38577 /* Build configuration list for PBXNativeTarget "PagingTableViewTests" */ = {
543 | isa = XCConfigurationList;
544 | buildConfigurations = (
545 | 5B7DF7F91EA3102300D38577 /* Debug */,
546 | 5B7DF7FA1EA3102300D38577 /* Release */,
547 | );
548 | defaultConfigurationIsVisible = 0;
549 | defaultConfigurationName = Release;
550 | };
551 | 5B7DF80F1EA310DE00D38577 /* Build configuration list for PBXNativeTarget "Example" */ = {
552 | isa = XCConfigurationList;
553 | buildConfigurations = (
554 | 5B7DF8101EA310DE00D38577 /* Debug */,
555 | 5B7DF8111EA310DE00D38577 /* Release */,
556 | );
557 | defaultConfigurationIsVisible = 0;
558 | defaultConfigurationName = Release;
559 | };
560 | /* End XCConfigurationList section */
561 | };
562 | rootObject = 5B7DF7D81EA3102300D38577 /* Project object */;
563 | }
564 |
--------------------------------------------------------------------------------
/PagingTableView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PagingTableView
2 |
3 | [](http://cocoapods.org/pods/PagingTableView)
4 | [](https://github.com/mu29/PagingTableView/blob/master/LICENSE)
5 | [](http://cocoapods.org/pods/PagingTableView)
6 | [](https://developer.apple.com/swift/)
7 |
8 | The simplest way to add paginate (a.k.a infinite scroll) function to your table view.
9 | All you have to do is just set your table view class in the storyboard to `PagingTableView`, and implement the `PagingTableViewDelegate#paginate`
10 |
11 | ## Installation
12 |
13 | `PagingTableView` is available through [CocoaPods](http://cocoapods.org). To install
14 | it, simply add the following line to your Podfile:
15 |
16 | ```ruby
17 | pod "PagingTableView"
18 | ```
19 |
20 | ## Example
21 |
22 |
23 |
24 | See full example [here](https://github.com/mu29/PagingTableView/blob/master/Example).
25 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
26 |
27 | ## Usage
28 |
29 | First set your table view class in the storyboard to `PagingTableView`
30 |
31 |
32 |
33 | Then implement `paginate` function. If `isLoading` is set to true, an indicator is displayed at the bottom of the table view. Otherwise, the indicator disappears and `UITableView.reloadData` is called.
34 |
35 | ```swift
36 | class MainViewController: UIViewController {
37 |
38 | override func viewDidLoad() {
39 | ...
40 | contentTable.pagingDelegate = self
41 | }
42 |
43 | ...
44 |
45 | }
46 |
47 | extension MainViewController: PagingTableViewDelegate {
48 |
49 | func paginate(_ tableView: PagingTableView, to page: Int) {
50 | contentTable.isLoading = true
51 | contentDataSource.loadData(at: page) { contents in
52 | self.contents.append(contentsOf: contents)
53 | self.contentTable.isLoading = false
54 | }
55 | }
56 |
57 | }
58 | ```
59 |
60 | See [example](https://github.com/mu29/PagingTableView/blob/master/Example) for more information.
61 |
62 | ## APIs
63 |
64 | | Name | Type | Description |
65 | |---|---|---|
66 | | `pagingDelegate` | `PagingTableViewDelegate` | Delegate pagination processing |
67 | | `currentPage` | `Int` | Returns the current page |
68 | | `isLoading` | `Bool` | Shows and hides the loading indicator. Reload table view data after loading |
69 | | `reset()` | `Void` | Return page to 0 and call `paginate` function |
70 |
71 | ## Author
72 |
73 | InJung Chung / [@mu29](http://mu29.github.io/)
74 |
75 | ## License
76 |
77 | `PagingTableView` is available under the MIT license. See the [LICENSE](https://github.com/mu29/PagingTableView/blob/master/LICENSE) file for more info.
78 |
--------------------------------------------------------------------------------
/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSPrincipalClass
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Sources/PagingTableView.h:
--------------------------------------------------------------------------------
1 | //
2 | // PagingTableView.h
3 | // PagingTableView
4 | //
5 | // Created by InJung Chung on 2017. 4. 16..
6 | // Copyright © 2017 InJung Chung. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for PagingTableView.
12 | FOUNDATION_EXPORT double PagingTableViewVersionNumber;
13 |
14 | //! Project version string for PagingTableView.
15 | FOUNDATION_EXPORT const unsigned char PagingTableViewVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Sources/PagingTableView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PagingTableView.swift
3 | // PagingTableView
4 | //
5 | // Created by InJung Chung on 2017. 4. 16..
6 | // Copyright © 2017 InJung Chung. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class PagingTableView: UITableView {
12 |
13 | private var loadingView: UIView!
14 | private var indicator: UIActivityIndicatorView!
15 | internal var page: Int = 0
16 | internal var previousItemCount: Int = 0
17 |
18 | open var currentPage: Int {
19 | get {
20 | return page
21 | }
22 | }
23 |
24 | open weak var pagingDelegate: PagingTableViewDelegate? {
25 | didSet {
26 | pagingDelegate?.paginate(self, to: page)
27 | }
28 | }
29 |
30 | open var isLoading: Bool = false {
31 | didSet {
32 | isLoading ? showLoading() : hideLoading()
33 | }
34 | }
35 |
36 | open func reset() {
37 | page = 0
38 | previousItemCount = 0
39 | pagingDelegate?.paginate(self, to: page)
40 | }
41 |
42 | private func paginate(_ tableView: PagingTableView, forIndexAt indexPath: IndexPath) {
43 | let itemCount = tableView.dataSource?.tableView(tableView, numberOfRowsInSection: indexPath.section) ?? 0
44 | guard indexPath.row == itemCount - 1 else { return }
45 | guard previousItemCount != itemCount else { return }
46 | page += 1
47 | previousItemCount = itemCount
48 | pagingDelegate?.paginate(self, to: page)
49 | }
50 |
51 | private func showLoading() {
52 | if loadingView == nil {
53 | createLoadingView()
54 | }
55 | tableFooterView = loadingView
56 | }
57 |
58 | private func hideLoading() {
59 | reloadData()
60 | pagingDelegate?.didPaginate?(self, to: page)
61 | tableFooterView = nil
62 | }
63 |
64 | private func createLoadingView() {
65 | loadingView = UIView(frame: CGRect(x: 0, y: 0, width: frame.width, height: 50))
66 | indicator = UIActivityIndicatorView()
67 | indicator.color = UIColor.lightGray
68 | indicator.translatesAutoresizingMaskIntoConstraints = false
69 | indicator.startAnimating()
70 | loadingView.addSubview(indicator)
71 | centerIndicator()
72 | tableFooterView = loadingView
73 | }
74 |
75 | private func centerIndicator() {
76 | let xCenterConstraint = NSLayoutConstraint(
77 | item: loadingView, attribute: .centerX, relatedBy: .equal,
78 | toItem: indicator, attribute: .centerX, multiplier: 1, constant: 0
79 | )
80 | loadingView.addConstraint(xCenterConstraint)
81 |
82 | let yCenterConstraint = NSLayoutConstraint(
83 | item: loadingView, attribute: .centerY, relatedBy: .equal,
84 | toItem: indicator, attribute: .centerY, multiplier: 1, constant: 0
85 | )
86 | loadingView.addConstraint(yCenterConstraint)
87 | }
88 |
89 | override open func dequeueReusableCell(withIdentifier identifier: String, for indexPath: IndexPath) -> UITableViewCell {
90 | paginate(self, forIndexAt: indexPath)
91 | return super.dequeueReusableCell(withIdentifier: identifier, for: indexPath)
92 | }
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/Sources/PagingTableViewDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PagingTableViewDelegate.swift
3 | // PagingTableView
4 | //
5 | // Created by 정인중 on 2017. 4. 16..
6 | // Copyright © 2017년 InJung Chung. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @objc public protocol PagingTableViewDelegate {
12 |
13 | @objc optional func didPaginate(_ tableView: PagingTableView, to page: Int)
14 | func paginate(_ tableView: PagingTableView, to page: Int)
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 |
--------------------------------------------------------------------------------
/Tests/PagingTableViewTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PagingTableViewTests.swift
3 | // PagingTableViewTests
4 | //
5 | // Created by InJung Chung on 2017. 4. 16..
6 | // Copyright © 2017 InJung Chung. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import PagingTableView
11 |
12 | class PagingTableViewTests: 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 |
--------------------------------------------------------------------------------
/etc/example.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mu29/PagingTableView/ce33da3379820d5370fe5397b50b1f20a8722b1a/etc/example.gif
--------------------------------------------------------------------------------
/etc/usage1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mu29/PagingTableView/ce33da3379820d5370fe5397b50b1f20a8722b1a/etc/usage1.png
--------------------------------------------------------------------------------