SlideShare a Scribd company logo
1 of 18
Download to read offline
Chapter 6
                Bit Academy
•
               •   MVC

               •
               •
plain tableview   grouped tableview




          - section
             section header
             section footer                                .
          - row
TableviewCell
               row   tableViewCell              .     4                            .




                             image is allowed   image is not allowed     image is not allowed
image is allowed
                             subtitle           subtitle right aligned   main title is in blue
                                                                         subtitle left aligned
•   UITableViewController Class :
                   UITableViewDelegate & UITableViewDataSource
                                   ,               , TableView
                             .

               •   UITableView Class :


               •   UITableViewCell Class : row
Cell Object

                       disclosure indicators, detail disclosure controls, control objects such as sliders or
                       switches, and custom views




               ,                       (reordering)
                   .
Accessary View
                 Disclosure indicator—
                 UITableViewCellAccessoryDisclosureIndicator.
                 disclosure indicator
                         .




                 Detail disclosure button—
                 UITableViewCellAccessoryDetailDisclosureButton.
                 detail disclosure button                              .
                                                                   .




                 Check mark—UITableViewCellAccessoryCheckmark.
                                                        .
                                                     .
DataSource & Delegate Protocol

               - UITableView          Data Source
               delegate                                                       .
               application delegate   custom UITableViewController                .

               - data source   UITableViewDataSource    protocol   delegate
               UITableViewDelegate protocol                  .

               - data source   UITableView
                    .                  row          ,
                                                               .

               - Delegate
                                                        .
Data Source Protocol


                                                  Data Source Object
                                                 (TableViewController
                                             or Application Delegate object)

                                                                           (   )



                                        UITableView Data Source Protocol
                                        Configuring a Table View
                                         1   – tableView:cellForRowAtIndexPath:  required method
                                    .    2   – numberOfSectionsInTableView:
                                         3   – tableView:numberOfRowsInSection:  required method
                                         4   – sectionIndexTitlesForTableView:
                          .
                                         5   – tableView:sectionForSectionIndexTitle:atIndex:
                                         6   – tableView:titleForHeaderInSection:
               Data Source Object
                                         7   – tableView:titleForFooterInSection:
                                        Inserting or Deleting Table Rows
                                         1   – tableView:commitEditingStyle:forRowAtIndexPath:
                                         2   – tableView:canEditRowAtIndexPath:
                                        Reordering Table Rows
                                         1
                                         2
                                             – tableView:canMoveRowAtIndexPath:
                                             – tableView:moveRowAtIndexPath:toIndexPath:
                                                                                                   Delegate
Delegate Protocol
                                                      Delegate Object
                                                   (TableViewController
                                               or Application Delegate object)

                                                                             (   )


                                          UITableView DelegateProtocol
                                          Configuring Rows for the Table View
                                           1   – tableView:heightForRowAtIndexPath:
                                           2   – tableView:indentationLevelForRowAtIndexPath:
                                           3   – tableView:willDisplayCell:forRowAtIndexPath:
RowAtIndexPath
                               Delegate   Managing Accessory Views
                                           1   – tableView:accessoryButtonTappedForRowWithIndexPath:
           .                               2   – tableView:accessoryTypeForRowWithIndexPath: Deprecated in iOS 3.0
                         .                Managing Selections
                                           1   – tableView:willSelectRowAtIndexPath:
                                           2   – tableView:didSelectRowAtIndexPath:
                                           3   – tableView:willDeselectRowAtIndexPath:
                                           4   – tableView:didDeselectRowAtIndexPath:
                                          Modifying the Header and Footer of Sections
                                           1   – tableView:viewForHeaderInSection:
                                           2   – tableView:viewForFooterInSection:
                                           3   – tableView:heightForHeaderInSection:
                                           4   – tableView:heightForFooterInSection:
                                          Editing Table Rows
                                           1   – tableView:willBeginEditingRowAtIndexPath:
                                           2   – tableView:didEndEditingRowAtIndexPath:
                                           3   – tableView:editingStyleForRowAtIndexPath:
                                           4   – tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:
                                           5   – tableView:shouldIndentWhileEditingRowAtIndexPath:
                                          Reordering Table Rows
                                           1   – tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:
RootViewController.m
                                                    TableView                                                       SimpleHumanResourceAppDelegate.m
                                                                                                          applicationDidFinishLaunching UIApplication
                          NSInteger numberOfSectionsInTableView   UITableView   tableView          application
                                  ;                                                                "    personnel             alloc initWithArray self
                                                                                                   createEmployees ;
                                                                                                   "     window addSubview navigationController view ;
                                                                                                        window makeKeyAndVisible ;


                                                                    DataSource
               TableView                                            & Delegate
                                                                                                                   NSArray


     NSInteger tableView UITableView   tableView numberOfRowsInSection               NSInteger section
"         rowCount     self appDelegate .personnel count ;
            rowCount;
  

                                                                          TableView         Data Source                          row
                                                                               tableView:cellForRowAtIndexPath:                    cell
                                                                            TableView            .
              UITableViewCell     tableView   UITableView   tableView cellForRowAtIndexPath                   indexPath
      
                                CellIdentifier         ;
      
               UITableViewCell cell     tableView dequeueReusableCellWithIdentifier CellIdentifier ;
                  cell
                   cell      UITableViewCell alloc initWithStyle UITableViewCellStyleValue1 reuseIdentifier CellIdentifier            autorelease ;

      
     "                   personnel   self appDelegate .personnel;
     "                      employee    personnel objectAtIndex indexPath.row ;
     "          cell.textLabel.text    employee valueForKey                   ;
     "          cell.detailTextLabel.text    employee valueForKey                              ;
                     cell;
cell

                                   .
                    ,     reuseIdentifier               .


                                                                              reuseIdentifier

    UITableViewCell       tableView    UITableView      tableView cellForRowAtIndexPath       indexPath
 
                        CellIdentifier              ;
 
    UITableViewCell cell     tableView dequeueReusableCellWithIdentifier CellIdentifier ;
       cell
        cell      UITableViewCell alloc initWithStyle UITableViewCellStyleValue1 reuseIdentifier CellIdentifier
autorelease ;

 
"                personnel    self appDelegate .personnel;
"                   employee     personnel objectAtIndex indexPath.row ;
"        cell.textLabel.text    employee valueForKey                   ;
"        cell.detailTextLabel.text    employee valueForKey                                ;
              cell;
XCode
                                                                               Navigation-based application template
                   1. In Xcode, choose New Project from the File menu.
                   2. Select the Navigation-based Application template project and click Choose.
                   3. Specify a name and location for the project and click Save.




RootViewController : datasource, delegate

MyTableViewAppDelegate : application
delegate
MainWindow.xib:
RootViewController.xib:
MainWindow.Xib
                           MainWindow.xib nib file

 Root View Controller     View   Table View             .

 The application delegate displaying the initial user interface
 - (void)applicationDidFinishLaunching:(UIApplication *)application {



          [window addSubview:[navigationController view]];

          [window makeKeyAndVisible];

 }




                                                                            view
viewController                   . RootViewController         TableViewController
     tableView                   .
root view controller’s nib for view


          document window       Root View
          Controller object        .
              NIB Name        RootViewController
                               .



            root view controller
          root view controller NIB Name
               RootViewController.Nib
                   .
RootViewController.xib

  RootViewController      table view
              , File’s Owner
  (RootViewController)
        .



  tableView (UITableViewController Class)
  Returns the table view managed by the controller object.

  @property(nonatomic, retain) UITableView *tableView

  view property inherited from UIViewController

TableView                                 property
dataSource
The object that acts as the data source of the receiving table view.

@property(nonatomic, assign) id<UITableViewDataSource> dataSource
Discussion
The data source must adopt the UITableViewDataSource protocol. The data source is not retained.
                                                                                            RootViewController
delegate                                                                                    Table View       property
The object that acts as the delegate of the receiving table view.                           TableView       dataSource protocol delegate protocol
@property(nonatomic, assign) id<UITableViewDelegate> delegate                               RootViewController                 .
Discussion
The delegate must adopt the UITableViewDelegate protocol. The delegate is not retained.

More Related Content

What's hot

Learning Appcelerator® Alloy™
Learning Appcelerator® Alloy™Learning Appcelerator® Alloy™
Learning Appcelerator® Alloy™Ricardo Alcocer
 
Михаил Крайнюк - Form API + Drupal 8: Form and AJAX
Михаил Крайнюк - Form API + Drupal 8: Form and AJAXМихаил Крайнюк - Form API + Drupal 8: Form and AJAX
Михаил Крайнюк - Form API + Drupal 8: Form and AJAXDrupalSib
 
MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8
MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8
MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8Michael Miles
 
Understanding
Understanding Understanding
Understanding Arun Gupta
 
Introduction to SQL Antipatterns
Introduction to SQL AntipatternsIntroduction to SQL Antipatterns
Introduction to SQL AntipatternsKrishnakumar S
 
The Magic of WPF & MVVM
The Magic of WPF & MVVMThe Magic of WPF & MVVM
The Magic of WPF & MVVMAbhishek Sur
 
Cake php 1.2-cheatsheet
Cake php 1.2-cheatsheetCake php 1.2-cheatsheet
Cake php 1.2-cheatsheetPrinceGuru MS
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with MobelloJeong-Geun Kim
 
Spring MVC Annotations
Spring MVC AnnotationsSpring MVC Annotations
Spring MVC AnnotationsJordan Silva
 

What's hot (15)

Spring by rj
Spring by rjSpring by rj
Spring by rj
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
Learning Appcelerator® Alloy™
Learning Appcelerator® Alloy™Learning Appcelerator® Alloy™
Learning Appcelerator® Alloy™
 
Михаил Крайнюк - Form API + Drupal 8: Form and AJAX
Михаил Крайнюк - Form API + Drupal 8: Form and AJAXМихаил Крайнюк - Form API + Drupal 8: Form and AJAX
Михаил Крайнюк - Form API + Drupal 8: Form and AJAX
 
MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8
MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8
MidCamp 2016 - Demystifying AJAX Callback Commands in Drupal 8
 
Java &amp; banco de dados
Java &amp; banco de dadosJava &amp; banco de dados
Java &amp; banco de dados
 
Sql Antipatterns Strike Back
Sql Antipatterns Strike BackSql Antipatterns Strike Back
Sql Antipatterns Strike Back
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
Understanding
Understanding Understanding
Understanding
 
Introduction to SQL Antipatterns
Introduction to SQL AntipatternsIntroduction to SQL Antipatterns
Introduction to SQL Antipatterns
 
The Magic of WPF & MVVM
The Magic of WPF & MVVMThe Magic of WPF & MVVM
The Magic of WPF & MVVM
 
Cake php 1.2-cheatsheet
Cake php 1.2-cheatsheetCake php 1.2-cheatsheet
Cake php 1.2-cheatsheet
 
Practical Object Oriented Models In Sql
Practical Object Oriented Models In SqlPractical Object Oriented Models In Sql
Practical Object Oriented Models In Sql
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with Mobello
 
Spring MVC Annotations
Spring MVC AnnotationsSpring MVC Annotations
Spring MVC Annotations
 

Similar to 아이폰강의(4) pdf

iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)Jonathan Engelsma
 
Cocoa heads testing and viewcontrollers
Cocoa heads testing and viewcontrollersCocoa heads testing and viewcontrollers
Cocoa heads testing and viewcontrollersStijn Willems
 
Swift Tableview iOS App Development
Swift Tableview iOS App DevelopmentSwift Tableview iOS App Development
Swift Tableview iOS App DevelopmentKetan Raval
 
아이폰강의(5) pdf
아이폰강의(5) pdf아이폰강의(5) pdf
아이폰강의(5) pdfsunwooindia
 
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
 
Using a model view-view model architecture for iOS apps
Using a model view-view model architecture for iOS appsUsing a model view-view model architecture for iOS apps
Using a model view-view model architecture for iOS appsallanh0526
 
Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Shih-Ting Huang
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2Calvin Cheng
 
02 integrate highchart
02 integrate highchart02 integrate highchart
02 integrate highchartErhwen Kuo
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLAkhil Mittal
 

Similar to 아이폰강의(4) pdf (20)

iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
iOS Bootcamp: learning to create awesome apps on iOS using Swift (Lecture 05)
 
IOS APPs Revision
IOS APPs RevisionIOS APPs Revision
IOS APPs Revision
 
201104 iphone navigation-based apps
201104 iphone navigation-based apps201104 iphone navigation-based apps
201104 iphone navigation-based apps
 
Objective c design pattens-architetcure
Objective c design pattens-architetcureObjective c design pattens-architetcure
Objective c design pattens-architetcure
 
Cocoa heads testing and viewcontrollers
Cocoa heads testing and viewcontrollersCocoa heads testing and viewcontrollers
Cocoa heads testing and viewcontrollers
 
iOS: Table Views
iOS: Table ViewsiOS: Table Views
iOS: Table Views
 
Swift Tableview iOS App Development
Swift Tableview iOS App DevelopmentSwift Tableview iOS App Development
Swift Tableview iOS App Development
 
занятие7
занятие7занятие7
занятие7
 
아이폰강의(5) pdf
아이폰강의(5) pdf아이폰강의(5) pdf
아이폰강의(5) pdf
 
Jpa
JpaJpa
Jpa
 
I os 11
I os 11I os 11
I os 11
 
DataFX - JavaOne 2013
DataFX - JavaOne 2013DataFX - JavaOne 2013
DataFX - JavaOne 2013
 
iOS
iOSiOS
iOS
 
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
 
Using a model view-view model architecture for iOS apps
Using a model view-view model architecture for iOS appsUsing a model view-view model architecture for iOS apps
Using a model view-view model architecture for iOS apps
 
Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)
 
iOS Beginners Lesson 2
iOS Beginners Lesson 2iOS Beginners Lesson 2
iOS Beginners Lesson 2
 
Table views
Table viewsTable views
Table views
 
02 integrate highchart
02 integrate highchart02 integrate highchart
02 integrate highchart
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
 

More from sunwooindia

아이폰강의(7) pdf
아이폰강의(7) pdf아이폰강의(7) pdf
아이폰강의(7) pdfsunwooindia
 
아이폰강의(6) pdf
아이폰강의(6) pdf아이폰강의(6) pdf
아이폰강의(6) pdfsunwooindia
 
2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서sunwooindia
 
2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서sunwooindia
 
2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서sunwooindia
 
아이폰강의(3)
아이폰강의(3)아이폰강의(3)
아이폰강의(3)sunwooindia
 
아이폰프로그래밍(2)
아이폰프로그래밍(2)아이폰프로그래밍(2)
아이폰프로그래밍(2)sunwooindia
 
오브젝트C(pdf)
오브젝트C(pdf)오브젝트C(pdf)
오브젝트C(pdf)sunwooindia
 

More from sunwooindia (8)

아이폰강의(7) pdf
아이폰강의(7) pdf아이폰강의(7) pdf
아이폰강의(7) pdf
 
아이폰강의(6) pdf
아이폰강의(6) pdf아이폰강의(6) pdf
아이폰강의(6) pdf
 
2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서
 
2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서
 
2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서2011년 상반기 스마트폰이용실태조사 요약보고서
2011년 상반기 스마트폰이용실태조사 요약보고서
 
아이폰강의(3)
아이폰강의(3)아이폰강의(3)
아이폰강의(3)
 
아이폰프로그래밍(2)
아이폰프로그래밍(2)아이폰프로그래밍(2)
아이폰프로그래밍(2)
 
오브젝트C(pdf)
오브젝트C(pdf)오브젝트C(pdf)
오브젝트C(pdf)
 

Recently uploaded

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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 

Recently uploaded (20)

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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

아이폰강의(4) pdf

  • 1. Chapter 6 Bit Academy
  • 2.
  • 3. • MVC • •
  • 4. plain tableview grouped tableview - section section header section footer . - row
  • 5. TableviewCell row tableViewCell . 4 . image is allowed image is not allowed image is not allowed image is allowed subtitle subtitle right aligned main title is in blue subtitle left aligned
  • 6. UITableViewController Class : UITableViewDelegate & UITableViewDataSource , , TableView . • UITableView Class : • UITableViewCell Class : row
  • 7. Cell Object disclosure indicators, detail disclosure controls, control objects such as sliders or switches, and custom views , (reordering) .
  • 8. Accessary View Disclosure indicator— UITableViewCellAccessoryDisclosureIndicator. disclosure indicator . Detail disclosure button— UITableViewCellAccessoryDetailDisclosureButton. detail disclosure button . . Check mark—UITableViewCellAccessoryCheckmark. . .
  • 9. DataSource & Delegate Protocol - UITableView Data Source delegate . application delegate custom UITableViewController . - data source UITableViewDataSource protocol delegate UITableViewDelegate protocol . - data source UITableView . row , . - Delegate .
  • 10. Data Source Protocol Data Source Object (TableViewController or Application Delegate object) ( ) UITableView Data Source Protocol Configuring a Table View 1 – tableView:cellForRowAtIndexPath:  required method . 2 – numberOfSectionsInTableView: 3 – tableView:numberOfRowsInSection:  required method 4 – sectionIndexTitlesForTableView: . 5 – tableView:sectionForSectionIndexTitle:atIndex: 6 – tableView:titleForHeaderInSection: Data Source Object 7 – tableView:titleForFooterInSection: Inserting or Deleting Table Rows 1 – tableView:commitEditingStyle:forRowAtIndexPath: 2 – tableView:canEditRowAtIndexPath: Reordering Table Rows 1 2 – tableView:canMoveRowAtIndexPath: – tableView:moveRowAtIndexPath:toIndexPath: Delegate
  • 11. Delegate Protocol Delegate Object (TableViewController or Application Delegate object) ( ) UITableView DelegateProtocol Configuring Rows for the Table View 1 – tableView:heightForRowAtIndexPath: 2 – tableView:indentationLevelForRowAtIndexPath: 3 – tableView:willDisplayCell:forRowAtIndexPath: RowAtIndexPath Delegate Managing Accessory Views 1 – tableView:accessoryButtonTappedForRowWithIndexPath: . 2 – tableView:accessoryTypeForRowWithIndexPath: Deprecated in iOS 3.0 . Managing Selections 1 – tableView:willSelectRowAtIndexPath: 2 – tableView:didSelectRowAtIndexPath: 3 – tableView:willDeselectRowAtIndexPath: 4 – tableView:didDeselectRowAtIndexPath: Modifying the Header and Footer of Sections 1 – tableView:viewForHeaderInSection: 2 – tableView:viewForFooterInSection: 3 – tableView:heightForHeaderInSection: 4 – tableView:heightForFooterInSection: Editing Table Rows 1 – tableView:willBeginEditingRowAtIndexPath: 2 – tableView:didEndEditingRowAtIndexPath: 3 – tableView:editingStyleForRowAtIndexPath: 4 – tableView:titleForDeleteConfirmationButtonForRowAtIndexPath: 5 – tableView:shouldIndentWhileEditingRowAtIndexPath: Reordering Table Rows 1 – tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:
  • 12.
  • 13. RootViewController.m TableView SimpleHumanResourceAppDelegate.m applicationDidFinishLaunching UIApplication NSInteger numberOfSectionsInTableView UITableView tableView application ; " personnel alloc initWithArray self createEmployees ; " window addSubview navigationController view ; window makeKeyAndVisible ; DataSource TableView & Delegate NSArray NSInteger tableView UITableView tableView numberOfRowsInSection NSInteger section " rowCount self appDelegate .personnel count ; rowCount;   TableView Data Source row tableView:cellForRowAtIndexPath: cell TableView . UITableViewCell tableView UITableView tableView cellForRowAtIndexPath indexPath   CellIdentifier ;   UITableViewCell cell tableView dequeueReusableCellWithIdentifier CellIdentifier ; cell cell UITableViewCell alloc initWithStyle UITableViewCellStyleValue1 reuseIdentifier CellIdentifier autorelease ;   " personnel self appDelegate .personnel; " employee personnel objectAtIndex indexPath.row ; " cell.textLabel.text employee valueForKey ; " cell.detailTextLabel.text employee valueForKey ; cell;
  • 14. cell . , reuseIdentifier . reuseIdentifier UITableViewCell tableView UITableView tableView cellForRowAtIndexPath indexPath   CellIdentifier ;   UITableViewCell cell tableView dequeueReusableCellWithIdentifier CellIdentifier ; cell cell UITableViewCell alloc initWithStyle UITableViewCellStyleValue1 reuseIdentifier CellIdentifier autorelease ;   " personnel self appDelegate .personnel; " employee personnel objectAtIndex indexPath.row ; " cell.textLabel.text employee valueForKey ; " cell.detailTextLabel.text employee valueForKey ; cell;
  • 15. XCode Navigation-based application template 1. In Xcode, choose New Project from the File menu. 2. Select the Navigation-based Application template project and click Choose. 3. Specify a name and location for the project and click Save. RootViewController : datasource, delegate MyTableViewAppDelegate : application delegate MainWindow.xib: RootViewController.xib:
  • 16. MainWindow.Xib MainWindow.xib nib file Root View Controller View Table View . The application delegate displaying the initial user interface - (void)applicationDidFinishLaunching:(UIApplication *)application { [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; } view viewController . RootViewController TableViewController tableView .
  • 17. root view controller’s nib for view document window Root View Controller object . NIB Name RootViewController . root view controller root view controller NIB Name RootViewController.Nib .
  • 18. RootViewController.xib RootViewController table view , File’s Owner (RootViewController) . tableView (UITableViewController Class) Returns the table view managed by the controller object. @property(nonatomic, retain) UITableView *tableView view property inherited from UIViewController TableView property dataSource The object that acts as the data source of the receiving table view. @property(nonatomic, assign) id<UITableViewDataSource> dataSource Discussion The data source must adopt the UITableViewDataSource protocol. The data source is not retained. RootViewController delegate Table View property The object that acts as the delegate of the receiving table view. TableView dataSource protocol delegate protocol @property(nonatomic, assign) id<UITableViewDelegate> delegate RootViewController . Discussion The delegate must adopt the UITableViewDelegate protocol. The delegate is not retained.