Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tvOS-example
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
Sherlock committed Nov 15, 2016
2 parents 94e5116 + 204f7d5 commit 61e8eab
Show file tree
Hide file tree
Showing 137 changed files with 4,234 additions and 866 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag
2.0.0
-----

This release closes the [2.0.0 milestone](https://github.com/Instagram/IGListKit/milestone/1?closed=1).
This release closes the [2.0.0 milestone](https://github.com/Instagram/IGListKit/milestone/1?closed=1). Thanks to the [19 contributors](https://github.com/Instagram/IGListKit/graphs/contributors) who helped with this release!

### Breaking Changes

- Diff result method `-resultWithUpdatedMovesAsDeleteInserts` removed and replaced with `-resultForBatchUpdates`
- Diff result method `-resultWithUpdatedMovesAsDeleteInserts` removed and replaced with `-resultForBatchUpdates` [(b5aa5e3)](https://github.com/Instagram/IGListKit/commit/b5aa5e39002854c947e777c11ae241f67f24d19c)
- `IGListDiffable` equality method changed from `isEqual:` to `isEqualToDiffableObject:` [(ab890fc)](https://github.com/Instagram/IGListKit/commit/ab890fc6070f170a2db5a383a6296e62dcf75678)

### Enhancements

- Added support for supplementaryViews created from nibs. [Rawlinxx](https://github.com/rawlinxx) [(#90)](https://github.com/Instagram/IGListKit/pull/90)
- Added support for cells created from nibs. [Sven Bacia](https://github.com/svenbacia) [(#56)](https://github.com/Instagram/IGListKit/pull/56)
- Added an additional initializer for `IGListSingleSectionController` to be able to support single sections created from nibs. An example can be found [here](Example/IGListKitExamples/ViewControllers/SingleSectionViewController.swift).
- Fixed `-[IGListAdapter reloadDataWithCompletion:]` not returning early when `collectionView` or `dataSource` is nil and `completion` is nil. [Ben Asher](https://github.com/benasher44) [(#51)](https://github.com/Instagram/IGListKit/pull/51)
- Added `-isFirstSection` and `-isLastSection` APIs to `IGListSectionController`
- Added support for cells created from storyboard. [Bofei Zhu](https://github.com/zhubofei) [(#92)](https://github.com/Instagram/IGListKit/pull/92)
- Added examples for Today & iMessage extensions. [Sherlouk](https://github.com/Sherlouk) [(#112)](https://github.com/Instagram/IGListKit/pull/112)
- Added `tvOS` support. [Jesse Squires](https://github.com/jessesquires) [(#137)](https://github.com/Instagram/IGListKit/pull/137)
- Added `tvOS` example pack. [Sherlouk](https://github.com/Sherlouk) [(#141)](https://github.com/Instagram/IGListKit/pull/141)
- Added new `-[IGListAdapter visibleObjects]` API. [Ryan Nystrom](https://github.com/rnystrom) [(386ae07)](https://github.com/Instagram/IGListKit/commit/386ae0786445c06e1eabf074a4181614332f155f)

1.0.0
-----
Expand Down
464 changes: 452 additions & 12 deletions Example/IGListKitExamples.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "986FB7101DBBA60900A65C18"
BuildableName = "IGListKitMessageExample.appex"
BlueprintName = "IGListKitMessageExample"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2961B3891D68B031001C9451"
BuildableName = "IGListKitExamples.app"
BlueprintName = "IGListKitExamples"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "986FB7101DBBA60900A65C18"
BuildableName = "IGListKitMessageExample.appex"
BlueprintName = "IGListKitMessageExample"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<RemoteRunnable
runnableDebuggingMode = "1"
BundleIdentifier = "com.apple.MobileSMS">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "986FB7101DBBA60900A65C18"
BuildableName = "IGListKitMessageExample.appex"
BlueprintName = "IGListKitMessageExample"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "986FB7101DBBA60900A65C18"
BuildableName = "IGListKitMessageExample.appex"
BlueprintName = "IGListKitMessageExample"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2961B3891D68B031001C9451"
BuildableName = "IGListKitExamples.app"
BlueprintName = "IGListKitExamples"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "986FB72E1DBBAD8600A65C18"
BuildableName = "IGListKitTodayExample.appex"
BlueprintName = "IGListKitTodayExample"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2961B3891D68B031001C9451"
BuildableName = "IGListKitExamples.app"
BlueprintName = "IGListKitExamples"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "986FB72E1DBBAD8600A65C18"
BuildableName = "IGListKitTodayExample.appex"
BlueprintName = "IGListKitTodayExample"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2961B3891D68B031001C9451"
BuildableName = "IGListKitExamples.app"
BlueprintName = "IGListKitExamples"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2961B3891D68B031001C9451"
BuildableName = "IGListKitExamples.app"
BlueprintName = "IGListKitExamples"
ReferencedContainer = "container:IGListKitExamples.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 2 additions & 0 deletions Example/IGListKitExamples/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
41 changes: 41 additions & 0 deletions Example/IGListKitExamples/Models/FeedItem.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
The examples provided by Facebook are for non-commercial testing and evaluation
purposes only. Facebook reserves all rights not expressly granted.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import IGListKit

final class FeedItem: IGListDiffable {

let pk: Int
let user: User
let comments: [String]

init(pk: Int, user: User, comments: [String]) {
self.pk = pk
self.user = user
self.comments = comments
}

//MARK: IGListDiffable

func diffIdentifier() -> NSObjectProtocol {
return pk as NSObjectProtocol
}

func isEqual(toDiffableObject object: IGListDiffable?) -> Bool {
guard self !== object else { return true }
guard let object = object as? FeedItem else { return false }
return user.isEqual(toDiffableObject: object.user) && comments == object.comments
}

}
31 changes: 31 additions & 0 deletions Example/IGListKitExamples/Models/SelectionModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
The examples provided by Facebook are for non-commercial testing and evaluation
purposes only. Facebook reserves all rights not expressly granted.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import IGListKit

enum SelectionModelType: Int {
case none, fullWidth, nib
}

final class SelectionModel: NSObject {

let options: [String]
let type: SelectionModelType

init(options: [String], type: SelectionModelType = .none) {
self.options = options
self.type = type
}

}
14 changes: 5 additions & 9 deletions Example/IGListKitExamples/Models/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import IGListKit

class User: IGListDiffable {
final class User: IGListDiffable {

let pk: Int
let name: String
Expand All @@ -32,14 +32,10 @@ class User: IGListDiffable {
return pk as NSObjectProtocol
}

func isEqual(_ object: IGListDiffable?) -> Bool {
if self === object {
return true
}
if let object = object as? User {
return name == object.name && handle == object.handle
}
return false
func isEqual(toDiffableObject object: IGListDiffable?) -> Bool {
guard self !== object else { return true }
guard let object = object as? User else { return false }
return name == object.name && handle == object.handle
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DemoItem: NSObject {

}

class DemoSectionController: IGListSectionController, IGListSectionType {
final class DemoSectionController: IGListSectionController, IGListSectionType {

var object: DemoItem?

Expand Down
Loading

0 comments on commit 61e8eab

Please sign in to comment.