D
D
Dmitry2015-09-11 12:52:20
Objective-C
Dmitry, 2015-09-11 12:52:20

How to implement a one-to-many relationship in the user interface of an iOS application?

Suppose the application has a phone book, each contact has such fields as: first name, last name, city and phone number. Each contact has multiple phone numbers. The data is stored in coredata. What are the ways to output such data to the interface? Using a UITableview for this seems wrong to me, since the number of phone numbers is small. Generating a UILabel in code, for example, doesn't look concise either.
Are there any established methods for this purpose? Or a pattern that will allow you to correctly implement this.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lyeskin, 2015-09-11
@lyeskin

UICollectionView can be tried. I'm not an iOS developer, but if UITableView doesn't suit you, then this is the second thing that comes to mind. Well, either one, but multi-line UILabel is possible.

A
An, 2015-09-11
@Flanker_4

Well, uilabel is definitely not suitable, because you need tapable numbers for the phone book. I would not bother and use generated uibuttons. Also, if you do not have an ios limit, you should look towards the new ui contral stack

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question