Last updated by at .

iOS Programming Recipe 17: Using UISS To Theme Your Application

This Week I thought I would explore A nice iOS library which allows you to customize the look and feel of your application. While this library is built on UIAppearance, it extends it by introducing a CSS like way of defining the look and feel. We already had a recipe on UIAppearance, so we’ll start by creating the same thing and then explore customizations.

Assumptions

Setting Everything Up

Creating the Project

To get started we’ll need to create a new project and add the UISS library to it using cocoapods.

  • Create a new project and title it “Recipe17UsingUII”. Make sure to use ARC and select iPhone from the devices.

[Read more…]

iOS Programming Recipe 8: Using UIAppearance For A Custom Look

Everyone wants to make their app look unique! Well the UIAppearance protocol can help you! In iOS 5.0 Apple introduced the UIAppearance proxy API which allows you the developer to customize many of the appearance aspects of UIKit elements. I know what you’re thinking… Can’t I already do that? Well sure, but not on the same scale as UIAppearance will allow, and furthermore, changing the appearance of UI components on a per object basis gets really old, really fast.

So let’s dive into an example right quick…

Say you have an app with a UINavigationBar and you want something other than the default background color (tint color). You would probably try something similar to the following


[self.navigationBar setTintColor:myColor];

Then you decide another part of your app needs a navigation bar and you end up writing the same code to change the background color for that one as well. This continues as time goes on and before long you end up with an unmanageable mess, leaving you sad and depressed wishing there was a better way… enter UIAppearance…

[Read more…]

css.php
Privacy Policy