Swift: How to remove default auto first responder assignment - swift

The app automatically assigns the first control in the document outline to the first responder automatically after the app launch (See reset button in the screenshot below).
I did not assign any control to be the first responder in my code. How to disable this behavior using swift?
I have referred and tested some Objective-C methods about resigning first responder but no effect.
Any hint or comment is appreciated and thanks for your time viewing this question.

After a day of investigation, I finally realize that it is my own problem. The button is auto-focused because I turned on the full keyboard access on my Mac (See screenshot below). It behavior commonly after I set it to the Text box and lists only.

Related

iOS - UIPickerView Dismiss with button or without a button?

Good Afternoon/Evening/Morning Folks,
I recently encountered a discussion with another developer on dismissing a UIPickerView. We work on a legacy enterprise application that had a lot of issues and was written very poorly (among other things). Since then, we revamped and fixed a lot of bugs with this program, strictly adhering to Apple's Human Interface Guidelines as much as possible while keeping to original requirements.
We seem to have a difference in opinion as Human Interface Guidelines do not really go into any detail about picker views. We implemented our new UIPickerView with a "Done," Button to confirm a selected value to be placed in a UITextField. Screen's input would be locked until they selected a value or clicked done.
Legacy application prior to our changes allowed users to utilize a done button but also by way of tapping a value selected in a picker. In addition, legacy application would also show selected UIPickerView value in UITextField prior to selection, wiping out original contents , if any was selected prior to opening a UIPickerView.
So, What is correct way to implement a UIPickerView per common practice or Strict Apple Documentation (if any exists). What is common practice?
Sorry, I cannot post any screen shots or code snippets due to business process reasons. I will do my best to explain if any questions arise.
Thanks,
We can figure this out through apps designed by Apple. Here are two examples
1. Contacts
Find a contact person in the Contacts app and set birthday. The picker shows up. While you are dragging the pickers, it does not set value to the text field. It happens only when you release the wheel. There is no Done button to hide the picker it self. To dismiss it, you can either click on the done button on navigation bar to end editing for the whole page, or click on another text field which pops a different keyboard.
2.Setting - Date&Time
Basically the same as Contacts app. Here you cannot even dismiss the picker.

Why is this iPhone app's "quote" button not replacing the Text View's lorem ipsum?

I am working through the "iPhone introduction for programmers" tutorial at http://www.raywenderlich.com/21320/objectively-speaking-a-crash-course-in-objective-c-ios6, and my present project is at http://JonathansCorner.com/project/Quotes.tgz. The tutorial's focus is on providing an iPhone app that randomly displays one of several quotes in a Text View when you click on a Button. Later on the tutorial pushes further by defining properties and storing and retrieving XML, but I'm at the first "Let Her Rip!", which offers the first attempt running the app within the simulator with some increment of functionality, which should be that when you click a button, a randomly pulled quote appears. The text should be read-only as far as editing with the keyboard is concerned.
The behavior I am presently observing is that the simulator displays the Text View's native lorem ipsum. It continues to do so after clicking the button, and when you click on the Text View, it pulls up the keyboard and edits it. I've checked my wiring, and I don't see where I failed to duplicate what the tutorial shares. (The tutorial references a ViewController.[h|m]; is it a problem that I have a prefix before everything that takes a prefix when creating the project, e.g. CJSHViewController.h?) It behaves like one would expect from following the tutorial up to that point but not wiring event handling up or turning off edit mode for the Text View.
Any help or nitpicks would be welcome. (I am a programmer just beginning in iOS, so if there are "programmers new to iOS development" errors, I may have made at least one.)
Thank you,
The function you wrote for changing the text in the text view is working perfectly. The problem is with your IBOutlets. You never linked the outlet for the text view to the text view and consequently when you assign new text to it, it has no where to go.
Ok checked your project and found the error:
The problem is that quoteText is not referenced on the storyboard file so...
Go to your .storyboard file and drag the + symbol from the Connections Inspector to the view controller as shown on the screenshot when you click up a context menu should appear with the following options
quoteText
view
Of course you click on quoteText
Hope this helps

How can I represent a keyboard touch event programmatically in IOS?

I am working on an app that uses voice commands to maneuver through text fields. What I need to do is translate the voice command into a touch event on the keyboard. Specifically I need to access the tab key and the return key. The user will not be using the keyboard in this app. I am having a difficult time finding a way to get this done. I know how to convert the voice commands into something that I can use, but I still need to apply that to the keyboard commands. I have researched this extensively and I get what I think are bits and pieces of what I really need, but nothing is connecting the dots for me.
You don't need the keyboard to navigate text fields. You just need to modify the first responder. There unfortunately isn't an easy way to get the current first responder, but you can search for it.
Once you have the first responder, you can move to the next field like this:
[[field nextResponder] becomeFirstResponder];
If you are trying to do this in a very general way, you should first call canBecomeFirstResponder and handle situations where there there are no available first responders and other corner cases, but this generally isn't needed for very simple interfaces.
If you want to manage "enter" in order to end editing and dismiss the keyboard, you can call endEditing: on the superview.
You can modify text without the keyboard by replacing the text property.

Why isn't my keyboard appearing?

I have an application that allows the user to edit multiple text fields and views. Rather than mess around raising each view to the top when the keyboard is active, I decided to instead make one textView for editing and hide/show it when input is needed, then transfer the data when it is done. To move focus to the new textView, I call its becomeFirstResponder method, and lo and behold, the cursor goes to the right place. However if I use this method, the iPhone keyboard does not appear. I have no idea why. Can anyone explain, and tell me how to make the keyboard appear? All the other questions I've looked at seem to indicate that setting becomeFirstResponder for a textView ought to make the keyboard come up.
-Ash
Is Hardware -> Simulate Hardware Keyboard enabled?
Are you doing this whole thing programatically or using Interface Builder as well?
If so are the IB connections setup right?

iPhone virtual keyboard bug

In iPhone virtual keyboard...
1.Change the alphabetical keypad view to numerical view.
2.Tap on the single quote(') button the view changes to alphabetical.
3.In this view tapping on space twice displays a fullstop.
I don't know whether it is apple bug or feature, How to fix this issue through coding?
Thanks,
This is not a bug, this is a feature.
(Apple deliberately make pressing ' switch back to the alphabetic plane for contractions like "Peter's".)
(And tapping space twice gives a period is also a feature. It's even documented.)
If you want to modify this feature, the whole UIKBKeyboard class of the keyboard layout needs to be changed at runtime, which means "private API" etc.
This answer may help: iPhone: Disable the "double-tap spacebar for ." shortcut?