Xcode 4.3 and iOS 5 Dynamic UILabels And UITextFields Example

Part of the iOS Category.

Besides the built-in capability to design UIView Elements using iOS 5 StoryBoard, it is possible to create UI Elements on-the-fly and position them according to your needs.

This is a project I created to help me learn about dynamic views. The important code to review is in ViewController.m and ViewController.h. It has comments to better help you understand the flow. 🙂

When the project is run in the Simulator, this is how it appears. The section with the yellow background is where the dynamic creating and placement of the UILabels and UITextFields takes place.

The project code, ‘property_array_example.zip‘ may be downloaded here.

Enjoy!

Did you like this? Share it:

About Don Larson

Using computer technology since June 1980.
This entry was posted in Education, iOS, iOS Tutorials, Native Apps, Technology. Bookmark the permalink.