Skip to content

Commit c267726

Browse files
authored
Merge pull request #25 from polydice/feature/drop-prefix
Drop Class Name Prefixes
2 parents d9dc195 + a5498ae commit c267726

19 files changed

+132
-160
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ xcuserdata
2222
*.moved-aside
2323
*.xcuserstate
2424
*.xcscmblueprint
25-
docs
2625

2726
## Obj-C/Swift specific
2827
*.hmap
2928
*.ipa
3029

30+
## Docs
31+
undocumented.json
32+
*.docset
33+
*.tgz
34+
3135
## CocoaPods
3236
Pods/
3337

.jazzy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ github_file_prefix: https://github.com/polydice/ICInputAccessory/blob/develop
66
xcodebuild_arguments: [-project, ICInputAccessory.xcodeproj, -scheme, ICInputAccessory-iOS]
77
module: ICInputAccessory
88
module_version: 1.5.0
9-
output: docs/output
9+
output: docs
1010
theme: fullwidth
1111
skip_undocumented: true

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ script:
1717
- bundle exec rake ci:test
1818
- make -B carthage
1919
- make -B docs
20-
after_script:
21-
- sh scripts/update-docs.sh
2220
notifications:
2321
email: false
2422
slack:

Example/CustomizedTokenField.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import UIKit
2828
import ICInputAccessory
2929

30-
class CustomizedTokenField: ICTokenField {
30+
class CustomizedTokenField: TokenField {
3131

3232
override init(frame: CGRect) {
3333
super.init(frame: frame)
@@ -49,7 +49,7 @@ class CustomizedTokenField: ICTokenField {
4949
////////////////////////////////////////////////////////////////////////////////
5050

5151

52-
extension ICTokenField {
52+
extension TokenField {
5353

5454
func applyCustomizedStyle() {
5555
icon = UIImage(named: "icook-iphone-input-search")

Example/CustomizedTokenViewController.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import UIKit
2828
import ICInputAccessory
2929

30-
class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
30+
class CustomizedTokenViewController: UIViewController, TokenFieldDelegate {
3131

3232
private let tokenField = CustomizedTokenField()
3333
private let textView = UITextView()
@@ -84,40 +84,40 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
8484
textView.endEditing(true)
8585
}
8686

87-
// MARK: - ICTokenFieldDelegate
87+
// MARK: - TokenFieldDelegate
8888

89-
func tokenFieldDidBeginEditing(_ tokenField: ICTokenField) {
89+
func tokenFieldDidBeginEditing(_ tokenField: TokenField) {
9090
print(#function)
9191
}
9292

93-
func tokenFieldDidEndEditing(_ tokenField: ICTokenField) {
93+
func tokenFieldDidEndEditing(_ tokenField: TokenField) {
9494
print(#function)
9595
}
9696

97-
func tokenFieldWillReturn(_ tokenField: ICTokenField) {
97+
func tokenFieldWillReturn(_ tokenField: TokenField) {
9898
print(#function)
9999
}
100100

101-
func tokenField(_ tokenField: ICTokenField, didChangeInputText text: String) {
101+
func tokenField(_ tokenField: TokenField, didChangeInputText text: String) {
102102
print("Typing \"\(text)\"")
103103
}
104104

105-
func tokenField(_ tokenField: ICTokenField, shouldCompleteText text: String) -> Bool {
105+
func tokenField(_ tokenField: TokenField, shouldCompleteText text: String) -> Bool {
106106
print("Should add \"\(text)\"?")
107107
return text != "42"
108108
}
109109

110-
func tokenField(_ tokenField: ICTokenField, didCompleteText text: String) {
110+
func tokenField(_ tokenField: TokenField, didCompleteText text: String) {
111111
print("Added \"\(text)\"")
112112
updateTexts()
113113
}
114114

115-
func tokenField(_ tokenField: ICTokenField, didDeleteText text: String, atIndex index: Int) {
115+
func tokenField(_ tokenField: TokenField, didDeleteText text: String, atIndex index: Int) {
116116
print("Deleted \"\(text)\"")
117117
updateTexts()
118118
}
119119

120-
func tokenField(_ tokenField: ICTokenField, subsequentDelimiterForCompletedText text: String) -> String {
120+
func tokenField(_ tokenField: TokenField, subsequentDelimiterForCompletedText text: String) -> String {
121121
return " ,"
122122
}
123123

Example/ExampleViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import ICInputAccessory
3030
class ExampleViewController: UITableViewController {
3131

3232
private let types: [UIView.Type] = [
33-
ICKeyboardDismissTextField.self,
34-
ICTokenField.self,
33+
KeyboardDismissTextField.self,
34+
TokenField.self,
3535
CustomizedTokenField.self
3636
]
3737

@@ -72,9 +72,9 @@ class ExampleViewController: UITableViewController {
7272

7373
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
7474
switch types[section] {
75-
case is ICKeyboardDismissTextField.Type:
75+
case is KeyboardDismissTextField.Type:
7676
return "Dismiss Keyboard"
77-
case is ICTokenField.Type:
77+
case is TokenField.Type:
7878
return "Text Field with Tokens"
7979
case is CustomizedTokenField.Type:
8080
return "Customize Token Field"
@@ -87,7 +87,7 @@ class ExampleViewController: UITableViewController {
8787
let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: ExampleCell.self), for: indexPath)
8888

8989
switch types[indexPath.section] {
90-
case let type as ICKeyboardDismissTextField.Type:
90+
case let type as KeyboardDismissTextField.Type:
9191
let textField = type.init()
9292
textField.leftViewMode = .always
9393
textField.leftView = UIView(frame: CGRect(x: 0, y: 0, width: 15, height: 15))
@@ -98,7 +98,7 @@ class ExampleViewController: UITableViewController {
9898
cell.textLabel?.text = String(describing: type)
9999
cell.accessoryType = .disclosureIndicator
100100

101-
case let type as ICTokenField.Type:
101+
case let type as TokenField.Type:
102102
let container = UIView(frame: cell.bounds)
103103
let tokenField = type.init()
104104
tokenField.placeholder = String(describing: type)

Example/Main.storyboard

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1212" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="XY5-gz-UXC">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="XY5-gz-UXC">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
99
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
1010
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1111
</dependencies>
@@ -18,8 +18,8 @@
1818
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1919
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2020
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
21-
<button key="tableFooterView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="N87-CU-PrP">
22-
<rect key="frame" x="0.0" y="219" width="375" height="88"/>
21+
<button key="tableFooterView" opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="N87-CU-PrP">
22+
<rect key="frame" x="0.0" y="217.5" width="375" height="88"/>
2323
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2424
<fontDescription key="fontDescription" type="system" pointSize="15"/>
2525
<state key="normal" title="Back to Code"/>
@@ -31,14 +31,14 @@
3131
<tableViewSection headerTitle="Dismiss Keyboard" id="tmE-Ln-PNX">
3232
<cells>
3333
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="hiq-lt-L5I">
34-
<rect key="frame" x="0.0" y="56" width="375" height="44"/>
34+
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
3535
<autoresizingMask key="autoresizingMask"/>
3636
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hiq-lt-L5I" id="dNb-Qm-7pq">
37-
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
37+
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
3838
<autoresizingMask key="autoresizingMask"/>
3939
<subviews>
40-
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Storyboard ICKeyboardDismissTextField" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="qdb-Ab-nYe" customClass="ICKeyboardDismissTextField" customModule="ICInputAccessory">
41-
<rect key="frame" x="18" y="12" width="339" height="20"/>
40+
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Storyboard KeyboardDismissTextField" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="qdb-Ab-nYe" customClass="KeyboardDismissTextField" customModule="ICInputAccessory">
41+
<rect key="frame" x="26" y="12" width="323" height="20"/>
4242
<fontDescription key="fontDescription" type="system" pointSize="16"/>
4343
<textInputTraits key="textInputTraits"/>
4444
<connections>
@@ -58,18 +58,18 @@
5858
<tableViewSection headerTitle="Text Field with Tokens" id="dx2-iZ-OPN">
5959
<cells>
6060
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="nCe-ZG-eEP">
61-
<rect key="frame" x="0.0" y="157" width="375" height="44"/>
61+
<rect key="frame" x="0.0" y="155.5" width="375" height="44"/>
6262
<autoresizingMask key="autoresizingMask"/>
6363
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nCe-ZG-eEP" id="6tu-Im-VHX">
64-
<rect key="frame" x="0.0" y="0.0" width="375" height="43"/>
64+
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
6565
<autoresizingMask key="autoresizingMask"/>
6666
<subviews>
67-
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2dP-7v-mWC" customClass="ICTokenField" customModule="ICInputAccessory">
67+
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2dP-7v-mWC" customClass="TokenField" customModule="ICInputAccessory">
6868
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
6969
<color key="backgroundColor" red="0.33333333333333331" green="0.33333333333333331" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
7070
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
7171
<userDefinedRuntimeAttributes>
72-
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="Storyboard ICTokenField"/>
72+
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="Storyboard TokenField"/>
7373
<userDefinedRuntimeAttribute type="image" keyPath="icon" value="icook-iphone-input-search"/>
7474
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
7575
<real key="value" value="0.0"/>
@@ -105,7 +105,7 @@
105105
</connections>
106106
</tableViewController>
107107
<placeholder placeholderIdentifier="IBFirstResponder" id="4Lj-fL-J07" userLabel="First Responder" sceneMemberID="firstResponder"/>
108-
<view contentMode="scaleToFill" id="zaj-ho-SsM" customClass="ICKeyboardDismissAccessoryView" customModule="ICInputAccessory">
108+
<view contentMode="scaleToFill" id="zaj-ho-SsM" customClass="KeyboardDismissAccessoryView" customModule="ICInputAccessory">
109109
<rect key="frame" x="0.0" y="0.0" width="320" height="60"/>
110110
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
111111
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -124,7 +124,7 @@
124124
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="XY5-gz-UXC" sceneMemberID="viewController">
125125
<toolbarItems/>
126126
<navigationBar key="navigationBar" contentMode="scaleToFill" id="wet-wK-15h">
127-
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
127+
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
128128
<autoresizingMask key="autoresizingMask"/>
129129
</navigationBar>
130130
<nil name="viewControllers"/>

Example/StoryboardViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import ICInputAccessory
2929

3030
class StoryboardViewController: UITableViewController {
3131

32-
@IBOutlet weak var tokenField: ICTokenField! {
32+
@IBOutlet weak var tokenField: TokenField! {
3333
didSet {
3434
tokenField.normalTokenAttributes = [
3535
.foregroundColor: UIColor.white,

0 commit comments

Comments
 (0)