diff --git a/DAKeyboardControl/DAKeyboardControl.m b/DAKeyboardControl/DAKeyboardControl.m old mode 100644 new mode 100755 index c629ca46..e39e7227 --- a/DAKeyboardControl/DAKeyboardControl.m +++ b/DAKeyboardControl/DAKeyboardControl.m @@ -111,10 +111,6 @@ - (void)addKeyboardControl:(BOOL)panning frameBasedActionHandler:(DAKeyboardDidM selector:@selector(inputKeyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(inputKeyboardDidShow) - name:UIKeyboardDidShowNotification - object:nil]; // For the sake of 4.X compatibility [[NSNotificationCenter defaultCenter] addObserver:self @@ -224,7 +220,7 @@ - (void)responderDidBecomeActive:(NSNotification *)notification } self.keyboardActiveInput = (UIResponder *)textField; // Force the keyboard active view reset - [self inputKeyboardDidShow]; + [self grabActiveKeyboardView]; } } @@ -240,6 +236,8 @@ - (void)inputKeyboardWillShow:(NSNotification *)notification UIViewAnimationCurve keyboardTransitionAnimationCurve; [[notification.userInfo valueForKey:UIKeyboardAnimationCurveUserInfoKey] getValue:&keyboardTransitionAnimationCurve]; + + [self grabActiveKeyboardView]; self.keyboardActiveView.hidden = NO; self.keyboardOpened = YES; @@ -273,7 +271,7 @@ - (void)inputKeyboardWillShow:(NSNotification *)notification }]; } -- (void)inputKeyboardDidShow +- (void)grabActiveKeyboardView { // Grab the keyboard view self.keyboardActiveView = self.keyboardActiveInput.inputAccessoryView.superview; diff --git a/DAKeyboardControlExample/DAKeyboardControlExample.xcodeproj/project.pbxproj b/DAKeyboardControlExample/DAKeyboardControlExample.xcodeproj/project.pbxproj index dc519011..dba29fdb 100644 --- a/DAKeyboardControlExample/DAKeyboardControlExample.xcodeproj/project.pbxproj +++ b/DAKeyboardControlExample/DAKeyboardControlExample.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 040A71E31B21AD26004A4B97 /* Launchscreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 040A71E21B21AD26004A4B97 /* Launchscreen.xib */; }; 6366DFC815B3E76100FE53DE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6366DFC715B3E76100FE53DE /* UIKit.framework */; }; 6366DFCA15B3E76100FE53DE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6366DFC915B3E76100FE53DE /* Foundation.framework */; }; 6366DFCC15B3E76100FE53DE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6366DFCB15B3E76100FE53DE /* CoreGraphics.framework */; }; @@ -19,6 +20,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 040A71E21B21AD26004A4B97 /* Launchscreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Launchscreen.xib; sourceTree = SOURCE_ROOT; }; 6366DFC315B3E76100FE53DE /* DAKeyboardControlExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DAKeyboardControlExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6366DFC715B3E76100FE53DE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 6366DFC915B3E76100FE53DE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -98,6 +100,7 @@ 6366DFD015B3E76100FE53DE /* InfoPlist.strings */, 6366DFD315B3E76100FE53DE /* main.m */, 6366DFD515B3E76100FE53DE /* DAKeyboardControlExample-Prefix.pch */, + 040A71E21B21AD26004A4B97 /* Launchscreen.xib */, ); name = "Supporting Files"; sourceTree = ""; @@ -165,6 +168,7 @@ files = ( 6366DFD215B3E76100FE53DE /* InfoPlist.strings in Resources */, 63ECD0631628CC5A004D8D10 /* Default-568h@2x.png in Resources */, + 040A71E31B21AD26004A4B97 /* Launchscreen.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/DAKeyboardControlExample/DAKeyboardControlExample/DAKeyboardControlExample-Info.plist b/DAKeyboardControlExample/DAKeyboardControlExample/DAKeyboardControlExample-Info.plist index d3c6b7d3..230b0c2f 100644 --- a/DAKeyboardControlExample/DAKeyboardControlExample/DAKeyboardControlExample-Info.plist +++ b/DAKeyboardControlExample/DAKeyboardControlExample/DAKeyboardControlExample-Info.plist @@ -24,6 +24,8 @@ 1.0 LSRequiresIPhoneOS + NSMainNibFile + Launchscreen UIRequiredDeviceCapabilities armv7 diff --git a/DAKeyboardControlExample/Launchscreen.xib b/DAKeyboardControlExample/Launchscreen.xib new file mode 100644 index 00000000..349ffd45 --- /dev/null +++ b/DAKeyboardControlExample/Launchscreen.xib @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 5f1eadc8..21f40c0b 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ No hacks, fully App Store safe. -![Screenshot](https://github.com/danielamitay/DAKeyboardControl/raw/master/screenshot.png) +![Screenshot](https://raw.githubusercontent.com/SabatinoMasala/DAKeyboardControl/master/screenshot.png) [Video demonstration on YouTube](http://www.youtube.com/watch?v=J6GLro0cyDU) diff --git a/screenshot.png b/screenshot.png index 0e30173f..1ada81b1 100644 Binary files a/screenshot.png and b/screenshot.png differ