Graphics Programs Reference
In-Depth Information
Now let's make more connections. For each of the
UITextField
s in the XIB file, con-
nect the
delegate
property to the
File's Owner
. (Remember, Control-drag from the
UITextField
to the
File's Owner
and select
delegate
from the list.)
Next, let's consider the
DetailViewController
's
view
. Right now, it has a plain
white background. Let's give it the same background as the
UITableView
. Recall that a
view controller's
view
is not created until the view controller loads it the first time, so
the code to perform extra setup on the
view
should be in
viewDidLoad
. Override this
method in
DetailViewController.m
.
- (void)viewDidLoad
{
[super viewDidLoad];
[[self view] setBackgroundColor:[UIColor groupTableViewBackgroundColor]];
}
Now that this project has a good number of source files, you will be switching between
them fairly regularly. One way to speed up switching between commonly accessed files is
to use
Xcode
tabs. If you double-click on a file in the project navigator, the file will open
in a new tab. You can also open up a blank tab with the shortcut Command-T. The key-
board shortcuts for cycling through tabs are Command-Shift-} and Command-Shift-{.
(You can see the other shortcuts for project organization by selecting the
General
tab from
Xcode
's preferences.)