Developing C# Apps for iPhone and iPad using MonoTouch: iOS Apps Development for .NET Developers

Developing C# Apps for iPhone and iPad using MonoTouch: iOS Apps Development for .NET Developers

Bryan Costanich

Language: English

Pages: 512

ISBN: 1430231742

Format: PDF / Kindle (mobi) / ePub


Developing C# Applications for iPhone and iPad using MonoTouch shows you how to use your existing C# skills to write apps for the iPhone and iPad. Fortunately, there's MonoTouch, Novell's .NET library that allows C# developers to write C# code that executes in iOS. Furthermore, MonoTouch allows you to address all the unique functions of the iPhone, iPod Touch, and iPad. And the big plus: You needn't learn any Objective-C to master MonoTouch!

Former Microsoft engineer and published app-store developer Bryan Costanich shows you how to use the tools you already know to create native apps in iOS using C# and the .NET Base Class Libraries. The magic is in Novell's implementation of Apple's Cocoa libraries in MonoTouch. You'll master the same elegant and rich Cocoa environment, but without the need to learn a new programming language. 

Developing C# Applications for iPhone and iPad using MonoTouch takes you from your first "Hello, World" example through the major APIs and features of iOS. The coverage is comprehensive and makes use of frequent examples, complete with sample code you can download and reuse to create your own powerful and playful apps.

 

 

 

 

 

 

 

 

 

 

 

Objective-C. But the truth is, as the iOS ecosystem has matured, a number of ways to develop apps for it has emerged. The reason is largely developer-driven. For many developers, learning Objective-C was seen as a huge barrier to entry. For .NET developers, many of whom have never had to worry about memory management, pointers, and other C language concepts, Objective-C also forced on them many responsibilities that they were unfamiliar with. Many also feel that the tools for developing in

MonoTouch automatically creates an info.plist file for you if you do not already have one based on your project options, and if you do have one, it will merge the project options settings with it. When you create an application using the iPad Window-based project template, it automatically sets the Target devices setting to iPad only, as shown in Figure 4.2. 61 62 CHAPTER 4: iPad and Universal (iPhone/iPad) Applications Figure 4–2. Build settings for an iPad-only application It also sets

far we’ve seen a 1:1 correlation between controllers and views; that is, for every controller, we’ve had it manage a single view. This is a pretty common pattern, but a controller can actually manage multiple views without having a separate controller for each view. The opposite is not true, however; a single view can only be assigned to one controller. In fact, one of the approaches to handle device rotation is for a single controller to have a view for each orientation, and then switch views

code, they’re simply style properties that are applied. With custom cells, you actually create your own custom cell views that are displayed. All code for customizing the appearance of a table can be found in the Example_TableAndCellStyles companion code and application. Let’s look at each one of the options in detail. Table Styles Tables in CocoaTouch come in two flavors, plain and grouped. The plain table style is a more space-efficient style because it takes up the entire table area and there

created our outlets directly in our AppDelegate class. In Chapter 2, we’ll do this a bit differently, when I introduce controllers. Let’s change our AppDelegate class to look like Listing 2–4. Listing 2–4. Our complete AppDelegate class that responds to button clicks and updates the screen // The name AppDelegate is referenced in the MainWindow.xib file. public partial class AppDelegate : UIApplicationDelegate { //---- number of times we've clicked protected int _numberOfClicks; // This method

Download sample

Download