Text Field doesn't active for Static Cell in Table View Controller? - ios

I have Single View App for IOS Xcode 6.4. Example Add Player screen, I tried it by myself, but Text Field doesn't active to click and typing at my application simulator (UITableViewController Static Cell) I have compared my project with example final project, everything looks good similar. How to fix this problem?

First you try with cmd+k that will open the simulator's keyboard. If that is not working then try with cmd+shit+k that may hide your keyboard but you can able to type on the text filed. If that also not work then you may accidentally off the user interaction for text field. Or may be some other view covering your text field which is transparent, so you are not able to see it. I hope that will save your problem, otherwise please provide your code sample.

There is a bug in the segue transition. Set the transition to None and it should work. I had the problem with a Curl transition.

Related

iOS accessibility doesn't recognize anything on the screen

I'm trying to make my app accessible (use voice-over properly).
It works just fine in the first screen (login), but after the login no element gets the accessibility focus. It seems to be stuck.
Accessibility inspector's audit gives me this issue for all of the "should-be-accessible" elements in the screen:
This element appears to display text that should be represented using the accessibility API
When pressing the question mark I get:
Determine if any part of the content should be exposed as separate accessibility children
Does anybody have an idea? Did you get this warning?
P.S.
Apologize in advance, but I can't share my code because of security reasons.
Solved my problem.
Apparently, i've added another view after the login and then animated it off screen, but did not remove from superview.
It caused the app to lose accessibility focus (the focus was on the status bar only).
After removing the view, my app got the accessibility focus again.
My lesson from this problem - remove unnecessary views!
P.S
It's legacy code - wasn't written by me :)
You can follow three things :
You can all the view hierarchy and check whether accessibilityElements are properly set or not.
Unnecessary views isAccessibilityElement property should be set as false.
remove Unnecessary views.

Cursor issue while creating Custom keyboard with UIView

My requirement was to make a application specific keyboard i.e with a different theme and different key contents as compared to the default keyboard. But the way Apple states to implement keyboard requires user effort to add it through Settings->General->Keyboard which I don't want.
So, for that I tried to implement it using a UIView and making it the inputView for UITextView and it is working perfectly fine except for one issue. I added a functionality to add a linebreak in the textView. For that the code I used is
textView.text = "\(textView.text)\n"
Now, whenever I add a linebreak through keyboard, line is changed, but a new cursor appears to blink above the old cursor. I don't know how to get rid of that.
To explain the problem in a better way, here's a GIF image of the issue.
Please help.

UIDatePicker not displaying correctly

Basically this issue started when I updated my app to run with iOS 9. Without making any change in the code now a white square appears over the picker view, but it works normally.
Note that the user can hide and show the picker views and the cells they're in. If you need more info leave a comment.
UPDATE: Here is the full screenshot of the Table View:
UPDATE 2: The following shows when I preview (press bar space button) the _pickerView property in the variables debugger. This makes me think the strange view is inside the UIDatePickerView and that it's a bug.
UPDATE 3: Extensive Research
So I finally did more research using the view inspector and the debugger and I got to some conclusion, although I still don't know how to solve it.
Using the view hierarchy debugger I found out the the white strange view it's a UIPickerTableView inside the UIDatePicker.
Here we can see the subject selected in blue and it's name at the top of the screen. I also wrote the whole hierarchy from the picker view to the subject so you can see it.
Next step was inspecting my datePicker var with the debugger to see if I could get to that UIPickerTableView causing problems. Inside it I could find 3 views, each one corresponding to each component (day, month, year). Let me show you the quick look of each one of these:
Click the pics to enlarge
In the first and the third one (day and year) we can see what look like some misplaced views next to the actual labels with the numbers. These properties, as you can see in the screenshot, are UIPickerColumnViews. I didn't go any further but you can imagine that if we inspect that property we would find the subject as a UIPickerTableView.
After all that I got to the conclusion that the misplacement of those views is what might be causing the issue. And that's all for today.
FINAL UPDATE
So some days after filing the bug report Apple answered and marked it as a duplicate. So I guess we just have to wait they fix it. You can check the radar at rdar://22566989
Apple Developer Relations marked my bug report as a duplicate, so I guess it is an SDK bug that they'll have to solve. It is still open by the time of this post (12 Oct).
Workaround
In the viewDidLoad() method change a property of the date picker, for example the mode. You don't have to leave it changed, you can set it to anything and then change it back to what you actually want.
Here's the hack that worked for me: If you change the UITableView separator style to None the problem goes away. Seems like a bug on Apple's end, like the numerous problems we are finding in iOS 9.9
I had the same issue, i discover that happened because my UIDatePicker was separate from view of my view controller. I added this view as a sub view in code. To solve this problem, i add the UIDatePicker in viewDidLoad method, this is helped me

UITextField not responding to touch in iOS8?

So I have multiple UITextFields in my storyboard, but there is one isolated field that will not respond to any touch (neither in the simulator nor on the device) for all iOS versions, besides on the very right side of the field? This may have something to do with the constraints/frame of the field, but I have tried resolving autolayout issues, but nothing seems to work.
This is what my storyboard looks like (with the malfunctioning UITextField selected):
And this is what the simulator looks like:
Any ideas? There is very little functionality code-wise, so I imagine this is an Xcode formatting thing.
Form the picture it looks like the picker is actual over the textfield. It doesn't look like it but those are rather tall. You could try panning on the text field and see if the picker moves. Also you can try hiding it and see if that changes anything.
Good luck and hope that helps.

Editing toolbar in Xcode 4.6 - unable to add Bar Button Items

I am attempting to add a toolbar as an input accessory, and as such have added it via xcode storyboard editor to the view controller (and not within the view). This was as specified in this tutorial(which seems to be written for an earlier version of xcode): reference
My issue: "8.) Now we need to open the toolbar item itself. Double click Toolbar in the document window."
This is no longer valid behavior in Xcode 4.6 it appears, so I ask you: how do I add button items to a toolbar? I would prefer to avoid doing it programmatically (Still reasonably new to xcode development and normally make my GUIs with storyboards) but if I have to, I have to.
Many thanks!
If you're doing what I think you are doing, adding UIBarButtonItems to a UIToolbar, then you simply drag a Bar Button Item out to the toolbar.
However, I would assume that what they mean when they say 'double-click' is not what people normally think of when they think double click. Try double clicking slowly this often does the trick.
Found the issue - it was appearing behind the UIView. However you dont ever need to graphically interact witha toolbar, you can just drag-and-drop controls onto it in the sidebar. If there is a need for more info on this message me or vote up.

Resources