Your First iOS and SwiftUI App |

If you're a complete beginner to iOS and SwiftUI development and wondering how to get started, this is the course for you.

This is a companion discussion topic for the original entry at
1 Like

Hi Ray! Are there another (e-mail, text) versions of this and another courses?

Hi Joe - if you want this course in text form, check out our book the iOS Apprentice. The early access version of the 8th edition, which includes the content from this course in text form, is out today! :]

1 Like

Hi Ray!

I’ve done lessons 1-46, so I’ve got a working app but for some reason on my phone (iPhone SE) the buttons aren’t displayed correctly like in the simulator. They have the right shape but they’re the ‘midnightBlue’ colour. I’ve checked if that’s also the case with your app to check if it was my mistake but it’s also a problem with your app. Everything else but that is fine. Have you got an idea why it’s happening and how to fix it? I’ve got all the updates on both my mac and iPhone. Stackoverflow didn’t really help.

Thanks in advance!

Edit: found a solution on this website:

Just need to add this line:


to the Button

@kammahha Thank you for sharing your solution - much appreciated! :]

I ran the Bullseye project on the simulator and noticed that the Info button only works the first time you press it. Afterwards it does nothing. I checked it on my phone and it works as expected so the problem is with the simulator.
I tried this on another I am writing and ran into the same problem.
Do you know if there is a way to get the simulator to work correctly?

@dianehoff Do you still have issues with this?

Last time I checked (last week) it had the problem. But I have moved on to other projects and have not looked at it recently. Do you know if anyone else saw a similar issue or could it be an issue with my computer?


Diane - I am having the same problem.

I am having strange issue before .padding worked but when I added navigationBarTitle the padding gives "“Int: is not Convertible to 'CGFloat?”

Here is part of the code:
.padding(.bottom, 20)
.background(Image(“Background”), alignment: .center)

If I remove padding from the code then the error goes to:

Error says: Type of expression is ambiguous without more context. I tried removing self but still has a error

Hi there! My name is Nikita. I’m from Russia. In my opinion, this course is awesome. The first app on the first course, wow! To be honest, my English is not very good, but I understand almost everything. I will be happy to recommend this course to my friends. Thanks Ray!

A conversation over on Stack Overflow indicates that this is a bug fixed in v11.4 of Xcode.

@tyfightercode Do you still have issues with this?

@niketracer Really glad you enjoy it! Cheers! :]

Ray, I have a question.
In the app you defined a custom view modifier struct called LabelStyle .
struct LabelStyle : ViewModifier {
func body(content: Content) -> some View {
return content.foregroundColor(Color.white)
.shadow(color:, radius: 5, x: 2, y: 2)
.font(Font.custom(“Arial Rounded MT Bold”, size: 18))

After that you used this LabelStyle to style/modify the text like below. You created an instance of LabelStyle() and pass it s an argument to modifier function
HStack {
Text(“Put the bullseye as close as you can to:”).modifier( LabelStyle() )
Generally I get all of these but there are a few things I want to understand.

1- In the LabelStyle struct we wrote body function and this function is doing all the styling work and returns the styled view. However when we use LableStyle we only created a instance of it and passed it to modifier function(.modifier( LabelStyle() )). We never called body method for the instance we created. How/when/where this body method is called? Could you please explain this with an example?

2- Could we call this body method manually and style a text instead of using modifier method? Is so please could you example?


With the new swiftUI 2.0 there is a new app structure I got all the way to adding the info page and I have no app delegate… so I guess I lucked out… was close to getting it finished…

Hi Ray! I just finished Your First iOS and SwiftUI App, but when I tried to run the app on my iPhone 8 Plus, I encounter some layout problems, it looks like the app doesn’t really fit on the screen of my phone. There is such a way to create app with an auto layout? On the subscriber tutorials I will performe this kind of issue?

Hi @rwenderlich,

Thanks for the excellent content. I’m new to iOS development as well as iPhones (don’t own a one yet). I’m really sorry for asking this here but would you mind sharing your experience by recommending a particular device to buy as a developer?

The new iPhone series is down the line and it’s rumoured to have a LiDAR Scanner. Do you think these features worth for the future-proof development?

Thank you!

Thanks, this is a fantastic beginners tutorial. It stopped working for me after upgrading to iOS 14. Will there be an update version of the SwiftUI app tutorial video or book for iOS 14 and Xcode 12 soon?

Yes! I have recorded a massive update/overhaul to this course, which includes (among many other things) a total redesign of the app that showcases some cool features of SwiftUI.

The course is currently in editing, and should be published on our site soon. :heart: