Creating a modal box with buttons

A modal box is similar to a conventional dialog window used by web and desktop applications. It appears as a response to an event. For instance, when a user clicks on a button then the click event is launched. This modal box can contain some buttons to launch different events or actions, and it is useful for offering different choices to the user without leaving the current page. The appearance of the modal box is not the same as the rest of the widget of the page. It is showed with a black background color at the bottom of the page. We will look at the process of building these kind of widgets in this recipe.

Getting ready

We go back to use the UiUIKit framework as it includes a specific widget for building this ...

Get iPhone JavaScript Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.