iOS Development #01
iOS Development #01
iOS Development #01
Xcode
Open a new project in Xcode.
Select “iOS” under “multiplatform”
Select “App” under “application”
hit “next”
say “I Am Rich” under “project name”
say “com.yourname” under “organization identifier”
Select “Storyboard” in “interface” dropdown menu
Select “swift” in “Language” dropdown menu
main.storyboard
We will focus on main.storyboard for now.
Add a label
click the “+” sign in the upper right corner.
drag “label” to the canvas.
click the rectangle and see attribute inspector and size inspector
Attribute Inspector
to set color and font
Size Inspector
To set the x, y position and width, height
What is x, y, width, hight? Google paintcodeapp ultimate guide to iphone resolution.
Set background color
select view and go to attribute inspector to set background color.
color can be customized. Google colorhunt.co
Insert image and set size and position
drag image view to canvas
image view is a picture frame.
We can change the size, color of it in Attribute inspector and size inspector.
Pictures goes inside.
To insert picture, go to attribute inspector.
set position and width height
Add image to Image View
drag .png file into Assets.xcassets folder
picture goes to 1x automatically.
2x 3x will increase the resolution and gives a sharper image.
Google appicon.co to generate 1x 2x 3x image.
delete the earlier diamond image and drag the new diamonds 2x 3x .png file into assets folder.
Now ready to use assets.
click the dropdown and see diamond
Add app icon
Google canva.com to create a new design.
Google appicon.co to generate different resolution of app icon.
unzip and notice the same naming convention as in Xcode.
simply drag the downloaded folder and replace the folder in the project folder, so that all the slots are automatically filled.