Showing posts with label multiple-view controllers. Show all posts
Showing posts with label multiple-view controllers. Show all posts

Sunday, 27 April 2014

Post WDI - iPhone Multiview Navigation-Based Apps (Table View Categories)

iPhone Development (Xcode 5) (Cont'd)

iPhone Multiview Navigation-Based Apps (with Table Views)    DONE
  • Table Views { toolset to display list of cells onscreen by Category and Sub Category, they respond to touch events and allowing users to scroll up and down, with each single cell structured to contain multiple pieces of info, and cells broken into sections of info clusters }
    • Types
      • Plain (aka Index Tables) { lack visual separation of sections of grouped tables
      • Grouped 
    • Implementation
      • UITableView { instance creates table view }
        • Methods:
        • accessoryType ("disclosure indicator" array. touching reveals details)
      • UITableViewController { subclass instance handles interactions with table view and conforms to req'd protocols }
      • UITableViewDataSource Protocol { provide data for table to display } 
        • Methods: 
        • numberOfSectionsInTableView (qty table sections)
        • tableView:tableViewNumberOfRowsInSection (qty rows in each section)
      • UITableViewDelegate Protocol { creating cells in table and react to user selection }
        • Methods:
        • tableView:titleForHeaderInSection (string title section no.)
        • tableView:cellForRowAtIndexPath (returns UITableViewCell object for table section and row)
        • tableView:didSelectRowAtIndexPath { react to row touch event from user using indexPath instance }
      • NSIndexPath { communicates row and section info (IndexPath for incoming objects in table methods with accessors IndexPath.section and IndexPath.row }
        • Methods:
        • UILabel object { textLabel, setText }
    • Memory Management
      • Reuse cells no longer req'd to generate current display instance of allocation across all table cells
  • Navigation Controller { allow user to drill down multiple views of data }
  • Navigation Controller Stack { new views appear when view controllers are instantiated and pushed onto the navigation controller stack or to go back the navigation controller pops the current view off the stack to unload it and previous view moves to top of stack and becomes active }
  • Apple Navigation-Base Application Template
    • Preparation
      • UINavigationController { instance of Root View Controller and subclass of UITableViewController. It is a navigation controller that provides functionality to push and pop other controllers }
        • Properties: { title property }
      • UINavigationBar { horizontal navigation bar with UI elements to navigate views }
      • UINavigationItem { used to display title in navigation bar }
Links:

Friday, 25 April 2014

Post WDI - iPhone Multiview App Architecture (Multiple-View Controllers, Toolbars)

iPhone Development (Xcode 5) (Cont'd)

iPhone Multiview Apps (with Toolbar) (manually created)   DONE
  • UIViewController { load and swap multiple @class subviews (separate controller structure) with UIView instance method insertSubView:atIndex. use default controller to clear current view (i.e. clearView ), remove inactive subviews  where superview property is tested to be nil using removeFromSuperView for individual or simultaneous views }
  • UIToolbar and UIBarButtonItem { overlayed floating subview index to switch views based on event action (i.e. Touch Up Inside) }


iPhone Multiview Apps (with Tab Bar) (expedited method)   DONE
  • UITabBar and UITabBarController (not the Apple default tab bar)
    • UITabBarControllerDelegate Protocol has all optional methods 
    • appplicationDidFinishLaunching method to add tabBarViewController instance
    • floatValue of NSString class provides floating point numbers from user input returning 0.0 for incorrect input allowing valid calculation always
    • viewWillAppear method used as hook to only update view just before displayed onscreen when we have access to all objects

Events Upcoming
    • ATTENDED - MyBirthdayApp, 28th Apr 2014
    • ATTENDED - Sydney MongoDB Meetup, 6pm, 29 Apr 2014 (MongoDB Australia, 2-12 Foveaux St Surry Hills)
    • ATTENDED - Entrepreneurs of 2025 - (Start Presenting To Groups) - 6:30pm 30 Apr 2014 (Level 1 99 York St) - Organiser and Host (Cyril Sansano) Beware: Nobody turned up except for me despite 11ppl RSVP'ing!!!
    • ATTENDED  - GA Launch Party - 6-9pm, Fri 2 May 2014 GA Sydney (York St), 56-58 York St