Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6aa3005

Browse files
* Updates examples and comments
* Podspec version
1 parent f571837 commit 6aa3005

File tree

8 files changed

+42
-27
lines changed

8 files changed

+42
-27
lines changed

‎Example/Pods/Pods.xcodeproj/project.pbxproj‎

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Example/SwiftSpreadsheet.xcodeproj/project.pbxproj‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,17 @@
250250
isa = PBXProject;
251251
attributes = {
252252
LastSwiftUpdateCheck = 0720;
253-
LastUpgradeCheck = 0900;
253+
LastUpgradeCheck = 0930;
254254
ORGANIZATIONNAME = CocoaPods;
255255
TargetAttributes = {
256256
607FACCF1AFB9204008FA782 = {
257257
CreatedOnToolsVersion = 6.3.1;
258-
DevelopmentTeam = 8X3874GC2S;
258+
DevelopmentTeam = T8V7V3Q22W;
259259
LastSwiftMigration = 0900;
260260
};
261261
607FACE41AFB9204008FA782 = {
262262
CreatedOnToolsVersion = 6.3.1;
263-
DevelopmentTeam = 8X3874GC2S;
263+
DevelopmentTeam = T8V7V3Q22W;
264264
LastSwiftMigration = 0900;
265265
TestTargetID = 607FACCF1AFB9204008FA782;
266266
};
@@ -466,12 +466,14 @@
466466
CLANG_WARN_BOOL_CONVERSION = YES;
467467
CLANG_WARN_COMMA = YES;
468468
CLANG_WARN_CONSTANT_CONVERSION = YES;
469+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
469470
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
470471
CLANG_WARN_EMPTY_BODY = YES;
471472
CLANG_WARN_ENUM_CONVERSION = YES;
472473
CLANG_WARN_INFINITE_RECURSION = YES;
473474
CLANG_WARN_INT_CONVERSION = YES;
474475
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
476+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
475477
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
476478
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
477479
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -499,7 +501,7 @@
499501
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
500502
GCC_WARN_UNUSED_FUNCTION = YES;
501503
GCC_WARN_UNUSED_VARIABLE = YES;
502-
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
504+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
503505
MTL_ENABLE_DEBUG_INFO = YES;
504506
ONLY_ACTIVE_ARCH = YES;
505507
SDKROOT = iphoneos;
@@ -520,12 +522,14 @@
520522
CLANG_WARN_BOOL_CONVERSION = YES;
521523
CLANG_WARN_COMMA = YES;
522524
CLANG_WARN_CONSTANT_CONVERSION = YES;
525+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
523526
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
524527
CLANG_WARN_EMPTY_BODY = YES;
525528
CLANG_WARN_ENUM_CONVERSION = YES;
526529
CLANG_WARN_INFINITE_RECURSION = YES;
527530
CLANG_WARN_INT_CONVERSION = YES;
528531
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
532+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
529533
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
530534
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
531535
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -546,7 +550,7 @@
546550
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
547551
GCC_WARN_UNUSED_FUNCTION = YES;
548552
GCC_WARN_UNUSED_VARIABLE = YES;
549-
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
553+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
550554
MTL_ENABLE_DEBUG_INFO = NO;
551555
SDKROOT = iphoneos;
552556
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -560,7 +564,7 @@
560564
baseConfigurationReference = 1549AC9FD6E372C880FB0240 /* Pods-SwiftSpreadsheet_Example.debug.xcconfig */;
561565
buildSettings = {
562566
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
563-
DEVELOPMENT_TEAM = 8X3874GC2S;
567+
DEVELOPMENT_TEAM = T8V7V3Q22W;
564568
INFOPLIST_FILE = SwiftSpreadsheet/Info.plist;
565569
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
566570
MODULE_NAME = ExampleApp;
@@ -576,7 +580,7 @@
576580
baseConfigurationReference = CA743D276279FFF270C43FE6 /* Pods-SwiftSpreadsheet_Example.release.xcconfig */;
577581
buildSettings = {
578582
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
579-
DEVELOPMENT_TEAM = 8X3874GC2S;
583+
DEVELOPMENT_TEAM = T8V7V3Q22W;
580584
INFOPLIST_FILE = SwiftSpreadsheet/Info.plist;
581585
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
582586
MODULE_NAME = ExampleApp;
@@ -591,7 +595,7 @@
591595
isa = XCBuildConfiguration;
592596
baseConfigurationReference = 05EB07F7913E6773879A58BB /* Pods-SwiftSpreadsheet_Tests.debug.xcconfig */;
593597
buildSettings = {
594-
DEVELOPMENT_TEAM = 8X3874GC2S;
598+
DEVELOPMENT_TEAM = T8V7V3Q22W;
595599
FRAMEWORK_SEARCH_PATHS = (
596600
"$(SDKROOT)/Developer/Library/Frameworks",
597601
"$(inherited)",
@@ -613,7 +617,7 @@
613617
isa = XCBuildConfiguration;
614618
baseConfigurationReference = 97B1CC2699D92FDCCD6DD999 /* Pods-SwiftSpreadsheet_Tests.release.xcconfig */;
615619
buildSettings = {
616-
DEVELOPMENT_TEAM = 8X3874GC2S;
620+
DEVELOPMENT_TEAM = T8V7V3Q22W;
617621
FRAMEWORK_SEARCH_PATHS = (
618622
"$(SDKROOT)/Developer/Library/Frameworks",
619623
"$(inherited)",

‎Example/SwiftSpreadsheet.xcodeproj/xcshareddata/xcschemes/SwiftSpreadsheet-Example.xcscheme‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -40,7 +40,6 @@
4040
buildConfiguration = "Debug"
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43-
language = ""
4443
shouldUseLaunchSchemeArgsEnv = "YES">
4544
<Testables>
4645
<TestableReference
@@ -70,7 +69,6 @@
7069
buildConfiguration = "Debug"
7170
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
7271
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
73-
language = ""
7472
launchStyle = "0"
7573
useCustomWorkingDirectory = "NO"
7674
ignoresPersistentStateOnLaunch = "NO"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

‎Example/SwiftSpreadsheet/ViewController.swift‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ class ViewController: UIViewController {
7575

7676
//Setup Layout
7777
let layout = SpreadsheetLayout(delegate: self,
78-
topLeftDecorationViewNib:topLeftDecorationViewNib,
79-
topRightDecorationViewNib:topRightDecorationViewNib,
80-
bottomLeftDecorationViewNib:bottomLeftDecorationViewNib,
81-
bottomRightDecorationViewNib:bottomRightDecorationViewNib)
78+
topLeftDecorationViewType:.asNib(topLeftDecorationViewNib),
79+
topRightDecorationViewType:.asNib(topRightDecorationViewNib),
80+
bottomLeftDecorationViewType:.asNib(bottomLeftDecorationViewNib),
81+
bottomRightDecorationViewType:.asNib(bottomRightDecorationViewNib))
8282

8383
//Default is true, set false here if you do not want some of these sides to remain sticky
8484
layout.stickyLeftRowHeader = true
@@ -89,7 +89,7 @@ class ViewController: UIViewController {
8989
self.collectionView.collectionViewLayout = layout
9090

9191

92-
//Register Supplementary-Viewnibs for the given ViewKindTypes
92+
//Register Supplementary-View nibs for the given ViewKindTypes
9393
self.collectionView.register(leftSupplementaryViewNib, forSupplementaryViewOfKind: SpreadsheetLayout.ViewKindType.leftRowHeadline.rawValue, withReuseIdentifier: self.defaultSupplementaryViewIdentifier)
9494
self.collectionView.register(rightSupplementaryViewNib, forSupplementaryViewOfKind: SpreadsheetLayout.ViewKindType.rightRowHeadline.rawValue, withReuseIdentifier: self.defaultSupplementaryViewIdentifier)
9595
self.collectionView.register(topSupplementaryViewNib, forSupplementaryViewOfKind: SpreadsheetLayout.ViewKindType.topColumnHeader.rawValue, withReuseIdentifier: self.defaultSupplementaryViewIdentifier)

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ A short introduction on how to get started:
3232
The rows of the spreadsheet represent a section in the collection view, with columns being the respective items.
3333
The leftmost and the rightmost elements of the spreadsheet (`leftRowHeadline` and `rightRowHeadline`), as well as the topmost and the bottommost elements (`topColumnHeader` and `bottomColumnFooter`) are represented as `UISupplementaryView`, which — if needed — have to be registered with the respective identifiers of the provided enum `ViewKindType` (refer to the example code).
3434

35-
The corners of the resulting spreadsheet are represented as `UIDecorationView` which can be passed as `UINib` upon initialization of the Layout.
35+
The corners of the resulting spreadsheet are represented as `UIDecorationView` which can be passed as `UINib` or as `AnyClass`upon initialization of the layout. To allow more flexibilty you have to pass the given nib or class via the `DecorationViewType` enum. Its cases hold one of the respective types as associative value: `asNib(myNib)` or `asClass(myClass)`.
3636

3737
A short example:
3838

3939
```swift
40-
//Register SupplementaryViews first, then initialize the layout with optional Nibs for the DecorationViews
40+
//Register SupplementaryViews first, then initialize the layout with optional Nibs/Classes for the DecorationViews
4141
let layout = SpreadsheetLayout(delegate: self,
42-
topLeftDecorationViewNib: topLeftDecorationViewNib,
43-
topRightDecorationViewNib: topRightDecorationViewNib,
44-
bottomLeftDecorationViewNib: bottomLeftDecorationViewNib,
45-
bottomRightDecorationViewNib: bottomRightDecorationViewNib)
42+
topLeftDecorationViewType: .asNib(topLeftDecorationViewNib),
43+
topRightDecorationViewType: .asNib(topRightDecorationViewNib),
44+
bottomLeftDecorationViewType: .asClass(bottomLeftDecorationViewClass),
45+
bottomRightDecorationViewType: .asClass(bottomRightDecorationViewClass))
4646

4747
//Default is true, set false here if you do not want some of these sides to remain sticky
4848
layout.stickyLeftRowHeader = true

‎SwiftSpreadsheet.podspec‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'SwiftSpreadsheet'
11-
s.version = '1.1.0'
11+
s.version = '1.2.0'
1212
s.summary = 'A spreadsheet CollectionViewLayout in Swift.'
1313

1414
# This description is used to generate tags and improve search results.
@@ -28,7 +28,7 @@ Reference to the demo application and the description on github. Additional info
2828
s.source = { :git => 'https://github.com/stuffrabbit/SwiftSpreadsheet.git', :tag => s.version.to_s }
2929
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
3030

31-
s.ios.deployment_target = '8.0'
31+
s.ios.deployment_target = '9.0'
3232

3333
s.source_files = 'SwiftSpreadsheet/Classes/**/*'
3434

‎SwiftSpreadsheet/Classes/SpreadsheetLayout.swift‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ public class SpreadsheetLayout: UICollectionViewLayout {
103103
case decorationBottomRight = "DecorationBottomRightKind"
104104
}
105105

106+
/// Associative values of this enum represent `AnyClass` or `UINib`
106107
public enum DecorationViewType {
107108
case asClass(AnyClass)
108109
case asNib(UINib)
109110
}
110111

111-
/// Convenience initializer. Pass delegate and the respective Decoration Views if required.
112+
/// Convenience initializer. Pass delegate and the respective Decoration View types if required.
112113
public convenience init(delegate: SpreadsheetLayoutDelegate?, topLeftDecorationViewType: DecorationViewType? = nil, topRightDecorationViewType: DecorationViewType? = nil, bottomLeftDecorationViewType: DecorationViewType? = nil, bottomRightDecorationViewType: DecorationViewType? = nil) {
113114
self.init()
114115
self.delegate = delegate

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /