Last listened to The Ricky Gervais Show 2002-02-09 by Ricky Gervais, Stephen Merchant & Karl Pilkington (on 25 Aug 2010, 16:00)

MonoTouch app: NDC 2010 iPhone app in the App Store now

My first iPhone app is available now in the App Store: NDC 2010. It displays information about each of the 120+ sessions at this years Norwegian Developers Conference. It lists the sessions by day and time, it lists the speakers and contains their bio, and it displays the latest talk on Twitter by following the #NDC2010 hashtag. If the latest version I submitted to Apple gets approved in time, it will also have the ability to plan your own schedule.

It was written in C# using MonoTouch. It is also an open-source app, so you can not only download and use it at this years NDC 2010 conference directly from the App Store, but you can also freely browse and use the source code in any way you want.

Here are some screenshots of the app.

I hope someone finds it useful.

This post has been removed by the author.

Check out this similar post by Paulio: Creating a very simple MonoTouch application without the Interface Builder.



Selecting a contact from the Address Book with MonoTouch

This screencast shows how to programmatically select a contact from the address book in a MonoTouch iPhone application, in only 5 minutes.

The key bit of code is to create an ABPeoplePickerNavigationController, and then take advantage of its SelectPerson event. The brief idea is shown in this code snippet:

var picker = new ABPeoplePickerNavigationController();

picker.SelectPerson +=
delegate(object sender, ABPeoplePickerSelectPersonEventArgs e) {
ABPerson selectedPerson = e.Person;
// do something with 'selectedPerson'
};

Hope you found this screencast helpful.

Deleting cells from a UITableView with MonoTouch

This screencast shows the end-to-end process of how to create a simple iPhone application with MonoTouch. The application displays data in a table, and gives the user the ability to delete cells from the table.

The application consists of a UINavigationController, a UITableViewController and of course some UITableViewCells which can be deleted from their containing table.

Some things I mention in the screencast are:

  • Just like in my UINavigationController RSS example, I am using a template for UITableViewControllers which is based on the one I found at Code Snack.
  • Swipe to delete is enabled simply by overriding the CommitEditingStyle method in your UITableViewDataSource class.

The key bit of code from this example is the CommitEditingStyle method:

class DataSource : UITableViewDataSource
{
EmployeesTableViewController tvc;

// ...

public override void CommitEditingStyle(UITableView tableView,
UITableViewCellEditingStyle editingStyle,
NSIndexPath indexPath)
{
if (editingStyle == UITableViewCellEditingStyle.Delete)
{
tvc.Employees.RemoveAt(indexPath.Row);
tableView.DeleteRows(new [] { indexPath }, UITableViewRowAnimation.Fade);
}
}
// ...

MonoTouch code snippet - Application Icon Badge Number

Another MonoTouch code snippet: how to set the "new items" number on your iPhone apps badge:

UIApplication.SharedApplication.ApplicationIconBadgeNumber = 11;

That will give you this result: