image view
component that is stretched to fill the whole screen
Content Mode
under the View
section in the right sideAspect Fit
: keeps the ratio of the imageScale to Fill
: STRETCHES the image to fitAspect Fill
: increases the ratio proportionally to fit the imageview
option
then drag to new locationViewController.swift
Main.storyboard
and ViewController.swift
are 2 different files, you need to link
somehow:
Main.storyboard
and then select Assistant
so that the design
is on one side and the code editor is on the right side of itcontrol
and drag it to the editor before the viewDidLoad()
with the following options:
Name
: give the component a specific name (camelCased)
Refactor
Rename
. This picks up all areas where the name is used and will rename it.imageView
component:
image
property:
component.image = imageLiteral -> tab -> click on the image to select which image to use
ctrl
+ drag)Outlet
Type
to UIButton
Connect
Touch up Inside
means that the user landed within the boundaries of the button and was lifted up
when they released from within the boundary.imglit
-> tab and THEN surround with []
var
keyword