iOS Samples

A demonstration of automatic RTL support in Asset Catalogs and UIStackViews

A demonstration of automatic RTL support in Asset Catalogs and UIStackViews

Accessibility

This sample demonstrates how to use the AutomationProperties class, so that a screen reader can speak about the user interface elements on the page.

Accessing Native Views in Code

This sample demonstrates how to refer to native views declared in XAML, from code.

AdaptiveElements: Implementing Your Own Adaptive Design with UIKit

Implementing Your Own Adaptive Design with UIKit

AdaptivePhotos

Sample demonstrates how to use new UIKit features introduced in iOS 8.

Application Shortcuts

Demonstrates how to use the UIApplicationShortcutItem class

AstroLayout: Building Adaptive UI with Auto Layout

Sample demonstrates how to properly activate and deactivate groups of constraints.

Bindable Layouts

This sample demonstrates binding a layout class to a collection of items, and setting the appearance of each item with a DataTemplate.

Bindable Picker

This sample demonstrates how to use a Picker to select a color from a list of colors.

BugSweeper

A familiar game with a new twist.

Button Demos

Demonstrates Button properties and events.

Button Event Demo

Sample demonstrates how to use a C# event on a button press to run a callback.

Chat

This project shows one way of implementing a bubble-chat rendering similar to the iPhone Messages application

Circle Layout

This sample provides an introduction to Collection Views.

Circle Map Overlay

This sample demonstrates how to add a circular overlay to a map in order to highlight a circular area of the map.

ClassHierarchy

Demonstrates a scrollable hierarchy of all Xamarin.Forms classes, structures, and enumerations.

Collection Views: Using the New Drag-To-Reorder Feature

Sample demonstrates built-in drag-to-reorder in Collection Views.

CollectionViewTransition

This sample illustrates how to create a custom transition when navigating between two collection views.

Content Controls

A cross platform sample which that demonstrates the usage of some common content controls.

ContentPage Custom Renderer

This sample demonstrates a custom renderer for a ContentPage, enabling developers to override the default native rendering with their own platform-specific customization.

ConvertedFrogScroller

Enhancing scrollview experience with UIPageViewController, UIScrollView and CATiledLayer.

Customizing UINavigationBar

Sample demonstrates using `UINavigationController` and `UIViewController` classes together as building blocks to your application's user interface.

Days Between Dates

Demonstrates DatePicker and calculating a difference between two dates.

Dynamic ListView Row Resizing

This sample demonstrates using the Cell.ForceUpdateSize method to programmatically resize a ListView row at runtime.

Employee Directory

This is a Xamarin.Forms port of the pre-built sample app Employee Directory.

Entry Custom Renderer

This sample demonstrates a custom renderer for the Entry control, enabling developers to override the default native rendering with their own platform-specific customization.

FlexLayout Demos

Demonstrates common applications of the FlexLayout, and allows experimentation with its many properties.

Font Example

Lists the fonts available on the device and shows a preview of each font.

Forms2Native

This sample demonstrates how to add native views to a Xamarin.Forms page, and how they can interact with Xamarin.Forms views.

FormsGallery

This program displays all the views, cells, layouts, and pages available in Xamarin.Forms, one per page.

Gesture Recognizers

An example on how to handle touches to move multiple objects.

GridLayoutDemo

This sample demonstrates how to display various UI elements in a grid.

GrowRowTable

Shows how to create a Table View with Auto-Resizing Row Height.

Handling Rotation

Shows how to handle user-interface layout changes when device is rotated.

Hello Goodbye

This project shows you how to use the Accessibility API to widen your user base.

Hello iPad

This is a simple hello world application for iPad.

Hello Multi-Screen iPhone

This sample serves as an introduction to the primary pattern used in iOS for user interfaces: MVC.

Hello World: iPhone

A simple hello world sample demonstrating the use of the UIButton and UILabel controls.

Hello, Complex Universal

Sample shows how to create universal applications that will run on both iPhone and iPad.

Hello, iOS

This introductory sample introduces the concepts from the Getting Started guides

Hello, Universal

Sample demonstrating how to create universal applications that will run on both iPhone and iPad.

HybridWebView Custom Renderer

This sample demonstrates a custom renderer for a HybridWebView custom control, that demonstrates how to enhance the platform-specific web controls to allow C# code to be invoked from JavaScript.

Hyperlinks

This sample demonstrates how Label and Span instances can be turned into hyperlinks.

Implementing Peek and Pop

Accelerate actions in your app by providing shortcuts to preview content in detail view controllers.

iTravel

First steps with on-demand resources technology and Xamarin.

Kannada Keyboard

Kannada Keyboard is a keyboard extension for the iOS.

LabelledSections

This sample demonstrates how to create an alphabetically ordered list with labelled sections.

Layout Compression

Layout compression removes specified layouts from the visual tree in an attempt to improve page rendering performance. This sample demonstrates how to enable layout compression, and the benefits it can bring when combined with fast renderers on Android.

LayoutOptions

Every Xamarin.Forms view has HorizontalOptions and VerticalOptions properties, of type LayoutOptions. This sample demonstrates the effect that each LayoutOptions value has on the alignment and expansion of a view.

Lazy Table Images

This sample demonstrates how to lazily download images and add them to table.

LineLayout

Sample shows how to implement a document-browser-like-interface as a flow layout subclass.

Lister

Lister is a productivity sample project which includes iOS app and iOS Today extensions app (Widget).

ListView Colors

ListView Displaying System Colors using BoxView.

ListView Custom Renderer

This sample demonstrates a custom renderer that encapsulates platform-specific list controls and native cell layouts.

Local Authentication using Face ID or Touch ID

Demonstrates how to use FaceID and TouchID to authenticate the user.

LookInside

Sample shows how to use a custom presentation controller to create a custom view controller presentation.

Map Custom Renderer

This sample demonstrates how to create a custom renderer for the Map control, which displays a native map with a customized pin and a customized view of the pin data on each platform.

Monkey App (CSS)

This sample demonstrates how to use CSS to perform basic styling in a Xamarin.Forms app.

Monkey Picker

This sample demonstrates how to populate a Picker with data by setting the ItemsSource property, and how to respond to item selection by the user.

MonoCatalog MonoDevelop

A kitchen sink example of common UI elements and APIs used with Xamarin.iOS.

MonoTouch.Dialog Element Walkthrough

This sample demonstrates how to use the Element API with MonoTouch.Dialog.

MonoTouch.Dialog JSON Walkthrough

This sample demonstrates how to use the JSON API with MonoTouch.Dialog.

MonoTouch.Dialog Reflection API Walkthrough

This sample demonstrates how to use the Reflection API with MonTouch.Dialog.

MultiTask

Sample demonstrates a multitasking ready iPad app.

MultiTasking

A simple cross platform example of using a background thread to perform a long running task.

Multi-Touch Tracking for iOS

Tracking multi-touch events in iOS.

Native Embedding

This sample demonstrates how to add platform-specific controls to a Xamarin.Forms layout, and includes how to override the layout of custom controls in order to correct their measurement API usage.

Native Switch

This sample demonstrates how to add native views to a Xamarin.Forms page, and how they can interact with Xamarin.Forms views.

PaintCode Demo

This sample app shows some PaintCode-generated elements.

PanGesture

This sample demonstrates using the PanGestureRecognizer class to implement dragging.

Phoneword

Demonstrates how to share C# code across iOS, Android, Windows Phone 7, Windows 8.

Picker

This sample demonstrates how to use a Picker to select a text item from a list of data.

PictureInPicture

This sample demonstrates how to get picture in picture playback.

PinchGesture

This sample demonstrates using the PinchGestureRecognizer class to implement interactive zoom functionality.

PinchIt

This sample provides an introduction to Collection Views and illustrates the use of a flow layout.

Platform Specifics

This sample demonstrates how to consume the platform-specifics that are built into Xamarin.Forms.

Polygon Map Overlay

This sample demonstrates how to add a polygon overlay to a map in order to highlight a region on the map. Polygons are a closed shape and have their interiors filled in.

Polyline Map Overlay

This sample demonstrates how to add a polyline overlay to a map. A polyline overlay is a series of connected line segments that are typically used to show a route on a map, or form any shape that's required.

Popovers

This sample demonstrates proper use of UIPopoverController in iOS.

Print Sample

A simple example of using the UIKit Printing API in a Xamarin.iOS application.

PrintBanner

This Sample demonstrates how to print to a roll-fed AirPrint printer.

Protocols, Delegates, and Events

This sample demonstrates how to interact with Objective-C protocols from C#.

Quotes

This sample application utilizes the legacy string drawing functions and the new attributed string drawing.

Recipes and Printing

Sample shows displaying items in a table view, allowing the user to dig into detail pages and view photos.

SamplePhotoApp

Basic Photos-like app which introduces the Photos framework.

Search Demo

Demonstrates how to create a master-detail style of application.

SegueCatalog

This sample demonstrates how to use External References to factor your storyboards, how to combine UIStoryboardSegue subclasses with Transition Delegates and Adaptivity, and how to use unwind segues with custom container view controllers.

Shadow Platform-Specific

This sample demonstrates how to expose an Effect through a platform-specific.

Simple Collection Views

Shows how to use collection Views in iOS.

Simple Drill-Down

Demonstrates making a table with cells that can be drilled further down to a detailed view.

Simple Text Input Demo

An example showing how to implement a simple text-editing application using Core Text.

Slider Demos

Demonstrates the Slider view for selecting from a range of numeric values.

Solitaire Encryption (Xamarin.Forms)

Demonstrates the Solitaire encryption algorithm from Neal Stephenson's novel Cryptonomicon.

Split View

Sample illustrates how to use the UISplitView control for iPad.

StackView: Using the UIStackView Control

Sample demonstrates how to use the new UIStackView control.

Standard Controls

This sample application illustrates how to use a number of standard ui controls.

StateRestoration

Demonstrates a way to present ordered data to users in a grid-like fashion.

Stepper Demos

This sample demonstrates how to use a Stepper in code, XAML with code-behind, and XAML data-binding scenarios.

Subclassed Native Views

This sample demonstrates how to subclass native to define a XAML-friendly API.

SwipeGesture

This sample demonstrates how to use the SwipeGestureRecognizer class to recognize a swipe gesture.

Tabbed Images

Sample demonstrating basic usage of images.

Table Editing

Sample that demonstrates how to implement swipe-to-delete and edit mode in UITableView.

Table Parts

This sample illustrates the constituent parts of a table.

Table Search with UISearchController

Create a user interface with searchable content in a table view.

Table Swipe Actions

This sample demonstrates table row actions in ios 11

Tables and Lists

Demonstrates the various table and cell styles available out of the box.

TapGesture

This sample demonstrates working with tap gestures using Xamarin Forms.

Tasky

Demonstrates a cross-platform todo application that allows you to track todo/task items.

Tasky

This version of Tasky uses a Portable Class Library and SQLite NuGet package to encapsulate and share code across platforms.

Tasky Pro

Demonstrates proper application architecture layering and using a common code base.

TextKitDemo

This sample demonstrates the flexibility and power of new Text Kit APIs.

This sample shows how to use many of the new iOS 7 font features in your application

This sample shows how to use many of the new iOS 7 font features.

TimePicker

This sample demonstrates how to use a TimePicker view to select a time, and respond to a time being selected.

TipCalc

Tip calculator is simple cross platform application, which calculates the correct tip amount.

Toast Modern

Shows how to test your ideas quickly to save time and money.

Todo

This sample demonstrates a Todo list application where the data is stored and accessed in a local SQLite database.

TodoLocalized (Xamarin.Forms)

Demonstrates how to localize Xamarin.Forms using RESX.

TodoLocalized RTL (Xamarin.Forms)

Demonstrates how to right-to-left localize Xamarin.Forms apps.

Touch Cells

An example of how to use a UITableView and display a custom cell within it.

TouchCanvas

Illustrates responsive touch handling using coalesced and predictive touches.

Touches

An example on how to handle touches to move multiple objects.

Transitions Demo

This sample shows how to create custom view controller transitions in iOS.

UICatalog: Creating and Customizing UIKit Controls

Sample is a catalog exhibiting many views and controls in the UIKit framework.

UIKit Dynamics Catalog

This sample illustrates a number of uses of UIKit Dynamics.

Video Player Demos

This sample demonstrates renderers for a video player custom control.

View Custom Renderer

This sample demonstrates a custom renderer for a Xamarin.Forms custom control that's used to display a preview video stream from the device's camera.

View Transitions

An example on how to use Core Animation transitions.

ViewCell Custom Renderer

This sample demonstrates a custom renderer for a ViewCell that's hosted inside a Xamarin.Forms ListView control, enabling developers to override the default native rendering with their own platform-specific customization.

ViewControllerPreviews

Displays a UITableViewController that triggers view controller previews.

Visual State Manager Demos

Demonstrates some common usages of the Visual State Manager (VSM).

WatchComplication (watchOS 3)

Sample code for the Xamarin watchOS Complications documentation.

WatchLocalization (watchOS 3)

Sample code for the Xamarin watchOS 3 localization documentation.

WatchTables (watchOS 3)

Sample code for the Xamarin watchOS WKInterfaceTable control documentation.

Way Up Sample

Demonstrates how to autorate to interface orientation.

Weather App

Demonstrates a cross-platform app using Xamarin.Forms that retrieves data from a weather service.

Weather Map

Sample demonstrates using annotations in MapKit by placing weather forecasts above cities.

WeatherApp (Native iOS, Android, and UWP)

Demonstrates a cross-platform app using native UI layers that retrieves data from a weather service.

Working with Colors

This sample demonstrates how to use Xamrin Form's flexible Cross-Platform Color class.

Working with Fonts

This sample demonstrates working with fonts using Xamarin Forms.

Working with Images

This sample demonstrates using application support icons.

Working with ListView

These samples demonstrate how to work with ListView using Xamarin Forms.

Working With Tables

This collection of samples shows how to use a table in Xamarin.iOS

World Cities

A simple example of using the Map Kit API in a Xamarin.iOS application.

WrapLayout

This sample demonstrates an orientation-sensitive WrapLayout class that arranges its children horizontally across the page, and then wraps the display of subsequent children to additional rows.

Xamarin Forms Image Resizer

Demonstrates how to cross-platform load, resize, and display an image on the screen.

Xamarin.Forms Layout Demos

This sample demonstrates a variety of layouts, including Grid, AbsoluteLayout, RelativeLayout, and StackLayout.

Xamarin.Forms Layout Sample: The Business Tumble

This sample, inspired by a corporate social media profile app, demonstrates how to build similar layouts across StackLayout, RelativeLayout, and AbsoluteLayout.

Xamarin.Forms Layout: Handling Device Orientation

This application demonstrates how various layouts can be used to create user interfaces that work well in multiple orientations.

Xamarin.Forms ListView Sample: Binding Context Changed

This sample demonstrates binding context changes in a ListView custom cell in Xamarin.Forms.

Xamarin.Forms ListView Sample: Built-In Cells

This sample demonstrates the built-in ListView cells.

Xamarin.Forms ListView Sample: Custom Cells

This sample demonstrates custom cells with ListView in Xamarin.Forms.

Xamarin.Forms ListView Sample: Grouping

This sample demonstrates how to group items in a Xamarin.Forms ListView.

Xamarin.Forms ListView Sample: Interactivity

This sample demonstrates how to use ListView's interactivity features, including context actions, pull-to-refresh and row selection.

Xamarin.Forms ListView Sample: The Basics

The ListView Basics sample demonstrates populating a ListView with an array of strings, not specifying which ViewCell to use.

Xamarin.Forms ListView Sample: Two-Way Binding with SwitchCell and EntryCell

This sample demonstrates how to collect data using a ListView with SwitchCell or EntryCell.

Xamarin.Forms Text

This sample demonstrates the various views for displaying and entering text available in Xamarin.Forms.

Xuzzle

This sample implements the classic 14-15 puzzle using Xamarin.Forms.

Zooming PDF Viewer

This sample demonstrates how to use CGPDFDocument class to show PDF files in scroll view.