I am using UITextField hosted inside UIScrollView and using keyboard notification to adjust content size, right now when scrollview scrolls to textfield the padding between keyboard and textfield is too small. Is there anyway I can customise padding??
Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
3
Answers
You can use IQKeyboardManager for automatically provide padding and without any trouble of scrollView with single Line of code. You can install it via
CocoaPods
orManually
.add bottom constraint outlet of Scroll View( this must be the bottom constraint of last textfield from bottom).
and in that view controller add the following line of code.
Set the contentInset of the UIScrollView