SAMPLE CHAPTER. Brendan G. Lim Martin Conte Mac Donell MANNING
|
|
- Mabel Armstrong
- 6 years ago
- Views:
Transcription
1 SAMPLE CHAPTER Brendan G. Lim Martin Conte Mac Donell MANNING
2 ios 7 in Action by Brendan G. Lim Martin Conte Mac Donell Chapter 14 Copyright 2014 Manning Publications
3 brief contents PART 1 BASICS AND NECESSITIES Introduction to ios development 3 2 Views and view controller basics 24 3 Using storyboards to organize and visualize your views 50 4 Using and customizing table views 78 5 Using collection views 103 PART 2 BUILDING REAL-WORLD APPLICATIONS Retrieving remote data Photos and videos and the Assets Library Social integration with Twitter and Facebook Advanced view customization Location and mapping with Core Location and MapKit Persistence and object management with Core Data 248 PART 3 APPLICATION EXTRAS Using AirPlay for streaming and external display Integrating push notifications Applying motion effects and dynamics 316 iii
4 Applying motion effects and dynamics This chapter covers Motion effects using UIMotionEffects Adding the parallax effect Realistic animations with UIKit Dynamics Simulating gravity, collisions, and elasticity Creating custom behaviors With ios 7 came flat textures devoid of gradients and out went skeuomorphic design that mimicked real-life physical objects. There was also the addition of parallax, which made interface objects appear to be three-dimensional by altering their position ever so slightly depending on the angle at which you re holding your device. This parallax effect and many others can be achieved by using the new motion APIs in UIKit. Also, before ios 7 you needed to dive into complex math and physics if you wanted to create realistic physics effects in your views. Now there s also a whole new slew of APIs in UIKit Dynamics that you can use to create these realistic effects without having to be a mathematician. You ll learn about both motion and dynamics in this chapter. Together we ll build a fun little app that will serve as a catalog to showcase a few of the great things you can now do. 316
5 Creating your application Creating your application The app you ll prepare for this chapter will be rather quick and simple. It will involve two images, a basketball court floor for the background and an image of a basketball, which we ll use to demonstrate motion and dynamics. Open Xcode and create a new single-view application called Motion Ball. Next, you ll need to download an archive that contains four images for the background and the basketball you ll use in the app. There are two versions of each image, a retina and non-retina version. Open your web browser and go to HEbROX to download the image archive. Once it s downloaded, open the archive and you ll see the following files: basketball.png basketball@2x.png background.png background@2x.png Jump back into Xcode and select your image assets in the project navigator. Next, drag all four files into the window that displays all of your image assets. You should see them added to your project, as shown in figure Next, open your storyboard and add a UIImageView that fills the entire view, and set the image to background, as shown in figure Figure 14.1 Add the images to your image assets in your Xcode project.
6 318 CHAPTER 14 Applying motion effects and dynamics Figure 14.2 Add a UIImageView to show the background image you added to the image assets. The last view you ll need to add is another UIImageView that s positioned in the center of the screen. Set its size to 150 x 150 and the image to basketball, as shown in figure Once the basketball s been added, create an outlet for it in IAViewController.h called basketball, as shown in figure That s all the setup you ll need to do for your app. Let s now take a look at motion effects Using motion effects Motion effects are used to add effects to views in your application based on the motion of the device running the application. This is accomplished by applying a motion effect to a specific view. These effects can be applied for horizontal and vertical movement when an ios device is tilted. This also means that you can only see these results on a real device because you can t simulate this in the ios Simulator. You ll see how to add a parallax effect to your application Adding the parallax effect The parallax effect utilizes the accelerometer and gyroscope data to determine how a single axis on a view should be adjusted when a device is tilted horizontally or vertically. It d be easy to show you what the parallax effect looks like if we were able to show you an animated GIF within this book. Instead, look at figure 14.5, which shows you what the parallax effect looks like when you tilt a device horizontally or vertically.
7 Using motion effects 319 Figure 14.3 Add another image view to the center of the screen to represent the basketball. Figure 14.4 Add an outlet for the basketball image view named basketball to IAViewController.h.
8 320 CHAPTER 14 Applying motion effects and dynamics Center Tilted left Tilted right Center Tilted up Tilted down Figure 14.5 Demonstrating the parallax effect on a circle, which changes location when the device is tilted horizontally or vertically In this figure the motion effect is applied to the dark gray circle. The background is used as a reference point to demonstrate the way the ball is positioned as you move the device to the left/right or up/down. To create these effects there s a new class in the UIKit framework called UIMotion- Effect, which serves as an abstract class. This means you can t use this class directly to create your own motion effects, but you can subclass it. Luckily there s an out-of-thebox class called UIInterpolatingMotionEffect that you can use to create the parallax effect. To create a UIInterpolatingMotionEffect you can use the initwithkeypath:type: method. The first parameter, the key path, is used to specify on which axis on the view you d like to apply the effect. Normally this is done on the center point of the view. For instance, if you were to apply a horizontal motion effect, you d apply it to the center.x key path. For a vertical effect you d use center.y. The second parameter in the initwithkeypath:type: method specifies the type of motion to track,
9 Using motion effects 321 which is represented by two constants, UIInterpolatingMotionEffectTypeTilt- AlongHorizontalAxis for horizontal tracking and UIInterpolatingMotionEffect- TypeTiltVerticalAxis for vertical. Once a UIInterpolatingMotionEffect instance is created, you can add a maximum value and a minimum value that are used to specify the amount a view should move when a device is tilted horizontally all the way to the left or to the right. This is accomplished by specifying an NSNumber for the maximumrelativevalue and minimum- RelativeValue properties. Add the parallax effect to your app so that the basketball s position changes when the device is tilted horizontally or vertically. Jump into IAViewController.m and add the following method. Listing 14.1 Add parallax effect to basketball Set vertical maximum relative value. d Set horizontal maximum relative value. f - (void) addparallaxeffect { UIInterpolatingMotionEffect *horizontaleffect = [[UIInterpolatingMotionEffect alloc] initwithkeypath:@"center.x" type:uiinterpolatingmotioneffecttypetiltalonghorizontalaxis]; UIInterpolatingMotionEffect *verticaleffect = [[UIInterpolatingMotionEffect alloc] initwithkeypath:@"center.y" type:uiinterpolatingmotioneffecttypetiltalongverticalaxis]; } verticaleffect.maximumrelativevalue verticaleffect.minimumrelativevalue horizontaleffect.maximumrelativevalue horizontaleffect.minimumrelativevalue [self.basketball addmotioneffect:verticaleffect]; [self.basketball addmotioneffect:horizontaleffect]; Here you first create a vertical effect using the key path center.y so that the vertical effect is applied to the y-axis B. You then create a horizontal effect on the x-axis c. Next, you set the maximum d and minimum e values to 20 points for the vertical effect. Then you set the same for the maximum f and minimum g on the horizontal effect. Lastly you add the motion effect for vertical h and horizontal i to the UIImageView that represents your basketball. The last thing to do is to make a call to this method within the viewdidload method: - (void) viewdidload { [super viewdidload]; [self addparallaxeffect]; } Create vertical motion effect. You can try this out only if you have a paid developer account because you ll need to run this application on your device to see it in action. When you do run this, you e g b c Set vertical minimum relative value. Create horizontal motion effect. Set horizontal minimum relative value. h i Add vertical motion effect to basketball. Add horizontal motion effect to basketball.
10 322 CHAPTER 14 Applying motion effects and dynamics should see the basketball showcasing the parallax effect when the device is moved vertically or horizontally. Next, you ll be learning about UIKit Dynamics so that you can apply realistic animations to your basketball Using UIKit Dynamics UIKit Dynamics gives you a way to animate views to produce realistic effects. Previously in ios 6, in order to create these types of animations you d need a deep understanding of math, physics, and Core Animation. UIKit Dynamics now allows you to add these types of effects to your apps Introduction to UIKit Dynamics As is probably apparent from its name, UIKit Dynamics is part of the UIKit framework. The top-level class with the physics engine that s responsible for generating the effects you ll be using is the UIDynamicAnimator class. This class will accept behaviors that are applied to a specific view. Behaviors provide instructions to the animator s physics engine, which in turn applies the effects. These behaviors are represented by the UIDynamicBehavior class. Each UIDynamicBehavior can be applied to multiple UIDynamicItems. What s a UIDynamicItem? The UIDynamicItem is a protocol that defines a center, bounds, and a two-dimensional transform. Luckily the UIView class conforms to the UIDynamicItem protocol. Take a look at figure 14.6 to see how these all relate to each other. Also, the UICollectionViewLayoutAttributes class (you learned about this when reading about collection views) can be used with dynamic behaviors. In this chapter we ll be sticking to applying effects to UIViews. When creating a new UIDynamicAnimator instance you ll have to pass in a reference view using the initwithreferenceview: method. This reference view will be the top-level view in your view controller, as shown here: UIDynamicAnimator *animator = [[UIDynamicAnimator alloc] initwithreferenceview:self.view]; When using a UIDynamicBehavior you can use one of the out-of-the-box subclasses or create your own. The behaviors already created for us will solve almost all of our UIDynamicAnimator UIDynamicBehavior UIDynamicItem UIDynamicItem UIDynamicBehavior UIDynamicItem Figure 14.6 The UIDynamicAnimator takes in UIDynamicBehaviors, which can be applied to multiple objects that conform to the UIDynamicItem protocol.
11 Using UIKit Dynamics 323 needs, which is one of the reasons why we don t need to be rocket scientists to work with them. Each of them has its own specific behavior, as shown in table Table 14.1 Different types of UIDynamicBehaviors Behavior UIAttachmentBehavior UICollisionBehavior UIGravityBehavior UIDynamicItemBehavior UIPushBehavior UISnapBehavior Description Connection between two dynamic items Collision between dynamic items Gravity effect applied to dynamic items Effect to match ending velocity of a user gesture Apply force to a dynamic item from a push Snap a dynamic item to a specific point How about you get started by adding some dynamic behaviors to your basketball? First, open Xcode and add a property to IAViewController.h called animator, as shown (strong, nonatomic) UIDynamicAnimator *animator; Now go to IAViewController.m and set the animator property in the viewdidload method using the view property as the reference view: self.animator = [[UIDynamicAnimator alloc] initwithreferenceview:self.view]; Next, you should set the basketball to be able to interact with touch actions, because that s how you re going to be triggering these effects. Add the following to the bottom of viewdidload as well: [self.basketball setuserinteractionenabled:yes]; Great you re ready to start adding some awesome behaviors Applying the gravity behavior The gravity behavior is one of the simplest behaviors to use. The goal is to have the dynamic item, the basketball, fall with simulated gravity after it s tapped. To do this, you ll create two new methods, setupgravity and dropball: in IAViewController.m. The setupgravity method is only to add a gesture recognizer to execute dropball: when the ball is tapped. Add the following code: - (void) setupgravity { UITapGestureRecognizer *tapgesture = [[UITapGestureRecognizer alloc] initwithtarget:self action:@selector(dropball:)]; [self.basketball addgesturerecognizer:tapgesture]; }
12 324 CHAPTER 14 Applying motion effects and dynamics Now add the following to the bottom of viewdidload: [self setupgravity]; Finally, you can add the gravity behavior, which is executed when the basketball is tapped. This code is shown in the following listing. Listing 14.2 Applying gravity to a view on tap - (void) dropball:(uitapgesturerecognizer *)recognizer { UIGravityBehavior *gravity = [[UIGravityBehavior alloc] initwithitems:@[self.basketball]]; [self.animator addbehavior:gravity]; Apply behavior } to animator. Create gravity behavior for basketball. All of the magic is done in the two lines found in this method. You first create a new instance of UIGravityBehavior as the dynamic item B. Then you add the behavior to the animator c. If you run the application now, you ll see the ball fall off the screen as soon as it s tapped. The start and end results are shown in figure It s amazing how this was accomplished with such a small amount of code. It actually took you more lines to set up the tap gesture than it did to simulate the gravity c b After tapping Figure 14.7 After tapping, the ball will animate and fall off the screen as if gravity was pulling it down. After the animation, the ball will be off the screen.
13 Using UIKit Dynamics 325 effect. What if you wanted the ball to fall and come to a stop at the bottom of your view? You can do this by adding a collision behavior Applying a collision behavior Collision behaviors allow you to define how dynamic items should react when they come in contact with one another. This is accomplished by using the UICollision- Behavior class. In the case of your basketball, when the gravity behavior is applied, it falls but never stops falling. You can get it to stop at the bottom of the screen by adding a collision behavior. Because the animator was created with knowledge of a reference view the main view of your view controller it knows where the imposed boundaries are. You can use this to your advantage in this situation. The UICollisionBehavior class s translatesreferenceboundsintoboundary property allows you to tell it to set the bounds of the reference view as the boundary of the behavior by setting it to YES. You ll add the collision behavior within the dropball: method, as shown in the next listing. Listing 14.3 Adding the collision behavior - (void) dropball:(uitapgesturerecognizer *)recognizer { UIGravityBehavior *gravity = [[UIGravityBehavior alloc] initwithitems:@[self.basketball]]; [self.animator addbehavior:gravity]; UICollisionBehavior *collision = [[UICollisionBehavior alloc] initwithitems:@[self.basketball]]; collision.translatesreferenceboundsintoboundary = YES; [self.animator addbehavior:collision]; } Apply behavior to animator. c Create the collision behavior. Here you re adding three lines to add the collision behavior. First, you create a new UICollisionBehavior with the basketball view as the dynamic item B. Next, you set the bounds of the reference view as the boundary for the behavior c. Lastly, you add the behavior to the animator d. Run the application and tap the basketball. You should see that the ball lightly bounces as soon as it hits the bottom boundary of the reference view. The start and finish positions are shown in figure One thing you also see in this example is that you can add multiple behaviors to an animator to make a unique effect. Next, you re going to learn how to make this image come to life by making it bounce like a real basketball Adding dynamic behavior You re going to use the UIDynamicBehavior class to help with the bounce effect. The UIDynamicBehavior has a property that specifies the elasticity of an object that helps makes this possible. This property accepts a CGFloat that ranges from 0.0 (no bounce) to 1.0 (continuous elasticity). d b Set reference view bounds as boundary.
14 326 CHAPTER 14 Applying motion effects and dynamics After tapping Figure 14.8 After tapping it, the ball will fall with the same gravity behavior but will come to a light stop at the bottom of the reference view due to the collision behavior you added. Also, a basketball never falls straight down without rotating. The UIDynamicBehavior class lets you specify angular and linear velocities for a specific dynamic item. You ll be adding an angular velocity by using the addangularvelocity:foritem: method. This will be used to give the ball a little rotation when it collides with the boundaries of the reference view. To simulate friction there s a friction property that takes values from 0.0 (no friction) to 1.0 (strong friction). Also, to give the object realistic density to simulate mass, there s even a density property that you can specify. The density specified is directly related to the pixel size of the dynamic item that it s applied to. For example, an object that is 100 x 100 with a 1.0 density value will accelerate to 100 points per second 2. Update the dropball: method as shown in the following listing. Listing 14.4 Adding dynamic behavior - (void) dropball:(uitapgesturerecognizer *)recognizer { UIGravityBehavior *gravity = [[UIGravityBehavior alloc] initwithitems:@[self.basketball]]; [self.animator addbehavior:gravity];
15 Using UIKit Dynamics 327 Specify friction amount. e Specify density of basketball. f UICollisionBehavior *collision = [[UICollisionBehavior alloc] initwithitems:@[self.basketball]]; collision.translatesreferenceboundsintoboundary = YES; [self.animator addbehavior:collision]; UIDynamicItemBehavior *bounce = [[UIDynamicItemBehavior alloc] initwithitems:@[self.basketball]]; [bounce addangularvelocity:0.2f foritem:self.basketball]; } bounce.elasticity = 0.8f; bounce.friction = 0.2f; bounce.density = 0.4f; [self.animator addbehavior:bounce]; Specify elasticity amount. Create dynamic item behavior. Here you re creating a new dynamic item behavior for the basketball as the dynamic item B. Then you re adding an angular velocity of 0.2 c, elasticity of 0.8 d, friction of 0.2 e, and density of 0.4 f. Lastly you re adding the behavior to the animator g. When you run the app and tap the basketball, you ll notice that it rotates as it bounces and returns to its normal position as it comes to a stop at the bottom right of the screen. Figure 14.9 shows you how the ball ends up after the animator has finished. You re encouraged to play with the values for angular velocity, elasticity, friction, and density to see just how they affect the animation. d g Add behavior to animator. b c Add angular velocity to basketball. After tapping Figure 14.9 After you tap the ball, the dynamic item behavior will cause the ball to rotate and fall based on the angular velocity, elasticity, friction, and density that you added.
16 328 CHAPTER 14 Applying motion effects and dynamics Figure Create a subclass of UIDynamicBehavior called IABallBounceBehavior Creating a custom UIDynamicBehavior subclass If you want to package all of these behaviors into one class, it s easy to do by creating a subclass of UIDynamicBehavior. First, go to the project navigator and create a new file in the Motion Ball group called IABallBounceBehavior that s a subclass of UIDynamic- Behavior, as shown in figure After the new file s been created, open IABallBounceBehavior.h and add the following method declaration: -(id) initwithitems:(nsarray *)items; Next, open IABallBounceBehavior.m. Here you ll be adding all of the behaviors that you ve just created, but instead of adding them to an animator, you ll be adding them as child behaviors. Add the code shown in the following listing. Listing 14.5 Custom ball bounce behavior Create collision behavior. d -(id) initwithitems:(nsarray *)items { if (self = [super init]) { UIGravityBehavior *gravity = [[UIGravityBehavior alloc] initwithitems:items]; [self addchildbehavior:gravity]; UICollisionBehavior *collision = [[UICollisionBehavior alloc] initwithitems:items]; b Create gravity behavior. c Add gravity as child behavior.
17 Summary 329 Add collision as child behavior. collision.translatesreferenceboundsintoboundary = YES; [self addchildbehavior:collision]; UIDynamicItemBehavior *dynamic = [[UIDynamicItemBehavior alloc] initwithitems:items]; for (UIView *item in items) [dynamic addangularvelocity:0.2f foritem:item]; } e } dynamic.elasticity = 0.8f; dynamic.friction = 0.2f; dynamic.density = 0.4f; [self addchildbehavior:dynamic]; return self; This should look extremely familiar. All you re doing is adding the custom behaviors you ve already created into an initializer for the IABallBounceBehavior class. You first create the gravity behavior B and add it as a child behavior c. Then you create the collision behavior d and add that as a child behavior e. Lastly you create the dynamic item behavior f, apply velocity to all items in the items array g, and then add that as a child behavior h. Next, open IAViewController.m. You can replace all of the dynamic behaviors with your new IABallBounceBehavior. First, you ll need to import the new class by adding the following to the top of the IAViewController class: #import "IABallBounceBehavior.h" Finally, you can replace all of the code within dropball: with the two lines shown here: IABallBounceBehavior *ballbounce = [[IABallBounceBehavior alloc] initwithitems:@[self.basketball]]; [self.animator addbehavior:ballbounce]; This shows how simple it is to wrap different dynamic behaviors to achieve a desired effect in one single behavior Summary There are so many things you can do with motion effects and dynamics, and you ve only just skimmed the surface. There literally are endless possibilities, even with dynamics alone. On top of using both of these, you can also combine Core Animation and gestures to make something truly unique. All of these together, if used wisely, can simulate realistic and fun animations that can help provide a level of delight for your users as they use your applications. You can use motion effects to provide a parallax effect to your views. The parallax effect works by using data from the accelerometer and gyroscope when a device is tilted horizontally or vertically. To be able to test motion effects, you need to run the applications on a physical device. h Add dynamic item behavior as child behavior. g f Create dynamic item behavior. Apply angular velocity to all items passed in.
18 330 CHAPTER 14 Applying motion effects and dynamics UIKit Dynamics provides realistic animations without the need of a complex understanding of math and physics. Many dynamic behaviors can be used out of the box, such as gravity, collisions, and more. You can add multiple dynamic behaviors as child behaviors into a single UIKit- DynamicBehavior subclass.
19 ios DEVELOPMENT Lim Mac Donell To develop great apps you need a deep knowledge of ios. You also need a finely tuned sense of what motivates 500 million loyal iphone and ipad users. ios 7 introduces many new visual changes, as well as better multitasking, dynamic motion effects, and much more. This book helps you use those features in apps that will delight your users. ios 7 in Action is a hands-on guide that teaches you to create amazing native ios apps. In it, you ll explore thoroughly explained examples that you can expand and reuse. If this is your first foray into mobile development, you ll get the skills you need to go from idea to app store. If you re already creating ios apps, you ll pick up new techniques to hone your craft, and learn how to capitalize on new ios 7 features. What s Inside ios 7 IN ACTION Native ios 7 design and development Learn Core Data, AirPlay, Motion Effects, and more Create real-world apps using each core topic Use and create your own custom views Introduction and overview of Objective-C This book assumes you re familiar with a language like C, C++, or Java. Prior experience with Objective-C and ios is helpful. Brendan Lim is a Y Combinator alum, the cofounder of Kicksend, and the author of MacRuby in Action. Martin Conte Mac Donell, aka fz, is a veteran of several startups and an avid open source contributor. SEE INSERT A practical journey through the ios 7 SDK. Stephen Wakely Thomson Reuters A kickstart for newbs and a deft guide for experts. Mayur S. Patil Clearlogy Solutions Mobile developer: don t you dare not read this book! Ecil Teodoro, IBM The code examples are excellent and the methodology used is clear and concise. Gavin Whyte Verify Data Pty Ltd Everything you need to know to ship an app, and more. Daniel Zajork API Healthcare Corporation To download their free ebook in PDF, epub, and Kindle formats, owners of this book should visit manning.com/ios7inaction MANNING $44.99 / Can $47.99 [INCLUDING ebook]
What's New in UIKit Dynamics and Visual Effects Session 229
App Frameworks #WWDC15 What's New in UIKit Dynamics and Visual Effects Session 229 Michael Turner UIKit Engineer David Duncan UIKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public
More informationSAMPLE CHAPTER. Brendan G. Lim Martin Conte Mac Donell MANNING
SAMPLE CHAPTER Brendan G. Lim Martin Conte Mac Donell MANNING ios 7 in Action by Brendan G. Lim Martin Conte Mac Donell Chapter 2 Copyright 2014 Manning Publications brief contents PART 1 BASICS AND NECESSITIES...1
More informationStanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017
Stanford Developing Applications for ios Today Timer Periodically execute a block of code Blinking FaceIt Demo Animation Animating changes to UIViews Smoother Blinking FaceIt Head-shaking FaceIt Animating
More informationCSE 438: Mobile Application Development Lab 2: Virtual Pet App
CSE 438: Mobile Application Development Lab 2: Virtual Pet App Overview In this lab, you will create an app to take care of your very own virtual pets! The app will only have one screen and simple logic,
More informationIOS 9 App Development Essentials: Learn To Develop IOS 9 Apps Using Xcode 7 And Swift 2 PDF
IOS 9 App Development Essentials: Learn To Develop IOS 9 Apps Using Xcode 7 And Swift 2 PDF ios 9 App Development Essentials is latest edition of this popular book series and has now been fully updated
More informationHello! ios Development
SAMPLE CHAPTER Hello! ios Development by Lou Franco Eitan Mendelowitz Chapter 1 Copyright 2013 Manning Publications Brief contents PART 1 HELLO! IPHONE 1 1 Hello! iphone 3 2 Thinking like an iphone developer
More informationAssignment III: Graphing Calculator
Assignment III: Graphing Calculator Objective The goal of this assignment is to reuse your CalculatorBrain and CalculatorViewController objects to build a Graphing Calculator for iphone and ipad. By doing
More informationChapter 19- Object Physics
Chapter 19- Object Physics Flowing water, fabric, things falling, and even a bouncing ball can be difficult to animate realistically using techniques we have already discussed. This is where Blender's
More informationAssignment 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 information1 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 informationMobile 3.1 ios & Android v2
Mobile 3.1 ios & Android v2 Bookshelf Mobile 3.1 ios and Android v2 1 Introduction VitalSource Bookshelf lets you download and access books on any of the following devices: Android smartphone or tablet
More informationAssignment 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 informationiphone Programming Patrick H. Madden SUNY Binghamton Computer Science Department
iphone Programming Patrick H. Madden SUNY Binghamton Computer Science Department pmadden@acm.org http://optimal.cs.binghamton.edu General Outline Overview of the tools, and where to get more information
More informationSetting up A Basic Scene in Unity
Setting up A Basic Scene in Unity So begins the first of this series of tutorials aimed at helping you gain the basic understanding of skills needed in Unity to develop a 3D game. As this is a programming
More informationAssignment III: Graphing Calculator
Assignment III: Graphing Calculator Objective The goal of this assignment is to reuse your CalculatorBrain and CalculatorViewController objects to build a Graphing Calculator. By doing this, you will gain
More informationPong in Unity a basic Intro
This tutorial recreates the classic game Pong, for those unfamiliar with the game, shame on you what have you been doing, living under a rock?! Go google it. Go on. For those that now know the game, this
More informationFree Fall. Objective. Materials. Part 1: Determining Gravitational Acceleration, g
Free Fall Objective Students will work in groups to investigate free fall acceleration on the Earth. Students will measure the fundamental physical constant, g, and evaluate the dependence of free fall
More informationios 9 SDK Development
Extracted from: ios 9 SDK Development Creating iphone and ipad Apps with Swift This PDF file contains pages extracted from ios 9 SDK Development, published by the Pragmatic Bookshelf. For more information
More informationMy 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 informationLesson 1: Hello ios! 1
Contents Introduction xxv Lesson 1: Hello ios! 1 ios Developer Essentials 1 A Suitable Mac 1 A Device for Testing 2 Device Differences 2 An ios Developer Account 4 The Official ios SDK 6 The Typical App
More informationCOMP30019 Graphics and Interaction Input
COMP30019 Graphics and Interaction Input Department of Computing and Information Systems The Lecture outline Introduction Touch Input Gestures Picking Sensors Why Touch? Touch interfaces are increasingly
More informationStream iphone Sensor Data to Adafruit IO
Stream iphone Sensor Data to Adafruit IO Created by Trevor Beaton Last updated on 2019-01-22 04:07:41 PM UTC Guide Contents Guide Contents Overview In this learn guide we will: Before we start... Downloading
More informationMy 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 informationStructuring 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 informationHow To Make Your Own App Or Game. Go to
How To Make Your Own App Or Game. Go to http://appdevsecrets.com the most significant change to the interface since the introduction of ios Jony Ive, Apple Inc. Apple is and has always been the trendsetter
More informationAdvanced 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 informationIOS 8 SDK Development: Creating IPhone And IPad Apps With Swift By Chris Adamson
IOS 8 SDK Development: Creating IPhone And IPad Apps With Swift By Chris Adamson If you are searched for a ebook by Chris Adamson IOS 8 SDK Development: Creating iphone and ipad Apps with Swift in pdf
More informationSphero Lightning Lab Cheat Sheet
Actions Tool Description Variables Ranges Roll Combines heading, speed and time variables to make the robot roll. Duration Speed Heading (0 to 999999 seconds) (degrees 0-359) Set Speed Sets the speed of
More informationICS 61 Game Systems and Design Introduction to Scratch
ICS 61, Winter, 2015 Introduction to Scratch p. 1 ICS 61 Game Systems and Design Introduction to Scratch 1. Make sure your computer has a browser open at the address http://scratch.mit.edu/projects/editor/.
More informationPocketLab and Scratch STEM Coding Challenge
PocketLab and Scratch STEM Coding Challenge With this kit you will learn how to use sensor data in a computer program. Scratch can read data wirelessly from the PocketLab sensors, and then use that data
More informationLearning Objectives. Math Prerequisites. Technology Prerequisites. Materials. Math Objectives. Technology Objectives
Learning Objectives Parametric Functions Lesson 2: Dude, Where s My Football? Level: Algebra 2 Time required: 60 minutes Many students expect a falling object graph to look just like the path of the falling
More informationSAMPLE CHAPTER SECOND EDITION. Don Jones Jeffery Hicks Richard Siddaway MANNING
SAMPLE CHAPTER SECOND EDITION Don Jones Jeffery Hicks Richard Siddaway MANNING PowerShell in Depth by Don Jones Jeffery Hicks Richard Siddaway Chapter 1 Copyright 2015 Manning Publications brief contents
More informationDeveloping Applications for ios
Developing Applications for ios Lecture 1: Mobile Applications Development Radu Ionescu raducu.ionescu@gmail.com Faculty of Mathematics and Computer Science University of Bucharest Evaluation Individual
More informationWard s Single Probes. When All You Need is One
Ward s Single Probes When All You Need is One INTRODUCTION The Ward s Single Probes platform was designed for the classroom with ever-changing needs in mind. Users can select from three different operational
More informationLearn 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 informationWhat is the Best Way for Children to Learn Computer Programming?
What is the Best Way for Children to Learn Computer Programming? Dr Alex Davidovic One of the defining characteristics of today s society is that the computers and mobile devices are the integral and natural
More informationITP 342 Mobile App Dev. Accelerometer Gyroscope
ITP 342 Mobile App Dev Accelerometer Gyroscope Motion Events Users generate motion events when they move, shake, or tilt the device These motion events are detected by the device hardware, specifically,
More informationi wonder, therefore i am. Welcome to the Wonder League! This packet includes everything you need to know about Dash, Dot, and how to get started!
1 2 3 4 5 6 7 8 9 * 0 # 8 i wonder, therefore i am. Welcome to the Wonder League! This packet includes everything you need to know about Dash, Dot, and how to get started! Setting up your robots Setting
More informationPreface...3 Acknowledgments...4. Contents...5. List of Figures...17
Contents - 5 Contents Preface...3 Acknowledgments...4 Contents...5 List of Figures...17 Introduction...23 History of Delphi...24 Delphi for mobile platforms...27 About this book...27 About the author...29
More informationThis lesson will focus on the Bouncing Ball exercise.
This will be the first of an on-going series of Flipbook tutorials created by animator Andre Quijano. The tutorials will cover a variety of exercises and fundamentals that animators, of all skill levels,
More informationVelocity: A Bat s Eye View of Velocity
Name School Date Purpose Velocity: A Bat s Eye View of Velocity There are a number of ways of representing motion that we ll find useful. Graphing position, velocity, and acceleration vs. time is often
More informationGame Board: Enabling Simple Games in TouchDevelop
Game Board: Enabling Simple Games in TouchDevelop Manuel Fähndrich Microsoft Research One Microsoft Way, Redmond WA 98052, USA maf@microsoft.com February 23, 2012 Abstract TouchDevelop is a novel application
More informationBeginning Mac Programming
Extracted from: Beginning Mac Programming Develop with Objective-C and Cocoa This PDF file contains pages extracted from Beginning Mac Programming, published by the Pragmatic Bookshelf. For more information
More informationBuilding 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 informationPage 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 informationDEVELOPING APPS FOR. Note: This ebook relies on and uses information from the Google Glass Developers site.
DEVELOPING APPS FOR Note: This ebook relies on and uses information from the Google Glass Developers site. Table of Contents GLASS What is Google Glass? 3 Technology Basics.... 3 Design for Google Glass
More informationCISC 1600, Lab 2.3: Processing animation, objects, and arrays
CISC 1600, Lab 2.3: Processing animation, objects, and arrays Prof Michael Mandel 1 Getting set up For this lab, we will again be using Sketchpad. sketchpad.cc in your browser and log in. Go to http://cisc1600.
More informationWe ll be making starter projects for many of the examples, to get people started. Those should be appearing at
Marty Scratch Examples This document shows a selection of things you can do with Marty through the Scratch interface, from the very basic to the fairly complicated. Everything here is in prototype stage,
More informationBCC Particle System Generator
BCC Particle System Generator BCC Particle System is an auto-animated particle generator that provides in-depth control over individual particles as well as the overall shape and movement of the system.
More informationios Mobile Development
ios Mobile Development Today Protocols How to make id a little bit safer. Blocks Passing a block of code as an argument to a method. Animation Dynamic Animator View property animation Demo Dropit! Protocols
More informationDOWNLOAD PDF LEARN C ON THE MAC
Chapter 1 : How should i learn C++ on a mac? Yahoo Answers Dave Mark is a longtime Mac developer and author who has written a number of books on Mac and ios development, including Beginning iphone 4 Development
More informationAnimator Friendly Rigging Part 1
Animator Friendly Rigging Part 1 Creating animation rigs which solve problems, are fun to use, and don t cause nervous breakdowns. - http://jasonschleifer.com/ - 1- CONTENTS I. INTRODUCTION... 4 What is
More informationNotes 3: Actionscript to control symbol locations
Notes 3: Actionscript to control symbol locations Okay, you now know enough actionscript to shoot yourself in the foot, especially if you don t use types. REMEMBER to always declare vars and specify data
More informationStanford CS193p. Developing Applications for ios. Fall Stanford CS193p. Fall 2011
Developing Applications for ios Views A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space Draws and handles events in that rectangle Hierarchical A view has only one
More informationHow to Get a Help Desk Up and Running in a Day. May, 2011
How to Get a Help Desk Up and Running in a Day May, 2011 Table of Contents Introduction... 3 Easy to Get Started: Free 30- Day Trial... 3 Jumping In and Solving Your First Ticket... 3 Seeing and Replying
More informationITP 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 informationITP 342 Mobile App Dev. Accelerometer Gyroscope
ITP 342 Mobile App Dev Accelerometer Gyroscope Motion Events Users generate motion events when they move, shake, or tilt the device These motion events are detected by the device hardware, specifically,
More information3Using and Writing. Functions. Understanding Functions 41. In this chapter, I ll explain what functions are and how to use them.
3Using and Writing Functions Understanding Functions 41 Using Methods 42 Writing Custom Functions 46 Understanding Modular Functions 49 Making a Function Modular 50 Making a Function Return a Value 59
More informationiphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5
iphone App Basics iphone and ipod touch Development Fall 2009 Lecture 5 Questions? Announcements Assignment #1 due this evening by 11:59pm Remember, if you wish to use a free late you must email me before
More informationPUBLISHING FLASH. Lesson Overview
PUBLISHING FLASH Lesson Overview In this lesson, you ll learn how to do the following: Test a Flash document Understand the Bandwidth Profiler Change publish settings for a document Understand the difference
More informationBCC Comet Generator Source XY Source Z Destination XY Destination Z Completion Time
BCC Comet Generator Comet creates an auto-animated comet that streaks across the screen. The comet is compromised of particles whose sizes, shapes, and colors can be adjusted. You can also set the length
More informationCreate a Swirly Lollipop Using the Spiral Tool Philip Christie on Jun 13th 2012 with 12 Comments
Advertise Here Create a Swirly Lollipop Using the Spiral Tool Philip Christie on Jun 13th 2012 with 12 Comments Tutorial Details Program: Adobe Illustrator CS5 Difficulty: Beginner Es timated Completion
More informationA new clients guide to: Activating a new Studio 3.0 Account Creating a Photo Album Starting a Project Submitting a Project Publishing Tips
Getting Started With Heritage Makers A Guide to the Heritage Studio 3.0 Drag and Drop Publishing System presented by Heritage Makers A new clients guide to: Activating a new Studio 3.0 Account Creating
More informationios Application Development Course Details
ios Application Development Course Details By Besant Technologies Course Name Category Venue ios Application Development Mobile Application Development Besant Technologies No.24, Nagendra Nagar, Velachery
More informationSE 3S03 - Tutorial 1. Zahra Ali. Week of Feb 1, 2016
SE 3S03 - Tutorial 1 Department of Computer Science McMaster University naqvis7@mcmaster.ca Week of Feb 1, 2016 testing vs Software Devices and s Devices and s App Device Outline testing vs Software Devices
More informationApps Every College Student Should Have
Apps Every College Student Should Have Evernote Evernote makes it easy to remember things big and small from your everyday life using your computer, phone, tablet and the web. (All Platforms) myhomework
More informationYour First ios 7 App. Everything you need to know to build and submit your first ios app. Ash Furrow
Your First ios 7 App Everything you need to know to build and submit your first ios app. Ash Furrow This book is for sale at http://leanpub.com/your-first-ios-app This version was published on 2014-09-13
More informationHow to Access Your Digital Member Magazine
How to Access Your Digital Member Magazine GETTING STARTED WHERE TO GO: Point your browser to daytonartinstitute.org/magazine to find the latest issue of the Member Magazine. WHERE TO GO: You may also
More informationWelcome to your. Quick Start Guide
Welcome to your Quick Start Guide Charge your NOOKcolor 1 You must fully charge your NOOKcolor before using it the first time. Plug your NOOKcolor into a wall outlet using the Power Adapter and USB Cable
More informationCS193P: 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 informationWIREFRAMING 101. Essential Question: Can We Possibly Build an App? Learning Targets: Lesson Overview
WIREFRAMING 101 Essential Question: Can We Possibly Build an App? Learning Targets: Students will: Use wireframing to create a design for an app for mobile devices. Collaborate to make decisions about
More informationPlatform Games Drawing Sprites & Detecting Collisions
Platform Games Drawing Sprites & Detecting Collisions Computer Games Development David Cairns Contents Drawing Sprites Collision Detection Animation Loop Introduction 1 Background Image - Parallax Scrolling
More informationContents. iphone Training. Industry Trainers. Classroom Training Online Training ON-DEMAND Training. Read what you need
iphone Training Contents About iphone Training Our ios training classes can help you get off to a running start in iphone, ipod and ipad app development. Learn from expert Objective-C developers with years
More informationDESIGN PROCESS: REDESIGNING THE 2014 [REDACTED] CONFERENCE APP FOR 2015
DESIGN PROCESS: REDESIGNING THE 2014 [REDACTED] CONFERENCE APP FOR 2015 Preface: The 2014 [REDACTED] Conference application is no longer available in the App Store. The 2015 [REDACTED] Conference App is
More informationIn this exercise you will be creating the graphics for the index page of a Website for children about reptiles.
LESSON 2: CREATING AND MANIPULATING IMAGES OBJECTIVES By the end of this lesson, you will be able to: create and import graphics use the text tool attach text to a path create shapes create curved and
More informationIOS 9 App Development Essentials: Learn To Develop IOS 9 Apps Using Xcode 7 And Swift 2 By Neil Smyth
IOS 9 App Development Essentials: Learn To Develop IOS 9 Apps Using Xcode 7 And Swift 2 By Neil Smyth Neil Smyth - ios 9 App Development Essentials: Learn to Develop ios 9 Apps Using Xcode 7 and Swift
More informationPolygons and Angles: Student Guide
Polygons and Angles: Student Guide You are going to be using a Sphero to figure out what angle you need the Sphero to move at so that it can draw shapes with straight lines (also called polygons). The
More informationDownloading ebooks and eaudiobooks
Before You Start To get started, you will need access to the following items: A fully charged ipad, iphone, or ipod Touch A WiFi connection A Lake Bluff Library Card (or a card from another library that
More informationMobile App User Guide
Download the Mobile App iphone and ipad To find our Freedom Credit Union Mobile App just scan the appropriate QR code to the right with your Apple device: iphone Download Or you can find it through the
More informationSenior Project Write Up
Robert Burton Senior Project Write Up Motion Controlled Graphics Applications Abstract! This project implements a new control scheme for the OpenGL racing game Crusin Pangea[3] using the motion tracking
More informationYOUR MEDIA DELIVERED
YOUR MEDIA DELIVERED SUBSPLASH PLATFORM Apps Web Player Podcasting The all-in-one solution to present and manage your content across multiple channels. HOW DOES IT WORK? UPLOAD ENCODE ORGANIZE SHARE Upload
More information0 Graphical Analysis Use of Excel
Lab 0 Graphical Analysis Use of Excel What You Need To Know: This lab is to familiarize you with the graphing ability of excels. You will be plotting data set, curve fitting and using error bars on the
More informationA simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s
CENG 732 Computer Animation This week Inverse Kinematics (continued) Rigid Body Simulation Bodies in free fall Bodies in contact Spring 2006-2007 Week 5 Inverse Kinematics Physically Based Rigid Body Simulation
More informationManually Transfer Books To Kindle Fire Hd From
Manually Transfer Books To Kindle Fire Hd From Mac Address EPUB ebooks and Mobipocket files with Digital Rights Management (DRM) can't be To learn more, go to Deliver Items to Your Kindle For Mac customers,
More informationSAMPLE CHAPTER. Using Electron and NW.js. Paul B. Jensen. FOREWORD BY Cheng Zhao MANNING
SAMPLE CHAPTER Using Electron and NW.js Paul B. Jensen FOREWORD BY Cheng Zhao MANNING Cross-Platform Desktop Applications Using Electron and NW.js by Paul Jensen Chapter 6 Copyright 2017 Manning Publications
More informationTaught by Experienced University Lecturer, Ali Nemati. Location: 71 Cricklewood Broadway, NW2 3JR, London.
Taught by Experienced University Lecturer, Ali Nemati. Location: 71 Cricklewood Broadway, NW2 3JR, London. Why Study Games Design? Today we live in a world of technology and scientific advancement. We
More informationStanford CS193p. Developing Applications for ios. Winter CS193p. Winter 2017
Stanford Developing Applications for ios Today Views Custom Drawing Demo FaceView Views A view (i.e. UIView subclass) represents a rectangular area Defines a coordinate space For drawing And for handling
More informationInteractive Multimedia. Multimedia and the World Wide Web
Interactive Multimedia Multimedia and the World Wide Web Multimedia and WWW What is Multimedia? why is it important? Who needs to know about Multimedia? Interactive Multimedia hypermedia, hypertext media
More informationCOPYRIGHTED MATERIAL. 1Hello ios! A Suitable Mac. ios Developer Essentials
1Hello ios! Hello and welcome to the exciting world of ios application development. ios is Apple s operating system for mobile devices; the current version as of writing this book is 5.0. It was originally
More informationios Certified Associate Developer (ICAD)
TAN DUC INFORMATION TECHNOLOGY SCHOOL JSC Address: 103 Pasteur, Dist.1, HCMC Tel: 08 38245819; 38239761 Email: traincert@tdt-tanduc.com Website: www.tdt-tanduc.com; www.tanducits.com Let s Reach For Excellence!
More informationWhat Is React Native?
CHAPTER 1 What Is React Native? React Native is a JavaScript framework for writing real, natively rendering mobile applications for ios and Android. It s based on React, Facebook s JavaScript library for
More information25 Hidden ios 7 Features
25 Hidden ios 7 Features ios 7 is packed with hidden features and tricks that let iphone and ipad users get more out of their device with the newest software. ios 7 brings a collection of amazing new features
More informationMobile & More: Preparing for the Latest Design Trends
February 26, 2015 Mobile & More: Preparing for the Latest Design Trends LATEST TRENDS Responsive Takes Over Material Is the New Flat Hero Images Getting Bigger Interactions Are Micro Video in the Background
More informationGetting to know your ipad exploring the settings, App store, Mail
Getting to know your ipad exploring the settings, App store, Mail Exploring the settings Open the settings app from your homepage Wi-Fi Turn Wi-Fi on/off Add new Wi-Fi Connection Enter Network Name, any
More informationFigure 2.1: High level diagram of system.
Basile and Choudhury 6.111 Final Project: La PC-na Project Proposal 1 Introduction The luxury of purchasing separate pool tables, foosball tables, and air hockey tables is beyond the budget of many, particularly
More informationWHAT IS GOOGLE+ AND WHY SHOULD I USE IT?
CHAPTER ONE WHAT IS GOOGLE+ AND WHY SHOULD I USE IT? In this chapter: + Discovering Why Google+ Is So Great + What Is the Difference between Google+ and Other Social Networks? + Does It Cost Money to Use
More informationInDesign UX Design Patterns. by Justin Putney
InDesign UX Design Patterns by Justin Putney InDesign UX Design Patterns Hi, I m Justin Putney, Owner of Ajar Productions. Thanks for downloading this guide! It s full of ways to create interactive user
More informationBasic ios Programming
Basic ios Programming + Hanumayamma Innovations and Technologies Inc., 628 Crescent Terrace Fremont, CA 94536 USA http://www.hanuinnotech.com/training/index.html Phone: Email: India: 91 8179979892 USA:
More information2D & 3D CAD SOFTWARE USER MANUAL. AutoQ3D CAD for ipad & iphone
Type to enter text 2D & 3D CAD SOFTWARE USER MANUAL AutoQ3D CAD for ipad & iphone AUTOQ3D TEAM FIRST EDITION AutoQ3D CAD for ipad & iphone 2D / 3D cad software user manual 2015 by AutoQ3D Team. All rights
More informationApp Development. Quick Guides for Masterminds. J.D Gauchat Cover Illustration by Patrice Garden
App Development Quick Guides for Masterminds J.D Gauchat www.jdgauchat.com Cover Illustration by Patrice Garden www.smartcreativz.com Quick Guides for Masterminds Copyright 2018 by John D Gauchat All Rights
More information