Tip:
Highlight text to annotate it
X
so create annual iowa's single view application i'm going to call this one
photo viewer
and make sure that it's an i saw an application
and they were using both story boards and automatic reference counting
and i'll just say this to my desktop if i want this to show some photos ever be
useful to have some voters in the south well i do have a folder that i currently
have on my desktop that you can get it from the exercise files
that contains just a few photos in it i'm going to drag the sin tax code
i'm gonna put it in my supporting files folder and when the pop-up appears
i want to make sure that the
checkbox to copy these items
is selected
it doesn't matter that you put them in supporting files although i found that
some of useful place for them
but just simple preform acted images
the right size for an iphone screen
some of the jump
to my main storyboard
that currently here what we have is the basic setup
the view control area with its corresponding dot page and dont m files
in the project navigator
i actually don't want to start here so i'm going to do
is get rid of it
let me just highlight and delete the whole thing
go back to a blank canvas not only that but over here my project navigator
i'm going to delete it they had to file
make sure the completely deleted and the implementation file
so i really am starting from ground zero here
the reason that i did this is actually wants to start this off with a table
view controller
not a regular view controller with mild declined re-open i'm going to find a
table of you control another table view but make sure you got the controller
warm
drag it on
because retracted onto any blank storyboard we do have this little arrow
here the represents being
the and nishal view controller
and if i look to the attributes inspector will also see that check to
the initial scene and this is the initial view controller
then i'm going to drag on a regular you control of this is the one that's going
to display our photo
and then a third and this is going to show the information about our photo
i know that my first cable view control is also going to be imbedded in a
navigation controller
so that we can do a push segue between it
who on the displays the image
so i'm going to do is selected the table view controller go up to my editor
and tell it to embed in
and navigation controller
now i'm going to add a couple of segments
buddhism into full size here
another what i want to have happen is when someone talks to sell
and the table view controller we're going to move to the second you control
of the will display that photo
here's how we do that segue
in the storyboard i simply hold on the control key
the blank cell
and drag over to that second you controller let go
they will ask what kind of segway is this
i say it's a push segue
and in those now because the first one was embedded in the navigation
controller and we're pushing to the second
but it's also going to embed that in the navigation control too
now i do want this second view controller to move to the third
but i don't want to have a push segue i want to modal segera him
and something needs to trigger a modal segue
so i'm going to open up my utilities panel
filter down to controls and drag on a round wrecked button
position at their
committed double click and save
details
this view controller is of course also showing
and image on it sunday to switch to the date of your section of the object
library
fine the image of you
drag that in there
and make sure that it's sized appropriately
it's currently going to be over the top of my bum
so i can use the expanded window here to make sure that it's behind them
next i'm gonna make sure the button and select it so i can see the grab handles
around it
i'm going to have my control keep and control drag
to the final view controller
this will be a mogul segue mostly had a manipulate that in a moment
and this final screen is going to show his information about that image
so for that
i'm just going to do a couple of things
i'll just click the blanks area to select the few i want to change the
background to say hey light gray color
of drag on the label
from the object library
uh... widen the sound a little bit
and perhaps even use the attributes inspector to manipulate the font or the
text-color
changes a system bolt for example
now the moment of labeled would only show one line of tax that's what it's
limited to so one more thing i'm going to change it to you is at the top of the
attributes inspector change this to lines supported on zero that allows it
to be multi line
and we will need a way of dismissing this view controller won't have a
backbone because it won't be
in the navigation controller some of the ad on another button
his position and down the bottom
double click it and say
mizuno take a look at this
looks ok the only thing i'm going to do and i don't have to
is on the table view
is going to zoom in here and double click the first navigation bar
to say something like photos
we'll talk about how to set the title of that bar
for other scenes in a moment
so i have my storyboard
the next step is
i need to do some crap on this i'd need to create the custom class that we're
going to use
to pass between these different scenes