• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
아이폰강의(4) pdf
 

아이폰강의(4) pdf

on

  • 1,282 views

 

Statistics

Views

Total Views
1,282
Views on SlideShare
1,021
Embed Views
261

Actions

Likes
0
Downloads
7
Comments
0

3 Embeds 261

http://www.sunoo.net 249
http://sunoo.net 10
http://denny0326.tistory.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

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

    아이폰강의(4) pdf 아이폰강의(4) pdf Presentation Transcript

    • 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 allowedimage 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 CellIdentifierautorelease ; " 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, delegateMyTableViewAppDelegate : applicationdelegateMainWindow.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]; } viewviewController . 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 UIViewControllerTableView propertydataSourceThe object that acts as the data source of the receiving table view.@property(nonatomic, assign) id<UITableViewDataSource> dataSourceDiscussionThe data source must adopt the UITableViewDataSource protocol. The data source is not retained. RootViewControllerdelegate Table View propertyThe object that acts as the delegate of the receiving table view. TableView dataSource protocol delegate protocol@property(nonatomic, assign) id<UITableViewDelegate> delegate RootViewController .DiscussionThe delegate must adopt the UITableViewDelegate protocol. The delegate is not retained.