Understood! Thank you.
Post
Replies
Boosts
Views
Activity
So UIKit is used by the storyboard in Xcode and SwiftUI is used by the normal mode. Right?
Okay, so can I attend them also if I'm a beginner?
Ok don’t worry it’s ok. Just for confirmation the drawings will in png right?
Ok thank you very much!
I want to create my images, so I want to draw them and then insert to Xcode. But how can I draw them?
Hello there! Are you over 18 or the majority of age in your country? You can only enroll to the Apple Developer Program if you are over 18.
Hello,
Apple Support offers a support for everyone 24/7. Unfortunately in Developer Support there isn’t the chat option but you can decide to send an email to them or phone call them. Actually I haven’t understood the question, and why you cannot phone the support, in fact once you book the call you’ll receive an email with written on it “Talk you soon” and the time you have the call then they’ll phone you. But if you can’t book your call, you have the possibility to send an email. Hope that I have resolved your doubt.
Hi!
Can you please explain more in deep what is exactly the problem, why you can’t enroll?
For publishing apps on App Store you must have to be over the majority of the age in your country. If you are minor you can publish apps under one of your parents name.
So you have to enroll at the Apple Developer Program with your parent's name, id, etc.
Excuse me what is your question? Please write here if you want to ask something.
Oh thank you very very much! I actually can’t find the code I have searched a lot in the website, I really thank you for the help!
I have defined aspectRatio here:
struct ContentView: View {
let viewModel: EmojiMemoryGame
@State var aspectRatio = 1
Ps: I understand that is really hard to keep track of the code in this way but I do the possible to make it easy.
Yes I was responding to you. It seams that you changed something, I'm sorry.
Now I have tried to put CardView(card: card).aspectRatio(2.0, contentMode: ContentMode.fit) into my code and then put @State before aspectRatio. So this the updated code:
import SwiftUI
struct ContentView: View {
let viewModel: EmojiMemoryGame
@State var aspectRatio = 1
var body: some View {
let emojis = ["😀", "😍", "🤪", "😱", "🥶", "🤑", "😡", "🤠", "🥳", "🤩", "🥴", "😴", "😪", "😶🌫️", "😈", "🤯", "🤐", "🤗"] //WARNING: Initialization of immutable value 'emojis' was never used; consider replacing with assignment to '_' or removing it. Replace 'let emojis' with '_'
var emojiCount = 4
VStack {
LazyVGrid(columns: [GridItem(), GridItem(), GridItem()]) {
ForEach(viewModel.cards) { card in
CardView(card: card).aspectRatio(2.0, contentMode: ContentMode.fit)
}
}
.padding()
.foregroundColor(Color(.systemTeal))
Spacer()
Button {
emojiCount += 1
if emojiCount == 10 {
aspectRatio = 9/3
}
if emojiCount > 17 {
print("Card finished")
}
} label: {
Text("Add Card")
}
}
}
}
struct CardView: View {
let card: MemoryGame<String>.Card
var body: some View {
ZStack {
let shape = RoundedRectangle(cornerRadius: 20)
if card.isFaceUp {
shape.fill().foregroundColor(.white)
shape.stroke(lineWidth: 3)
Text(card.content).font(.system(size: 50))
} else {
shape.fill(.orange)
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView(viewModel: game) //Cannot find 'game' in scope
}
}
Now it gives me one Warning and an Error :(
I tried to copy and paste your code, but it's still not working. I really don't know how to figure out this