Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Button is not tappable if an Image is followed in a VStack
Set the width and it works: .frame(width: 240, height: 240) Or change aspect ratio: .aspectRatio(contentMode: .fit)// .fill) Problem is that image (with fill aspect or without width) overlays the button, as you can see with this: Image(systemName: "square.and.arrow.up") .resizable() .aspectRatio(contentMode: .fill) .foregroundStyle(Color.black) .frame(height: 240) .border(Color.blue, width: 2) .clipped() .onTapGesture { print("Tapped the image") } You can visualise if you do not clip: Image(systemName: "square.and.arrow.up") .resizable() .aspectRatio(contentMode: .fill) .foregroundStyle(Color.black) .frame(height: 240) .border(Color.blue, width: 2) // .clipped()
Topic: UI Frameworks SubTopic: SwiftUI
Apr ’25
Reply to Simulate run/ bike move
Effectively, that should move: https://sarunw.com/posts/how-to-simulate-location-in-xcode-and-simulator/ But you should try with freeway drive (move will be larger and hence more visible, depending on the map scale). If you want to build your own GPX file: https://developer.apple.com/forums/thread/766507
Apr ’25
Reply to Xcode Build Failure
May be because image is upside down 😉 When you post a message, make it easy to use: image in correct orientation complete code so that one can test, in text, not only screenshot full error message Seems it is a problem to type check shelterViewModel.getShelter (row: row, column: column).productId == ViewConstants.LAYOUT_DUMMY_ what is productId type ? How are ViewConstants defined ? What is .LAYOUT_DUMMY_ ? Which type ? If it is not exactly the same as productId, then the error. Note: tests as shelterViewModel.getShelterOperationFormat() != true may be written !shelterViewModel.getShelterOperationFormat()
Apr ’25
Reply to How do I use "views" and structures / what's wrong with my code?
what's wrong with my code? Sorry to say, nearly everything. There are so many errors everywhere. You should start studying Swift first. As DarkPaw said, AI (ChatGPT or other) does not replace plain intelligence. It seems you don't even understand your own code, isn't it ? There are even many typos in code: extra } Balls[].xPosition is wrong syntax. What do you mean here ? The problem for the error message (there are likely many other) is you call for item in Balls You have to use ForEach in a view. In addition, Balls is not an array, even less an instance of array. And View struct should be outside of the class. Otherwise, how do you plan to access it ? Here is a start to correct those many errors: class Balls: Identifiable { //var color: String var xPosition: Int var yPosition: Int var xVelocity: Int var yVelocity: Int var radius: Int var gravity: CGFloat var restitution: Int var other: Balls? init(xPosition: Int, yPosition: Int, xVelocity: Int, yVelocity: Int, radius: Int, gravity: CGFloat, restitution: Int) //ADD COLOR { //self.color = color self.xPosition = xPosition self.yPosition = yPosition self.xVelocity = xVelocity self.yVelocity = yVelocity self.radius = radius self.gravity = gravity self.restitution = restitution } } struct UserView: View { let ball1: Balls = Balls (xPosition: 100, yPosition: 100, xVelocity: 3, yVelocity: 0, radius: 3, gravity: 0.3, restitution: 1) let ball2: Balls = Balls (xPosition: 200, yPosition: 50, xVelocity: -2, yVelocity: 2, radius: 3, gravity: 0.3, restitution: 1) let ball3: Balls = Balls (xPosition: 300, yPosition: 150, xVelocity: 4, yVelocity: -3, radius: 3, gravity: 0.3, restitution: 1) var timer = Timer.publish(every: 0.01, on: .main, in: .common).autoconnect() @State var balls: [Balls] init() { balls = [ball1, ball2, ball3] } var body: some View { VStack { //Background color Color.gray.edgesIgnoringSafeArea(.all) //var balls [Int] = [ball1; ball2; ball3] // for item in Balls { ForEach($balls) { $ball in // You change ball later, so a binding here Circle() .fill(Color.black) .frame(width: 50, height: 50) .position(x: CGFloat($ball.xPosition.wrappedValue), y: CGFloat($ball.yPosition.wrappedValue)) // Wrappedvalue because ball is a binding .onReceive(timer) { _ in // Need on argument in the closure // self.yVelocity += self.gravity // self refers to View, not to a ball ball.yVelocity = ball.yVelocity + Int(ball.gravity) // One is Int, the other Float. Why ? That forbids += // ball.xPosition = CGPoint(ball.xPosition + ball.xVelocity) // That's not a CGPoint, needs 2 arguments ball.xPosition = ball.xPosition + ball.xVelocity ball .yPosition = ball.yPosition + ball.yVelocity if ball.yPosition >= 500 - 25 { ball.yPosition = 500 - 25 ball.yVelocity = -ball.yVelocity * ball.restitution } if ball.xPosition <= 25 { ball.xPosition = 25 ball.xVelocity = -ball.xVelocity } if ball.xPosition >= 375 { ball.xPosition = 375 ball.xVelocity = -ball.xVelocity // I suppose that's what you mean insted of ball.velocityX } /* errrors below you'll have to correct yourself let dx: int = other.xPosition - self.xPosition let dy: int = other.yPosition - self.yPosition let distance: int = sqrt (dx * dx + dy * dy) if distance < self.radius + other.radius { self.xVelocity = -self.xVelocity * self.restitution self.yVelocity = -self.yVelocity * self.restitution other.xVelocity = -other.xVelocity * self.restitution other.yVelocity = -other.yVelocity * self.restitution } */ } } } } }
Topic: UI Frameworks SubTopic: SwiftUI
Apr ’25
Reply to 4.3a then 3.2f
What a long post just to explain your app was rejected. BTW, what is section 3.2f you refer in your title ? I do not see it in the guidelines. PS: you have posted several times for the same issue and show that you have received a confirmation by reviewer of clause 4.3. And I don't think your financial "proposal" will help in anyway, will probably have inverse effect. So it is not really useful to repeat the same message again.
Apr ’25
Reply to App stops responding to touch; works normally otherwise
Looks like the issue is not specific to your app. https://www.reddit.com/r/iphone/comments/1gnssap/iphone_apps_occasionally_stop_responding_to_touch/?rdt=53523 Did you file a bug report ? PS: if you google search for "iphone apps not responding to touch", you'll get a lot of similar reports as well as some videos explaining how to solve. Don't know how useful they are though.
Apr ’25
Reply to SwiftUI Button is not tappable if an Image is followed in a VStack
Set the width and it works: .frame(width: 240, height: 240) Or change aspect ratio: .aspectRatio(contentMode: .fit)// .fill) Problem is that image (with fill aspect or without width) overlays the button, as you can see with this: Image(systemName: "square.and.arrow.up") .resizable() .aspectRatio(contentMode: .fill) .foregroundStyle(Color.black) .frame(height: 240) .border(Color.blue, width: 2) .clipped() .onTapGesture { print("Tapped the image") } You can visualise if you do not clip: Image(systemName: "square.and.arrow.up") .resizable() .aspectRatio(contentMode: .fill) .foregroundStyle(Color.black) .frame(height: 240) .border(Color.blue, width: 2) // .clipped()
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Apr ’25
Reply to Multiple Info.plist related errors occur when uploading an Apple Watch app
You should ask on Flutter support. Issue may be a bad version of Flutter, or missing file….
Replies
Boosts
Views
Activity
Apr ’25
Reply to Simulate run/ bike move
Effectively, that should move: https://sarunw.com/posts/how-to-simulate-location-in-xcode-and-simulator/ But you should try with freeway drive (move will be larger and hence more visible, depending on the map scale). If you want to build your own GPX file: https://developer.apple.com/forums/thread/766507
Replies
Boosts
Views
Activity
Apr ’25
Reply to Xcode Build Failure
May be because image is upside down 😉 When you post a message, make it easy to use: image in correct orientation complete code so that one can test, in text, not only screenshot full error message Seems it is a problem to type check shelterViewModel.getShelter (row: row, column: column).productId == ViewConstants.LAYOUT_DUMMY_ what is productId type ? How are ViewConstants defined ? What is .LAYOUT_DUMMY_ ? Which type ? If it is not exactly the same as productId, then the error. Note: tests as shelterViewModel.getShelterOperationFormat() != true may be written !shelterViewModel.getShelterOperationFormat()
Replies
Boosts
Views
Activity
Apr ’25
Reply to Xcode use window 11 laptop 6 GB 512 GB storage
This is a forum for Apple products, not other platforms. Better ask on Microsoft support forum.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to How to make a UIButton resize its custom font text using `configurationUpdateHandler`?
loginButton.configurationUpdateHandler is called only on change of button state. So, have you checked the handler is ever called ? See details here: https://sarunw.com/posts/dynamic-button-configuration/
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to App Rejected Again - iPad Issue Despite Removing iPad Support
Welcome to the forum. My understanding is that any app, even if targetting only iPhone, must work on iPad in iPhone mode. Is that the case for your app ? How is it it does not work on iPad (have you found the bug door cause) ?
Replies
Boosts
Views
Activity
Apr ’25
Reply to General question about use of disassembled Apple products.
I'm not sure the forum is the right place to ask for legal advice. I'm pretty convinced no one at Apple will answer or even give a hint. And developers are not necessarily legal experts. So the best advice is probably: ask your lawyers and brace for the following if you decide to go.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to UIButton
Could you show a screenshot of the button ? And show the code as well ?
Replies
Boosts
Views
Activity
Apr ’25
Reply to How to screenshot?
have a look here if that can help: https://superuser.com/questions/1383379/is-there-a-way-on-macos-to-take-a-screenshot-of-a-region-and-paste-it-in-a-singl
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to How do I use "views" and structures / what's wrong with my code?
what's wrong with my code? Sorry to say, nearly everything. There are so many errors everywhere. You should start studying Swift first. As DarkPaw said, AI (ChatGPT or other) does not replace plain intelligence. It seems you don't even understand your own code, isn't it ? There are even many typos in code: extra } Balls[].xPosition is wrong syntax. What do you mean here ? The problem for the error message (there are likely many other) is you call for item in Balls You have to use ForEach in a view. In addition, Balls is not an array, even less an instance of array. And View struct should be outside of the class. Otherwise, how do you plan to access it ? Here is a start to correct those many errors: class Balls: Identifiable { //var color: String var xPosition: Int var yPosition: Int var xVelocity: Int var yVelocity: Int var radius: Int var gravity: CGFloat var restitution: Int var other: Balls? init(xPosition: Int, yPosition: Int, xVelocity: Int, yVelocity: Int, radius: Int, gravity: CGFloat, restitution: Int) //ADD COLOR { //self.color = color self.xPosition = xPosition self.yPosition = yPosition self.xVelocity = xVelocity self.yVelocity = yVelocity self.radius = radius self.gravity = gravity self.restitution = restitution } } struct UserView: View { let ball1: Balls = Balls (xPosition: 100, yPosition: 100, xVelocity: 3, yVelocity: 0, radius: 3, gravity: 0.3, restitution: 1) let ball2: Balls = Balls (xPosition: 200, yPosition: 50, xVelocity: -2, yVelocity: 2, radius: 3, gravity: 0.3, restitution: 1) let ball3: Balls = Balls (xPosition: 300, yPosition: 150, xVelocity: 4, yVelocity: -3, radius: 3, gravity: 0.3, restitution: 1) var timer = Timer.publish(every: 0.01, on: .main, in: .common).autoconnect() @State var balls: [Balls] init() { balls = [ball1, ball2, ball3] } var body: some View { VStack { //Background color Color.gray.edgesIgnoringSafeArea(.all) //var balls [Int] = [ball1; ball2; ball3] // for item in Balls { ForEach($balls) { $ball in // You change ball later, so a binding here Circle() .fill(Color.black) .frame(width: 50, height: 50) .position(x: CGFloat($ball.xPosition.wrappedValue), y: CGFloat($ball.yPosition.wrappedValue)) // Wrappedvalue because ball is a binding .onReceive(timer) { _ in // Need on argument in the closure // self.yVelocity += self.gravity // self refers to View, not to a ball ball.yVelocity = ball.yVelocity + Int(ball.gravity) // One is Int, the other Float. Why ? That forbids += // ball.xPosition = CGPoint(ball.xPosition + ball.xVelocity) // That's not a CGPoint, needs 2 arguments ball.xPosition = ball.xPosition + ball.xVelocity ball .yPosition = ball.yPosition + ball.yVelocity if ball.yPosition >= 500 - 25 { ball.yPosition = 500 - 25 ball.yVelocity = -ball.yVelocity * ball.restitution } if ball.xPosition <= 25 { ball.xPosition = 25 ball.xVelocity = -ball.xVelocity } if ball.xPosition >= 375 { ball.xPosition = 375 ball.xVelocity = -ball.xVelocity // I suppose that's what you mean insted of ball.velocityX } /* errrors below you'll have to correct yourself let dx: int = other.xPosition - self.xPosition let dy: int = other.yPosition - self.yPosition let distance: int = sqrt (dx * dx + dy * dy) if distance < self.radius + other.radius { self.xVelocity = -self.xVelocity * self.restitution self.yVelocity = -self.yVelocity * self.restitution other.xVelocity = -other.xVelocity * self.restitution other.yVelocity = -other.yVelocity * self.restitution } */ } } } } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Apr ’25
Reply to Legal Entity is different from domain name
Your email could be @gmail.com, which is obviously not your company name. So, AFAIK, there is no issue there.
Replies
Boosts
Views
Activity
Apr ’25
Reply to 4.3a then 3.2f
What a long post just to explain your app was rejected. BTW, what is section 3.2f you refer in your title ? I do not see it in the guidelines. PS: you have posted several times for the same issue and show that you have received a confirmation by reviewer of clause 4.3. And I don't think your financial "proposal" will help in anyway, will probably have inverse effect. So it is not really useful to repeat the same message again.
Replies
Boosts
Views
Activity
Apr ’25
Reply to App stops responding to touch, is working normally otherwise
That's a duplicate. See answer in the other thread.
Replies
Boosts
Views
Activity
Apr ’25
Reply to App stops responding to touch; works normally otherwise
Looks like the issue is not specific to your app. https://www.reddit.com/r/iphone/comments/1gnssap/iphone_apps_occasionally_stop_responding_to_touch/?rdt=53523 Did you file a bug report ? PS: if you google search for "iphone apps not responding to touch", you'll get a lot of similar reports as well as some videos explaining how to solve. Don't know how useful they are though.
Replies
Boosts
Views
Activity
Apr ’25