YouTube how to make first app

I’m following the step by step tutorial on YouTube for how to build an app. I’m in lesson 2 auto layout. I have created 3 buttons and added backgrounds. The first sign in with Facebook button looks way smaller than the other 2. How can I fix this, any thing I do, it starts giving me red mark errors.

Sorry if this is a silly question, just getting started.

I remember following this tutorial and everything worked OK for me. Sounds like you may have missed something so maybe go back over the video again.

I am also following the same tutorial and I have dowloaded the materials and see the image for the Facebook button, but I have no idea how to add this to the project.
I know it must be easy and something I just missed.

How is this done?

@Eagle442BR
The images that you downloaded as part of the course assets need to be dragged into your assets catalogue inside the project which is the folder titled Assets.xcassets.

  • Unzip the downloaded file
  • Click on the Assets.xcassets folder in your project so that it is the active folder in your project
  • select all the images in the folder you have just unziped
  • drag them into your project and drop them just below the AppIcon as shown in the attached screen shot.

Chris does cover that aspect as the lesson progresses but in the early part the lesson he talks about how constraints work.

Thanks for the quick response. That did the trick!

When I add the background image and add the constraints of 0 to the view and turn off constrain to margins the image does not go edge to edge on all devices.

Compare the following:

Is this because of the different resolution of the devices? I was expecting auto layout to take care of this?

Also, I don’t see the iPhone 8 in the device list just the iPhone 8 Plus?

Any ideas why this is the case?

Thanks

Check your constraints.
You may be constraining to a safe area or adding unnecessary padding

Finally got back on this today but still can’t find what I did wrong. Take a look at this image maybe you can spot my error.

Thanks

Check your constraints again. Click on the Edit option for each constraint and ensure that the leading and trailing constraints have 0 in the constant field.

The other thing to check under the Attributes Inspector is that you have the Content Mode for the View set to Aspect Fill.

1 Like

Thanks! it was the Aspect Fill that fixed the issue.


Hi, I’m having trouble adding the images as well. I looked for the Assets.xcassets and I can only see it from the top? I don’t see it in the side view. When I access it in the way I’ve shown here, I try and drag and drop, but they still are not getting imported. What else can I try?