# Quick Start: Display a C1Calendar Control

## Content



This section describes how to add a C1Calendar control to your iOS app and select a date on the calendar at runtime.

The following image shows how C1Calendar appears after completing the above steps.

![](https://cdn.mescius.io/document-site-files/images/1398d806-ac3c-4763-a9b3-2c7a2f5b49fb/images/calendarios_quickstart.png)

#### Step 1: Initialize Calendar control in code

To initialize a **C1Calendar** control, open the ViewController file from the Solution Explorer and replace its code with the code below. This code overrides the **ViewDidLoad** method of the View controller in order to initialize a C1Calendar.

```csharp
using C1.iOS.Calendar;
using CoreGraphics;
using System;
using UIKit;
namespace CalendariOS
{
    public partial class ViewController : UIViewController
    {
        //Initialize Calendar controlS
        C1Calendar calendar = new C1Calendar();
        public ViewController(IntPtr handle) : base(handle)
        {
        }
        public override void ViewDidLoad()
        {
           base.ViewDidLoad();
           this.Add(calendar);
        }
        public override void ViewDidLayoutSubviews()
        {
            base.ViewDidLayoutSubviews();
            calendar.Frame = new CGRect(this.View.Frame.X, this.View.Frame.Y,
             this.View.Frame.Width, this.View.Frame.Height);
        }
    }
}
```

#### Step 2: Run the Application

Press **F5** to run the application.