From 7b74ff800ae1e4f80ce3eeecd894a60070da8f19 Mon Sep 17 00:00:00 2001 From: hackiftekhar Date: Tue, 25 Feb 2014 17:00:41 +0530 Subject: [PATCH] ReadMe updated --- .../KeyboardTextFieldDemo/AppDelegate.m | 1 + README.md | 34 ++++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/KeyboardTextFieldDemo/KeyboardTextFieldDemo/AppDelegate.m b/KeyboardTextFieldDemo/KeyboardTextFieldDemo/AppDelegate.m index b34cd8d6..f455f2c7 100755 --- a/KeyboardTextFieldDemo/KeyboardTextFieldDemo/AppDelegate.m +++ b/KeyboardTextFieldDemo/KeyboardTextFieldDemo/AppDelegate.m @@ -29,6 +29,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( //Giving permission to modify TextView's frame [[IQKeyboardManager sharedManager] setCanAdjustTextView:YES]; + //Show TextField placeholder texts on autoToolbar [[IQKeyboardManager sharedManager] setShouldShowTextFieldPlaceholder:YES]; return YES; diff --git a/README.md b/README.md index 3c6354fd..a9c5a80d 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,25 @@ Often while developing an app, We ran into an issues where the iPhone UIKeyboard ![image](./KeyboardTextFieldDemo/Screenshot/IQKeyboardManagerScreenshot.png) -Usage +Installation +========================== + +Cocoapod +--- +IQKeyboardManager is available through [CocoaPods](http://cocoapods.org), to install +it simply add the following line to your Podfile: + + pod 'IQKeyboardManager', '~>2.5.0' + +Framework:- +--- +Link your project against `KeyboardManager.framework` found in "KeyboardManagerFramework" directory. Drag and drop the resource bundle `IQKeyboardManager.bundle` found in same directory. add `-ObjC` flag in `other linker flag`. In your `appDelegate.m` import `#import `. Write just one line of code. + +Source Code:- --- -Just drag and drop `IQKeyboardManager` class in your project. In your `appDelegate.m` write just one line of code. This will handle all UITextField/UITextView covering problem. +Just drag and drop `IQKeyBoardManager` directory from demo project to your project. In your `appDelegate.m` import `#import "IQKeyboardManager.h"`. Write just one line of code. +## Usage ``` objc //AppDelegate.m @@ -31,7 +46,7 @@ Just drag and drop `IQKeyboardManager` class in your project. In your `appDelega //(Optional)Enable autoToolbar behaviour. If It is set to NO. You have to manually create UIToolbar for keyboard. //[[IQKeyboardManager sharedManager] setEnableAutoToolbar:YES]; - //(Optional)Setting toolbar behaviour to IQAutoToolbarBySubviews to manage previous/next according to UITextField's hirarchy in it's SuperView. Set it to IQAutoToolbarByTag to manage previous/next according to UITextField's tag property in increasing order. + //(Optional)Setting toolbar behaviour to IQAutoToolbarBySubviews to manage previous/next according to UITextField's hierarchy in it's SuperView. Set it to IQAutoToolbarByTag to manage previous/next according to UITextField's tag property in increasing order. //[[IQKeyboardManager sharedManager] setToolbarManageBehaviour:IQAutoToolbarBySubviews]; //(Optional)Resign textField if touched outside of UITextField/UITextView. @@ -40,6 +55,9 @@ Just drag and drop `IQKeyboardManager` class in your project. In your `appDelega //(Optional)Giving permission to modify TextView's frame //[[IQKeyboardManager sharedManager] setCanAdjustTextView:YES]; + //(Optional)Show TextField placeholder texts on autoToolbar + [[IQKeyboardManager sharedManager] setShouldShowTextFieldPlaceholder:YES]; + [self.window makeKeyAndVisible]; return YES; } @@ -49,16 +67,6 @@ Just drag and drop `IQKeyboardManager` class in your project. In your `appDelega ``` -## Installation - -IQKeyboardManager is available through [CocoaPods](http://cocoapods.org), to install -it simply add the following line to your Podfile: - - pod 'IQKeyboardManager', '~>2.5.0' - - - - ## Feature:-