ITP 342 Mobile App Dev. Table Views

Size: px
Start display at page:

Download "ITP 342 Mobile App Dev. Table Views"

Transcription

1 ITP 342 Mobile App Dev Table Views

2 Table Views The most common mechanism used to display lists of data to the user Highly configurable objects that can be made to look practically any way you want them to Examples: Settings, ipod, and YouTube applications Tables display lists of data Each item in a table s list is a row ios tables can have an unlimited # of rows Constrained only by the amount of available memory ios tables can be only one column wide 2

3 Table View Styles There are two major styles of table views: plain and grouped. The two styles are distinguished mainly by appearance. Plain Table Views Grouped Table Views 3

4 Plain Table View Rows can be separated into labeled sections and an optional index can appear vertically along the right edge of the view A header can appear before the first item in a section, and a footer can appear after the last item 4

5 Indexed List A variation of plain table views associates an index with sections for quick navigation which is called an indexed list. The index runs down the right edge of the table view. Entries in the index correspond to section header titles. Touching an item in the index scrolls the table view to the associated section. The rows in indexed lists should not have disclosure indicators or detail disclosure buttons, because these interfere with the index. 5

6 Grouped Table View Rows are displayed in groups, which can be preceded by a header and followed by a footer A grouped table view always contains at least one group of list items one list item per row and each group always contains at least one item A grouped table view doesn t include an index 6

7 Tables In both styles, a table row becomes highlighted briefly when a user taps a selectable item. If a row selection results in navigation to a new screen, the selected row becomes highlighted briefly as the new screen slides into place. When the user navigates back to the previous screen, the originally selected row again becomes highlighted briefly to remind the user of the earlier selection (it doesn t remain highlighted). 7

8 Standard Styles for Table View Cells The UIKit framework defines four styles for the cells that a table view uses to draw its rows. You may create custom table view cells with different appearances if you want, but these four predefined cell styles are suitable for most purposes. A Closer Look at Table View Cells n/userexperience/conceptual/tableview_iphone/table ViewCells/TableViewCells.html 8

9 Cell Styles 9

10 Default The default cell style includes an optional image in the left end of the row, followed by a left-aligned title. The default style is good for displaying a list of items that don t need to be differentiated by supplementary information. This style is associated with the UITableViewCellStyleDefault constant. 10

11 Subtitle The subtitle style includes an optional image in the left end of the row, followed by a leftaligned title on one line and a leftaligned subtitle on the line below. The left alignment of the text labels makes the list easy to scan. This table cell style works well when list items look similar, because users can use the additional information in the detail text labels to help distinguish items named in the text labels. This style is associated with the UITableViewCellStyleSubtitle constant. 11

12 Value 1 The value 1 style displays a left-aligned title with, on the same line, a rightaligned subtitle in a lighter font. It is associated with the UITableViewCellStyleValue1 constant. 12

13 Value 2 The value 2 style displays a right-aligned title in a blue font, followed on the same line by a left-aligned subtitle in a black font. Images don t fit well in this style. In the value 2 layout, the crisp vertical margin between the text and the detail text helps users focus on the first words of the detail text label. It is associated with the UITableViewCellStyleValue2 constant. 13

14 Table View Elements 14

15 Table View Basics A table view is the view that displays a table's data Is an instance of the class UITableView Each visible row of the table is implemented by the class UITableViewCell A table view is the object that displays the visible part of a table A table view cell is responsible for displaying a single row of the table 15

16 Table View Basics All tables are implemented as a single column Each row is represented by a single UITableViewCell Each UITableViewCell object can be configured with an image, some text, and an optional accessory icon 2 basic ways to add more data in a cell Add subviews to UITableViewCell By subclassing UITableViewCell 16

17 Sections in Tables Each division of your table is known to your datasource as a section In a grouped table, each group is a section In an indexed table, each indexed grouping of data is a section Sections has 2 primary purposes In a grouped table, each section represents one group In an indexed table, each section corresponds to one index entry It is technically possible to create a grouped table with an index, but don t! ios Human Interface Guidelines 17

18 Table Project Create a Single View Application for iphone Call it TableView Delete the view controller from the storyboard Select it (should be outlined in blue) and hit the delete key Delete the ViewController (.h and.m) files Select both files, right click, and select Delete Click the Move to Trash button

19 Working with Tables Create a new Objective-C class named ExampleTableViewController File à New à File Make it a subclass of UITableViewController Add it into the TableView à TableView folder 19

20 Creating a Table View Controller Open the storyboard It should be empty! In Library, search for Table Drag a Table View Controller into the storyboard In the Identity Inspector, set its class identity to ExampleTableViewController 20

21 Populating a Table View A UITableView uses: A data source to populate its rows A delegate to respond to user interaction Both roles are defined by protocols The table view controller plays both roles 21

22 Delegate Pattern 22

23 What the Data Source Provides // UITableViewDataSource - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableview; - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath; - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section; SWIFT // UITableViewDataSource optional public func numberofsections(in tableview: UITableView) -> Int public func tableview(_ tableview: UITableView, numberofrowsinsection section: Int) -> Int public func tableview(_ tableview: UITableView, cellforrowat indexpath: IndexPath) -> UITableViewCell 23

24 Answering the Questions How many sections? // ExampleTableViewController.m // Return the number of sections - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableview{ return 1; } SWIFT // ExampleTableViewController.swift // Return the number of sections func numberofsections(in tableview: UITableView) -> Int { return 1 } 24

25 Answering the Questions How many rows? // ExampleTableViewController.m // Return number of rows in the section - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section{ return 100; } SWIFT // ExampleTableViewController.swift // Return the number of rows in the section func tableview(_ tableview: UITableView, numberofrowsinsection section: Int) -> Int { return 100 } 25

26 Configuring Rows (Cells) // ExampleTableViewController.m - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath: (NSIndexPath *)indexpath{ static NSString *cellidentifier UITableViewCell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; // Configure the cell cell.textlabel.text = [NSString stringwithformat:@"row %d", indexpath.row]; } return cell; 26

27 Configuring Rows (Cells) SWIFT // ExampleTableViewController.swift // Return the number of rows in the section func tableview(_ tableview: UITableView, cellforrowat indexpath: IndexPath) -> UITableViewCell { let cellidentifier = "TableCell" let cell = tableview.dequeuereusablecell(withidentifier: cellidentifier) // Configure the cel.. cell?.textlabel?.text = "Row \(indexpath.row)" } return cell 27

28 Dequeing and Reusing Objects Instantiating and destroy objects are expensive, but sometimes we need a lot of objects (table view cells in ios, bullets in video games, etc.) Common approach in software development is to put unused objects into a reuse pool, then use them when it s necessary When you call [tableview dequeuereusablecellwithidentifier:] you either: A. Get a cell that has previously been created and isn't currently being used OR B. Create a new cell of the class you specified 28

29 Storyboard identifier must match the code Storyboard In the Attributes Inspector, for Identifier, enter TableCell 29

30 Build and Run A table is displayed with 100 rows 30

31 Need a Model Let's use the DataModel from a previous project Drag DataModel files (.h and.m) into Table View project 31

32 DataModel 32

33 Data Model Your model should have public methods: // DataModel : NSObject - (NSUInteger) numberofstudents; - (NSDictionary *) randomstudent; - (NSDictionary *) studentatindex:(nsuinteger) index; - (void) insertstudent: (NSDictionary *) studentobj atindex: (NSUInteger) index; - (void) insertstudent: (NSDictionary *) studentobj; - (void) insertstudent: (NSString *) lastname firstname: (NSString *) firstname; - (void) insertstudent: (NSString *) lastname firstname: (NSString *) firstname atindex: (NSUInteger) index; - (void) removestudentatindex: (NSUInteger) index; - (NSDictionary *) nextstudent; - (NSDictionary *) 33

34 Data Model Your model should have public methods: SWIFT // DataModel.swift class DataModel{ } // Properties... func numberofstudents() -> Int func randomstudent() -> [String: String] func studentatindex(index: Int) func insertstudentatindex(index: Int) func insertstudent(lastname: String, firstname: String) func insertstudent(lastname: String, firstname: String, index: Int) func removestudentatindex(index: Int) func nextstudent() -> [String : String] func prevstudent() -> [String : String ] 34

35 Storyboard Can choose different styles for the cells In the Document Outline, select the TableCell In the Attributes Inspector, change the Style Options: Custom, Basic, Right Detail, Left Detail, Subtitle If using one of the styles that displays a Title and Subtitle, you can access to these labels Title à textlabel Subtitle à detailtextlabel 35

36 Add Model to View Controller Create a DataModel property in the ExampleTableViewController Instantiate it in the viewdidload method (Objective-C) // ExampleTableViewController.m #import "ExampleTableViewController.h" #import ExampleTableViewController (strong, nonatomic) ExampleTableViewController - (void)viewdidload { [super viewdidload]; } self.model = [[DataModel alloc] init]; 36

37 Modify Table View Methods // ExampleTableViewController.m // Return number of sections - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableview { return 1; } // Return numbers of rows in section - (NSInteger)tableView:(UITableView *)tableview numberofrowsinsection:(nsinteger)section { return [self.model numberofstudents]; } 37

38 Modify Table View Methods // ExampleTableViewController.m // Return cell at a given index path - (UITableViewCell *)tableview:(uitableview *)tableview cellforrowatindexpath: (NSIndexPath *)indexpath { UITableViewCell *cell = [tableview dequeuereusablecellwithidentifier:@"tablecell" forindexpath:indexpath]; // Configure the cell... NSDictionary *student = [self.model studentatindex:indexpath.row]; cell.textlabel.text = student[kfirstname]; cell.textlabel.text = student[klastname]; } return cell; 38

39 Add Model to View Controller Create a DataModel property in the ExampleTableViewController SWIFT // ExampleTableViewController.swift import UIKit class ExampleTableViewController: UITableViewController { } var datamodel = DataModel() 39

40 Modify Table View Methods SWIFT // ExampleTableViewController.swift // Return number of sections override func numberofsections(in tableview: UITableView) -> Int { return 1 } // Return numbers of rows in section override func tableview(_ tableview: UITableView, numberofrowsinsection section: Int) -> Int { return self.datamodel.numberofstudents() } 40

41 Modify Table View Methods SWIFT // ExampleTableViewController.swift // Return cell for row at index path override func tableview(_ tableview: UITableView, cellforrowat indexpath: IndexPath) -> UITableViewCell { let cell = tableview.dequeuereusablecell(withidentifier: "TableCell", for: indexpath) // Configure the cell... let student = self.datamodel.studentatindex(index: indexpath.row) cell.textlabel?.text = student[kfirstname] cell.detailtextlabel?.text = student[klastname] } return cell 41

42 Result! Hopefully data from your model is displayed in your table 42

43 Table View Troubleshooting Empty Table? Check the View Controller's Class identity in IB Is the controller set as the table view's data source? Is the property for the model strong? Did you instantiate the model? Did you implement the data source methods? 43

44 Delete table cells Modifying Tables Add navigation control Enable edit button in viewdidload method Use the public remove method in the model Implement the tableview: commiteditingstyle: forrowatindexpath method 44

45 Adding Navigation We need someplace to add our edit buttons We'll use a navigation controller to get a navigation bar Select the Example Table View Controller From Xcode's main menu, select Editor à Embed in à Navigation Controller 45

46 46

47 Enable Editing Uncomment the edit button boilerplate If you did not subclass UITableViewController, then you will have to add the line into the viewdidload method The default is the rightbarbuttonitem, but I changed it to the leftbarbuttonitem 47

48 Enable Editing // ExampleTableViewController.m - (void)viewdidload { [super viewdidload]; } self.navigationitem.rightbarbuttonitem = self.editbuttonitem; SWIFT // ExampleTableViewController.swift override func viewdidload() { super.viewdidload() } self.navigationitem.rightbarbuttonitem = self.editbuttonitem 48

49 Handling Deletes We get delete controls, but they don't work We need to fulfill the delete commands Two step process 1. Delete the data 2. Remove the table cells Always update the data model first! 49

50 Enable Editing In ExampleTableViewController implementation file Uncomment the edit method boilerplate tableview: commiteditingstyle: forrowatindexpath: If you did not subclass UITableViewController, then you will have to add the method 50

51 Delete the Table Cell // ExampleTableViewController.m - (void) tableview: (UITableView *) tableview commiteditingstyle: (UITableViewCellEditingStyle) editingstyle forrowatindexpath: (NSIndexPath *) indexpath { if (editingstyle == UITableViewCellEditingStyleDelete){ // Delete from the model [self.model removestudentatindex:indexpath.row]; } } // Delete the row from data source [tableview deleterowsatindexpaths:@[indexpath] withrowanimation:uitableviewrowanimationfade]; 51

52 Delete the Table Cell SWIFT // ExampleTableViewController.swift override func tableview(_ tableview: UITableView, commit editingstyle: UITableViewCellEditingStyle, forrowat indexpath: IndexPath) { if editingstyle ==.delete{ // Delete from the model self.datamodel.removestudentatindex(index: indexpath.row) } } // Delete the row from data source self.tableview.deleterows(at: [indexpath], with:.fade) 52

53 Adding table cells Add an add button Modifying Tables Add the TextInput files Use one of the insert methods in the model Create a modal segue from table view to input view Implement prepareforsegue method Set the input view controller's completion block Call the insertquote: author: method Refresh the table view 53

54 Open the Storyboard Adding a + Button Using the library, search for a bar button Drag a bar button item to the nav bar on the Answers View controller In the Attributes Inspector, for the Identifier select Add 54

55 Enabling Text Entry Open the TextInput project Drag the following files into your TableView project InputViewController.h InputViewController.m 55

56 Presenting the Input View Copy the Input View Controller (make sure there is a blue line around it) from the TextInput project Paste it into the TableView storyboard Under the Identity Inspector, set the Storyboard ID to InputViewController 56

57 Presenting the Input View Control drag from the + to the Input View Controller This creates a segue Choose modal 57

58 Storyboards A storyboard may designate one view controller to be the initial view controller. If a storyboard represents a specific workflow through part of your UI, the initial view controller represents the first scene in that workflow. You establish relationships from the initial view controller to other view controllers in the storyboard. In turn, you establish relationships from those view controllers to others, eventually connecting most or all of the storyboard s scenes into a single connected graph. 58

59 Relationships If the relationship is a segue, the destination view controller is instantiated when the segue is triggered. If the relationship represents containment, the child view controller is instantiated when its parent is instantiated. If the controller is not the destination or child of another controller, it is never instantiated automatically. You must instantiate it from the storyboard programmatically. 59

60 Identification To identify a specific view controller or segue inside a storyboard, use Interface Builder to assign it an identifier string that uniquely identifies it. To programmatically load a view controller from the storyboard, you must assign it an identifier. Similarly, to trigger a segue programmatically, it must also be assigned an identifier. When a segue is triggered, that segue's identifier is passed to the source view controller, which uses it to determine which segue was triggered. For this reason, consider labeling every segue with an identifier. 60

61 How many storyboards? When you build an app using storyboards, you can use a single storyboard to hold all of its view controllers, or you can create multiple storyboards and implement a portion of the user interface in each. One storyboard in your app is almost always designated as the main storyboard. If there is a main storyboard, ios loads it automatically; other storyboards must be explicitly loaded by your app. 61

62 Main Storyboard The main storyboard is defined in the app s Information property list file. If a main storyboard is declared in this file, then when your app launches, ios performs the following steps: 1. It instantiates a window for you. 2. It loads the main storyboard and instantiates its initial view controller. 3. It assigns the new view controller to the window s rootviewcontroller property and then makes the window visible on the screen. Your app delegate is called to configure the initial view controller before it is displayed. 62

63 Segues A segue represents a triggered transition that brings a new view controller into your app s user interface. Segues contain a lot of information about the transition, including the following: The object that caused the segue to be triggered, known as the sender The source view controller that starts the segue The destination view controller to be instantiated The kind of transition that should be used to bring the destination view controller onscreen An optional identifier string that identifies that specific segue in the storyboard 63

64 Segues When a segue is triggered, ios takes the following actions: 1.It instantiates the destination view controller using the attribute values you provided in the storyboard. 2.It gives the source view controller an opportunity to configure the new controller. 3.It performs the transition configured in the segue. 64

65 Storyboard Scene Connections Containment relationships are for parentchild connections Navigation Controllers, Tab Bar Controllers Segues are for transitions between views 65

66 Segue Identifiers Pick a segue identifier right away Under the Attributes Inspector, for the Identifier enter showinput 66

67 Handle Input Completion Supply a block Use the prepareforsegue: sender: method Add the data to the model using the one of its insert methods Insert a row into the table NSIndexPath *indexpath = [NSIndexPath indexpathforrow:answerindex insection:0]; [self.tableview insertrowsatindexpaths:@[indexpath] withrowanimation:uitableviewrowanimationfade]; Dismiss the input view [self dismissviewcontrolleranimated:yes completion:nil]; 67

ITP 342 Mobile App Dev. Table Views

ITP 342 Mobile App Dev. Table Views ITP 342 Mobile App Dev Table Views Tables A table presents data as a scrolling, singlecolumn list of rows that can be divided into sections or groups. Use a table to display large or small amounts of information

More information

Chapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView

Chapter 22 TableView TableView. TableView ios. ViewController. Cell TableViewCell TableView Chapter 22 TableView TableView Android TableView ListView App 22.1 TableView TableView Storyboard Table View ViewController TableView ios Cell TableViewCell TableView Table View Cell Cell ImageView (imageview)

More information

ios Mobile Development

ios Mobile Development ios Mobile Development Today UITableView! Data source-driven vertical list of views.! ipad! Device-specific UI idioms.! Demo! Shutterbug UITableView Very important class for displaying data in a table!

More information

Today s Topics. Scroll views Table views. UITableViewController Table view cells. Displaying data Controlling appearance & behavior

Today s Topics. Scroll views Table views. UITableViewController Table view cells. Displaying data Controlling appearance & behavior Today s Topics Scroll views Table views Displaying data Controlling appearance & behavior UITableViewController Table view cells Scroll Views UIScrollView For displaying more content than can fit on the

More information

Tables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder

Tables. Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Tables Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Table View Controller Table View Table Cells

More information

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall Stanford Developing Applications for ios Today Drag and Drop Transferring information around within and between apps. EmojiArt Demo Drag and drop an image to get our EmojiArt masterpieces started. UITableView

More information

CS193P - Lecture 8. iphone Application Development. Scroll Views & Table Views

CS193P - Lecture 8. iphone Application Development. Scroll Views & Table Views CS193P - Lecture 8 iphone Application Development Scroll Views & Table Views Announcements Presence 1 due tomorrow (4/28)! Questions? Presence 2 due next Tuesday (5/5) Announcements Enrolled students who

More information

Apple Development Technology Workshops

Apple Development Technology Workshops Apple Development Technology Workshops Workshop 10 Table Views Building iphone Apps. Pt 2 Fall 2008 Hafez Rouzati Fall 2008 Zach Pousman Last Week UIViewControllers Organizing Content & Building iphone

More information

Introductory ios Development

Introductory ios Development Introductory ios Development 152-164 Unit 5 - Multi-View Apps Quick Links & Text References What is a Delegate? What is a Protocol? Delegates, Protocols and TableViews Creating a Master-Detail App Modifying

More information

ITP 342 Mobile App Dev. Unit Testing

ITP 342 Mobile App Dev. Unit Testing ITP 342 Mobile App Dev Unit Testing Testing Xcode provides you with capabilities for extensive software testing. Testing your projects enhances robustness, reduces bugs, and speeds the acceptance of your

More information

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar

Produced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar Design Patterns MSc in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015

Stanford CS193p. Developing Applications for ios. Winter CS193p! Winter 2015 Stanford CS193p Developing Applications for ios Today UITextField Bonus Topic! Table View A UIView for displaying long lists or tables of data UITextField Like UILabel, but editable Typing things in on

More information

Naviga&on and Tab Bar Controllers and Table View

Naviga&on and Tab Bar Controllers and Table View Naviga&on and Tab Bar Controllers and Table View UINaviga)onController Stack of view controllers Naviga)on bar How It Fits Together Top view controller s view Top view controller s )tle Previous view controller

More information

Praktikum Entwicklung von Mediensystemen mit

Praktikum Entwicklung von Mediensystemen mit Praktikum Entwicklung von Mediensystemen mit Wintersemester 2013/2014 Christian Weiß, Dr. Alexander De Luca Today Table View Navigation Controller Passing Data Between Scenes Assignment 2 2 Navigation-based

More information

Collection Views. Dr. Sarah Abraham

Collection Views. Dr. Sarah Abraham Collection Views Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 What is a Collection View? Presents an ordered set of data items in a flexible layout Subclass of UIScrollView (like UITableView)

More information

IPHONE DEVELOPMENT. Getting Started with the iphone SDK

IPHONE DEVELOPMENT. Getting Started with the iphone SDK IPHONE DEVELOPMENT Getting Started with the iphone SDK OBJECTIVE-C The Big Picture STRICT SUPERSET OF C The Objective C Language Any C stuff applies Standard libs are here (time, sqrt etc) The C Language

More information

COMPLETE TUTORIAL COURSE. Learn to make tvos LE. apps with real-worldam S F

COMPLETE TUTORIAL COURSE. Learn to make tvos LE. apps with real-worldam S F HACKING WITH SWIFT COMPLETE TUTORIAL COURSE Learn to make tvos LE P apps with real-worldam S Swift projects REEPaul Hudson F Project 1 Randomly Beautiful 2 www.hackingwithswift.com Setting up In this first

More information

Data IAP 2010 iphonedev.csail.mit.edu edward benson / Thursday, January 14, 2010

Data IAP 2010 iphonedev.csail.mit.edu edward benson / Thursday, January 14, 2010 Data IAP 2010 iphonedev.csail.mit.edu edward benson / eob@csail.mit.edu Today Property Lists User Defaults Settings Panels CoreData Property Lists Today Add persistence. plist 1. Using Property Lists in

More information

Structuring an App Copyright 2013 Apple Inc. All Rights Reserved.

Structuring an App Copyright 2013 Apple Inc. All Rights Reserved. Structuring an App App Development Process (page 30) Designing a User Interface (page 36) Defining the Interaction (page 42) Tutorial: Storyboards (page 47) 29 App Development Process Although the task

More information

Protocols and Delegates. Dr. Sarah Abraham

Protocols and Delegates. Dr. Sarah Abraham Protocols and Delegates Dr. Sarah Abraham University of Texas at Austin CS329e Fall 2016 Protocols Group of related properties and methods that can be implemented by any class Independent of any class

More information

ITP 342 Mobile App Dev. Interface Builder in Xcode

ITP 342 Mobile App Dev. Interface Builder in Xcode ITP 342 Mobile App Dev Interface Builder in Xcode New Project From the Main Menu, select the File à New à Project option For the template, make sure Application is selected under ios on the left-hand side

More information

Learn to make ios apps

Learn to make ios apps HACKING WITH SWIFT PROJECTS 1-39 Learn to make ios apps E L P with real projects SAM E E FR Paul Hudson Project 1 Storm Viewer Get started coding in Swift by making an image viewer app and learning key

More information

Building GUIs with UIKit. Kevin Cathey

Building GUIs with UIKit. Kevin Cathey Building GUIs with UIKit Kevin Cathey Building GUIs with UIKit acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What is UIKit? acm.uiuc.edu/macwarriors/devphone Building GUIs with UIKit What

More information

ITP 342 Mobile App Dev. Collection View

ITP 342 Mobile App Dev. Collection View ITP 342 Mobile App Dev Collection View Collection View A collection view manages an ordered collection of items and presents them in a customizable layout. A collection view: Can contain optional views

More information

Document Version Date: 1st March, 2015

Document Version Date: 1st March, 2015 7 Minute Fitness: ios(swift) Application Document Version 1.0.1 Date: 1st March, 2015 2 [7 MINUTE FITNESS: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance

More information

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney 1 Build Your First App The way to get started is to quit talking and begin doing. Walt Disney Copyright 2015 AppCoda Limited All rights reserved. Please do not distribute or share without permission. No

More information

ITP 342 Mobile App Dev. Connections

ITP 342 Mobile App Dev. Connections ITP 342 Mobile App Dev Connections User Interface Interactions First project displayed information to the user, but there was no interaction. We want the users of our app to touch UI components such as

More information

Navigation and Segues

Navigation and Segues Navigation and Segues Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Multiple views Segues Navigation

More information

Index. btndrop function, 224, 226 btngetquote function, 246 btnpressed function, 28 btnquote method, 245. CallWeb method, 238, 240

Index. btndrop function, 224, 226 btngetquote function, 246 btnpressed function, 28 btnquote method, 245. CallWeb method, 238, 240 Index A App icons section icons set, 277 LaunchImage, 278 launch screen graphics, 278 279 PNG format, 277 settings, 276 App store deployment application graphics, 273 general settings Identity section,

More information

Assignment IV: Smashtag Mentions

Assignment IV: Smashtag Mentions Assignment IV: Smashtag Mentions Objective In this assignment, you will enhance the Smashtag application that we built in class to give ready-access to hashtags, urls, images and users mentioned in a tweet.

More information

ITP 342 Mobile App Dev. Interface Components

ITP 342 Mobile App Dev. Interface Components ITP 342 Mobile App Dev Interface Components Human Interface Guidelines ios Human Interface Guidelines (HIG) https://developer.apple.com/ library/ios/documentation/us erexperience/conceptual/m obilehig/index.html

More information

Building Mapping Apps for ios With Swift

Building Mapping Apps for ios With Swift Building Mapping Apps for ios With Swift Jeff Linwood This book is for sale at http://leanpub.com/buildingmappingappsforioswithswift This version was published on 2017-09-09 This is a Leanpub book. Leanpub

More information

A Mad Libs app that you will navigate through 3 UIViewControllers to add text that will be shown in a story on the fourth UIViewController.

A Mad Libs app that you will navigate through 3 UIViewControllers to add text that will be shown in a story on the fourth UIViewController. WordPlay App: A Mad Libs app that you will navigate through 3 UIViewControllers to add text that will be shown in a story on the fourth UIViewController. Create a new project Create a new Xcode project

More information

ITP 342 Mobile App Dev. Interface Fun

ITP 342 Mobile App Dev. Interface Fun ITP 342 Mobile App Dev Interface Fun Human Interface Guidelines ios Human Interface Guidelines https://developer.apple.com/ library/ios/documentation/ userexperience/conceptual/ MobileHIG/index.html 2

More information

ITP 342 Mobile App Dev. Connections

ITP 342 Mobile App Dev. Connections ITP 342 Mobile App Dev Connections User Interface Interactions First project displayed information to the user, but there was no interaction. We want the users of our app to touch UI components such as

More information

ios 101 Hands-On Challenges

ios 101 Hands-On Challenges ios 101 Hands-On Challenges Copyright 2014 Razeware LLC. All rights reserved. No part of this book or corresponding materials (such as text, images, or source code) may be reproduced or distributed by

More information

Learn to make desktop LE

Learn to make desktop LE HACKING WITH SWIFT COMPLETE TUTORIAL COURSE Learn to make desktop LE P apps with real-worldam S Swift projects REEPaul Hudson F Project 1 Storm Viewer Get started coding in Swift by making an image viewer

More information

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010

Stanford CS193p. Developing Applications for iphone 4, ipod Touch, & ipad Fall Stanford CS193p Fall 2010 Developing Applications for iphone 4, ipod Touch, & ipad Today More Core Data What does the code for the custom NSManagedObject subclasses generated by Xcode look like? Querying for (fetching) objects

More information

My First iphone App. 1. Tutorial Overview

My First iphone App. 1. Tutorial Overview My First iphone App 1. Tutorial Overview In this tutorial, you re going to create a very simple application on the iphone or ipod Touch. It has a text field, a label, and a button. You can type your name

More information

Enhancing your apps for the next dimension of touch

Enhancing your apps for the next dimension of touch App Frameworks #WWDC16 A Peek at 3D Touch Enhancing your apps for the next dimension of touch Session 228 Tyler Fox UIKit Frameworks Engineer Peter Hajas UIKit Frameworks Engineer 2016 Apple Inc. All rights

More information

imate: ios Application

imate: ios Application imate: ios Application Document Version 1.0.1 Date: 27 th May, 2014 2 [IMATE: IOS APPLICATION] Contents AppDelegate Class Reference... 4 Tasks... 4 Properties... 4 Instance Methods... 4 ChatMenuViewController

More information

IPhone Application of Carleton University. Carleton University Computer Science Honors Project Report

IPhone Application of Carleton University. Carleton University Computer Science Honors Project Report IPhone Application of Carleton University Carleton University Computer Science Honors Project Report Student Name: Yang Cai Student Number: 100309906 Project Supervisor: Dr. Dwight Deugo Date: Dec. 13,

More information

MVC & Onwards. CS 442: Mobile App Development Michael Saelee

MVC & Onwards. CS 442: Mobile App Development Michael Saelee MVC & Onwards CS 442: Mobile App Development Michael Saelee Agenda - Recap: view-controller communication - Delegation as a general pattern - Observer pattern - Controller responsibilities & MVC - Multiple

More information

Social Pinboard: ios(swift) Application

Social Pinboard: ios(swift) Application Social Pinboard: ios(swift) Application Document Version 1.0.1 Date: 15 th May, 2015 2 [SOCIAL PINBOARD: APP DOCUMENTATION] Important Notes:... 5 AppDelegate Class Reference... 6 Tasks... 6 Instance Methods...

More information

Developing Applications for ios

Developing Applications for ios Developing Applications for ios Lab 10: Nearby Deals (6 of 6) Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Task 1 Task: Save the favorite deals

More information

CSC 581: Mobile App Development Spring 2019

CSC 581: Mobile App Development Spring 2019 CSC 581: Mobile App Development Spring 2019 Unit 1: Getting Started with App Development Xcode installing XCode, creating a project, MVC pattern interface builder, storyboards, object library outlets vs.

More information

lecture 10 UI/UX and Programmatic Design cs : spring 2018

lecture 10 UI/UX and Programmatic Design cs : spring 2018 lecture 10 UI/UX and Programmatic Design cs198-001 : spring 2018 1 Announcements custom app progress form due before lab (~1 minute) will be released after lecture only 2 labs left (both very important)

More information

This book contains code samples available under the MIT License, printed below:

This book contains code samples available under the MIT License, printed below: Bluetooth Low Energy in ios Swift by Tony Gaitatzis Copyright 2015 All Rights Reserved All rights reserved. This book or any portion thereof may not be reproduced or used in any manner whatsoever without

More information

News- ipad: ios(swift) Application

News- ipad: ios(swift) Application News- ipad: ios(swift) Application Document Version 1.0.1 Date: 9 th Nov, 2014 2 [NEWS- IPAD: APP DOCUMENTATION] Important Notes:... 6 AppDelegate Class Reference... 7 Tasks... 7 Instance Methods... 7

More information

Page 1. GUI Programming. Lecture 13: iphone Basics. iphone. iphone

Page 1. GUI Programming. Lecture 13: iphone Basics. iphone. iphone GUI Programming Lecture 13: iphone Basics Until now, we have only seen code for standard GUIs for standard WIMP interfaces. Today we ll look at some code for programming mobile devices. on the surface,

More information

My First iphone App (for Xcode version 6.4)

My First iphone App (for Xcode version 6.4) My First iphone App (for Xcode version 6.4) 1. Tutorial Overview In this tutorial, you re going to create a very simple application on the iphone or ipod Touch. It has a text field, a label, and a button

More information

View Controller Lifecycle

View Controller Lifecycle View Controller Lifecycle View Controllers have a Lifecycle A sequence of messages is sent to them as they progress through it Why does this matter? You very commonly override these methods to do certain

More information

Learn to make watchosle

Learn to make watchosle HACKING WITH SWIFT COMPLETE TUTORIAL COURSE Learn to make watchosle P apps with real-worldam S Swift projects REEPaul Hudson F Project 1 NoteDictate 2 www.hackingwithswift.com Setting up In this project

More information

The MVC Design Pattern

The MVC Design Pattern The MVC Design Pattern The structure of iphone applications is based on the Model-View-Controller (MVC) design pattern because it benefits object-oriented programs in several ways. MVC based programs tend

More information

CS193P: HelloPoly Walkthrough

CS193P: HelloPoly Walkthrough CS193P: HelloPoly Walkthrough Overview The goal of this walkthrough is to give you a fairly step by step path through building a simple Cocoa Touch application. You are encouraged to follow the walkthrough,

More information

ITP 342 Mobile App Dev. Web View

ITP 342 Mobile App Dev. Web View ITP 342 Mobile App Dev Web View Web View 2 WebKit The WebKit provides a set of core classes to display web content in windows, and by default, implements features such as following links clicked by the

More information

Advanced ios. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012

Advanced ios. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012 Advanced ios CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 20 11/01/2012 1 Goals of the Lecture Present a few additional topics and concepts related to ios programming persistence serialization

More information

ios Development - Xcode IDE

ios Development - Xcode IDE ios Development - Xcode IDE To develop ios applications, you need to have an Apple device like MacBook Pro, Mac Mini, or any Apple device with OS X operating system, and the following Xcode It can be downloaded

More information

User Experience: Windows & Views

User Experience: Windows & Views View Controller Programming Guide for ios User Experience: Windows & Views 2011-01-07 Apple Inc. 2011 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval

More information

My First Cocoa Program

My First Cocoa Program My First Cocoa Program 1. Tutorial Overview In this tutorial, you re going to create a very simple Cocoa application for the Mac. Unlike a line-command program, a Cocoa program uses a graphical window

More information

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011

Stanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011 Developing Applications for ios Today UI Element of the Week UIToolbar ipad Split View Popover Universal (iphone + ipad) Application Demo Friday Section AVFoundation framework - Capturing and manipulating

More information

CSC 581: Mobile App Development Spring 2018

CSC 581: Mobile App Development Spring 2018 CSC 581: Mobile App Development Spring 2018 Unit 2: Introduciton to the UIKit UIKit, UIViews UIControl subclasses 1 UIKit the UIKit is a code framework for building mobile apps the foundational class for

More information

Mobile Application Development

Mobile Application Development Mobile Application Development Lecture 16 Controllers of View Controllers 2013/2014 Parma Università degli Studi di Parma Lecture Summary Multiple MVCs UINavigationController Segues UITabBarController

More information

Mobile Development - Lab 2

Mobile Development - Lab 2 Mobile Development - Lab 2 Objectives Illustrate the delegation mechanism through examples Use a simple Web service Show how to simply make a hybrid app Display data with a grid layout Delegation pattern

More information

Learn more about Pages, Keynote & Numbers

Learn more about Pages, Keynote & Numbers Learn more about Pages, Keynote & Numbers HCPS Instructional Technology May 2012 Adapted from Apple Help Guides CHAPTER ONE: PAGES Part 1: Get to Know Pages Opening and Creating Documents Opening a Pages

More information

ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout

ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout ios DeCal : Lecture 2 Structure of ios Applications: MVC and Auto Layout Overview : Today s Lecture Model View Controller Design Pattern Creating Views in Storyboard Connecting your Views to Code Auto

More information

Instructions for Formatting MLA Style Papers in Microsoft Word 2010

Instructions for Formatting MLA Style Papers in Microsoft Word 2010 Instructions for Formatting MLA Style Papers in Microsoft Word 2010 To begin a Microsoft Word 2010 project, click on the Start bar in the lower left corner of the screen. Select All Programs and then find

More information

Create and edit word processing. Pages.

Create and edit word processing. Pages. Create and edit word processing documents with Pages. In this chapter, we begin to get work done on the ipad by using Pages to create and format documents. Creating a New Document Styling and Formatting

More information

Table Basics. The structure of an table

Table Basics. The structure of an table TABLE -FRAMESET Table Basics A table is a grid of rows and columns that intersect to form cells. Two different types of cells exist: Table cell that contains data, is created with the A cell that

More information

BASIC MICROSOFT POWERPOINT

BASIC MICROSOFT POWERPOINT BASIC MICROSOFT POWERPOINT PART ONE PHONE: 504-838-1144 IT Training Team Jefferson Parish Library EMAIL: jpltrain@jplibrary.net In this class you will learn to: Launch, close, and interact with Microsoft

More information

App. Chapter 19 App. App (ViewController) App. Single View Application Single View Application View. (View Controller)

App. Chapter 19 App. App (ViewController) App. Single View Application Single View Application View. (View Controller) Chapter 19 App App (ViewController) App 19.1 App App Single View Application Single View Application View Controller View Controller Label Button Button (View Controller) 2 View Controller Utility Area

More information

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017

Stanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017 Stanford Developing Applications for ios Today Core Data Object-Oriented Database Core Data Database Sometimes you need to store large amounts of data or query it in a sophisticated manner. But we still

More information

MS_40541 Build Native Cross-Platform Mobile Apps with a Shared C# Business Logic for ios, Android, and UWP in C#.NET with Xamarin and Visual Studio

MS_40541 Build Native Cross-Platform Mobile Apps with a Shared C# Business Logic for ios, Android, and UWP in C#.NET with Xamarin and Visual Studio Build Native Cross-Platform Mobile Apps with a Shared C# Business Logic for ios, Android, and UWP in C#.NET with Xamarin and Visual Studio www.ked.com.mx Av. Revolución No. 374 Col. San Pedro de los Pinos,

More information

UICollectionView. NSCoder Milwaukee. 2 April John Psuik. Tuesday, April 2, 13

UICollectionView. NSCoder Milwaukee. 2 April John Psuik. Tuesday, April 2, 13 UICollectionView NSCoder Milwaukee 2 April 2013 John Psuik 1 UICollectionView New to ios 6 Layouts determine placement of items (flowlayout and custom layout) UITableView concepts, but you can do so much

More information

DÉVELOPPER UNE APPLICATION IOS

DÉVELOPPER UNE APPLICATION IOS DÉVELOPPER UNE APPLICATION IOS PROTOCOLES CE COURS EST EXTRAIT DU LIVRE APP DEVELOPMENT WITH SWIFT 1 PROTOCOLES Définit un plan de méthodes, de propriétés et d'autres exigences qui conviennent à une tâche

More information

S A M P L E C H A P T E R

S A M P L E C H A P T E R SAMPLE CHAPTER Anyone Can Create an App by Wendy L. Wise Chapter 5 Copyright 2017 Manning Publications brief contents PART 1 YOUR VERY FIRST APP...1 1 Getting started 3 2 Building your first app 14 3 Your

More information

Chapter 5 Making Life Easier with Templates and Styles

Chapter 5 Making Life Easier with Templates and Styles Chapter 5: Making Life Easier with Templates and Styles 53 Chapter 5 Making Life Easier with Templates and Styles For most users, uniformity within and across documents is important. OpenOffice.org supports

More information

ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani

ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani ios Development Lecture 3 Controllers of View Controllers Ing. Simone Cirani email: simone.cirani@unipr.it http://www.tlc.unipr.it/cirani Corso IFTS Cisita ios Development 2014 Parma Università degli Studi

More information

Announcement. Final Project Proposal Presentations and Updates

Announcement. Final Project Proposal Presentations and Updates Announcement Start Final Project Pitches on Wednesday Presentation slides dues by Tuesday at 11:59 PM Email slides to cse438ta@gmail.com Extensible Networking Platform 1 1 - CSE 438 Mobile Application

More information

Detailed Design Specification

Detailed Design Specification Department of Computer Science and Engineering the University of Texas at Arlington Detailed Design Specification BehindtheCurtain Enterprises Project Team Members: Kyle Burgess Kyle Crumpton Austen Herbst

More information

View Controllers CPRE 388

View Controllers CPRE 388 View Controllers CPRE 388 View Controllers Manage views in model view controller design template. Many types: custom view controller; container view controller; modal view controller. Custom View controllers

More information

CREATING ACCESSIBLE SPREADSHEETS IN MICROSOFT EXCEL 2010/13 (WINDOWS) & 2011 (MAC)

CREATING ACCESSIBLE SPREADSHEETS IN MICROSOFT EXCEL 2010/13 (WINDOWS) & 2011 (MAC) CREATING ACCESSIBLE SPREADSHEETS IN MICROSOFT EXCEL 2010/13 (WINDOWS) & 2011 (MAC) Screen readers and Excel Users who are blind rely on software called a screen reader to interact with spreadsheets. Screen

More information

Miscellaneous Topics

Miscellaneous Topics Miscellaneous Topics Mobile Application Development in ios School of EECS Washington State University Instructor: Larry Holder Mobile Application Development in ios 1 Outline Renaming Xcode project and

More information

ITP 342 Advanced Mobile App Dev. Core Data

ITP 342 Advanced Mobile App Dev. Core Data ITP 342 Advanced Mobile App Dev Core Data Persistent Data NSUser Defaults Typically used to save app preferences Property List (plist) in Documents Directory Data is in a dictionary or an array Coders

More information

CS193P - Lecture 10. iphone Application Development. Performance

CS193P - Lecture 10. iphone Application Development. Performance CS193P - Lecture 10 iphone Application Development Performance 1 Announcements 2 Announcements Paparazzi 2 is due next Wednesday at 11:59pm 2 Announcements Paparazzi 2 is due next Wednesday at 11:59pm

More information

In the first class, you'll learn how to create a simple single-view app, following a 3-step process:

In the first class, you'll learn how to create a simple single-view app, following a 3-step process: Class 1 In the first class, you'll learn how to create a simple single-view app, following a 3-step process: 1. Design the app's user interface (UI) in Xcode's storyboard. 2. Open the assistant editor,

More information

Cascade User Guide. Introduction. Key System Features. User Interface

Cascade User Guide. Introduction. Key System Features. User Interface Cascade User Guide Introduction Key System Features User Interface Menus and Moving Through the System Files and Pages Working with Existing Pages File Action Menu Version Control Deleting files Restoring

More information

Praktikum Entwicklung von Mediensystemen mit ios

Praktikum Entwicklung von Mediensystemen mit ios Praktikum Entwicklung von Mediensystemen mit ios WS 2011 Prof. Dr. Michael Rohs michael.rohs@ifi.lmu.de MHCI Lab, LMU München Today Storyboards Automatic Reference Counting Animations Exercise 3 2 Timeline

More information

ITP 342 Mobile App Development. Model View Controller

ITP 342 Mobile App Development. Model View Controller ITP 342 Mobile App Development Model View Controller Model-View-Controller The Model-View-Controller (MVC) design pattern assigns objects in an application one of three roles: model, view, or controller.

More information

Here is an example of a spending report-type Dashboard. This would be a great tool for a Sales Manager.

Here is an example of a spending report-type Dashboard. This would be a great tool for a Sales Manager. iphone Dashboard handbook Introduction Welcome to the iphone Dashboard Handbook, your one-stop source for learning about and creating 4D iphone Dashboards. iphone Dashboards are data-at-a-glance summaries

More information

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall

Stanford CS193p. Developing Applications for ios. Fall CS193p. Fall Stanford Developing Applications for ios Today More about Documents Demo Use Codable to create a JSON representation of our document Store it in the filesystem Think better of that and let UIDocument store

More information

Document Formatting and Page Layout

Document Formatting and Page Layout Word 2013 Document Formatting and Page Layout Introduction Instructional designers create a lot of documents such as job aids, training manuals, memos, and so forth. They do so using Word software. While

More information

Assignment III: Graphing Calculator

Assignment III: Graphing Calculator Assignment III: Graphing Calculator Objective You will enhance your Calculator to create a graph of the program the user has entered which can be zoomed in on and panned around. Your app will now work

More information

TL;DR: Interface builder is the tool within Xcode for creating a User Interface via a GUI.

TL;DR: Interface builder is the tool within Xcode for creating a User Interface via a GUI. Week 8 Lab Comp327 week 8 lab for week commencing 12 November 2018. Interface Builder TL;DR: Interface builder is the tool within Xcode for creating a User Interface via a GUI. Interface Builder has been

More information

Esri Story Maps let you combine authoritative maps with narrative text, images, and multimedia

Esri Story Maps let you combine authoritative maps with narrative text, images, and multimedia Geoinformation and Sectoral Statistics Section (GiSS) Story Maps Esri Story Maps let you combine authoritative maps with narrative text, images, and multimedia content. They make it easy to harness the

More information

Best Practices for Accessible Course Materials

Best Practices for Accessible Course Materials Best Practices for Accessible Course Materials Instructure Canvas Learning Management System Course Syllabus Use the University of Tennessee, Knoxville Accessible Syllabus Template to create your syllabus

More information

Chapter 2 Welcome App

Chapter 2 Welcome App 2.1 Introduction Chapter 2 Welcome App 1. A app is an app that can run on iphones, ipod touches and ipads. a. multi-purpose b. global c. unrestricted d. universal Ans: d. universal 2. You can your apps

More information

What s New in NSCollectionView Session 225

What s New in NSCollectionView Session 225 App Frameworks #WWDC15 What s New in NSCollectionView Session 225 Troy Stephens Application Frameworks Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without

More information

Quick Interaction Techniques for watchos

Quick Interaction Techniques for watchos App Frameworks #WWDC16 Quick Interaction Techniques for watchos Session 211 Tom Witkin watchos Engineer Miguel Sanchez watchos Engineer 2016 Apple Inc. All rights reserved. Redistribution or public display

More information

PAGES, NUMBERS, AND KEYNOTE BASICS

PAGES, NUMBERS, AND KEYNOTE BASICS PAGES, NUMBERS, AND KEYNOTE BASICS Pages, Numbers, and Keynote are applications developed by Apple that are comparable to Microsoft Office and Google Docs. Pages, Numbers, and Keynote comes free with your

More information