Post

Replies

Boosts

Views

Activity

Reply to LazyVGrid in Xcode 13 ignores Spacer
In GridItem, you can specify the alignment, which in your example is .topLeading Try: private let columns = Array(repeating: GridItem(.flexible(), spacing: 24, alignment: .topLeading), count: 4) That seems to give the result you want. It can be possible for default values to change, between versions of Xcode? Probably best to specify the exact behavior that you want.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to self is used before all properties are initialized (Swift)
I like it as it gets rid of the optional. However, but that still requires that the property 'callback' in ModelDemo and the property 'modelDemo' need to be var's. If there was a way to do everything in the init(), they could be let's You could protect the vars by making them "private (set)" (which, as you probably know, makes them read-only to the outside world (as if they were "let")). Giving this: struct ModelDemo { private (set) var callback: () -> () = {} mutating func setCallback(_ callback: @escaping () -> ()) { self.callback = callback } } final class ViewModelDemo { private (set) var modelDemo = ModelDemo() init() { modelDemo.setCallback(modelCallback) } private func modelCallback() { } }
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’21
Reply to app rejection in app store
You seem to be saying that your app is about watching ads. Apple agree that: "The primary purpose of your app is to encourage users to watch ads" And they also say that this: "...is not appropriate for the App Store" You mention your app is "exactly like goodeed" (perhaps you mean "GoodDeed"?) It is not a good idea to simply copy an existing app, but in any case, the presence of existing apps on the App Store will not help your own submission (especially if you are rejected for being a copy of another app). Your app's submission will have to succeed on it's own merits. If you want your app to be approved, you will have to add some more functionality to it, beyond just watching ads.
Nov ’21