SlideShare a Scribd company logo
UITABLEVIEW WORKSHOP
        UITableView, UITableViewControlled & UITableViewDelegate
                               0887 965 194




Monday, 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 resu
Monday, January 23, 12           having to reload its user interface.
UPDATE


    • UITableView        е оптимизиране за презареждане

    • Заредетепърво това, което може да се види
        МОМЕНТАЛНО

    • GIVE VISUAL        FEEDBACK



Monday, 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 ap
Monday, 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 both
ubtitle 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 works
ms 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 of
Monday, 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 row
Monday, 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 succ
Monday, January 23, 12
                                 phrases can be difficult for users to scan and understand. Te

More Related Content

Similar to iOS UI Table Views (20)

DOCX
Beginning iOS 7 Development Exploring the iOS SDKby Jack .docx
DOCX
Beginning iOS 7 Development Exploring the iOS SDKby Jack .docx
PDF
Session 14 - Working with table view and search bar
PPTX
Table views
PDF
아이폰강의(4) pdf
PDF
Tapworthy ch5
PPTX
iOS Guidelines and Naming Conventions Part 1
PDF
Beginning i os part 2 sam kirchmeier
PDF
iOS: Table Views
PDF
Ch7.2-Controls for Programm 001-193819qk
KEY
занятие7
PDF
IOS APPs Revision
PPTX
UITableView Training Presentation Slides
PPT
Mockapp library 100
PPT
Mockapp_Library_110.ppt
PDF
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
PDF
201104 iphone navigation-based apps
PDF
Cross platform mobile development
PDF
iOS app case study
DOCX
Grid view control
Beginning iOS 7 Development Exploring the iOS SDKby Jack .docx
Beginning iOS 7 Development Exploring the iOS SDKby Jack .docx
Session 14 - Working with table view and search bar
Table views
아이폰강의(4) pdf
Tapworthy ch5
iOS Guidelines and Naming Conventions Part 1
Beginning i os part 2 sam kirchmeier
iOS: Table Views
Ch7.2-Controls for Programm 001-193819qk
занятие7
IOS APPs Revision
UITableView Training Presentation Slides
Mockapp library 100
Mockapp_Library_110.ppt
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
201104 iphone navigation-based apps
Cross platform mobile development
iOS app case study
Grid view control
Ad

More from Marian Ignev (8)

PDF
Какво е Startup?
PDF
PaaS бъдещето на креативния програмист!
PDF
iOS Tips + ModalVC
PDF
iOS Memory management & Navigation
PDF
iOS Views
PDF
The messy lecture
PDF
iOS Architecture and MVC
PDF
iOS Development - Intro
Какво е Startup?
PaaS бъдещето на креативния програмист!
iOS Tips + ModalVC
iOS Memory management & Navigation
iOS Views
The messy lecture
iOS Architecture and MVC
iOS Development - Intro
Ad

Recently uploaded (20)

PDF
Getting Started with Data Integration: FME Form 101
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
A Presentation on Touch Screen Technology
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
August Patch Tuesday
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Hybrid model detection and classification of lung cancer
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Getting Started with Data Integration: FME Form 101
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DP Operators-handbook-extract for the Mautical Institute
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A Presentation on Touch Screen Technology
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Mushroom cultivation and it's methods.pdf
Group 1 Presentation -Planning and Decision Making .pptx
August Patch Tuesday
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Programs and apps: productivity, graphics, security and other tools
OMC Textile Division Presentation 2021.pptx
Tartificialntelligence_presentation.pptx
A comparative analysis of optical character recognition models for extracting...
A novel scalable deep ensemble learning framework for big data classification...
Hybrid model detection and classification of lung cancer
MIND Revenue Release Quarter 2 2025 Press Release

iOS UI Table Views

  • 1. UITABLEVIEW WORKSHOP UITableView, UITableViewControlled & UITableViewDelegate 0887 965 194 Monday, January 23, 12
  • 2. 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 resu Monday, January 23, 12 having to reload its user interface.
  • 3. UPDATE • UITableView е оптимизиране за презареждане • Заредетепърво това, което може да се види МОМЕНТАЛНО • GIVE VISUAL FEEDBACK Monday, January 23, 12
  • 4. 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
  • 5. 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
  • 6. ВИДОВЕ ТАБЛИЦИ 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 ap Monday, January 23, 12
  • 7. 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
  • 8. 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 both ubtitle 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 works ms 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
  • 9. 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 of Monday, January 23, 12
  • 10. ЕЛЕМЕНТИ НА ТАБЛИЦИТЕ 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 row Monday, January 23, 12 plain and grouped tables. Each cell style is best suited to display a different type of information.
  • 11. 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 succ Monday, January 23, 12 phrases can be difficult for users to scan and understand. Te