Friday, 25 April 2014

Post WDI - iPhone Interface Notifications, Alerts, AudioToolbox Framework (Modals, Action Sheets, Sounds, Vibrations)

iPhone Development (Xcode 5)

iPhone / Cocoa Touch Interface Notifications and Alerts (   DONE
  • UIAlertView { modal alert window of message and options including 'delegate' actions upon dialog dismissal (i.e. low memory, dropped network, activity completion) }
    • Multi-Option Alerts 
      • otherButtonTitles for multiple buttons
      • UIAlertViewDelegate Protocol conformance (declared in header and 'delegate' pointer to object instantiating alert for effects after dismissal) and either alertView:clickedButtonAtIndex method for index of button pressed or buttonTitleAtIndex method to return its title (where not nil)
      • Constants { for defining button labels }
  • UIActionSheet { prompt decision from user based on actions (i.e. share, upload, bookmark, data modifications) }
    • Animated Opening from current View Controller UI Element { i.e. [actionSheet showInView:self.view]; } or Toolbar { showFromToolBar } or TabBar { showFromTabBar }
    • Custom Appearance { actionSheetStyle property (i.e. actionSheet.actionSheetStyle=UIBarStyleBlackTranslucent), or UIActionSheetStyleAutomatic (inherit any set view style), or UIActionSheetStyleBlackOpaque (shiny black) }
    • UIActionSheetDelegate Protocol conformance (declared in header and 'delegate' pointer to object instantiating action sheet for effects after dismissal) and either actionSheet:clickedButtonAtIndex method to capture index of button press event or buttonTitleAtIndex method to return its title (where not nil)
    • Dynamic Buttons { addButtonWithTitle method to add outside the 'initialization convenience method', in combination with cancelButtonIndex and destructiveButtonIndex }
  • System Sound Services API
    • Uses: potentially uninterruptive Sound, Alert, Vibrate notifications as user feedback, attention, error, action status
    • AudioToolbox Framework { add using menus and then import interface file with #import <AudioToolbox/AudioToolbox.h> }
    • Vibrations { substitute into stub method block kSystemSoundID_Vibrate }
  • Stub Methods { i.e. -(IBAction)doAction }

No comments:

Post a Comment