Post

Replies

Boosts

Views

Activity

Comment on Presentation single with code
@narcisfromgirona Why do you make the var private? The keyword private is an access modifier which limits the access to the property (or method) only within the same class. It is a good habit not to show some members required only for internal processing for abstraction and may help Swift compiler optimize better.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Comment on API Error
Thanks for clarifying. Readers would not be able to guess you have some code like myStore.product!.title somewhere. Neither able to guess what myStore is nor how the property product is updated.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Comment on How to get the UIViewController instance for displaying dialog when the app starts up?
for newer version (after iOS14) of Xcode, both SceneDelegate.swift and AppDelegate.swift are no longer automatically generated. Using Xcode 12.x, you can choose Life Cycle as UIKit App Delegate for iOS App, and Xcode will generate both SceneDelegate.swift and AppDelegate.swift. Better forget that unreliable link and make Xcode generate them, after that, you can move other SwiftUI files into the new project.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’21
Comment on Trailing closure passed to parameter of type 'Int' that does not accept a closure
I guess it is due to I have two TabView in one project. do you have any idea? Very likely. Rename your own TabView to something other and tell us what happens. One more, please show us the complete definition of your TabView.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Please tell me why licenceUrl is nil???
I must have selected create group? No you need to choose Create folder references, or you can change the resource path textFiles/Licence to Licence.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Need Help Transfer Data From Button
Can you show the complete code of FavCell? In addition, can you tell us from where the segue to HighlightsVC is put?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on JSON from inputStream
Thanks for showing your code. But isn't it a problem of using URLSessionStreamTask?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Adding Restores Everything
The thing is I need noRepFav because I don't want duplicates in my array. You just need to update favArr without making duplicates.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on xcode keeps showing this error that the view controller does not have identifier""
It is needed only when using State Preservation & Restoration feature of iOS and you want to make your Restoration ID same as the Storyboard ID. Generally, not many apps use this feature and you can keep it empty.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Presentation single with code
@narcisfromgirona Why do you make the var private? The keyword private is an access modifier which limits the access to the property (or method) only within the same class. It is a good habit not to show some members required only for internal processing for abstraction and may help Swift compiler optimize better.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on API Error
Thanks for clarifying. Readers would not be able to guess you have some code like myStore.product!.title somewhere. Neither able to guess what myStore is nor how the property product is updated.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Swift can't find the Entity Core Data
Tried with Xcode 12.5.1 and worked.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Swift can't find the Entity Core Data
Unfortunately, Xcode is not so mature as compared to Visual Studio. You can send a bug report to Apple.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Implementing a RandomNumberGenerator for testing
Please re-read again. You may need to generate seemingly uniform values.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on SwiftUI Picker.onchange not changing.
Can you show whole definitions of ViewModel and ServerStatusAPI? In case ServerStatusAPI or any properties in it are not value type, @Published would not work as expected.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on How to get the UIViewController instance for displaying dialog when the app starts up?
for newer version (after iOS14) of Xcode, both SceneDelegate.swift and AppDelegate.swift are no longer automatically generated. Using Xcode 12.x, you can choose Life Cycle as UIKit App Delegate for iOS App, and Xcode will generate both SceneDelegate.swift and AppDelegate.swift. Better forget that unreliable link and make Xcode generate them, after that, you can move other SwiftUI files into the new project.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on UserDefaults on App Launch
Thanks for showing. So how or when or where do you set "HasAchnowledgedUserLicence"?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on UserDefaults on App Launch
Thanks for trying, but far from enough to guess what's happening for me. Hope you can solve your issue soon.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’21