Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Latest commit

 

History

History
60 lines (38 loc) · 2.19 KB

README.md

File metadata and controls

60 lines (38 loc) · 2.19 KB

#UIKit The UIKit framework is a collection of classes specially designated to help display and minupulate things on screen. Every button, label, map and table finds it's origin in the UIKit framework.

####Connecting the Dots For the last few weeks, we have been discussing classes, the blueprints for things you want to model. UIKit uses classes to model user interface elements like labels and text fields. Creating a UIKit object is just like creating any other kind of object.

Labels Labels are great for displaying static text on your screen. Use this for displaying basic content in your app.

Here is an example of creating a label (UILabel):

UILabel *myLabel = [[UILabel alloc] init];

Here are a few examples of UILabels with different colors:

Text Fields Text Fields take in user text to be processed by your app.

Here is an example of creating a text field (UITextField):

UITextField *myTextField = [[UITextField alloc] init];

Here an example of a UITextField:

UIButton Buttons allow for basic selection to trigger some kind of event.

Here is an example of creating a button (UIButton):

UISegmentedControl *mySegmentedControl = [[UISegmentedControl alloc] init];

Here an example of a UIButton with a rounded border:

UISegmentedControl Segmented controls allow you to select one option out of many. This control is used in many of the iOS core apps including iTunes and the App Store.

Here is an example of creating a segmented control (UISegmentedControl):

UISegmentedControl *mySegmentedControl = [[UISegmentedControl alloc] init];

Here an example of a UISegmentedControl at the top of the iOS Notification Center:

####Other UI Elements

There are plenty of other UI Elements to use in your app. Open Xcode and experiment for your self!