Book Image

iOS Development with Xamarin Cookbook

By : Dimitrios Tavlikos (USD)
Book Image

iOS Development with Xamarin Cookbook

By: Dimitrios Tavlikos (USD)

Overview of this book

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

Styling views


iOS provides a set of APIs through the UIAppearance protocol that allows us to adjust the appearance of the views once, without having to explicitly modify the styling properties on every instance of each view. This is particularly useful if, say, we want a specific view to have the same appearance throughout the app.

Apart from setting the styling properties of a view globally, we can also define the appearance of this view to be different under certain circumstances. Read on to find out how to accomplish this.

Getting ready

We will work on the existing CustomViewApp project we created in the preceding recipe. Open the project in Xamarin Studio.

Note

The downloadable code contains a separate project for this recipe. It is named CustomViewApp2.

How to do it…

Perform the following steps to complete this recipe:

  1. Open the CustomViewAppViewController.xib file in Xcode.

  2. Resize the MyView object, which we created earlier, to make some room at the top.

  3. Add a UILabel above the MyView object...