Skip to content

Commit f183ab9

Browse files
committed
[GitHubRepo] Show List of Repositories
Also add ListKit Dependency
1 parent fd38df3 commit f183ab9

File tree

92 files changed

+4857
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+4857
-261
lines changed

Cartfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ github "nerdishbynature/octokit.swift"
22
github "Quick/Quick"
33
github "Quick/Nimble"
44
github "soffes/SSKeychain"
5+
github "Ben-G/ListKit"

Cartfile.resolved

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
github "Ben-G/ListKit" "1.0.0"
12
github "Quick/Nimble" "v3.1.0"
23
github "Quick/Quick" "v0.9.1"
3-
github "nerdishbynature/RequestKit" "0.2.1"
4+
github "nerdishbynature/RequestKit" "0.2.2"
45
github "soffes/SSKeychain" "v1.3.1"
5-
github "nerdishbynature/octokit.swift" "0.5.1"
6+
github "nerdishbynature/octokit.swift" "0.5.2"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
*.xccheckout
22+
*.moved-aside
23+
*.xcuserstate
24+
*.xcscmblueprint
25+
26+
## Obj-C/Swift specific
27+
*.hmap
28+
*.ipa
29+
30+
# CocoaPods
31+
#
32+
# We recommend against adding the Pods directory to your .gitignore. However
33+
# you should judge for yourself, the pros and cons are mentioned at:
34+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35+
#
36+
# Pods/
37+
38+
# Carthage
39+
#
40+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
41+
# Carthage/Checkouts
42+
43+
Carthage/Build
44+
45+
# fastlane
46+
#
47+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48+
# screenshots whenever they are needed.
49+
50+
fastlane/report.xml
51+
fastlane/screenshots
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Benjamin Encz
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.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Pod::Spec.new do |s|
2+
s.name = "ListKit"
3+
s.version = "1.0.0"
4+
s.summary = "A libary that helps you build table views without re-inventing the data source"
5+
s.description = "A libary that helps you build table views without re-inventing the data source."
6+
s.homepage = "https://github.com/Ben-G/ListKit"
7+
s.license = { :type => "MIT", :file => "LICENSE.md" }
8+
s.author = { "Benjamin Encz" => "[email protected]" }
9+
s.social_media_url = "http://twitter.com/benjaminencz"
10+
s.source = { :git => "https://github.com/Ben-G/ListKit.git", :tag => s.version.to_s }
11+
12+
s.platforms = { :ios => "8.0" }
13+
s.requires_arc = true
14+
15+
s.source_files = 'ListKit/*.{swift}'
16+
17+
end

Carthage/Checkouts/ListKit/ListKit.xcodeproj/project.pbxproj

Lines changed: 828 additions & 0 deletions
Large diffs are not rendered by default.

Carthage/Checkouts/ListKit/ListKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0700"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "6265183B1A96474900F1D760"
18+
BuildableName = "ListKit.framework"
19+
BlueprintName = "ListKit"
20+
ReferencedContainer = "container:ListKit.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES"
30+
codeCoverageEnabled = "YES">
31+
<Testables>
32+
<TestableReference
33+
skipped = "NO">
34+
<BuildableReference
35+
BuildableIdentifier = "primary"
36+
BlueprintIdentifier = "626518451A96474900F1D760"
37+
BuildableName = "ListKitTests.xctest"
38+
BlueprintName = "ListKitTests"
39+
ReferencedContainer = "container:ListKit.xcodeproj">
40+
</BuildableReference>
41+
</TestableReference>
42+
</Testables>
43+
<MacroExpansion>
44+
<BuildableReference
45+
BuildableIdentifier = "primary"
46+
BlueprintIdentifier = "6265183B1A96474900F1D760"
47+
BuildableName = "ListKit.framework"
48+
BlueprintName = "ListKit"
49+
ReferencedContainer = "container:ListKit.xcodeproj">
50+
</BuildableReference>
51+
</MacroExpansion>
52+
<AdditionalOptions>
53+
</AdditionalOptions>
54+
</TestAction>
55+
<LaunchAction
56+
buildConfiguration = "Debug"
57+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
58+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59+
launchStyle = "0"
60+
useCustomWorkingDirectory = "NO"
61+
ignoresPersistentStateOnLaunch = "NO"
62+
debugDocumentVersioning = "YES"
63+
debugServiceExtension = "internal"
64+
allowLocationSimulation = "YES">
65+
<MacroExpansion>
66+
<BuildableReference
67+
BuildableIdentifier = "primary"
68+
BlueprintIdentifier = "6265183B1A96474900F1D760"
69+
BuildableName = "ListKit.framework"
70+
BlueprintName = "ListKit"
71+
ReferencedContainer = "container:ListKit.xcodeproj">
72+
</BuildableReference>
73+
</MacroExpansion>
74+
<AdditionalOptions>
75+
</AdditionalOptions>
76+
</LaunchAction>
77+
<ProfileAction
78+
buildConfiguration = "Release"
79+
shouldUseLaunchSchemeArgsEnv = "YES"
80+
savedToolIdentifier = ""
81+
useCustomWorkingDirectory = "NO"
82+
debugDocumentVersioning = "YES">
83+
<MacroExpansion>
84+
<BuildableReference
85+
BuildableIdentifier = "primary"
86+
BlueprintIdentifier = "6265183B1A96474900F1D760"
87+
BuildableName = "ListKit.framework"
88+
BlueprintName = "ListKit"
89+
ReferencedContainer = "container:ListKit.xcodeproj">
90+
</BuildableReference>
91+
</MacroExpansion>
92+
</ProfileAction>
93+
<AnalyzeAction
94+
buildConfiguration = "Debug">
95+
</AnalyzeAction>
96+
<ArchiveAction
97+
buildConfiguration = "Release"
98+
revealArchiveInOrganizer = "YES">
99+
</ArchiveAction>
100+
</Scheme>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
//
2+
// DataSource.swift
3+
// ListKitDemo
4+
//
5+
// Created by Benjamin Encz on 2/19/15.
6+
// Copyright (c) 2015 Benjamin Encz. All rights reserved.
7+
//
8+
9+
import Foundation
10+
import UIKit
11+
12+
/// A `UITableViewCell` adopoting this type can be used together
13+
/// with the `ArrayDataSource` class.
14+
public protocol ListKitCellProtocol {
15+
typealias CellType
16+
17+
/// Stores the content that is represented within the cell.
18+
/// Types adopting this protocol should update the UI when this
19+
/// property is set
20+
var model: CellType? {get set}
21+
}
22+
23+
/// Implements the `UITableViewDataSource` protocol. Needs to be initialized with a custom cell class.
24+
/// Optionally you can provide a NIB file from which the cell should be created. You define the content
25+
/// of the table view by setting the `array` property.
26+
public class ArrayDataSource<U, T where U:ListKitCellProtocol, U:UITableViewCell, T == U.CellType> : NSObject, UITableViewDataSource {
27+
28+
let cellIdentifier = "arrayDataSourceCell"
29+
30+
private let nib: UINib?
31+
32+
/// The content represented in the table view
33+
public var array: Array<T>
34+
35+
/// Initialize with a custom cell type
36+
public init (array:Array<T> = [], cellType: U.Type) {
37+
self.array = array
38+
self.nib = nil
39+
}
40+
41+
/// Initialize with a custom cell type and a NIB file from which
42+
/// the cell should be loaded
43+
public init (array:Array<T> = [], cellType: U.Type, nib: UINib) {
44+
self.array = array
45+
self.nib = nib
46+
}
47+
48+
public func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
49+
return array.count
50+
}
51+
52+
public func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
53+
var cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) as! U?
54+
55+
if var cell = cell {
56+
cell.model = array[indexPath.row]
57+
} else {
58+
if let nib = nib {
59+
// if nib was registered, load from there
60+
tableView.registerNib(nib, forCellReuseIdentifier: cellIdentifier)
61+
cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier) as? U
62+
cell!.model = array[indexPath.row]
63+
} else {
64+
// else, create cell programatically
65+
cell = U(style: .Default, reuseIdentifier: cellIdentifier)
66+
cell!.model = array[indexPath.row]
67+
}
68+
}
69+
70+
return cell!
71+
}
72+
73+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
23+
<key>NSPrincipalClass</key>
24+
<string></string>
25+
</dict>
26+
</plist>

0 commit comments

Comments
 (0)