title: TextField attach to keyboard while editing - how to make the ScrollView appear same as before editing?
body: <p>I created new Xcode single view project. In interface builder, I added a UIScrollView to cover complete view. Over this scrollview, I added a UITextField. The resulting UI looked like this:
  <a href="https://i.stack.imgur.com/cQsHY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cQsHY.png" alt="enter image description here"></a></p>
  
  <p>Note that the scrollview does not scroll at this point as the content takes only the size of view and not greater than it.</p>
  
  <p>Now for bringing UITextField on top of keyboard while editing, I followed the way described by Apple on <a href="https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html" rel="nofollow noreferrer">Managing The Keyboard</a> page. After doing this, it gave me expected behavior which brought the text field right above keyboard on editing begin as shown in following screenshot:
  <a href="https://i.stack.imgur.com/7xOnA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7xOnA.png" alt="enter image description here"></a></p>
  
  <p>Now, after calling <code>[textfield endEditing:YES]</code>, the keyboard hides itself, but the textfield does not return to its original place. It return to the place just little above its original place and now the scroll view becomes scrollable as if little height was added to it:</p>
  
  <p><a href="https://i.stack.imgur.com/ezDvY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ezDvY.png" alt="enter image description here"></a></p>
  
  <p>Notice the scroll bar in the above screenshot!</p>
  
  <p>I want help in bring back the original behavior of the view after editing ends (when keyboard hides) i.e. the textField to return to exact same place and scroll should be happening as it was not happening before editing begin.</p>
  
  <p>Project URL: - <a href="https://github.com/therohansanap/keyboard.git" rel="nofollow noreferrer">https://github.com/therohansanap/keyboard.git</a></p>