My Application is on an iPad. I have a UIButton that I would like to mimic the action of when a user selects a phone number from a UITextField, and then selects the "Add to Contacts" button from the popover. In short, I would like that popover to appear over my UIButton when a user presses it.
I was just wondering if anyone has thought of possible ways to accomplish this, or is my only option to add contacts in iOS is to use ABUnknownPersonViewController?
You should link the button to perform a method that pushes an ABNewPersonViewController to the top of the ABPeoplePickerNavigationControler, where the user can then go and enter the data. This is what the NewPerson vc is made for.
Related
I am trying to recreate the behaviour in Instagram app. When a user has multiple Instagram accounts, the settings tab becomes the current users profile picture. (attached)
When a user long presses on the settings tab item it produces a pop up view to change accounts. Its important to specify that this long press gesture is triggered even if I am not on the settings tab. This makes it easy to switch accounts from anywhere in the app. Here is the attached photo
I would like to produce the same behaviour for the tab bar item. I have already created the swapping account transition. I just dont know how to add a gesture recognizer to a bar button item, can anyone help?
I am wondering what the best approach for dismissing a keyboard is when using a UITextView. At the minute for UITextFields I dismiss the keyboard when the return button is pressed. However for the TextView I want to have the return button actually add new lines so there is no additional buttons remaining to close.
What if any is the current "standard" approach for dealing with this issue? For example is it to add an additional button on the screen or is there another approach?
Thanks
On the iPad there is a "dismiss" button on the keyboard. For iPhones, add an inputAccessoryView to the UITextView. Put a "dismiss" button there.
If you have several fields (text fields, text views, etc.) in some sort of form, you could have a standard inputAccessoryView for all of them. Include a "Next" button (to go to the next field) and a "Done" button (to dismiss the keyboard).
This just started happening with iOS 9.
I have a CNContactViewController that displays a contact for the user to edit and save. I also have toolbar buttons at the bottom of the screen by calling setToolbarItems.
The problem is that when the user taps "Add To Existing Contact", the toolbar buttons stay on the screen and cover the bottom of the contact list that shows up, so the last contact on the list can't be tapped.
Similarly if "Share Contact" is tapped, the toolbar buttons cover most of the "Cancel" button, so the word Cancel can't be read and it's hard to tap.
Is there a notification I can use to know when to hide the toolbar buttons?
In my app first screen content few button (it is password screen) and user must press few buttons and go to next screen.
How I can create one segue for all button with same behavior?
Or, I must create one IBAction and programmaticaly call push method?
Thanks
In my application I have one uiview.
I am adding another subview to this view which contains one textfield.
when user clicks that field then it display the keypad.
This subview also contains one add and delete button.
when user clicks on that button another view is opened which is also the subview of main view and that view contains selection list in the table.
The problem here is when user types something in textfield so keyboard is open.
if user does not dismiss that keyboard and clicks on add button to select from selection list then only half of the selection list is visible because keyboard is still open.
I want to send the keyboard back.
Here i do not want to dismiss the keyborad.while user clicks the add button.i only want to send it back to the selection view.when user is done with selection view keyboard should be open as it is.How can i solve this issue?
If you want the keyboard to go away, you need to dismiss it when they click on the button by using [yourTextField resignFirstResponder];.
If you want it to come back when they select an item, you will need to call [yourTextField becomeFirstResponder];.