Skip to content

Commit 73d46d4

Browse files
Merge pull request #26 from EurekaCommunity/release
Release version 2.1.0
2 parents cfdd6d7 + 97499ff commit 73d46d4

File tree

6 files changed

+38
-38
lines changed

6 files changed

+38
-38
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Change Log
22
All notable changes to SuggestionRow will be documented in this file.
33

4-
### [1.0.0](https://github.com/EurekaCommunity/SuggestionRow/releases/tag/1.0.0)
4+
## [2.1.0](https://github.com/EurekaCommunity/SuggestionRow/releases/tag/2.1.0)
55

6-
* This is the initial version. It supports Eureka 3.0 and Swift 3
6+
* Support for Swift 4
7+
* Support loading suggestions asynchronously
8+
9+
## [1.0.0](https://github.com/EurekaCommunity/SuggestionRow/releases/tag/1.0.0)
710

11+
* This is the initial version. It supports Eureka 3.0 and Swift 3

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "xmartlabs/Eureka" "9678ff95edd7b217ecb73c02938ce47d206cb03d"
1+
github "xmartlabs/Eureka" "4.2.0"

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ DEPENDENCIES:
55
- Eureka (~> 4.0)
66

77
SPEC REPOS:
8-
https://github.com/cocoapods/specs.git:
8+
https://github.com/cocoapods/specs:
99
- Eureka
1010

1111
SPEC CHECKSUMS:

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<img src="https://img.shields.io/badge/platform-iOS-blue.svg?style=flat" alt="Platform iOS" />
2-
<a href="https://developer.apple.com/swift"><img src="https://img.shields.io/badge/swift3-compatible-4BC51D.svg?style=flat" alt="Swift 3 compatible" /></a>
32
<a href="https://cocoapods.org/pods/SuggestionRow"><img src="https://img.shields.io/cocoapods/v/SuggestionRow.svg" alt="CocoaPods compatible" /></a>
43
<a href="https://raw.githubusercontent.com/EurekaCommunity/SuggestionRow/master/LICENSE"><img src="http://img.shields.io/badge/license-MIT-blue.svg?style=flat" alt="License: MIT" /></a>
54
</p>
@@ -8,6 +7,7 @@
87
* [Introduction](#introduction)
98
* [Installation](#installation)
109
* [Usage](#usage)
10+
* [Running the examples](#running-the-examples)
1111
* [Customization](#customization)
1212
* [Dependencies](#dependencies)
1313
* [Requirements](#requirements)
@@ -54,7 +54,7 @@ First, the type that you want to provide completion suggestions for must conform
5454
self.firstName = firstName
5555
self.lastName = lastName
5656
}
57-
}
57+
}
5858

5959
To conform to the `SuggestionValue` protocol, add a `suggestionString` method that specifies how `Scientist`s should be displayed as suggestions. This is the text that will either go in a tag in the `inputAccessoryView` or in a row in the suggestions `UITableView`. For `Scientist`s, displaying the full name is a good option, as shown below. `Scientist` must also conform to `Equatable` and `InputTypeInitiable` as required by `SuggestionValue`. `InputTypeInitiable` is a protocol defined by `Eureka` which requires an optional initializer that takes in a `String`. It's used to determine how to instatiate a value from the contents of a `UITextField`. In this case, the text that the user types in is used to filter existing values but not create new ones so the initializer can return nil.
6060

@@ -63,7 +63,7 @@ To conform to the `SuggestionValue` protocol, add a `suggestionString` method th
6363
init?(string stringValue: String) {
6464
return nil
6565
}
66-
66+
6767
// Text that is displayed as a completion suggestion.
6868
var suggestionString: String {
6969
return "\(firstName) \(lastName)"
@@ -74,7 +74,7 @@ To conform to the [`Equatable`](https://developer.apple.com/reference/swift/equa
7474

7575
func == (lhs: Scientist, rhs: Scientist) -> Bool {
7676
return lhs.id == rhs.id
77-
}
77+
}
7878

7979
### Instantiate the row
8080
In your form, add a row of type `SuggestionAccessoryRow<Scientist>` or `SuggestionTableRow<Scientist>`. You must define the row's `filterFunction` to determine where completion suggestions come from and how they are selected based on the user's input. The function you set as `filterFunction` must take in a `String` parameter (what the user has typed in) and return an array of `Scientist` (the valid suggestions). This function is called each time the user input field changes. The following example is also in `SuggestionExampleViewController`:
@@ -90,6 +90,13 @@ In your form, add a row of type `SuggestionAccessoryRow<Scientist>` or `Suggesti
9090
$0.placeholder = "Search for a famous scientist"
9191
}
9292

93+
## Running the examples
94+
To run the examples follow these steps:
95+
96+
* Clone or download this repo
97+
* Run `carthage update` in the root folder
98+
* Run the project
99+
93100
## Customization
94101

95102
### `SuggestionAccessoryRow<T>`
@@ -99,7 +106,7 @@ In your form, add a row of type `SuggestionAccessoryRow<Scientist>` or `Suggesti
99106

100107
* If you want to change the **layout of the collectionView** then you can use/modify/override the `collectionViewLayout` attribute in the `cellSetup` method when declaring the row.
101108

102-
* If you want to change something about the **collectionView** (e.g. its height, backgroundColor) then you can also do that in the `cellSetup` method.
109+
* If you want to change something about the **collectionView** (e.g. its height, backgroundColor) then you can also do that in the `cellSetup` method.
103110

104111
* If you want to **change the collection view cell of the inputAccessoryView** drastically, create your own row (`MySuggestionAccessoryRow`) with your own cell class which conforms to `EurekaSuggestionCollectionViewCell`.
105112

@@ -113,7 +120,7 @@ In your form, add a row of type `SuggestionAccessoryRow<Scientist>` or `Suggesti
113120
* If you want to change these cells drastically, create your own row with your own cell class which conforms to `EurekaSuggestionTableViewCell`.
114121

115122
## Dependencies
116-
* Eureka
123+
* Eureka
117124

118125
## Requirements
119126
* iOS 8.0+
@@ -124,4 +131,3 @@ In your form, add a row of type `SuggestionAccessoryRow<Scientist>` or `Suggesti
124131
* If you **want to contribute** please feel free to **submit pull requests**.
125132
* If you **have a feature request** please **open an issue**.
126133
* If you **found a bug** or **need help** please **check older issues before submitting an issue.**.
127-

SuggestionRow.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "SuggestionRow"
3-
s.version = "2.0.0"
3+
s.version = "2.1.0"
44
s.summary = "Eureka row that displays completion suggestions either below the row in a table view or in the input accessory view above the keyboard."
55
s.homepage = "https://github.com/EurekaCommunity/SuggestionRow"
66
s.license = { type: 'MIT', file: 'LICENSE' }

SuggestionRow.xcodeproj/project.pbxproj

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@
1010
491BA285AFA32862390D7431 /* Pods_SuggestionRow.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E382FC4170AC6A8094CA8BB2 /* Pods_SuggestionRow.framework */; };
1111
6A9D202F2BA6E4BFA39C5B05 /* Pods_SuggestionRowUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9AB6675C27F04324EC0932A6 /* Pods_SuggestionRowUITests.framework */; };
1212
79E4A8291FD82BF50023D6B6 /* SuggestionRow.h in Headers */ = {isa = PBXBuildFile; fileRef = 79E4A8271FD82BF50023D6B6 /* SuggestionRow.h */; settings = {ATTRIBUTES = (Public, ); }; };
13-
79E4A82C1FD82BF50023D6B6 /* SuggestionRow.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79E4A8251FD82BF50023D6B6 /* SuggestionRow.framework */; };
14-
79E4A82D1FD82BF50023D6B6 /* SuggestionRow.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79E4A8251FD82BF50023D6B6 /* SuggestionRow.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1513
79E4A8391FD82C320023D6B6 /* SuggestionRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD741D64F824002F17F9 /* SuggestionRow.swift */; };
1614
79E4A83A1FD82C320023D6B6 /* SuggestionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD751D64F824002F17F9 /* SuggestionCell.swift */; };
1715
79E4A83B1FD82C320023D6B6 /* SuggestionCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD761D64F824002F17F9 /* SuggestionCollectionCell.swift */; };
1816
79E4A83C1FD82C320023D6B6 /* SuggestionCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD771D64F824002F17F9 /* SuggestionCollectionViewCell.swift */; };
1917
79E4A83D1FD82C320023D6B6 /* SuggestionTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD7C1D64FB78002F17F9 /* SuggestionTableCell.swift */; };
2018
79E4A83E1FD82C320023D6B6 /* SuggestionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD7D1D64FB78002F17F9 /* SuggestionTableViewCell.swift */; };
2119
79E4A83F1FD82C320023D6B6 /* String+SuggestionValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FA74BC81D831E2100571A0C /* String+SuggestionValue.swift */; };
22-
79E4A8411FD82DB50023D6B6 /* Eureka.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79E4A8401FD82DB50023D6B6 /* Eureka.framework */; };
2320
8FA74BC91D831E2100571A0C /* String+SuggestionValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FA74BC81D831E2100571A0C /* String+SuggestionValue.swift */; };
21+
8FDDC60320F7988B00468068 /* Eureka.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FDDC60120F7988300468068 /* Eureka.framework */; };
22+
8FDDC60420F7988B00468068 /* Eureka.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8FDDC60120F7988300468068 /* Eureka.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2423
AA81DD461D64F706002F17F9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD451D64F706002F17F9 /* AppDelegate.swift */; };
2524
AA81DD481D64F707002F17F9 /* SuggestionExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA81DD471D64F707002F17F9 /* SuggestionExampleViewController.swift */; };
2625
AA81DD4B1D64F707002F17F9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA81DD491D64F707002F17F9 /* Main.storyboard */; };
@@ -38,13 +37,6 @@
3837
/* End PBXBuildFile section */
3938

4039
/* Begin PBXContainerItemProxy section */
41-
79E4A82A1FD82BF50023D6B6 /* PBXContainerItemProxy */ = {
42-
isa = PBXContainerItemProxy;
43-
containerPortal = AA81DD3A1D64F706002F17F9 /* Project object */;
44-
proxyType = 1;
45-
remoteGlobalIDString = 79E4A8241FD82BF50023D6B6;
46-
remoteInfo = SuggestionRow;
47-
};
4840
AA81DD571D64F707002F17F9 /* PBXContainerItemProxy */ = {
4941
isa = PBXContainerItemProxy;
5042
containerPortal = AA81DD3A1D64F706002F17F9 /* Project object */;
@@ -68,7 +60,7 @@
6860
dstPath = "";
6961
dstSubfolderSpec = 10;
7062
files = (
71-
79E4A82D1FD82BF50023D6B6 /* SuggestionRow.framework in Embed Frameworks */,
63+
8FDDC60420F7988B00468068 /* Eureka.framework in Embed Frameworks */,
7264
);
7365
name = "Embed Frameworks";
7466
runOnlyForDeploymentPostprocessing = 0;
@@ -81,9 +73,9 @@
8173
79E4A8251FD82BF50023D6B6 /* SuggestionRow.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SuggestionRow.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8274
79E4A8271FD82BF50023D6B6 /* SuggestionRow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SuggestionRow.h; sourceTree = "<group>"; };
8375
79E4A8281FD82BF50023D6B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
84-
79E4A8401FD82DB50023D6B6 /* Eureka.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Eureka.framework; path = Carthage/Build/iOS/Eureka.framework; sourceTree = "<group>"; };
8576
7CD7B18C2AB9C6EBA7388C89 /* Pods-SuggestionRowUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SuggestionRowUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SuggestionRowUITests/Pods-SuggestionRowUITests.debug.xcconfig"; sourceTree = "<group>"; };
8677
8FA74BC81D831E2100571A0C /* String+SuggestionValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+SuggestionValue.swift"; sourceTree = "<group>"; };
78+
8FDDC60120F7988300468068 /* Eureka.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Eureka.framework; path = Carthage/Build/iOS/Eureka.framework; sourceTree = "<group>"; };
8779
92D8B188ED3E2B0E4F9C4557 /* Pods_SuggestionRowTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SuggestionRowTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8880
9AB6675C27F04324EC0932A6 /* Pods_SuggestionRowUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SuggestionRowUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8981
AA81DD421D64F706002F17F9 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -116,7 +108,6 @@
116108
isa = PBXFrameworksBuildPhase;
117109
buildActionMask = 2147483647;
118110
files = (
119-
79E4A8411FD82DB50023D6B6 /* Eureka.framework in Frameworks */,
120111
491BA285AFA32862390D7431 /* Pods_SuggestionRow.framework in Frameworks */,
121112
);
122113
runOnlyForDeploymentPostprocessing = 0;
@@ -125,7 +116,7 @@
125116
isa = PBXFrameworksBuildPhase;
126117
buildActionMask = 2147483647;
127118
files = (
128-
79E4A82C1FD82BF50023D6B6 /* SuggestionRow.framework in Frameworks */,
119+
8FDDC60320F7988B00468068 /* Eureka.framework in Frameworks */,
129120
);
130121
runOnlyForDeploymentPostprocessing = 0;
131122
};
@@ -244,7 +235,7 @@
244235
B49C487EB6DD1EF9AA014DDC /* Frameworks */ = {
245236
isa = PBXGroup;
246237
children = (
247-
79E4A8401FD82DB50023D6B6 /* Eureka.framework */,
238+
8FDDC60120F7988300468068 /* Eureka.framework */,
248239
E382FC4170AC6A8094CA8BB2 /* Pods_SuggestionRow.framework */,
249240
92D8B188ED3E2B0E4F9C4557 /* Pods_SuggestionRowTests.framework */,
250241
9AB6675C27F04324EC0932A6 /* Pods_SuggestionRowUITests.framework */,
@@ -297,7 +288,6 @@
297288
buildRules = (
298289
);
299290
dependencies = (
300-
79E4A82B1FD82BF50023D6B6 /* PBXTargetDependency */,
301291
);
302292
name = Example;
303293
productName = SuggestionRow;
@@ -359,7 +349,6 @@
359349
};
360350
AA81DD411D64F706002F17F9 = {
361351
CreatedOnToolsVersion = 7.3.1;
362-
DevelopmentTeam = 6F2G55XL63;
363352
LastSwiftMigration = 0800;
364353
};
365354
AA81DD551D64F707002F17F9 = {
@@ -536,11 +525,6 @@
536525
/* End PBXSourcesBuildPhase section */
537526

538527
/* Begin PBXTargetDependency section */
539-
79E4A82B1FD82BF50023D6B6 /* PBXTargetDependency */ = {
540-
isa = PBXTargetDependency;
541-
target = 79E4A8241FD82BF50023D6B6 /* SuggestionRow */;
542-
targetProxy = 79E4A82A1FD82BF50023D6B6 /* PBXContainerItemProxy */;
543-
};
544528
AA81DD581D64F707002F17F9 /* PBXTargetDependency */ = {
545529
isa = PBXTargetDependency;
546530
target = AA81DD411D64F706002F17F9 /* Example */;
@@ -765,10 +749,13 @@
765749
AA81DD6B1D64F707002F17F9 /* Debug */ = {
766750
isa = XCBuildConfiguration;
767751
buildSettings = {
768-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
769752
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
770753
CODE_SIGN_IDENTITY = "iPhone Developer";
771-
DEVELOPMENT_TEAM = 6F2G55XL63;
754+
DEVELOPMENT_TEAM = "";
755+
FRAMEWORK_SEARCH_PATHS = (
756+
"$(inherited)",
757+
"$(PROJECT_DIR)/Carthage/Build/iOS",
758+
);
772759
INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist";
773760
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
774761
PRODUCT_BUNDLE_IDENTIFIER = "Helene-Martin.SuggestionRow";
@@ -779,10 +766,13 @@
779766
AA81DD6C1D64F707002F17F9 /* Release */ = {
780767
isa = XCBuildConfiguration;
781768
buildSettings = {
782-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
783769
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
784770
CODE_SIGN_IDENTITY = "iPhone Developer";
785-
DEVELOPMENT_TEAM = 6F2G55XL63;
771+
DEVELOPMENT_TEAM = "";
772+
FRAMEWORK_SEARCH_PATHS = (
773+
"$(inherited)",
774+
"$(PROJECT_DIR)/Carthage/Build/iOS",
775+
);
786776
INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist";
787777
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
788778
PRODUCT_BUNDLE_IDENTIFIER = "Helene-Martin.SuggestionRow";

0 commit comments

Comments
 (0)