Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying iOS Development with Xamarin Cookbook
  • Table Of Contents Toc
iOS Development with Xamarin Cookbook

iOS Development with Xamarin Cookbook

By : Dimitrios Tavlikos (USD)
4 (13)
close
close
iOS Development with Xamarin Cookbook

iOS Development with Xamarin Cookbook

4 (13)
By: Dimitrios Tavlikos (USD)

Overview of this book

Table of Contents (22 chapters)
close
close
iOS Development with Xamarin Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1
Index

Loading a view with a view controller


In this recipe, we will learn how to use the UIViewController class to manage views.

Getting ready

Create a new iPhone Empty Project in Xamarin Studio and name it ViewControllerApp.

How to do it...

Perform the following steps to load a view with a view controller:

  1. Add a new file to the project.

  2. Right-click on the project in the Solution pad and go to Add | New File….

  3. In the dialog that will appear, select iPhone View Controller from the iOS section. Name it MainViewController and click on the New button. Xamarin Studio will create a new XIB file and will automatically open the MainViewController.cs source file. This file contains a class that overrides the UIViewController class, and we can implement any code related to our view controller in it.

  4. Open the MainViewController.xib file in Interface Builder.

  5. Add UILabel on the view.

  6. Create and connect an outlet for it inside the MainViewController class and name it myLabel.

  7. Enter the text View in controller! in the...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
iOS Development with Xamarin Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon