CSC 581: Mobile App Development

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

Create a Simple Game in Scratch
Create a Simple Game in Scratch
An End-User Perspective On Using NatQuery Extraction From two Files T
This document guides you through using the common features of the InFocus™ Mondopad™ touchscreen display located in this room. Getting Started Power Display.
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
Introduction to TouchDevelop
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
USSF North Carolina Arbiter Referee Assignment Site An Introduction & Guide for Use by Referees © Copyright June 2005 by Paul James, all rights reserved.
A walkthrough of the SageQuest Mobile Control Online & ESC integration.
Microsoft Visual Basic 2012 CHAPTER TWELVE (ENRICHMENT CHAPTER) Windows Store Apps.
OFFICE 365 C&G USER TRAINING. PRESENT BY MICROSOFT SOLUTION ENTERPRISE SECTION.
Xcode testing Using XCTest.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
MagicInfo Pro Scheduler Now that a template has been created from content imported into the Library, the user is ready to begin scheduling content to.
1 of 8 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Tabbed Views UITabBarController. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and.
IOS with Swift Hello world app.
Gestures UIGestureRecognizer.
IPSOS / Vodafone / Novartis Kenya 17 December 2014.
1 Mezzanine Ware (Pty) Ltd © 2014 Installing\Uninstalling the Mezzanine Helium Android application.
Computer Game Design ActionScript is… Object-oriented programming Everything you do in ActionScript does something to some object* Some objects.
1 UI Alert View iPhone/iPad, iOS Development Tutorial.
Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza.
1 CSC 221: Computer Programming I Fall 2009 Introduction to programming in Scratch  animation sprites  motion, control & sensing  costume changes 
SNG via Webinar. Where’s Webinar??  Double click Aflac 2000 folder  Highlight “SNGWebCommunicator”  Right Click and “Send To - Desktop”
GAME:IT Mario Creating Platform Games Level 4 with GML Game Maker Language (GML) allows users more flexibility in game design. GML is similar to how real.
WebViews UIWebView. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and xib) that manages.
Import existing part with drawing
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
The Next Step Hudson Fare Files 102 – Import & upload Rev. 10/14.
Software Overview How to… Review Video and Data  Review the Journal Review the Journal  Simple Search Simple Search  Advanced Search Advanced Search.
Creating a Teacher Web Page Using Mambo. Location You can find the teacher web pages from the home page of the school site: “Class Web Pages”
Dive Into® Visual Basic 2010 Express
Core ELN Training: Office Web Apps (OWA)
Project Management: Messages
Create a Halloween Computer Game in Scratch
About the To-Do Bar in Outlook
SubAnywhere: Setup and Configuration
Single Sample Registration
RAD-IT Architecture Software Training
Introduction With TimeCard users can tag SharePoint events with information that converts them into time sheets. This way they can report.
BOM and BOM Comparison June 16, 2009.
Chapter 7 Advanced Form Techniques
How to register patients via Trust services
Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline Test-Driving the Microwave Oven Application Designing.
Introduction to TouchDevelop
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Visual programming Chapter 2: Events and Event Handling
Lesson 6: Working with Layout and Graphics
CSC 581: Mobile App Development
CSC 581: Mobile App Development
Timelapse with the Veho VMS-001 Microscope
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Scripts In Matlab.
Timing Out Press Menu button. Press Record Tracks button.
Guidelines for Microsoft® Office 2013
2019 Convention Planner Training Using NCA Convention Central: Part IV
Approving Time in Kronos Manager/Supervisor Reference Guide
Creating a Simple Game in Scratch
Chapter 13 Conditional Repetition
Wings 2.0 Business Flow Reference
CSC 221: Introduction to Programming Fall 2018
CSC 581: Mobile App Development
Computers and Scientific Thinking David Reed, Creighton University
All Right Reserved © JiJi Technologies Pvt Ltd
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
Presentation transcript:

CSC 581: Mobile App Development Spring 2018 Examples & advanced topics dice shaker motion sensor counter swipe gestures tap gestures countdown timer scheduledTimer random quotations reading from a local file HTTP requests

Dice shaker suppose we wanted to simulate the roll of two dice could utilize buttons that change images when clicked (similar to slot machine) or, could have two images that are changed when a separate button is clicked

Motion sensor many apps use the motion sensor to initiate actions e.g., shake the phone to clear the fields, restart the game, or roll the dice Swift provides various UIResponders to handle touch events motion events press events shaking the phone is a motion event want to process when the motion is done double check to verify UIEventSubtype is .shakeMotion

App example

Counter app suppose we wanted to have a counter app right swipe increments the count; left swipe decrements double tap resets the counter to 0 touch gestures can similarly be handled with UIResponders in the code but, can be more simply handled via the storyboard drag a Swipe Gesture Recognizer onto the storyboard this adds an icon to the View Controller Tab Bar edit its attributes to make it left/right/up/down add an IBAction from the icon to specify the action drag a Tap Gesture Recognizer onto the storyboard edit its attributes to specify number of taps

App example

Countdown timer suppose we wanted to simulate a countdown timer the user enters a duration in minutes & seconds at the click of a button, the time remaining counts down until 0:00 Swift provides a Timer class for such tasks the scheduledTimer method can schedule a method to be executed in the future, and repeatedly (if desired) Timer.scheduledTimer(timeInterval: DURATION_IN_SEC, target: self,                      selector: #selector(METHOD_TO_BE_EXECUTED),                      userInfo: nil, repeats: TRUE_IF_REPEATED) this class still has ties to Objective-C, so the selector method must have the annotation @objc as part of its header

App example

App example (cont.) suppose we wanted to add color to the display @objc func updateTime() { var min = Int(minLabel.text!)! var sec = Int(secLabel.text!)! // CODE FOR UPDATING min & sec if min == 0 { if sec == 0 { self.view.backgroundColor = .red } else if sec <= 10 { self.view.backgroundColor = .orange else if sec <= 30 { self.view.backgroundColor = .yellow else { self.view.backgroundColor = .green // CODE FOR UPDATING THE LABELS suppose we wanted to add color to the display 30<sec : green 10<sec<30 : yellow 0<sec<10 : orange 0=sec : red add the code on the right

Random quotes suppose we wanted to develop an app for displaying random quotes we have already seen how to read from a file added to the project Bundle could start with a file of quotes, one per line add it to the project Bundle, then read it in when the app loads will need to be able to split it into its components, separated by newLines finally, select and display a random quote when the user clicks on a button

App example

Another approach maintaining & updating the list of quotes is work! there exist Web sites that store and display thousands of quotes better solution would be to have the app request a quote directly from a site in order for the app to send requests to a Web server: must be able to specify a URL must be able to specify a request for data at that URL that request may have additional header information or, it may have queries attached to it finally, must be able to dispatch the request, wait for the response, and return the data when received

App example Concepts HTTP Requests URLSession dataTask downloadTask uploadTask AlamoFire* API Really Web API Different URLs in Swift URL URLRequest URLComponents Asynchronous Calls DispatchGroup

App example (cont.)