Your First ios Application

Size: px
Start display at page:

Download "Your First ios Application"

Transcription

1 Your First ios Application General

2 Apple Inc Apple Inc. All rights reserved. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Inc., with the following exceptions: Any person is hereby authorized to store documentation on a single computer for personal use only and to print copies of documentation for personal use provided that the documentation contains Apple s copyright notice. The Apple logo is a trademark of Apple Inc. No licenses, express or implied, are granted with respect to any of the technology described in this document. Apple retains all intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-labeled computers. Apple Inc. 1 Infinite Loop Cupertino, CA App Store is a service mark of Apple Inc. Apple, the Apple logo, Cocoa, Cocoa Touch, Instruments, iphone, Mac, Objective-C, and Xcode are trademarks of Apple Inc., registered in the United States and other countries. ipad is a trademark of Apple Inc. IOS is a trademark or registered trademark of Cisco in the U.S. and other countries and is used under license. Even though Apple has reviewed this document, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS DOCUMENT IS PROVIDED AS IS, AND YOU, THE READER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS DOCUMENT, even if advised of the possibility of such damages. THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty.

3 Contents Introduction Introduction 7 Organization of This Document 8 Chapter 1 Creating Your Project 11 Xcode 11 Application Bootstrapping 14 Recap 16 Chapter 2 Understanding Fundamental Design Patterns 17 Delegation 17 Model-View-Controller 17 Target-Action 18 Other Design Patterns 18 Chapter 3 Adding a View Controller 19 Adding a View Controller Class 19 Adding a View Controller Property 22 Creating the View Controller Instance 23 Setting Up the View 24 Housekeeping 25 Implementation Source Listing 26 Test the Application 27 Recap 28 Chapter 4 Inspecting the Nib File 29 A View Controller s View Often Comes from a Nib File 29 File s Owner 30 The View Outlet 31 Test the Application 32 Recap 34 Chapter 5 Configuring the View 35 Adding the User Interface Elements 35 Make Connections 39 Make the Text Field s Delegate Connection 43 Testing 44 3

4 CONTENTS Recap 45 Chapter 6 Implementing the View Controller 47 The User s Name Property 47 The changegreeting: Method 49 Configure the View Controller as the Text Field s Delegate 50 Test the Application 51 Recap 51 Chapter 7 Troubleshooting 53 Code and Compiler Warnings 53 Check the Nib Files 53 Delegate Method Names 53 Chapter 8 Next Steps 55 Improve the User Interface 55 Create User Interface Elements Programmatically 55 Install the Application on a Device 56 Add More Functionality 56 Add Unit Tests 57 Appendix A Code Listings 59 HelloWorldAppDelegate 59 The header file: HelloWorldAppDelegate.h 59 The implementation file: HelloWorldAppDelegate.m 59 MyViewController 60 The header file: MyViewController.h 60 The implementation file: MyViewController.m 60 Document Revision History 63 4

5 Figures Chapter 3 Adding a View Controller 19 Figure 3-1 MyViewController 20 Figure 3-2 MyViewController 21 5

6 FIGURES 6

7 INTRODUCTION Introduction This tutorial shows how to create a simple ios application. It has a text field, a label, and a button. You can type your name into the text field and tap the button to say hello. The application updates the label s text to say Hello, <Name>! : The goal is not to create a finely polished application, or on the other hand to get an application on screen as quickly as possible, but to illustrate the Three T s: Tools: How you create and manage a project using Xcode Technologies: How to make your application respond to user input using standard user interface controls Techniques: The fundamental design patterns and techniques that underlie all Mac OS X development 7

8 INTRODUCTION Introduction A secondary goal is to point out other documents that you must also read to fully understand the ios development tools and techniques. You should read this document if you are just starting development for ios. You should use this tutorial to get started even if you intend to develop solely for the ipad. Although the tutorial shows the iphone user interface, the tools and techniques you use are exactly the same as those you use to develop ipad applications. You must, though, already have some familiarity with the basics of computer programming in general and the Objective-C language in particular. If you haven t used Objective-C before, read through at least Learning Objective-C: A Primer. Important: To follow this tutorial, you must have installed the iphone SDK and developer tools available from the ios Dev Center. This document describes the tools that are available for iphone SDK v4.3 and later check that your version of Xcode is at least 4.0. To learn more about the technologies in Cocoa Touch, read ios Technology Overview. In this tutorial, little regard is given to the user interface. Presentation is, however, a critical component of a successful ios application. You should read the ios Human Interface Guidelines to understand how the user interface might be improved for a full-fledged application. This tutorial does not discuss issues beyond basic application development; in particular, it does not describe how to submit applications to the App Store. Organization of This Document The tool you use to create Mac OS X applications is Xcode Apple s IDE (integrated development environment). Creating Your Project (page 11) shows you how to create a new project and describes how an application launches. Whereas Xcode is the application you use to create and manage the project, Cocoa is the name given to the collection of APIs that you use to develop programs for Mac OS X. You should typically use the highest level of abstraction available to accomplish whatever task you want to perform. To create a desktop application, you should use the Objective-C-based frameworks that provide the infrastructure you need to implement graphical, event-driven applications. To use the Objective-C frameworks effectively, you need to follow a number of conventions and design patterns. Following the Model-View-Controller (or MVC ) design pattern, the application uses a controller object to mediate between the user interface (view objects) and the underlying representation of a track (a model object). Understanding Fundamental Design Patterns (page 17) provides an overview of the design patterns you ll use. Adding a View Controller (page 19) shows you how to customize a view controller class and create an instance of it. You design the user interface graphically, using Xcode, rather than by writing code. The interface objects are stored in an archive called a nib file. 8 Organization of This Document

9 INTRODUCTION Introduction Terminology: Although an interface document may have a.xib extension, historically the extension was.nib (an acronym for NextStep Interface Builder ) so they are referred to colloquially as Nib files. The nib file doesn t just describe the layout of user interface elements, it also defines non-user interface elements and connections between elements. The controller object is represented in the nib file. At runtime, when a nib file is loaded the objects are unarchived and restored to the state they were in when you saved the file including all the connections between them. Inspecting the Nib File (page 29) introduces you to two important concepts: outlets, and the File s Owner proxy object Configuring the View (page 35) shows you how to add and configure the button and text fields. Implementing the View Controller (page 47) walks you through implementing the view controller, including memory management, the changegreeting: method, and ensuring that the keyboard is dismissed when the user taps Done Troubleshooting (page 53) describes some approaches to solving common problems that you may encounter. Next Steps (page 55) offers suggestions as to what directions you should take next in learning about ios development. Organization of This Document 9

10 INTRODUCTION Introduction 10 Organization of This Document

11 CHAPTER 1 Creating Your Project In this chapter, you create the project using Xcode and find out how an application launches. Xcode The tool you use to create applications for ios is Xcode Apple s IDE (integrated development environment). You can also use it to create a variety of other project types, including Cocoa and command-line utilities. To create a new project Launch Xcode. By default it s in /Developer/Applications. 2. Create a new project by choosing File > New Project. You should see a new window similar to this: Xcode 11

12 CHAPTER 1 Creating Your Project 3. In the left pane, choose ios application. 4. Select Window-based Application then click Next. 5. In the Device popup menu, make sure iphone is selected. Do not select the option to use Core Data. The tutorial does not use Core Data. Do not select the option to use unit tests. The tutorial doesn t discuss how to set up unit tests; however, you should consider using unit tests a best practice for Cocoa development. 6. Enter HelloWorld as the product name, and a suitable company identifier (if you don t have one, use edu.self). Note: The remainder of the tutorial assumes that you named the project HelloWorld, so the application delegate class is called HelloWorldAppDelegate. If you name your project something else, then the application delegate class will be called YourProjectNameAppDelegate. 7. Click Next. A sheet appears to allow you to select where your project will be saved. 8. Select a suitable location for your project (such as the Desktop or a custom Projects directory), then click Save. You do not need to create a version control repository for this project, although in general you are encouraged to do so. 12 Xcode

13 CHAPTER 1 Creating Your Project You should see a new project window like this: If you haven t used Xcode before, take a moment to explore the application. You should read Xcode Workspace Guide to understand the organization of the project window and how to perform basic tasks like editing and saving files. You can now build and run the application to see what Simulator looks like. To run your application in Simulator Make sure you have set the Active Scheme that uses the iphone Simulator. 2. Choose Product > Run (or click the Run button in the toolbar). The ios Simulator application should launch automatically, and when your application starts up you should simply see a white screen: Xcode 13

14 CHAPTER 1 Creating Your Project To understand where the white screen came from, you need to understand how the application starts up. For now, quit Simulator. To quit Simulator... Choose Simulator > Quit. Application Bootstrapping The template project you created already sets up the basic application environment. It creates an application object, connects to the window server, establishes the run loop, and so on. Most of the work is done by the UIApplicationMain function. The main function in main.m calls the UIApplicationMain function: 14 Application Bootstrapping

15 CHAPTER 1 Creating Your Project int retval = UIApplicationMain(argc, argv, nil, nil); This creates an instance of UIApplication; it also scans the application s Info.plist file. The Info.plist file is a property list that contains information about the application such as its name and icon. It contain the name of the nib file the application object should load, specified by the NSMainNibFile key. Nib files contain an archive of user interface elements and other objects you ll learn more about them later in the tutorial. In your project s Info.plist file you should see: Key NSMainNibFile Value MainWindow This means that when the application launches, the MainWindow nib file is loaded. To look at the main nib file... Click MainWindow.xib in the project navigator. The file has the extension xib but by convention it is referred to as a nib file. Xcode displays the file in the editor area. The nib file contains several items split into two groups by a dividing line. Above the line are placeholders: Application Bootstrapping 15

16 CHAPTER 1 Creating Your Project The File s Owner proxy object (the pale yellow cube). The File s Owner object is actually the UIApplication instance File s Owner is discussed later, in File s Owner (page 30). A First Responder proxy object. The First Responder is not used in this tutorial but you can learn more about it by reading The Event-Handling System in ios Application Programming Guide. Below the line are actual objects: An instance of HelloWorldAppDelegate set to be the application s delegate. Delegation is explained in more detail in Understanding Fundamental Design Patterns (page 17). A window. The window has its background set to white and is set to be visible at launch. It s this window that you see when the application launches. You use the application delegate to perform custom configuration for the application as a whole, including displaying the window. It shouldn t, though, manage any of the content on the screen beyond the window itself that s the job of view controllers. A view controller is a special controller responsible for managing a view this adheres to the model-view-controller design pattern (explained in more detail in Understanding Fundamental Design Patterns (page 17)). When the application object has completed its setup, it sends its delegate an application:didfinishlaunchingwithoptions: message. This gives the delegate an opportunity to configure the user interface and perform other tasks before the application is displayed. Recap In this chapter you created a new project using Xcode and built and ran the default application. You also looked at some of the basic pieces of a project and a nib file, and learned how the application starts up. In the next chapter, you ll learn about the design patterns you use when developing a Cocoa application. 16 Recap

17 CHAPTER 2 Understanding Fundamental Design Patterns In this chapter, you learn about the main design patterns you ll use in Cocoa applications. There s not much practical to do in this chapter, but the concepts are fundamental, so allow some time to read and think about it. The main patterns you re going to use in this tutorial are: Delegation Model-View-Controller Target-Action Here s a quick summary of these patterns and an indication of where they ll be used in the application. Delegation Delegation is a pattern in which one object sends messages to another object specified as its delegate to ask for input or to notify the delegate that an event is occurring. You typically use it as an alternative to class inheritance for extending the functionality of reusable objects. In this application, the application object tells its delegate that the main start-up routines have finished and that the custom configuration can begin. For this application, you want the delegate to create an instance of a controller to set up and manage the view. In addition, the text field will tell its delegate (which in this case will be the same controller) when the user has tapped the Return key. Delegate methods are typically grouped together into a protocol. A protocol is basically just a list of methods. If a class conforms to (or adopts ) a protocol, it guarantees that it implements the required methods of a protocol. (Protocols may also include optional methods.) The delegate protocol specifies all the messages an object might send to its delegate. To learn more about protocols and the role they play in Objective-C, see the Protocols chapter in The Objective-C Programming Language. Model-View-Controller The Model-View-Controller (or MVC ) design pattern sets out three roles for objects in an application. Model objects represent data such as SpaceShips and Weapons in a game, ToDo items and Contacts in a productivity application, or Circles and Squares in a drawing application. Delegation 17

18 CHAPTER 2 Understanding Fundamental Design Patterns In this application, the model is very simple just a string and it s not actually used outside of a single method, so from a practical perspective in this application it s not even necessary. It s the principle that s important here, though. In other applications the model will be more complicated and accessed from a variety of locations. View objects know how to display data (model objects) and may allow the user to edit the data. In this application, you need a main view to contain several other views a text field to capture information from the user, a second text field to display text based on the user s input, and a button to let the user tell us that the secondary text should be updated. Controller objects mediate between models and views. In this application, the controller object takes the data from the input text field, stores it in a string, and updates a second text field appropriately. The update is initiated as a result of an action sent by the button. Target-Action The target-action mechanism enables a view object that presents a control that is, an object such as a button or slider in response to a user event (such as a tap) to send a message (the action) to another object (the target) that can interpret the message and handle it as an application-specific instruction. In this application, when it s tapped, the button tells the controller to update its model and view based on the user s input. Other Design Patterns Cocoa makes pervasive use of a number of design patterns beyond those described above. The design patterns chapter in Cocoa Fundamentals Guide provides a comprehensive overview of all the design patterns you use in Cocoa application development you should consider it to be essential reading. Understanding, and using, the patterns will make it easier for you to use the various technologies Cocoa provides, and transfer skills you ve learned in one area to another. Following the patterns also means that your code is better able to take advantage of enhancements to the Cocoa frameworks in future releases. 18 Target-Action

19 CHAPTER 3 Adding a View Controller In this application you ll need two classes. Xcode s application template provided an application delegate class and an instance is created in the nib file. You need to implement a view controller class and create an instance of it. Adding a View Controller Class View controller objects play a central role in most ios applications. As the name implies, they re responsible for managing a view, but on ios they also help with navigation and memory management. You re not going to use the latter features here, but it s important to be aware of them for future development. UIKit provides a special class UIViewController that encapsulates most of the default behavior you want from a view controller. You have to create a subclass to customize the behavior for your application. To add a custom view controller class In Xcode, in the project organizer select either the project (HelloWorld at the top of the Groups and Files list) or the HelloWorld group folder. The new files will be added to the current selection. 2. Choose File > New File and in the New File window. You should see a sheet like this: Adding a View Controller Class 19

20 CHAPTER 3 Adding a View Controller 3. Select the Cocoa Touch Classes group, then select UIViewController subclass. 4. Click Next. You should see a sheet like this: Figure 3-1 MyViewController 20 Adding a View Controller Class

21 CHAPTER 3 Adding a View Controller 5. Using the combo box, choose to create a subclass of UIViewController. 6. Using the checkboxes, make sure that Targeted for ipad is not selected, and that With XIB for user interface is selected. 7. Click Next. You should see a sheet like this: Figure 3-2 MyViewController Make sure the Add to targets check box is selected. 8. Give the file a new name such as MyViewController. By convention, class names begin with a capital letter. 9. Click Save. Make sure that the files were added to your project. If you look at the new source files, you ll see that stub implementations of various methods are already given to you. These are all you need for the moment; the next task is to create an instance of the class. Adding a View Controller Class 21

22 CHAPTER 3 Adding a View Controller Adding a View Controller Property You want to make sure that the view controller lasts for the lifetime of the application, so it makes sense to add it as a property of the application delegate (which will also last for the lifetime of the application). (To understand why, consult Memory Management Programming Guide.) Perform the following tasks in the header file for the application delegate class (HelloWorldAppDelegate.h). To add a view controller property Add a forward declaration for the MyViewController class. Before the interface declaration for HelloWorldAppDelegate, MyViewController; The property will be an instance of the MyViewController class. The compiler will generate an error, though, if you declare the variable but you don t tell it about the MyViewController class. You could import the header file, but typically in Cocoa you instead provide a forward declaration a promise to the compiler that MyViewController will be defined somewhere else and that it needn t waste time checking for it now. (Doing this also avoids circularities if two classes need to refer to each other and would otherwise include each other s header files.) Later, you will import the header file itself in the implementation file. 2. Add a declaration for the view controller property. After the closing brace but (nonatomic, retain) MyViewController *myviewcontroller; Important: Like C, Objective-C is case-sensitive. MyViewController refers to a class; myviewcontroller is a variable that here contains an instance of MyViewController. A common programming error in Cocoa is to misspell a symbol name, frequently by using a letter of an inappropriate case (for example, tableview instead of tableview ). This tutorial deliberately uses MyViewController and myviewcontroller to encourage you to look at the name carefully. When writing code, make sure you use the appropriate symbol. Properties are described in the Declared Properties chapter in The Objective-C Programming Language. Basically, though, this declaration specifies that an instance of HelloWorldAppDelegate has a property that you can access using the getter and setter methods myviewcontroller and setmyviewcontroller: respectively, and that the instance retains the property (retaining is discussed in more detail later). To make sure you re on track, confirm that your HelloWorldAppDelegate class interface file (HelloWorldAppDelegate.h) looks like this (comments are not shown): #import HelloWorldAppDelegate : NSObject <UIApplicationDelegate> { 22 Adding a View Controller Property

23 CHAPTER 3 Adding a View Controller (nonatomic, retain) IBOutlet UIWindow (nonatomic, retain) MyViewController You can now create an instance of the view controller. Creating the View Controller Instance Now that you ve added the view controller property to the application delegate, you need to actually create an instance of the view controller and set it as the value for the property. To make code-completion work for your new class in Xcode, you also need to import the relevant header file for the view controller. Perform the following tasks in the implementation file for the application delegate class (HelloWorldAppDelegate.m). To import the view controller s header file... At the top of file, add: #import "MyViewController.h" To add a view controller instance... Add the following code as the first statements in the implementation of the application:didfinishlaunchingwithoptions: method: MyViewController *aviewcontroller = [[MyViewController alloc] initwithnibname:@"myviewcontroller" bundle:nil]; [self setmyviewcontroller:aviewcontroller]; [aviewcontroller release]; There s quite a lot in just these three lines. What they do is: Create and initialize an instance of the view controller class. Set the new view controller to be the value of the myviewcontroller property using an accessor method. Remember that you didn t separately declare setmyviewcontroller:, it was implied as part of the property declaration see Adding a View Controller Property (page 22). Creating the View Controller Instance 23

24 CHAPTER 3 Adding a View Controller Adhere to memory management rules by releasing the view controller. You create the view controller object using alloc, then initialize it using initwithnibname:bundle:. The init method specifies first the name of the nib file the controller should load and second the bundle in which it should find it. A bundle is an abstraction of a location in the file system that groups code and resources that can be used in an application. The advantages of using bundles over locating resources yourself in the file-system are that: bundles provide a convenient and simple API the bundle object can locate a resource just by name; and they take account of localization for you. To learn more about bundles, see Resource Programming Guide. By convention, you own any objects you create using an alloc method (amongst others, see Memory Management Rules ). You should also: Relinquish ownership of any objects you create. Typically use accessor methods to set property values anywhere other than in an initializer method. The second line in the implementation uses an accessor method to set the property value, and then the third line uses release to relinquish ownership. There are other ways to implement the above. You could, for example, replace the three lines with just two: MyViewController *aviewcontroller = [[[MyViewController alloc] initwithnibname:@"myviewcontroller" bundle:nil] autorelease]; [self setmyviewcontroller:aviewcontroller]; In this version, you use autorelease as a way to relinquish ownership of the new view controller but at some point in the future. To understand this, read Autorelease Pools in the Memory Management Programming Guide. In general, however, you should try to avoid using autorelease wherever possible since it means memory may be reclaimed later than it would be if you used release. You could also replace [self setmyviewcontroller:aviewcontroller]; with: self.myviewcontroller = aviewcontroller; The dot notation invokes exactly the same accessor method (setmyviewcontroller:) as in the original implementation. The dot notation simply provides a more compact syntax for accessor methods especially when you use nested expressions. Which syntax you choose is largely personal preference, although using the dot syntax does have some additional benefits when used in conjunction with properties see Declared Properties in The Objective-C Programming Language. For more about the dot syntax, see Dot Syntax in The Objective-C Programming Language in Objects, Classes, and Messaging in The Objective-C Programming Language. Setting Up the View View controllers are responsible for configuring and managing each screenful you see in an application. Each screenful should be managed by a view controller. To codify this principle, a window has a root view controller the view controller responsible for configuring the view first displayed when the window appears. To get your view controller s content into the window, you set your view controller to be the window s root view controller. 24 Setting Up the View

25 CHAPTER 3 Adding a View Controller To set your view controller as the window s root view controller... Add the following line of code just before the call to makekeyandvisible. self.window.rootviewcontroller = self.myviewcontroller; Instead of using the dot syntax, you could also use square brackets: [[self window] setrootviewcontroller:[self myviewcontroller]]; Both lines of code would compile to the same thing; again you can choose which you feel is more readable. A further important point about this line, though, is that it uses the accessor method to retrieve myviewcontroller. Tip In addition to using accessor methods to set property values (except in the implementation of an init method), you should use accessor methods to get property values, even those of self (except in the implementation of a dealloc method). This helps to preserve encapsulation, and in some cases ensures that a property value is properly initialized before you try to use it. This is discussed in more detail in Housekeeping (page 25). The final line in the implementation of the application:didfinishlaunchingwithoptions: method from the template: [self.window makekeyandvisible]; causes the window now complete with your view to be displayed on screen. Housekeeping There are a couple of unfinished tasks to complete: You need to synthesize the accessor methods, and to conform to the rules of memory management make sure the view controller is released in the dealloc method. You perform the following tasks in block of the class (HelloWorldAppDelegate). To synthesize the view controller property... Tell the compiler to synthesize the accessor methods for the view controller, and to use a custom name for the corresponding instance myviewcontroller=_myviewcontroller; Housekeeping 25

26 CHAPTER 3 Adding a View Controller This line of code tells the compiler to do several things: Create accessor methods for the myviewcontroller property. Strictly speaking, it means create accessor methods, according to the property declaration, for which the developer hasn t provided an implementation. Since you haven t created custom implementations, the compiler will generate a get and set accessor. (If the property were declared as readonly, the compiler would only generate a get accessor.) Use _myviewcontroller as the name of the instance variable for the myviewcontroller property. Because you didn t declare a _myviewcontroller instance variable, it also tells the compiler to add that to the class as well. You use the _ prefix for the instance variable to serve as a reminder that you shouldn t access an instance variable directly. From an academic perspective, this helps to preserve encapsulation, but there are two important practical benefits in Cocoa: Some Cocoa technologies (notably key-value coding) depend on use of accessor methods, and in the appropriate naming of the accessor methods. If you don t use accessor methods, your application may be less able to take advantage of standard Cocoa features. Some property values are created on-demand. If you try to use the instance variable directly, you may get nil or an uninitialized value. (A view controller s view is a good example.) To complete the implementation of the dealloc method... In the dealloc method, release the view controller as the first statement. [_myviewcontroller release]; Implementation Source Listing To make sure you re still on track, confirm that your HelloWorldAppDelegate class implementation (HelloWorldAppDelegate.m) looks like this (the methods you didn t edit are omitted): #import "HelloWorldAppDelegate.h" #import myviewcontroller=_myviewcontroller; - (BOOL)application:(UIApplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions 26 Implementation Source Listing

27 CHAPTER 3 Adding a View Controller { MyViewController *aviewcontroller = [[MyViewController alloc] initwithnibname:@"myviewcontroller" bundle:nil]; self.myviewcontroller = aviewcontroller; // Or, instead of the line above: // [self setmyviewcontroller:aviewcontroller]; [aviewcontroller release]; self.window.rootviewcontroller = self.myviewcontroller; [self.window makekeyandvisible]; } return YES; /* Other methods omitted from the listing. */ - (void)dealloc { [_myviewcontroller release]; [_window release]; [super dealloc]; Test the Application You can now test your application. To test the application... Compile and run the project. Choose Product > Run (or click the Run button in Xcode s toolbar). Your application should compile without errors and you should again see a white screen in Simulator. Test the Application 27

28 CHAPTER 3 Adding a View Controller Recap In this section you added a new view controller class and its accompanying nib file. In the application delegate, you declared an instance variable and accessor methods for a view controller instance. You also synthesized the accessor methods and performed a few other housekeeping tasks. Most importantly, though, you created an instance of the view controller and passed it to the window as the root view controller. In the next chapter you ll configure the nib file the controller uses to load its view. 28 Recap

29 CHAPTER 4 Inspecting the Nib File This chapter introduces two important concepts: outlets and the File s Owner proxy object. A View Controller s View Often Comes from a Nib File As you learned earlier, a view controller is responsible for configuring and managing each screenful you see in an application. Each screenful is defined by the view controller s view; often you configure that view in a nib file (a common exception is a table view). Typically you specify the name of the nib file to load as the first argument to initwithnibname:bundle: (see Creating the View Controller Instance (page 23)). A view controller loads its nib file in its loadview method. (You can load nib files yourself using an instance of NSBundle. You can learn more about loading nib files in Resource Programming Guide.) If you initialize a view controller using initwithnibname:bundle: but you want to perform additional configuration after the view is loaded, you override the controller s viewdidload method. The view controller s nib file contains three objects, the File s Owner proxy, the First Responder proxy, and a view. You can see them by inspecting the nib file. To inspect the nib file... In Xcode, click the view controller s nib file (MyViewController.xib). You should see the file displayed like this: A View Controller s View Often Comes from a Nib File 29

30 CHAPTER 4 Inspecting the Nib File The view is the main view for the view controller. The view controller is represented by the File s Owner proxy. It s important to understand the role of File s Owner, and how to create connections to and from both File s Owner and other objects. File s Owner In a nib file, in contrast to the other objects you add to the interface, the File s Owner object is not created when the nib file is loaded. It represents the object set to be the owner in the method that loads the nib file in this case, loadnibnamed:owner:options:. This is discussed in more detail in Resource Programming Guide. In your application, the File s Owner will be the instance of MyViewController. To allow you to make appropriate connections to and from the File s Owner, Xcode has to know what sort of object File s Owner is. You tell Xcode the class of the object using the Identity Inspector. It was actually set when you created the nib file together with the view controller classes, but it s useful to look at the inspector now. To show the inspector With the nib file selected, in Xcode display the Utilities view. 30 File s Owner

31 CHAPTER 4 Inspecting the Nib File 2. In the Inspector pane, select the Identity inspector. In the Class field of the Custom Class section, you should see MyViewController. It s important to understand that this is just a promise to Interface Builder that the File s Owner will be an instance of MyViewController. Setting the class doesn t ensure that the File s Owner will be an instance of that class. Remember, the File s Owner is simply whatever object is passed as the owner argument to the loadnibnamed:owner:options: method. If it s an instance of a different class, the connections you make in the nib file will not be properly established. The View Outlet You can look at and make and break an object s connections using the Inspector pane, or in a connections panel. To look at the view controller s connections In the Interface Builder editor window, click File s Owner. 2. In the Inspector pane, select the Connections inspector. This displays File s Owner s outlet connections in the utility area. The View Outlet 31

32 CHAPTER 4 Inspecting the Nib File 3. In the Interface Builder editor window, Control-click File s Owner. This displays a translucent panel showing File s Owner s connections. The utility area and the connections pane both show the same information. You can use whichever is more convenient at any particular time. The only connection at the moment is the view controller s view outlet. An outlet is just a property that happens to connect to an item in a nib file. The outlet connection means that when the nib file is loaded and the UIView instance is unarchived, the view controller s (strictly File s Owner s) view property is set to that view. Test the Application To make sure your application s working correctly, you could set the background color of the view to something other than white and verify that the new color is displayed after the application launches. To set the background color of the view controller s view In Xcode, select the view controller s nib file (MyViewController.xib). 32 Test the Application

33 CHAPTER 4 Inspecting the Nib File 2. In the utilities area, select the Attributes inspector. 3. In the editor area, select the view. 4. In the Attributes inspector for the view, click the frame of the Background color well to display the Colors panel. 5. In the Colors panel, select a different color. 6. Save the nib file. 7. Click the Run button in the toolbar to compile and run the project. Your application should compile without errors and you should again see an appropriately-colored screen in Simulator. To restore the view s background color In Xcode, using the attributes inspector, set the view s background color to white. 2. Save the nib file. Test the Application 33

34 CHAPTER 4 Inspecting the Nib File Recap In this section you inspected a nib file, learned about outlets, and set the background color of a view. You also learned more about resource loading and how the view controller loads the nib file. In the next chapter you will add controls to the view. 34 Recap

35 CHAPTER 5 Configuring the View Interface Builder provides a library of objects that you can add to a nib file. Some of these are user interface elements such as buttons and text fields; others are controller objects such as view controllers. Your nib file already contains a view now you just need to add the button and text fields. Adding the User Interface Elements You add user interface elements by dragging them from the object library. To add objects to the nib file and lay them out appropriately In Xcode, select the view controller s nib file. 2. In the utilities area, display the object library. 3. Add a button (UIButton), a text field (UITextField), and a label (UILabel) to the view. You can drag view items from the library and drop them onto the view just as you might in a drawing application. Adding the User Interface Elements 35

36 CHAPTER 5 Configuring the View 4. Lay out the elements appropriately. You can then resize the items using resize handles where appropriate, and reposition them by dragging. As you move items within the view, alignment guides are displayed as dashed blue lines. 36 Adding the User Interface Elements

37 CHAPTER 5 Configuring the View 5. Finalize the view. Add a placeholder string Your Name to the text field by entering it in the Text Field Attributes inspector. Resize the label so that it extends for the width of the view. Delete the text ( Label ) from the label either using the Label Attributes inspector or by selecting the text in the label itself (double-click to make a selection) and press Delete. Add a title to the button by double-clicking inside the button and typing Hello. Use the inspector to set the text alignment for the text field and label to centered. Your view should look like this: Adding the User Interface Elements 37

38 CHAPTER 5 Configuring the View 6. In the view section of the label s Label Attributes inspector, select Clear Context Before Drawing. This ensures that when you update the greeting the previous string is removed before the new one is drawn. If you don t do this, the strings are drawn on top of each other. There are several other changes to make to the text field it might be fairly obvious that the first change applies to the text field, but the others are less obvious. First, you might want to ensure that names are automatically capitalized. Second, you might want to make sure that the keyboard associated with the text field is configured for entering names, and that the keyboard displays a Done button. The guiding principle here is this: You know when you re putting it on screen what a text field will contain. You therefore design the text field to make sure that at runtime the keyboard can configure itself to best suit the user s task. You make all of these settings using text input traits. To configure the text field Select the text field. 2. In the utilities area, display the attributes inspector. 3. Configure the text field using the Text Input Traits. In the Capitalize pop-up menu, select Words. 38 Adding the User Interface Elements

39 CHAPTER 5 Configuring the View In the Keyboard Type pop-up menu, select Default. In the Keyboard Return Key pop-up menu, select Done. 4. Save the nib file. If you build and run your application in Xcode, when it launches you should see the user interface elements as you positioned them. If you press the button, it should highlight, and if you tap inside the text field, the keyboard should appear. At the moment, though, after the keyboard appears, there s no way to dismiss it. To remedy this, and add other functionality, you need to make appropriate connections to and from the view controller. These are described in the next section. Make Connections You can create and connect outlets and actions in Xcode by dragging from a nib file to the appropriate source file. Whereas this makes it easy to add code to support outlets and actions, it adds a conceptual level of indirection. Although you re dragging to the source file, the actual connections are made in the nib file itself, to the object for which the header file is the declaration in this case, the view controller represented by File s Owner. You want to add an action method to the view controller; when the button is activated it should send a changegreeting: message to the view controller. For the button, you want to create an action called changegreeting:: To add an action for the button In Xcode, select the view controller s nib file (MyViewController.xib). 2. Display the Assistant editor. 3. Make sure Assistant displays the view controller s header file (MyViewController.h). 4. Control drag from the button in the nib file to the method declaration area in the header file. Make Connections 39

40 CHAPTER 5 Configuring the View 5. Configure the button s connection as an action. Set the connection type to Action. Set the name to changegreeting:. Set the type to id. It doesn t matter what sort of object sends the message. Set the event to touch up inside. The message should be sent if the user lifts their finger inside the button this corresponds to UIControlEventTouchUpInside. Set the arguments to sender. 6. Click Connect. You accomplished two things by adding an action for a button: 1. Added appropriate code to the view controller class. You added the action method declaration to the header file: - (IBAction)changeGreeting:(id)sender; 40 Make Connections

41 CHAPTER 5 Configuring the View and a stub implementation to the implementation file: - (IBAction)changeGreeting:(id)sender { } IBAction is a special keyword that is used only to tell Interface Builder to treat a method as an action for target/action connections. It s defined to void. 2. Established a connection from the button to the view controller, as represented by the File s Owner. Establishing the connection is the equivalent of invoking addtarget:action:forcontrolevents: on the button, with the target being Fie s Owner, the action being the changegreeting: selector, and the control events containing just UIControlEventTouchUpInside. You follow similar operations to add outlets for the text field and label. To add an outlet for the text field In Xcode, select the view controller s nib file (MyViewController.xib). 2. Display the Assistant editor. 3. Make sure Assistant is displaying the view controller s header file (MyViewController.h). 4. Control drag from the text field in the nib file to the method declaration area in the header file. Make Connections 41

42 CHAPTER 5 Configuring the View 5. Configure the text field s connection as an outlet. Add an outlet from the view controller connected to the text field. Set the connection type to Outlet. Set the name to textfield. You can call the outlet whatever you want, but it makes your code more understandable if the name bears some relationship with the thing it represents. Set the type to UITextField. You want to make sure the outlet can only connect to a text field. 6. Click Connect. You accomplished two things by adding an outlet for the text field: 1. You added appropriate code to the view controller class. You added a property declaration to the header (nonatomic, retain) IBOutlet UITextField *textfield; In the implementation file, you textfield=_textfield; to the top of block; [_textfield release]; to the dealloc method, and [self settextfield:nil]; to the viewdidunload method. Note: Depending on which version of Xcode you use, the instance variable name may not have an underscore prefix, so you may textfield; [textfield release]; Property declarations and the synthesize keyword are explained in more detail in The User s Name Property (page 47). IBOutlet is a special keyword that is used only to tell Interface Builder to treat a property as an outlet. It s actually defined as nothing so it has no effect at compile time. 42 Make Connections

43 CHAPTER 5 Configuring the View 2. You established a connection from the the view controller (as represented by the File s Owner) to the text field. Establishing a connection from the the view controller does the equivalent of invoking settextfield: on the view controller, passing the text field as the argument. Now configure the label. Follow the same steps as for the text field, but with appropriate changes to the configuration. To add an outlet from the view controller to the label... Follow the same steps as for the text field. In the connection configuration dialog: Set the connection type to Outlet. Set the name to label. Set the type to UILabel. Make the Text Field s Delegate Connection The text field sends a message to its delegate when the user taps the Return button in the keyboard. You can use this callback to dismiss the keyboard (see Configure the View Controller as the Text Field s Delegate (page 50)). To set the text field s delegate In Xcode, select the view controller s nib file (MyViewController.xib). 2. Control-click in the text field. 3. Using the translucent panel that appears, select the open circle after delegate and drag to the File s Owner. Make the Text Field s Delegate Connection 43

44 CHAPTER 5 Configuring the View Testing You can now test the application. To test the application... Click Run. Make sure that all the files are saved. You should find that the button works (it highlights when you tap it). You should also find that if you touch in the text field, the keyboard appears and you enter text. There is, however, no way to dismiss the keyboard. To do that, you have to implement the relevant delegate method. You ll do that in the next chapter. 44 Testing

45 CHAPTER 5 Configuring the View Recap You configured the nib file with appropriate connections; in doing so, you also updated the header and implementation files to support the outlets and action. There s no need to use the Xcode feature to add the source code at the same time as establishing a connection; you can add the property and method declarations to the header file yourself, and then make the connections like you did with the text field s delegate. Typically, though, you make fewer mistakes (and have less typing to do) if you let the tools do as much of the work as they can. Recap 45

46 CHAPTER 5 Configuring the View 46 Recap

47 CHAPTER 6 Implementing the View Controller There are several parts to implementing the view controller. You need to add a property for the user s name including memory management, implement the changegreeting: method, and ensure that the keyboard is dismissed when the user taps Done. The User s Name Property You then need to add a property for the user s name, which is a string. You add the property declaration to the view controller s header file (MyViewController.h). To add a property declaration for the user s name... Add statement for a string called username. The property declaration looks like (nonatomic, copy) NSString *username; Your interface file should look similar to this: #import MyViewController : UIViewController <UITextFieldDelegate> { UITextField *textfield; UILabel *label; NSString *username; (nonatomic, retain) IBOutlet UITextField (nonatomic, retain) IBOutlet UILabel (nonatomic, copy) NSString *username; - To complete the implementation, you also need to tell the compiler to synthesize the accessor methods, and update the dealloc method. You add the implementation parts to the view controller s implementation file (MyViewController.m). The User s Name Property 47

ios Development Tutorial Nikhil Yadav CSE 40816/60816: Pervasive Health 09/09/2011

ios Development Tutorial Nikhil Yadav CSE 40816/60816: Pervasive Health 09/09/2011 ios Development Tutorial Nikhil Yadav CSE 40816/60816: Pervasive Health 09/09/2011 Healthcare iphone apps Various apps for the iphone available Diagnostic, Diet and Nutrition, Fitness, Emotional Well-being

More information

INTRODUCTION TO IOS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 13 02/22/2011

INTRODUCTION TO IOS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 13 02/22/2011 INTRODUCTION TO IOS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 13 02/22/2011 1 Goals of the Lecture Present an introduction to ios Program Coverage of the language will be INCOMPLETE We

More information

Start Developing ios Apps Today

Start Developing ios Apps Today Start Developing ios Apps Today Contents Introduction 6 Setup 7 Get the Tools 8 Review a Few Objective-C Concepts 9 Objects Are Building Blocks for Apps 9 Classes Are Blueprints for Objects 9 Objects Communicate

More information

An Introduction to Modern Software Development Tools Creating A Simple GUI-Based Tool Appleʼs XCode Version 3.2.6

An Introduction to Modern Software Development Tools Creating A Simple GUI-Based Tool Appleʼs XCode Version 3.2.6 1 2 3 4 An Introduction to Modern Software Development Tools Creating A Simple GUI-Based Tool Appleʼs XCode Version 3.2.6 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Charles J. Ammon / Penn State August, 2011

More information

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 1 Goals of the Lecture Present an introduction to Objective-C 2.0 Coverage of the language will be INCOMPLETE

More information

TestFlight FAQ. 2014-7-17 Apple Inc.

TestFlight FAQ. 2014-7-17 Apple Inc. TestFlight FAQ apple 2014-7-17 Apple Inc. 2014 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means,

More information

ios Team Administration Guide (Legacy)

ios Team Administration Guide (Legacy) ios Team Administration Guide (Legacy) Contents About ios Development Team Administration 5 At a Glance 6 Team Admins Manage Team Membership and Assign Roles in the Member Center 6 Development Devices

More information

Creating Carbon Menus. (Legacy)

Creating Carbon Menus. (Legacy) Creating Carbon Menus (Legacy) Contents Carbon Menus Concepts 4 Components of a Carbon Menu 4 Carbon Menu Tasks 6 Creating a Menu Using Nibs 6 The Nib File 7 The Menus Palette 11 Creating a Simple Menu

More information

iphone Objective-C Exercises

iphone Objective-C Exercises iphone Objective-C Exercises About These Exercises The only prerequisite for these exercises is an eagerness to learn. While it helps to have a background in object-oriented programming, that is not a

More information

Networking & Internet 2010-07-06

Networking & Internet 2010-07-06 Wireless Enterprise App Distribution Networking & Internet 2010-07-06 Apple Inc. 2010 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted,

More information

Apple Applications > Safari 2008-10-15

Apple Applications > Safari 2008-10-15 Safari User Guide for Web Developers Apple Applications > Safari 2008-10-15 Apple Inc. 2008 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system,

More information

itunes Connect App Analytics Guide v1

itunes Connect App Analytics Guide v1 itunes Connect App Analytics Guide v1 apple 2015-04-22 Apple Inc. 2015 Apple Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any

More information

View Controller Programming Guide for ios

View Controller Programming Guide for ios View Controller Programming Guide for ios Contents About View Controllers 10 At a Glance 11 A View Controller Manages a Set of Views 11 You Manage Your Content Using Content View Controllers 11 Container

More information

How To Develop An App For Ios (Windows)

How To Develop An App For Ios (Windows) Mobile Application Development Lecture 14 ios SDK 2013/2014 Parma Università degli Studi di Parma Lecture Summary ios operating system ios SDK Tools of the trade ModelViewController MVC interaction patterns

More information

Objective C and iphone App

Objective C and iphone App Objective C and iphone App 6 Months Course Description: Understanding the Objective-C programming language is critical to becoming a successful iphone developer. This class is designed to teach you a solid

More information

Introduction to iphone Development

Introduction to iphone Development Introduction to iphone Development Introduction to iphone Development Contents Task 1 2 3 4 Application Runtime Core Architecture and Life-cycles What s in a bundle? The resources in an app bundle Customizing

More information

Learn iphone and ipad game apps development using ios 6 SDK. Beginning. ios 6 Games. Development. Lucas Jordan. ClayWare Games tm

Learn iphone and ipad game apps development using ios 6 SDK. Beginning. ios 6 Games. Development. Lucas Jordan. ClayWare Games tm Learn iphone and ipad game apps development using ios 6 SDK Beginning ios 6 Games Development Lucas Jordan ClayWare Games tm This book was purchased by dstannard@oregonmba.com For your convenience Apress

More information

ios App Development for Everyone

ios App Development for Everyone ios App Development for Everyone Kevin McNeish Table of Contents Chapter 2 Objective C (Part 1) When I first started writing ios Apps, coding in Objective-C was somewhat painful. Like stuck-in-acheckout-line-behind-the-old-woman-writing-a-personal-check

More information

Xcode User Default Reference. (Legacy)

Xcode User Default Reference. (Legacy) Xcode User Default Reference (Legacy) Contents Introduction 5 Organization of This Document 5 Software Version 5 See Also 5 Xcode User Defaults 7 Xcode User Default Overview 7 General User Defaults 8 NSDragAndDropTextDelay

More information

Your First App Store Submission

Your First App Store Submission Your First App Store Submission Contents About Your First App Store Submission 4 At a Glance 5 Enroll in the Program 5 Provision Devices 5 Create an App Record in itunes Connect 5 Submit the App 6 Solve

More information

Xcode Application note

Xcode Application note 1 Xcode Application note - how to export file from an ios application Feifei Li ECE480 Design Team 10 2 Table of Contents Introduction... 3 Get Started... 3 Familiar with Xcode... 6 Create user interface...

More information

Xcode Project Management Guide. (Legacy)

Xcode Project Management Guide. (Legacy) Xcode Project Management Guide (Legacy) Contents Introduction 10 Organization of This Document 10 See Also 11 Part I: Project Organization 12 Overview of an Xcode Project 13 Components of an Xcode Project

More information

ios Dev Crib Sheet In the Shadow of C

ios Dev Crib Sheet In the Shadow of C ios Dev Crib Sheet As you dive into the deep end of the ios development pool, the first thing to remember is that the mother ship holds the authoritative documentation for this endeavor http://developer.apple.com/ios

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 Organization Introduction to ios programming Hello World Assignment 1 2 Organization 6

More information

Assignment I Walkthrough

Assignment I Walkthrough Assignment I Walkthrough Objective Reproduce the demonstration (building a calculator) given in class. Goals 1. Downloading and installing the ios4 SDK. 2. Creating a new project in Xcode. 3. Defining

More information

WiFiSurvey Using AirPort Utility for WiFi Scanning Guide

WiFiSurvey Using AirPort Utility for WiFi Scanning Guide WiFiSurvey Using AirPort Utility for WiFi Scanning Guide WiFiSurvey User Guide (January 10, 2016) AccessAgility LLC 2016 AccessAgility LLC. All rights reserved. No part of this publication may be reproduced,

More information

ios Dev Fest Research Network Operations Center Thursday, February 7, 13

ios Dev Fest Research Network Operations Center Thursday, February 7, 13 ios Dev Fest Research Network Operations Center Outline http://goo.gl/02blw Getting Started With App Development Setup Developer Environment Setup Certificates and Provisioning Deploying App To Device

More information

Event Kit Programming Guide

Event Kit Programming Guide Event Kit Programming Guide Contents Introduction 4 Who Should Read This Document? 4 Organization of This Document 4 See Also 4 Fetching Events 6 Initializing an Event Store 6 Fetching Events with a Predicate

More information

Assignment 2: Matchismo 2

Assignment 2: Matchismo 2 Assignment 2: Matchismo 2 Objective This assignment extends the card matching game Matchismo we started last week to get experience understanding MVC, modifying an MVC s View in Xcode, creating your own

More information

Titanium Mobile: How-To

Titanium Mobile: How-To Titanium Mobile: How-To Getting Started With Appcelerator Titanium For Windows Release GSW August 17, 2010 Copyright 2010 Appcelerator, Inc. All rights reserved. Appcelerator, Inc. 444 Castro Street, Suite

More information

2. About iphone ios 5 Development Essentials. 5. Joining the Apple ios Developer Program

2. About iphone ios 5 Development Essentials. 5. Joining the Apple ios Developer Program Table of Contents 1. Preface 2. About iphone ios 5 Development Essentials Example Source Code Feedback 3. The Anatomy of an iphone 4S ios 5 Display Wireless Connectivity Wired Connectivity Memory Cameras

More information

Application Menu and Pop-up List Programming Topics

Application Menu and Pop-up List Programming Topics Application Menu and Pop-up List Programming Topics Contents Introduction to Application Menus and Pop-up Lists 4 Organization of This Document 4 How Menus Work 5 Menu Basics 5 Application Menus 6 Pop-Up

More information

Application Programming on the Mac COSC346

Application Programming on the Mac COSC346 Application Programming on the Mac COSC346 OS X Application An application is a complex system made of many subcomponents Graphical interface Event handling Multi-threading Data processing Storage 2 Cocoa

More information

Creating a Custom Class in Xcode

Creating a Custom Class in Xcode Creating a Custom Class in Xcode By Mark Mudri March 28, 2014 Executive Summary: Making an ios application requires the use of Xcode, an integrated development environment (IDE) developed by Apple. Within

More information

Integrated Invoicing and Debt Management System for Mac OS X

Integrated Invoicing and Debt Management System for Mac OS X Integrated Invoicing and Debt Management System for Mac OS X Program version: 6.3 110401 2011 HansaWorld Ireland Limited, Dublin, Ireland Preface Standard Invoicing is a powerful invoicing and debt management

More information

A product of Byte Works, Inc. http://www.byteworks.us. Credits Programming Mike Westerfield. Art Karen Bennett. Documentation Mike Westerfield

A product of Byte Works, Inc. http://www.byteworks.us. Credits Programming Mike Westerfield. Art Karen Bennett. Documentation Mike Westerfield A product of Byte Works, Inc. http://www.byteworks.us Credits Programming Mike Westerfield Art Karen Bennett Documentation Mike Westerfield Copyright 2013 By The Byte Works, Inc. All Rights Reserved Apple,

More information

MEAP Edition Manning Early Access Program Hello! ios Development version 14

MEAP Edition Manning Early Access Program Hello! ios Development version 14 MEAP Edition Manning Early Access Program Hello! ios Development version 14 Copyright 2013 Manning Publications For more information on this and other Manning titles go to www.manning.com brief contents

More information

App Distribution Guide

App Distribution Guide App Distribution Guide Contents About App Distribution 10 At a Glance 11 Enroll in an Apple Developer Program to Distribute Your App 11 Generate Certificates and Register Your Devices 11 Add Store Capabilities

More information

Business Portal for Microsoft Dynamics GP. Key Performance Indicators Release 10.0

Business Portal for Microsoft Dynamics GP. Key Performance Indicators Release 10.0 Business Portal for Microsoft Dynamics GP Key Performance Indicators Release 10.0 Copyright Copyright 2007 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the

More information

MA-WA1920: Enterprise iphone and ipad Programming

MA-WA1920: Enterprise iphone and ipad Programming MA-WA1920: Enterprise iphone and ipad Programming Description This 5 day iphone training course teaches application development for the ios platform. It covers iphone, ipad and ipod Touch devices. This

More information

Xcode Source Management Guide. (Legacy)

Xcode Source Management Guide. (Legacy) Xcode Source Management Guide (Legacy) Contents Introduction 5 Organization of This Document 5 See Also 6 Source Management Overview 7 Source Control Essentials 7 Snapshots 8 Managing Source in Xcode 8

More information

Tag Specification Document

Tag Specification Document Measuring the digital world. DIGITAL ANALYTIX ios Mobile Application Measurement Tag Specification Document March 2012 FOR FURTHER INFORMATION, PLEASE CONTACT: comscore, Inc. +1 866 276 6972 sdksupport@comscore.com

More information

Creating Custom Crystal Reports Tutorial

Creating Custom Crystal Reports Tutorial Creating Custom Crystal Reports Tutorial 020812 2012 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic, or mechanical,

More information

Foglight. Dashboard Support Guide

Foglight. Dashboard Support Guide Foglight Dashboard Support Guide 2013 Quest Software, Inc. ALL RIGHTS RESERVED. This guide contains proprietary information protected by copyright. The software described in this guide is furnished under

More information

Integrated Accounting System for Mac OS X

Integrated Accounting System for Mac OS X Integrated Accounting System for Mac OS X Program version: 6.3 110401 2011 HansaWorld Ireland Limited, Dublin, Ireland Preface Standard Accounts is a powerful accounting system for Mac OS X. Text in square

More information

Business Portal for Microsoft Dynamics GP. Requisition Management User s Guide Release 10.0

Business Portal for Microsoft Dynamics GP. Requisition Management User s Guide Release 10.0 Business Portal for Microsoft Dynamics GP Requisition Management User s Guide Release 10.0 Copyright Copyright 2007 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws

More information

PrinterOn Mobile App for ios and Android

PrinterOn Mobile App for ios and Android PrinterOn Mobile App for ios and Android User Guide Version 3.4 Contents Chapter 1: Getting started... 4 Features of the PrinterOn Mobile App... 4 Support for PrinterOn Secure Release Anywhere printer

More information

Introduction to Programming with Xojo

Introduction to Programming with Xojo Introduction to Programming with Xojo IOS ADDENDUM BY BRAD RHINE Fall 2015 Edition Copyright 2013-2015 by Xojo, Inc. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike

More information

A LITTLE PROMISE FROM YOU

A LITTLE PROMISE FROM YOU A LITTLE PROMISE FROM YOU It took me many years of experience to gather the knowledge that helped me make this guide and hours to actually produce it. But I am happy to offer it for you completely free

More information

Apple Certificate Library Functional Specification

Apple Certificate Library Functional Specification Apple Certificate Library Functional Specification apple 2005-01-13 apple Apple Computer, Inc. 2005 Apple Computer, Inc. All rights reserved. No part of this publication may be reproduced, stored in a

More information

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system.

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system. Chapter 1 Introduction to ios Development Objectives: Touch on the history of ios and the devices that support this operating system. Understand the different types of Apple Developer accounts. Introduce

More information

Customize tab; click the Accounts category; drag the satellite dish icon to your toolbar.

Customize tab; click the Accounts category; drag the satellite dish icon to your toolbar. The Tech/Media Department will install and configure GroupWise for you on your classroom Mac OS X or PC computer. If GroupWise is not currently installed and you would like to begin using it, please submit

More information

Chapter 1. Xcode Projects

Chapter 1. Xcode Projects Chapter 1 Xcode Projects Every program you create in Xcode requires a project, even a simple command-line program with one file. Because every program requires a project, covering projects is a good way

More information

Your First Windows Mobile Application. General

Your First Windows Mobile Application. General Your First Windows Mobile Application General Contents Your First Windows Mobile Application...1 General...1 Chapter 1. Tutorial Overview and Design Patterns...3 Tutorial Overview...3 Design Patterns...4

More information

Mail Programming Topics

Mail Programming Topics Mail Programming Topics Contents Introduction 4 Organization of This Document 4 Creating Mail Stationery Bundles 5 Stationery Bundles 5 Description Property List 5 HTML File 6 Images 8 Composite Images

More information

ios App Development for Everyone

ios App Development for Everyone ios App Development for Everyone Kevin McNeish Table of Contents Chapter 2 Objective C (Part 6) Referencing Classes Now you re ready to use the Calculator class in the App. Up to this point, each time

More information

Microsoft Dynamics GP. Audit Trails

Microsoft Dynamics GP. Audit Trails Microsoft Dynamics GP Audit Trails Copyright Copyright 2007 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of the user. Without limiting

More information

Copyright 2006 TechSmith Corporation. All Rights Reserved.

Copyright 2006 TechSmith Corporation. All Rights Reserved. TechSmith Corporation provides this manual as is, makes no representations or warranties with respect to its contents or use, and specifically disclaims any expressed or implied warranties or merchantability

More information

How To Use Standard Pos On A Pc Or Macbook Powerbook 2.5.2.2 (Powerbook 2)

How To Use Standard Pos On A Pc Or Macbook Powerbook 2.5.2.2 (Powerbook 2) Integrated Point of Sales System for Mac OS X Program version: 6.3.22 110401 2012 HansaWorld Ireland Limited, Dublin, Ireland Preface Standard POS is a powerful point of sales system for small shops and

More information

Assignment 1: Matchismo

Assignment 1: Matchismo Assignment 1: Matchismo Objective This assignment starts off by asking you to recreate the demonstration given in the second lecture. Not to worry, the posted slides for that lecture contain a detailed

More information

Copyright 2010 The Pragmatic Programmers, LLC.

Copyright 2010 The Pragmatic Programmers, LLC. Extracted from: ipad Programming A Quick-Start Guide for iphone Developers This PDF file contains pages extracted from ipad Programming, published by the Pragmatic Bookshelf. For more information or to

More information

Microsoft Dynamics GP. Field Service - Preventive Maintenance

Microsoft Dynamics GP. Field Service - Preventive Maintenance Microsoft Dynamics GP Field Service - Preventive Maintenance Copyright Copyright 2010 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of the

More information

Praktikum Entwicklung von Mediensystemen mit ios

Praktikum Entwicklung von Mediensystemen mit ios Praktikum Entwicklung von Mediensystemen mit ios SS 2011 Michael Rohs michael.rohs@ifi.lmu.de MHCI Lab, LMU München Today Schedule Organization Introduction to ios Exercise 1 2 Schedule Phase 1 Individual

More information

New Features in Primavera P6 EPPM 16.1

New Features in Primavera P6 EPPM 16.1 New Features in Primavera P6 EPPM 16.1 COPYRIGHT & TRADEMARKS Copyright 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

More information

Contents. About Testing with Xcode 4. Quick Start 7. Testing Basics 23. Writing Test Classes and Methods 28. At a Glance 5 Prerequisites 6 See Also 6

Contents. About Testing with Xcode 4. Quick Start 7. Testing Basics 23. Writing Test Classes and Methods 28. At a Glance 5 Prerequisites 6 See Also 6 Testing with Xcode Contents About Testing with Xcode 4 At a Glance 5 Prerequisites 6 See Also 6 Quick Start 7 Introducing the Test Navigator 7 Add Testing to Your App 11 Create a Test Target 12 Run the

More information

TakeMySelfie ios App Documentation

TakeMySelfie ios App Documentation TakeMySelfie ios App Documentation What is TakeMySelfie ios App? TakeMySelfie App allows a user to take his own picture from front camera. User can apply various photo effects to the front camera. Programmers

More information

CheckBook Pro 2 Help

CheckBook Pro 2 Help Get started with CheckBook Pro 9 Introduction 9 Create your Accounts document 10 Name your first Account 11 Your Starting Balance 12 Currency 13 Optional password protection 14 We're not done yet! 15 AutoCompletion

More information

Beginner level: Modules 1 to 18. Advanced level: Quick review of modules 1 to 18, then following to module 26. 1- A Simple ios Application

Beginner level: Modules 1 to 18. Advanced level: Quick review of modules 1 to 18, then following to module 26. 1- A Simple ios Application FROM 1st TO 4th OF FEBRUARY 2012 contents of the app s creation training track Beginner level: Modules 1 to 18. Advanced level: Quick review of modules 1 to 18, then following to module 26. 1- A Simple

More information

Synology SSO Server. Development Guide

Synology SSO Server. Development Guide Synology SSO Server Development Guide THIS DOCUMENT CONTAINS PROPRIETARY TECHNICAL INFORMATION WHICH IS THE PROPERTY OF SYNOLOGY INCORPORATED AND SHALL NOT BE REPRODUCED, COPIED, OR USED AS THE BASIS FOR

More information

MICR Check Printing. Quick Start Guide

MICR Check Printing. Quick Start Guide MICR Check Printing Quick Start Guide Mekorma MICR Quick Start Guide Copyright 2013, Mekorma Enterprises. All Rights Reserved. Your right to copy this documentation is limited by copyright law and the

More information

AC 2012-3338: OBJECTIVE-C VERSUS JAVA FOR SMART PHONE AP- PLICATIONS

AC 2012-3338: OBJECTIVE-C VERSUS JAVA FOR SMART PHONE AP- PLICATIONS AC 2012-3338: OBJECTIVE-C VERSUS JAVA FOR SMART PHONE AP- PLICATIONS Dr. Mohammad Rafiq Muqri, DeVry University, Pomona Mr. James R. Lewis, DeVry University, Pomona c American Society for Engineering Education,

More information

Business Portal for Microsoft Dynamics GP. Electronic Document Delivery Release 10.0

Business Portal for Microsoft Dynamics GP. Electronic Document Delivery Release 10.0 Business Portal for Microsoft Dynamics GP Electronic Document Delivery Release 10.0 Copyright Copyright 2007 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is

More information

BIGPOND ONLINE STORAGE USER GUIDE Issue 1.1.0-18 August 2005

BIGPOND ONLINE STORAGE USER GUIDE Issue 1.1.0-18 August 2005 BIGPOND ONLINE STORAGE USER GUIDE Issue 1.1.0-18 August 2005 PLEASE NOTE: The contents of this publication, and any associated documentation provided to you, must not be disclosed to any third party without

More information

Microsoft Dynamics GP. Electronic Signatures

Microsoft Dynamics GP. Electronic Signatures Microsoft Dynamics GP Electronic Signatures Copyright Copyright 2007 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of the user. Without

More information

WINDOWS 7 & HOMEGROUP

WINDOWS 7 & HOMEGROUP WINDOWS 7 & HOMEGROUP SHARING WITH WINDOWS XP, WINDOWS VISTA & OTHER OPERATING SYSTEMS Abstract The purpose of this white paper is to explain how your computers that are running previous versions of Windows

More information

Contents. Stationery Greeting Cards at a glance... 3. Stationery Greeting Cards in Mail... 4. Installing Stationery Greeting Cards...

Contents. Stationery Greeting Cards at a glance... 3. Stationery Greeting Cards in Mail... 4. Installing Stationery Greeting Cards... Greeting Cards Contents Stationery Greeting Cards at a glance... 3 Stationery Greeting Cards in Mail... 4 Installing Stationery Greeting Cards... 5 Downloading & installing the app... 5 Restoring your

More information

formerly Help Desk Authority 9.1.3 HDAccess Administrator Guide

formerly Help Desk Authority 9.1.3 HDAccess Administrator Guide formerly Help Desk Authority 9.1.3 HDAccess Administrator Guide 2 Contacting Quest Software Email: Mail: Web site: info@quest.com Quest Software, Inc. World Headquarters 5 Polaris Way Aliso Viejo, CA 92656

More information

Once you have obtained a username and password you must open one of the compatible web browsers and go to the following address to begin:

Once you have obtained a username and password you must open one of the compatible web browsers and go to the following address to begin: CONTENT MANAGER GUIDELINES Content Manager is a web-based application created by Scala that allows users to have the media they upload be sent out to individual players in many locations. It includes many

More information

Scribe Online Integration Services (IS) Tutorial

Scribe Online Integration Services (IS) Tutorial Scribe Online Integration Services (IS) Tutorial 7/6/2015 Important Notice No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, photocopying,

More information

Getting Started Guide

Getting Started Guide Getting Started Guide Mulberry IMAP Internet Mail Client Versions 3.0 & 3.1 Cyrusoft International, Inc. Suite 780 The Design Center 5001 Baum Blvd. Pittsburgh PA 15213 USA Tel: +1 412 605 0499 Fax: +1

More information

Sophos Anti-Virus for Mac OS X Help. For networked and single computers running Mac OS X version 10.4 or later

Sophos Anti-Virus for Mac OS X Help. For networked and single computers running Mac OS X version 10.4 or later Sophos Anti-Virus for Mac OS X Help For networked and single computers running Mac OS X version 10.4 or later Product version: 7 Document date: October 2009 Contents 1 About Sophos Anti-Virus...3 2 On-access

More information

Mobile Application Development

Mobile Application Development Mobile Application Development MAS 490: Theory and Practice of Mobile Applications Professor John F. Clark What is Interface Builder? Interface Builder is a software development application for Apple s

More information

Personal Call Manager User Guide. BCM Business Communications Manager

Personal Call Manager User Guide. BCM Business Communications Manager Personal Call Manager User Guide BCM Business Communications Manager Document Status: Standard Document Version: 04.01 Document Number: NN40010-104 Date: August 2008 Copyright Nortel Networks 2005 2008

More information

PrinterOn Embedded Application For Samsung Printers and MFPs

PrinterOn Embedded Application For Samsung Printers and MFPs PrinterOn Embedded Application For Samsung Printers and MFPs Table of Contents 1. Introduction... 3 2. Setup and Service Prerequisites... 4 3. How to Purchase the PrinterOn Service... 5 4. How to install

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 Alerts, Action Sheets, text input Application architecture Table views

More information

HP LoadRunner. Software Version: 11.00. Ajax TruClient Tips & Tricks

HP LoadRunner. Software Version: 11.00. Ajax TruClient Tips & Tricks HP LoadRunner Software Version: 11.00 Ajax TruClient Tips & Tricks Document Release Date: October 2010 Software Release Date: October 2010 Legal Notices Warranty The only warranties for HP products and

More information

2. Setting Up The Charts

2. Setting Up The Charts Just take your time if you find this all a little overwhelming - you ll get used to it as long as you don t rush or feel threatened. Since the UK became members of the European Union, we stopped shooting

More information

This documentation is made available before final release and is subject to change without notice and comes with no warranty express or implied.

This documentation is made available before final release and is subject to change without notice and comes with no warranty express or implied. Hyperloop for ios Programming Guide This documentation is made available before final release and is subject to change without notice and comes with no warranty express or implied. Requirements You ll

More information

Asset Track Getting Started Guide. An Introduction to Asset Track

Asset Track Getting Started Guide. An Introduction to Asset Track Asset Track Getting Started Guide An Introduction to Asset Track Contents Introducing Asset Track... 3 Overview... 3 A Quick Start... 6 Quick Start Option 1... 6 Getting to Configuration... 7 Changing

More information

ios Deployment Simplified FileMaker How To Guide

ios Deployment Simplified FileMaker How To Guide ios Deployment Simplified FileMaker How To Guide Table of Contents FileMaker How To Guide Introduction... 3 Deployment Options... 3 Option 1 Transfer to the ios device... 3 Option 2 - Host with FileMaker

More information

Introduction: The Xcode templates are not available in Cordova-2.0.0 or above, so we'll use the previous version, 1.9.0 for this recipe.

Introduction: The Xcode templates are not available in Cordova-2.0.0 or above, so we'll use the previous version, 1.9.0 for this recipe. Tutorial Learning Objectives: After completing this lab, you should be able to learn about: Learn how to use Xcode with PhoneGap and jquery mobile to develop iphone Cordova applications. Learn how to use

More information

SQL Server 2005: Report Builder

SQL Server 2005: Report Builder SQL Server 2005: Report Builder Table of Contents SQL Server 2005: Report Builder...3 Lab Setup...4 Exercise 1 Report Model Projects...5 Exercise 2 Create a Report using Report Builder...9 SQL Server 2005:

More information

How To Package In Composer 2.5.2.2 (Amd64)

How To Package In Composer 2.5.2.2 (Amd64) Composer User Guide Version 9.1 JAMF Software, LLC 2013 JAMF Software, LLC. All rights reserved. JAMF Software has made all efforts to ensure that this guide is accurate. JAMF Software 301 4th Ave S Suite

More information

Salesforce Classic Guide for iphone

Salesforce Classic Guide for iphone Salesforce Classic Guide for iphone Version 37.0, Summer 16 @salesforcedocs Last updated: July 12, 2016 Copyright 2000 2016 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark

More information

Exchange 2003 Standard Journaling Guide

Exchange 2003 Standard Journaling Guide Exchange 2003 Standard Journaling Guide Websense Email Security Solutions v7.3 Websense Advanced Email Encryption Copyright 1996-2011 Websense, Inc. All rights reserved. This document contains proprietary

More information

Apple URL Scheme Reference

Apple URL Scheme Reference Apple URL Scheme Reference Contents About Apple URL Schemes 4 At a Glance 4 Composing Items Using Mail 4 Starting a Phone or FaceTime Conversation 4 Specifying Text Messages 5 Opening Locations in Maps

More information

DIGIPASS CertiID. Getting Started 3.1.0

DIGIPASS CertiID. Getting Started 3.1.0 DIGIPASS CertiID Getting Started 3.1.0 Disclaimer Disclaimer of Warranties and Limitations of Liabilities The Product is provided on an 'as is' basis, without any other warranties, or conditions, express

More information

FOR WINDOWS FILE SERVERS

FOR WINDOWS FILE SERVERS Quest ChangeAuditor FOR WINDOWS FILE SERVERS 5.1 User Guide Copyright Quest Software, Inc. 2010. All rights reserved. This guide contains proprietary information protected by copyright. The software described

More information

Using FileMaker Pro with Microsoft Office

Using FileMaker Pro with Microsoft Office Hands-on Guide Using FileMaker Pro with Microsoft Office Making FileMaker Pro Your Office Companion page 1 Table of Contents Introduction... 3 Before You Get Started... 4 Sharing Data between FileMaker

More information

TheFinancialEdge. Journal Entry Guide

TheFinancialEdge. Journal Entry Guide TheFinancialEdge Journal Entry Guide 101811 2011 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic, or mechanical, including

More information