SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
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

Contenu connexe

Similaire à iOS UI Table Views

Session 14 - Working with table view and search bar
Session 14 - Working with table view and search barSession 14 - Working with table view and search bar
Session 14 - Working with table view and search barVu Tran Lam
 
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...Shalin Hai-Jew
 
SQL dabatase interveiw pdf for interveiw preparation
SQL dabatase  interveiw pdf for interveiw preparationSQL dabatase  interveiw pdf for interveiw preparation
SQL dabatase interveiw pdf for interveiw preparationkumarvikesh2841998
 
Sql overview-1232931296681161-1
Sql overview-1232931296681161-1Sql overview-1232931296681161-1
Sql overview-1232931296681161-1sagaroceanic11
 
The uses of Tables & graphs
The uses of Tables & graphsThe uses of Tables & graphs
The uses of Tables & graphsFranco Jesús
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&aSyed Shah
 

Similaire à iOS UI Table Views (8)

Session 14 - Working with table view and search bar
Session 14 - Working with table view and search barSession 14 - Working with table view and search bar
Session 14 - Working with table view and search bar
 
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
Views, Triggers, Functions, Stored Procedures,  Indexing and JoinsViews, Triggers, Functions, Stored Procedures,  Indexing and Joins
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
 
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
Interactivity on Excel Using Pivoting, Dashboards, “Index and Match,” and Glo...
 
SQL dabatase interveiw pdf for interveiw preparation
SQL dabatase  interveiw pdf for interveiw preparationSQL dabatase  interveiw pdf for interveiw preparation
SQL dabatase interveiw pdf for interveiw preparation
 
Sql overview-1232931296681161-1
Sql overview-1232931296681161-1Sql overview-1232931296681161-1
Sql overview-1232931296681161-1
 
The uses of Tables & graphs
The uses of Tables & graphsThe uses of Tables & graphs
The uses of Tables & graphs
 
Sql wksht-7
Sql wksht-7Sql wksht-7
Sql wksht-7
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
 

Plus de Marian Ignev

Какво е Startup?
Какво е Startup?Какво е Startup?
Какво е Startup?Marian Ignev
 
PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!Marian Ignev
 
iOS Tips + ModalVC
iOS Tips + ModalVCiOS Tips + ModalVC
iOS Tips + ModalVCMarian Ignev
 
iOS Memory management & Navigation
iOS Memory management & NavigationiOS Memory management & Navigation
iOS Memory management & NavigationMarian Ignev
 
iOS Architecture and MVC
iOS Architecture and MVCiOS Architecture and MVC
iOS Architecture and MVCMarian Ignev
 
iOS Development - Intro
iOS Development - IntroiOS Development - Intro
iOS Development - IntroMarian Ignev
 

Plus de Marian Ignev (8)

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

Dernier

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Dernier (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

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