Getting Started with Custom UIControls
At this point, your app has data in all of its screens, but the Restaurant Detail screen is incomplete. You can’t set a star rating for a restaurant, and you can’t add photos or reviews.
You have been using Apple’s standard UI elements so far. In this chapter, you’ll create a custom subclass of the UIControl
class that displays restaurant ratings in the form of stars. You’ll modify this subclass so users can set a rating for a restaurant by tapping it. After that, you’ll implement a review form that allows users to submit restaurant reviews.
By the end of this chapter, you’ll have learned how to create custom UIControl
classes, handle touch events, and implement review forms for your own apps.
The following topics will be covered in this chapter:
- Creating a custom
UIControl
subclass - Displaying stars in your custom
UIControl
subclass - Adding support for touch events...