Post

Replies

Boosts

Views

Activity

Comment on What is the difference between func (to view: UIView) and not using the 'to'?
There is a third case: ignoring completely label. func anchorSizePercent(_ view: UIView, sFactor: CGSize) { } that you would call as myHeader.anchorSizePercent(myView, sFactor: CGSize(width: 0.8, height: 0.2)).    So it is a question of preference and that often depends on the name of the function itself to see if you need label or not and if label is the same name as parameter or not.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’22
Comment on Taking a photo and displaying it on one of many UIImageView's
Thanks for feedback. I kew the other thread as I answered to it. Don't forget to close this one as well. Good continuation.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’22
Comment on Converting struct so it can be sent from watch to phone
That was visibly easily understood by the OP writer, @Karonsbo. It simply means adding Codable to each struct declaration:  such as: struct Storage : Codable { var acc: Acc struct Acc : Codable {        Straightforward, isn't it ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’22
Comment on DateComponentsFormatter formatted string is not working as expected
Looks like eskimo has provided the way to handle that. It depends on what you want to do with it and if taking into account daylight shift is of interest or not for you.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’22
Comment on How we can delete all list items in SwiftUI?
Thanks for feedback. self.datas.removeAll() is equivalent to datas = [].
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Comment on am getting address label nil inUITableViewCell on calling tableviewreload function but after scrolling it appear
My question was: could you show the complete code where you load devices ? Most likely you have an async issue.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’22
Comment on How can I use multiple `.alert` dialog in SwiftUI?
I don't understand your code. Where is alert presented ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Newbie: What iPhone and iOS version should I get for development considering a wide range of backward compatibility support
I use an iPhone X with the latest OS as one of the test platforms.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on UIPasteboard: pasting images from Safari
That's one of the many limitations of Safari. Did you try with another browser ? Could you send a copy (pdf or other) of the FB. I will send one on my own.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on "The given data was not valid JSON."
Ok, so you need the tuple. What do you get exactly in data ?
Replies
Boosts
Views
Activity
Mar ’22
Comment on Every non-Apple app crashes or exits on its own
So, you run a beta version of iOS ?
Replies
Boosts
Views
Activity
Mar ’22
Comment on What is the difference between func (to view: UIView) and not using the 'to'?
There is a third case: ignoring completely label. func anchorSizePercent(_ view: UIView, sFactor: CGSize) { } that you would call as myHeader.anchorSizePercent(myView, sFactor: CGSize(width: 0.8, height: 0.2)).    So it is a question of preference and that often depends on the name of the function itself to see if you need label or not and if label is the same name as parameter or not.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Core Data
Waiting what? Please take time and make the effort to formulate precisely your questions on the forum.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Best process to convert older Objective C Project to Swift
200 VC is already pretty large. But may be you will also refactor during the redesign, to reduce the number of VC. Good luck and don't forget to close the thread.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Same content in 2 cards
Another way is to create an id = UUID() in the struct, instead of num. And create with simply MyEmoji(char: "🐶") and use .id instead of .self.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22
Comment on Buttons in the title bar
If you show the code you tried, maybe someone can help…
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’22