Book Image

Application Development in iOS 7

By : Kyle Begeman
Book Image

Application Development in iOS 7

By: Kyle Begeman

Overview of this book

Table of Contents (15 chapters)
Application Development in iOS 7
About the Author
About the Reviewers

Finishing our menu view

Our buttons tend to blend into the background slightly, so let's add a new view that will help them stand out better. First, let's navigate to our storyboard and create a new outlet for our background image. Select our MenuViewController class, and open the assistant editor. Control drag from the background image in our storyboard to the MenuViewController.h file (between @interface and @end). Name this outlet mainBackground. Now switch to MenuViewController.m, and add the following code to ViewDidLoad:

// Create a white transparent bar for the bottom of the screen
// Set the color to white with an alpha of 0.5
UIView *bottomBarBG = [[UIView alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height - 130, self.view.bounds.size.width, 130)];
bottomBarBG.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.5f];

// Add the view to the background
    [self.view insertSubview:bottomBarBG aboveSubview:self.mainBackground];

The first line creates a new UIView and...