日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

UITableViewCell的幾種樣式設置預覽總結

系統 2567 0

iOS defines four table-cell styles that implement the most common layouts for table rows in both plain and grouped tables. Each cell style is best suited to display a different type of information.

Note: ?Programmatically, these styles are applied to a table view’s cell, which is an object that tells the table how to draw its rows.

Default ( UITableViewCellStyleDefault ). The default cell style includes an optional image in the left end of the row, followed by a left-aligned title in black.

In the default cell style, the text label’s appearance implies that it represents an item name or title and its left-alignment makes the list easy to scan. This makes the default style good for displaying a list of items that do not need to be differentiated by supplementary information.

Subtitle ( UITableViewCellStyleSubtitle ). The subtitle style includes an optional image in the left end of the row, followed by a left-aligned title on one line and a left-aligned subtitle on the line below. The title is in black and the subtitle is in a smaller, gray font.

In the subtitle cell style, the prominent appearance of the text label implies that it represents an item name or title, whereas the subtle appearance of the detail text label implies that it contains subsidiary information related to the item. The left-alignment of the text labels makes the list easy to scan. This table-cell style works well when list items look similar, because users can use the additional information in the detail text labels to help distinguish items named in the text labels.

Value 1 ( UITableViewCellStyleValue1 ). The value 1 style displays a left-aligned title in black on the same line with a right-aligned subtitle in a smaller, blue font. Images do not fit well in this style.

In the value 1 cell style, the appearance of the text label implies that it represents an item name or title, whereas the appearance of the detail text label implies that it provides important information that is closely associated with the item.

The left-alignment and font of the text label help users scan the list for the item they want, and the right-alignment of the detail text label draws their attention to the related information it provides. This table-cell style works well to display an item’s current value, possibly selected from a sublist.

Value 2 ( UITableViewCellStyleValue2 ). The value 2 style displays a right-aligned title in a small, blue font, followed on the same line by a left-aligned subtitle in a larger, black font. Images do not fit well in this style.

In the value 2 cell style, the right-alignment, constrained width, and font of the text label imply that it functions as a heading or caption for the important information in the more prominent, left-aligned detail text label.

In this layout, the labels are aligned towards each other at the same location in every row. This creates a crisp, vertical margin between the text labels and the detail text labels in the list, which helps users focus on the first words of the detail text label.

Note: ?All four standard table-cell styles also allow the addition of a table-view element, such as the checkmark or the disclosure indicator. Adding these elements decreases the width of the cell available for the title and subtitle.

?

UITableViewCell的幾種樣式設置預覽總結


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。?!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 武胜县| 苍溪县| 定州市| 通榆县| 襄城县| 许昌县| 华池县| 迭部县| 陇南市| 扬中市| 深水埗区| 二手房| 赤壁市| 巴楚县| 昆山市| 元谋县| 溧阳市| 石河子市| 阿鲁科尔沁旗| 什邡市| 洛浦县| 兴和县| 巴彦淖尔市| 偏关县| 乐清市| 眉山市| 公安县| 双桥区| 渭源县| 徐闻县| 商洛市| 岳普湖县| 吉安市| 项城市| 滁州市| 芜湖县| 金昌市| 乌兰察布市| 南汇区| 甘肃省| 稷山县|