I am trying to create an "add contact" button in Xcode that would bring the user to address book and add a Name, Phone Number, email, and address to the contact list after the user clicks on the button.
If I wanted to implement this feature, how would I go about doing so if I am using storyboard?
I recommend looking over this documentation for the ABNewPersonViewController class.
The setup I would use is to setup an IBAction to your "Add Contact" button. The IBAction can create an instance of the New Person VC.
If you need to predefine some of the fields for the new contact, you will need to create an ABRecordRef and set the properties you want to be in the new contact. Then set the New Person VC's displayedPerson property to this record.
At the end of the method, you can call `[self.navigationController presentViewController: newPersonVC];
This may be possible in a storyboard, but I have always found it easier to do in code.
Hopefully this will help.
Related
I have a Phonecall hosted control opened inside unified service desk as one of the tab and i have a few grids on that page.
On click of any grid inside my phone call page the respective entity is displayed on the same page.
Like for example if I click on customer product grid entity then that grid is opened similarly, there are other grids on which the user can click and it will load that entity on the same tab.
Now, the issue is as i said earlier that my new entity is being loaded on the same hosted control that is my phone call page. I want to prevent this from happening.
I want to display a different tab for whatever record is clicked within my PhoneCall Hosted control so this way my Phone Call Page is still there.
I know i can do this using Windows Navigation Rule but I will have to create different navigation rules for my different entities and then in future if any other grid is added in my phone call page then i will need to add another navigation rule to cater it. This is not the best approach, I want it to be dynamic. Is there any other way where I can open a different tab if a record is clicked from my phonecall page?
Create a new windows navigation rule. The "From" field should be your Phone Call Page. Leave the Entity, From search, and URL fields in the "Route Logic" section blank. Windows Nav Rules get executed in order, and once they find a match it stops executing. So make the order low enough so that it gets executed where you want it to.
The "Target Tab" and "Show Tab" fields should be a new hosted control that you want the popup to open in. The action is "Route Window".
As far as route type, you are going to have to play with this a bit. I think opening stuff from a subgrid is Route Type "Popup", but you might need to create 2 very similar rules (one with route type "popup" and the other with route type "in place") to account for all scenarios.
See the example screenshot below:
I have a back button that I want to connect to an action (Back) that is in a file (ShopController.swift). When I control+drag the button to the function, it does not connect. I read that I need to give a class to the button, but when I type one in in the side bar it automatically deletes.
http://i.stack.imgur.com/gOmlf.png
You have to set the ShopController as the class of the viewController to be able to connect the button action.
To do that, click on the tiny yellow icon on the top of the viewController. Then open the Identity Inspector and enter your class name there:
I'm new to IBM Domino Designer. I'm trying to create an IBM Domino Designer application which has 2 fields and a button. Once click on the button the data has to be stored in DB.
Now the problem is how to store the data in DB and where to write this code?
Should it be either in Button click or do we need to write any agent for it?
Create an application via "File" - "Application" "New"
Click "Create" - "Design" - "Form" in a designer client.
Name the Form, "Test" for example.
Insert a field in the form via "Create" - "Field" , name that field, for example "field1".
Insert some button via create - hotspot - button.
Paste this code in the action section:
#If(#Command([FileSave]);#Command([FileCloseWindow]);#Prompt([Ok];"Attention!";"Error saving document"))
Save the form
Go to the Notes Client, Open your Application, click Create menu, choose the form name, "Test" in our example and you will get a new document created by form "Test".
You should see a white form with a brackets in it and a button.
You can type some text inside brackets and can push the button. Formula action will try to save and close the document When you press the button.
Thats it. You have got an application with the form where you can put some data into the field and save it to DB.
Designing Lotus Notes Databases is nothing, that you can learn from scratch without having any clue or a good teacher.
You could start with the help and click through starting at "IBM Domino Designer Basic User Guide and Reference > Application Design", but I doubt that you will ever be successful.
As long as you do not understand, what Lotus Notes Databases are all about, you will not be able to create even the most simple application.
To give you at least a starting point: Lotus Notes Databases are simple "unstructured" containers for everything you throw in there. Data is presented as "Notes Document" and can contain Structured Data, Images, Attachments, Tables, whatever...
To create a document the easiest way is to create a "Form" in Lotus Notes Designer, create some fields in that form and then use the "Preview in Notes"- Button to show the Form in Lotus Notes. Using Ctrl + S you can save the document, that you created with the form.
Then you use "Views" to show the "documents" that you created.
Now I explained 2 Design- Elements out of 20 "Base"- Design elements, and you might already got lost...
Take my advice: Let someone teach you, how to do this, there is no other sensible way to learn developing applications in Lotus Notes (now Known as IBM Notes)
Xcode:
I got the below annotation code form GitHub
https://github.com/jpsim/JPSThumbnailAnnotation
When I click on the annotation, nothing happens. I want users to be brought to a new view which will display text and an image of the location on which the pin is placed.
I presume I have to create a new viewcontroller but how do I link each annotation to its own view?
I take it I create a new viewcontrol and somehow name(or tag) it? If so what is the code to link the callout to that unique "named" view controller?
Apparently this is a common question but I have received no guidance on this nor are there quality videos online to show how this is done.
Anyone help?
i have added a contact into the address book, i want a cancel button instead of edit button in address book.
how can make it programmatically without using ABUnknownPersonViewController.
Thanks,
use rightbarbutton and implement rightbarbuttonitem in protocol