folding-cell | :octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion | Animation library
kandi X-RAY | folding-cell Summary
kandi X-RAY | folding-cell Summary
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of folding-cell
folding-cell Key Features
folding-cell Examples and Code Snippets
Community Discussions
Trending Discussions on folding-cell
QUESTION
This is the result I currently get (unwanted): https://vimeo.com/459984986.
This is the result I get using a workaround (almost what I want): https://vimeo.com/459986233.
The summary of what my problem is, is the following: (1) I have installed the "IQKeyboardManagerSwift" cocoapod, (2) I have a custom cell in my UITableViewController that is a FolingCell (another cocoapod) and contains a textfield, (3) when I tap inside the textfield, I want the view to automatically scroll up to make the textfield visible (above the keyboard), which should be automatically taken care of by IQKeyboardManager (yes, I have added the "enable" code in my AppDelegate).
As seen in the "unwanted" result video above, the view seemingly attempts to scroll but, ultimately, just ends up jittering up and down slightly before ending up at the original position while the keyboard slides up and covers the textfield undesirably.
Further, the little "workaround" I found which I do not want to settle for is adding the following line to the textfield's IBAction editingDidEnd outlet/action function: "sender.becomeFirstResponder()". Before I updated to XCode 12 and iOS 14 on my iPhone on which I run and test my app, I did not have to hassle with ".becomeFirstResponder()" or ".resignResponder()" because that's what IQKeyboardManager does automatically. Now, adding the aforementioned line of code allows the UITableViewController to move the view above the keyboard. BUT, if you look closely, it sits the textfield right on top of the keyboard which is clearly not done by IQKeyboardManager because IQKeyboardManager has a default offset of CGFloat(10) between the textfield and keyboard.
I think the relevant parts of code are my custom cell (called "SavedImageFoldingImageCell") because that is where I create the textfield in question and my UITableViewController (called "SavedImageTableViewController").
Please, any help, suggestion, advice you can offer would help me a ton and be super appreciated. Thanks!
Yes, my code looks horrific because I have no proper training/education in best practices for coding or coding in general. Suggestions there would be appreciated as well! If you see ways I can shorten and organize my code, by all means divulge your secrets!
Custom Cell's Code:
...ANSWER
Answered 2020-Sep-21 at 16:31I solved my own problem by simply switching the class from UITableViewController -> UIViewController. I went through the closed issues on IQKeyboardManager's Github page and discovered that since Apple's UITableViewController automatically handles movement of the view and keyboard, IQKeyboardManager's developer chose to ignore textfield's that are in a UITableViewController. Therefore, you must change the class to a UIViewController or another supported class to have textfields recognized by IQKeyboardManager.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install folding-cell
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page