Chapter 1.  Building a Gallery Application

This chapter will walkthrough native development with Xamarin by building an iOS and Android application that will read from your local gallery files, and display them in a UITableView and ListView. The following topics will be covered in this chapter:

Expected knowledge:

  • Creating iOS provision certificates
  • iOS development
  • Objective-C
  • Creating keystores
  • Android development
  • Java

In this chapter you will learn the following:

  • Creating an iOS project
  • Creating a UIViewController and UITableView
  • Customizing a cell's appearance
  • Creating an Android project
  • Creating an XML interface and ListView
  • Shared projects
  • Custom row appearance
  • Bitmap functions
  • The ALAssetLibrary
  • Adding the iOS photo screen
  • Adding the Android photo screen

Create an iOS project

Let's begin our Xamarin journey; we will start by setting up our iOS project in Xamarin Studio:

  1. Start by opening Xamarin Studio and creating a new iOS project. To do so, we simply select File | New | Solution and select an iOS Single View App; we must also give it a name and add the bundle ID you want in order to run your application.

    Note

    It is recommended that for each project, a new bundle ID is created, along with a developer provisioning profile for each project.

  2. Now that we have created the iOS project, you will be taken to the following screen:
Create an iOS project

Doesn't this look familiar? Yes, it is our AppDelegate file; notice the .cs on the end; because we are using C#, all our code files will have this extension (no more .h or .m files).

Tip

Before we go any further, spend a few minutes moving around the IDE, expanding the folders, and exploring the project structure; it is very similar to an iOS project created in XCode.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.193.232