Table View Cells - Beginning Table Views with Xcode 10, iOS 12, Swift 4.2 - raywenderlich.com

preview_player
Показать описание
To display data, you need a table view cell but cells come with a few other features as well. This episode will get you started with them.

Download the course materials:

Watch the full course:

---

We are also focused on developing a strong community. Our goal is to help each other reach our dreams through friendship and cooperation. As you can see below, a bunch of us have joined forces to make this happen: authors, editors, subject matter experts, app reviewers, and most importantly our amazing readers!

---

From Apple's Human Interface Guidelines:

A table presents data as a scrolling, single-column list of rows that can be divided into sections or groups. Use a table to display large or small amounts of information cleanly and efficiently in the form of a list. Generally speaking, tables are ideal for text-based content, and often appear as a means of navigation on one side of a split view, with related content shown on the opposite side.

iOS implements two styles of table, plain and grouped

Plain. Rows can be separated into labeled sections, and an optional index can appear vertically along the right edge of the table. A header can appear before the first item in a section, and a footer can appear after the last item.

Grouped. Rows are displayed in groups, which can be preceded by a header and followed by a footer. This style of table always contains at least one group and each group always contains at least one row. A grouped table doesn’t include an index.

Think about table width. Thin tables can cause truncation and wrapping, making them hard to read and scan quickly at a distance. Wide tables can also be difficult to read and scan, and can take away space from content.

Begin showing table content quickly. Don’t wait for extensive table content to load before showing something. Fill onscreen rows with textual data immediately and show more complex data—such as images—as it becomes available. This technique gives people useful information right away and increases the perceived responsiveness of your app. In some cases, showing stale, older data may make sense until fresh, new data arrives.

Communicate progress as content loads. If a table’s data takes time to load, show a progress bar or spinning activity indicator to reassure people that your app is still running.

Keep content fresh. Consider updating your table’s content regularly to reflect newer data. Just don’t change the scrolling position. Instead, add the content to the beginning or end of the table, and let people scroll to it when they’re ready. Some apps display an indicator when new data has been added, and provide a control for jumping right to it. It’s also a good idea to include a refresh control, so people can manually perform an update at any time.

Avoid combining an index with table rows containing right-aligned elements. An index is controlled by performing large swiping gestures. If other interactive elements reside nearby, such as disclosure indicators, it may be difficult to discern the user’s intent when a gesture occurs and the wrong element may be activated.

Table Rows

You use standard table cell styles to define how content appears in table rows.

Basic (Default). An optional image on the left side of the row, followed by a left-aligned title. It’s a good option for displaying items that don’t require supplementary information. For developer guidance, see the UITableViewCellStyleDefault constant of UITableViewCell.

Subtitle. A left-aligned title on one line and a left-aligned subtitle on the next. This style works well in a table where rows are visually similar. The additional subtitle helps distinguish rows from one another. For developer guidance, see the UITableViewCellStyleSubtitle constant of UITableViewCell.

Right Detail (Value 1). A left-aligned title with a right-aligned subtitle on the same line. For developer guidance, see the UITableViewCellStyleValue1 constant of UITableViewCell.

Left Detail (Value 2). A right-aligned title, followed by a left-aligned subtitle on the same line. For developer guidance, see UITableViewCellStyleValue2 constant of UITableViewCell.

All standard table cell styles also allow graphical elements, such as a checkmark or disclosure indicator. Of course, adding these elements decreases the space available for titles and subtitles.

Keep text succinct to avoid clipping. Truncated words and phrases are hard to scan and decipher.
Рекомендации по теме
Комментарии
Автор

The best video that I've found to learn Table Views Cells.
It's an incredible way to learn.

kevinarielhernandezmartine
Автор

Great video. I like the way you managed to explain a complex topic with simple vocabulary. Keep up the good work.

aimeYM
Автор

Great Video! But can you make a video about how to make a real-time table view Xcode app ?

swiftcodes
Автор

Good series from try to provide one video everyday on tableviews it will help me alot

manikiran
Автор

By using nib file how to change table view cell background ??? I used didselect row at but in nib file it's nt working ??

kamaleshwari
Автор

Help, for me it says "Method does not override any method from its superclass". What should I do?

LL-qmsl
Автор

thanks!! That was a ton a help! how do you do this but with multiple cells?

ossai
Автор

i tried with xcode 10.2 but doesn't work

otimistarj
Автор

Hey, I'm getting Sigabrt threat, so can anyone tell . why is the signal being aborted?

jahnavigupta
Автор

how to plist data get in pickerview..?

monikamaheriya
Автор

ray, ive got sigbrt. what do i do son?
pls. its due in 20 mins ray.

jacklewisohn
Автор

I came here with not much knowledge of xcode, and you started the tutorial off great, but then you immediately go into where you left off from a previous video???, I dont know how you got to the point of where you are at, this is just a fyi, maybe you should improve your tutorials to not depend on other videos because honestly i'm going to look at another tutorial because wherever this video resumes from, i cant find it and I know other people will do the same

mrmaywho