Create new contact

I was told to do the following:

Implement the contact, add the view as shown below, and let it store in the SQL table, the contacts will have a name, mobile phone number, work, fax, email. The view should look like this:

enter image description here

My question is: Can you clarify me if I should use the address book or just a user view and sql database to save data from this user view? I mean, are both options open here?

+6
source share
1 answer

You cannot use the address book to create custom content in your application. So you have to implement your own view to collect information for storage in your database (sqlite?)

If you create a contact or modify existing contact information, you can use the address book structure.


Answer the question in the comment (how to do this for this user interface)

Yes, group the table view to get the background you want.

Among the many possible solutions, here is perhaps the simplest:

  • You have 2 sections in your table.
    • The first section has a special cell. Only one line in this section. You can use Interface Builder to create cell content, or you can build code.
    • The second section contains similar cells. It can contain as many fields as you need. Just specify the UITableViewCell style as UITableViewCellStyleValue2 and specify the appropriate values
+1
source

Source: https://habr.com/ru/post/895996/


All Articles