iOS UI Table Views
Upcoming SlideShare
Loading in...5
×
 

iOS UI Table Views

on

  • 1,002 views

 

Statistics

Views

Total Views
1,002
Slideshare-icon Views on SlideShare
1,001
Embed Views
1

Actions

Likes
0
Downloads
10
Comments
0

1 Embed 1

https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    iOS UI Table Views iOS UI Table Views Presentation Transcript

    • UITABLEVIEW WORKSHOP UITableView, UITableViewControlled & UITableViewDelegate 0887 965 194Monday, January 23, 12
    • Preferences Are Available in Settings ЗАЩО ТАБЛИЦИ? Note Multitasking is available on certain devices runn Most apps enter a suspended state when they transition to the multitasking UI, which provides an effective way to find at the bottom of the screen, below the UI of the currently ru the iPhone Settings app). • Как да покажем много информация на веднъж? • Как тя да изглежда структурирана? • Как да представим много опции? • Иерархия на информацията When people restart a suspended app, it can instantly resuMonday, January 23, 12 having to reload its user interface.
    • UPDATE • UITableView е оптимизиране за презареждане • Заредетепърво това, което може да се види МОМЕНТАЛНО • GIVE VISUAL FEEDBACKMonday, January 23, 12
    • A variation of plain-‐style table views associates an an example of this kind of table view, which is ca the table view with entries in the index correspon ОСНОВНИ ПОНЯТИЯ scrolls the table view to the associated section. Fo abbreviations and the rows for a section could be displays the cities for the selected state. The rows or detail disclosure buttons, because these interfe Figure 1-2 A table view configured as an section in • Само една колона • Вертикален скролингMonday, January 23, 12
    • Note Programmatically, these styles are applied to a table view’s cell, which is a the table how to draw its rows. ВИДОВЕ ТАБЛИЦИ Default (UITableViewCellStyleDefault). The default cell style includes an opti of theGrouped by a left-‐aligned title in black.Plain style row, followed style In the default cell style, the text label’s appearance implies that it represents an item left-‐alignment makes the list easy to scan. This makes the default style good for disp do not need to be differentiated by supplementary information.Monday, January 23, 12
    • ВИДОВЕ ТАБЛИЦИ Table View Styles and Accessory Views Table View Styles A variation of plain-‐style table views associates an index with sections for quick navigation;and Accessory Views Table View Styles Figure 1-‐2 shows • Section Headers • Selection an example of this kind of table view, which is called an indexed list. The index runs down the right edge of Table View Styles list the table view with entries in the index corresponding to section header titles. Touching an item in the index scrolls the table view to the associated section. For example, the section headings could be two-‐letter state abbreviations and the rows for a section could be the cities in that state; touching at a certain spot in the indexa selection (or radio) list (see Figure 1-‐3). A The simplest kind of table view is • UITableViewCellAcc • Section Indexes displays the cities for the selected state. The rows in indexed section lists should not have disclosure indicators that users can select. It can limit the sele or detail disclosure buttons, because these interfere with the index. view that presents a menu of options essoryCheckmark selections. A selection list marks a selected row with a checkmark (see Figur Figure 1-2 A table view configured as an section index Figure 1-3 A table view configured as a selection list A grouped table view also displays a list of information, but it groups related As shown in Figure 1-‐4, each section has rounded corners and by default apMonday, January 23, 12
    • Table View Styles and Accessory Views ГРУПИРАНИ ТАБЛИЦИ Standard Styles for Table-‐View Cells The headers and footers of sections in a grouped table view have relative locations and sizes as indicated in Figure 1-‐5. Figure 1-5 Header and footer of a section Padding Header Table cell Footer Padding • групирането помага за бързото ориентиране On iPad devices, table views in the grouped style automatically get wider margins when the table views themselves are wide.Monday, January 23, 12
    • d by a styles that implement the most common layouts for table rows inbelow. The title is le-‐cell left-‐aligned title on one line and a left-‐aligned subtitle on the line bothubtitle is inis best suited to display a different type of information. cell style a smaller, gray font. iOS UI Element Usage Guidelines ФОРМАТ НА КЛЕТКИТЕ Content Views hese styles are applied to a table view’s cell, which is an object that tells ows. Subtitle (UITableViewCellStyleSubtitle). The subtitle style includes an optional image in th tyleDefault). The default cell style includes an optional image in the left title on one line and a left-‐aligned subtitle on the line below. of the row, followed by a left-‐aligned end ligned title in black. in black and the subtitle is in a smaller, gray font. style, the prominent appearance Element Usage Guidelines that it represents an item name iOS UI of the text label implies e subtle appearance of the Contenttext label implies that it contains subsidiary information detail Views . The left-‐alignment of the text labels makes the list easy to scan. This table-‐cell style worksms look similar, because users can use the additional information in the detail text labels to ems named in the text labels. 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 ViewCellStyleValue1). The value 1 style displays a left-‐aligned title in black on the same style. igned subtitle in a smaller, blue font. Images do not fit well in this style. In the subtitle cell style, the prominent appearance of the text label implies that it represents an ite t label’s appearance implies that it represents an item name or title and its or title, whereas the subtle appearance of the detail text label implies that it contains subsidiary in asy to scan. This makes the default style good for displaying a list of items that related to the item. The left-‐alignment of the text labels makes the list easy to scan. This table-‐cell s d by supplementary information. well when list items look similar, because users can use the additional information in the detail tex help distinguish items named in the text labels. Value 1 (UITableViewCellStyleValue1). The value 1 style displays a left-‐aligned title in black on line with a right-‐aligned subtitle in a smaller, blue font. Images do not fit well in this style. tyle, the appearance of the text label implies that it represents an item name or title, whereasand font of the text label imply that it function In the value 2 cell style, the right-‐alignment, constrained width, ContentView за повече customization the detail text label implies as a heading or important information that is closely associated that it provides caption for the important information in the more prominent, left-‐aligned detail text label. Monday, January 23, 12 In this layout, the labels are aligned towards each other at the same location in every row. This creates a crisp
    • Note If a UIViewController object is managing the table view, it automatically receives a setEditing:animated: message when the Edit button is tapped. In its implementation of this message, it can update button state or do any other kind of task before invoking the table view’s version of the method. UITABLEVIEW When the table view receives setEditing:animated:, it sends the same message to the UITableViewCell object for each visible row. Then it sends a succession of messages to its data source and its delegate (if they Undressed implement the methods) as depicted in the diagram in Figure 7-‐1. Figure 7-1 Calling sequence for inserting or deleting rows in a table view Client Table View Delegate User presses Edit button setEditing:YES animated:YES Data Source tableView: canEditRowAtIndexPath: tableView: editingStyleForRowAtIndexPath: User presses editing control User presses Delete button tableView:commitEditingStyle: forRowAtIndexPath: deleteRowsAtIndexPath: withRowAnimation or insertRowsAtIndexPath: withRowAnimation: After resending setEditing:animated: to the cells corresponding to the visible rows, the sequence ofMonday, January 23, 12
    • ЕЛЕМЕНТИ НА ТАБЛИЦИТЕ iOS includes some table-view elements that can extend the functionality of table views. Unless noted o these elements are suitable for use with table views only. Table 7-1 Table-‐view elements Element Name Description Checkmark Indicates that the row is selected Disclosure indicator Displays another table associated with the row iOS UI Element Usage Guidelines Detail disclosure button Displays additional details about the row in a new view Content Views information on how to use this element outside of a ta see “Detail Disclosure Button” (page 143)) Row reorder Indicates that the row can be dragged to another loca Element Name in the table Description Row insert Adds a new row to the table Delete button control 2011-‐10-‐12 In an editing context, reveals | © 2011 Apple Inc. All Rights Reserved. and hides the Delete bu for a row 121 Delete button Deletes the row iOS 3 and later defines four table-‐cell styles that implement the most common layouts for table rowMonday, January 23, 12 plain and grouped tables. Each cell style is best suited to display a different type of information.
    • TRY ITiOS UI Element Usage Guidelines Content Views iPhone Contacts uses the value 2 cell style: • Опитайте се да форматирата таблица по същия начин. As much as possible, ensure that your text labels are succMonday, January 23, 12 phrases can be difficult for users to scan and understand. Te