Skip to content

Commit

Permalink
Fix the init issue of AccessoryToolbar.
Browse files Browse the repository at this point in the history
  • Loading branch information
lm2343635 committed Aug 22, 2017
1 parent a37ea19 commit be791e2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Example/MGKeyboardAccessory.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
805D11831E63B0797F08A674 /* [CP] Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -336,7 +336,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
F8C5B6BA35AE3F86C4492D98 /* [CP] Copy Pods Resources */ = {
Expand Down
2 changes: 1 addition & 1 deletion MGKeyboardAccessory.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'MGKeyboardAccessory'
s.version = '0.3'
s.version = '0.3.1'
s.summary = 'A keyboard accessory to input special characters.'

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion MGKeyboardAccessory/Classes/AccessoryToolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class AccessoryToolbar: UIToolbar {
}

required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
super.init(coder: aDecoder)
}

func createStringBarButtonItem(strings: [String], color: UIColor, action: Selector, height: CGFloat) -> UIBarButtonItem {
Expand Down
2 changes: 2 additions & 0 deletions MGKeyboardAccessory/Classes/MGKeyboardAccessory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import Foundation

public extension UITextField {

// Add keyboard accessory for text field.
func setupKeyboardAccessory(_ strings: [String], barStyle: UIBarStyle) {
self.inputAccessoryView = AccessoryToolbar.init(strings, barStyle: barStyle, forTextInput: self)
}
Expand All @@ -36,6 +37,7 @@ public extension UITextField {

public extension UITextView {

// Add keyboard accessory for text view.
func setupKeyboardAccessory(_ strings: [String], barStyle: UIBarStyle) {
self.inputAccessoryView = AccessoryToolbar.init(strings, barStyle: barStyle, forTextInput: self)
}
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ The first parameter is a string array to create custom button, the second parame
- v0.3
- Support UITextView.

- v0.3.1
- Fix the init issue of AccessoryToolbar.

## Author

Meng Li, http://fczm.pw, lm2343635@126.com
Expand Down

0 comments on commit be791e2

Please sign in to comment.