I'm building an app for iOS 7+ and I'm testing this on iOS 8 for now.
I'm creating a simple sign up form. Using a UITableView where one cell holds a UITextInput for the username and another cell underneath holds a UITextInput for password.
When I click on the username input field, the keyboard pops up as expected. Now, if I click on the password input field in the other UITableViewCell then the whole UITableView crashes/appears black. The keyboard remains visible however.
What's strange is that no logs are left either via the Terminal debug output area or the whole iPhone console log.
Additionally - this ONLY happens when running it on an actual iPhone. I cannot replicate the crash/black screen in the simulator (perhaps this is because the keyboard doesn't pop up in the simulator?). I'm using Xcode 6 beta 2 and building for iOS 7 and above. Running on iOS 8.
Lastly - I have stuck a debug output in prepareForReuse() for the respective cells. This does not get called.
Any tips on what is going on here?
Thanks in advance.
== Edit ==
After the "crash" the screen appears like (note: the status bar is hidden before the crash):
Disabling correction fixed the problem - how weird!
Related
When developing an app for iOS, I've encountered a strange problem.
To be precise, it's about a chat app. Inside the chat view controller, the message input box should stick to the keyboard when it appears. I've got that one covered with the UIKeyboardWillChangeFrameNotification.
However, the problem is that this notification is not called when I change from the default keyboard to the emoji keyboard, which is slightly taller, the notification is not called (I'm leading both UIKeyboardWillChangeFrameNotification and UIKeyboardDidChangeFrameNotification to the same selector, none of them is called, I've tested it by doing a NSLog and setting a breakpoint). That results in the keyboard overlapping the message box. I made some screenshots to visualize the problem.
Default keyboard
Emoji keyboard
I've tested it on an iPhone X and on the iPhone 8 Plus Simulator, but there, everything's fine because the auto-completion bar makes up the difference between the two keyboards.
Am I implementing the wrong notification? How should I solve this problem?
Okay, it seems like this was an actual bug in iOS 11. It seems to be fixed in iOS 11.2.6.
So I just switched the keyboard type for the three textViews I have on one of my viewControllers to use the Number Pad keyboard. I also added a library (not a cocoapod) for a custom ScrollView object that I added to the view; the Scrollview makes all subviews scroll up/down to respond to instances of the keyboard being displayed onscreen.
It displays fine when I run the code on my machine's simulators (simulators for iPhones 5s and 6.) But when the other guy on the project tries it, the keyboard shows up briefly on the 5s simulator before hiding. On his simulator for the 6, the keyboard doesn't appear at all.
Could it be the custom Scrollview screwing with the UI? I'll post a link to the repo..I'd post some code but aside from this object, I can't think of anything else that could be responsible.
https://github.com/michaeltyson/TPKeyboardAvoiding
If you tap into a textfield and the keyboard does not appear, hit command+k on your physical keyboard to bring up the simulator one. You will still be able to type with your physical keyboard but the simulator one will come up as well.
Try command+shift+k. That turns on and off the simulated hardware keyboard. I have had it fix this kind of issue before, even when I didn't realize I had it turned on.
I'm developing an iOS 8 app in Xcode 6.0.1 and running it on my iPhone 5 (which has iOS 8.0.2 on it). In my app, I'm using a UITextField with the Decimal Pad keyboard type (I use the Xcode storyboard to set the keyboard type). Everything worked as expected when I was using iOS 7 and Xcode 5. However, after updating my software, I'm having this problem:
Every time I click on the UITextField, the Decimal Pad keyboard pops up normally (although the decimal button in the lower left corner is a half the size it should be), but then the UITextField won't animate upwards above the keyboard (like it used to) and the following message gets printed out on the console (however, my app does not crash):
Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using 1425143906_Portrait_iPhone-Simple-Pad_Default
A number of "solutions" on the internet suggest going to iOS Simulator > Hardware > Keyboards and toggling an option in there. However, I'm not running my app on a simulator; I'm running it on my phone, so this solution does not work.
Thanks for the help!
Turns out, the issue with the UITextField animation was not due to the keyboard problem. I needed to set up constraints in Xcode's storyboard for the UITextField, make outlets for them in my view controller, and use the constraints to programmatically move the UITextField. I have that working now. However, the error message still pops up when the decimal pad comes up. I guess I can just ignore it until Apple fixes it.
EDIT:
I reported the bug to Apple.
When running the iOS 8 simulator one of my screens has stopped entering edit mode. When pressing the button I created to active edit mode for the tableView nothing happens. It still works in iOS8.
Has anything changed for tableview editing in iOS8 that I am un aware of? Ive also noticed that when swiping to delete the row doesn't disappear like it use to. What must be done to fix this problem?
I am coming across a strange bug in my app, that I believe is an iOS 6 bug.
I have a UITextView that contains some text that has some links and phone numbers. In my storyboard, I have Links & Phone Numbers checked under 'Detection' for my UITextView. In code I also do:
_txtvFooter.editable = NO;
_txtvFooter.dataDetectorTypes = UIDataDetectorTypeAll;
The issue I am having is a strange one, but when I run my app onto my device (or sim) from Xcode, the UITextView detects all of the links fine, and I can click them. If I then run the app not in debug (not running through Xcode), the links show as black standard text and cannot be touched. Note this is only happening on iOS 6.
On the iOS 5 simulator, the links show as blue and are clickable no matter if the app is run in debug, or just ran from the simulator.
I have looked all over the internets, and cannot find a solution or anyone else who has reported this issue. Does anyone know if something changed in iOS 6 specifically? I thing is, like I said it detects the links when run straight from Xcode, so to me it seems like an iOS 6 bug.
Any help is appreciated!
I found what was causing my issue. What I was doing was placing a UIView in the footer of a UITableView in Storyboard that contained a UITextView.
The fix was dumb... I removed the UITextView from the UIView and just used that as the footer (I at one point had multiple textviews in the footer) and the links began detecting.
I still believe this is a bug though-- because if you do need to use a UIView the links would not detect from the textviews within.