Post

Replies

Boosts

Views

Activity

Reply to Rectangle change size by swipe
Declare state var for rectangle width and height. Use this var in the .frame() Change the values when you swipe. Here is a code example: struct BlueRectangleView: View { @State var height: CGFloat = 100 @State var width: CGFloat = 200 // If you also want to change width var body: some View { VStack { Rectangle() .fill(Color.blue) .frame(width: width, height: height) .cornerRadius(10) .shadow(radius: 5) .padding() .gesture( DragGesture(minimumDistance: 5) .onChanged { value in let newHeight = height + value.translation.height / 20 // /20: To slow down change let newWidth = width + value.translation.width / 20 // /20: To slow down change if newHeight > 5 && newHeight < 500 { height = newHeight print("New height\(height)") } if newWidth > 5 && newWidth < 400 { width = newWidth print("New width\(width)") } } ) } .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color.white) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’25
Reply to Lag
The purpose of the forum is not to discuss performance of third party apps. In fact, I don't care reading about gaming performance on pubgmobile in this forum. Have a good day and contact the app developer forum.
Topic: Graphics & Games SubTopic: General Tags:
Jan ’25
Reply to SwiftUI Issues on iOS 16: App Freezes, Buttons Unresponsive, and Missing Data (Works Fine on iOS 17)
Does it work in simulators iOS 16 ? Have you found any device where it works with iOS 16 ? How is it you discover the issue only now ? Did it work in the past ? Did you change Xcode version in between ? Can you test with Xcode 16 ? It seems that it affects older devices iPhone 8, iPhone 12, iPhone 8 Plus, iPhone 8 Plus So is it only iOS related ?
Topic: UI Frameworks SubTopic: SwiftUI
Jan ’25
Reply to Shocked by Apple Developer Program Experience – Account Banned Without Explanation
It's a fact that the rules on Appstore are much more strict than on other platforms, specially for money games like casino. One may appreciate or not, but that's it. So, expecting to "replicate" what was done on other platform when submitting to Appstore is not the best approach. In addition, as darkpaw explained, it is really important to discuss with reviewer in good faith, transparency and of course respectful way (as reviewers always do) even to explain why you think their decision was wrong. Doing differently may lead to unexpected consequences. BTW, if your account was banned, you will ne be able to publish on Appstore. But you may try to appeal this ban (need to have convincing arguments).
Jan ’25
Reply to Assertions in View bodies
I would do it in onAppear: struct Foo { var valid : Bool } struct FooView: View { var foo: Foo = Foo(valid: false) var body: some View { Text("Check assert") .onAppear() { assert(foo.valid) } } } Other option is to do it in init()
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’25
Reply to Rectangle change size by swipe
Declare state var for rectangle width and height. Use this var in the .frame() Change the values when you swipe. Here is a code example: struct BlueRectangleView: View { @State var height: CGFloat = 100 @State var width: CGFloat = 200 // If you also want to change width var body: some View { VStack { Rectangle() .fill(Color.blue) .frame(width: width, height: height) .cornerRadius(10) .shadow(radius: 5) .padding() .gesture( DragGesture(minimumDistance: 5) .onChanged { value in let newHeight = height + value.translation.height / 20 // /20: To slow down change let newWidth = width + value.translation.width / 20 // /20: To slow down change if newHeight > 5 && newHeight < 500 { height = newHeight print("New height\(height)") } if newWidth > 5 && newWidth < 400 { width = newWidth print("New width\(width)") } } ) } .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color.white) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Lag
The purpose of the forum is not to discuss performance of third party apps. In fact, I don't care reading about gaming performance on pubgmobile in this forum. Have a good day and contact the app developer forum.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to RevenueCat & SwiftUI Error 23 :(
Have a look here, https://community.revenuecat.com/general-questions-7/ios-code-error-23-none-of-the-products-registered-in-the-revenuecat-dashboard-could-be-fetched-from-app-store-connect-3680 Maybe that's due to the declared list of active countries for subscription
Replies
Boosts
Views
Activity
Jan ’25
Reply to SwiftUI Issues on iOS 16: App Freezes, Buttons Unresponsive, and Missing Data (Works Fine on iOS 17)
Does it work in simulators iOS 16 ? Have you found any device where it works with iOS 16 ? How is it you discover the issue only now ? Did it work in the past ? Did you change Xcode version in between ? Can you test with Xcode 16 ? It seems that it affects older devices iPhone 8, iPhone 12, iPhone 8 Plus, iPhone 8 Plus So is it only iOS related ?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jan ’25
Reply to Shocked by Apple Developer Program Experience – Account Banned Without Explanation
It's a fact that the rules on Appstore are much more strict than on other platforms, specially for money games like casino. One may appreciate or not, but that's it. So, expecting to "replicate" what was done on other platform when submitting to Appstore is not the best approach. In addition, as darkpaw explained, it is really important to discuss with reviewer in good faith, transparency and of course respectful way (as reviewers always do) even to explain why you think their decision was wrong. Doing differently may lead to unexpected consequences. BTW, if your account was banned, you will ne be able to publish on Appstore. But you may try to appeal this ban (need to have convincing arguments).
Replies
Boosts
Views
Activity
Jan ’25
Reply to Assertions in View bodies
I would do it in onAppear: struct Foo { var valid : Bool } struct FooView: View { var foo: Foo = Foo(valid: false) var body: some View { Text("Check assert") .onAppear() { assert(foo.valid) } } } Other option is to do it in init()
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25