Post

Replies

Boosts

Views

Activity

Help with documentation : example: DisclosureGroup
when I read the disclosureGroup documentation , I see struct DisclosureGroup<Label, Content> where Label : View, Content : View in the first part it says label, I dont understand why. I can put a string and it work, But if I put a label I get an error saying it requires that 'Label<Text, Image>' conform to 'StringProtocol' it get worse (for me :-) the second part say "where Label : View, Content : View" for me it says that label conform to view... ? I tried to put a view, it did not work either , with the same error if I use the "Jump to definition" of disclosure, I can see this   public init(@ViewBuilder content: @escaping () -> Content, @ViewBuilder label: () -> Label) then I am totally lost :-) in label I can see struct Label<Title, Icon> where Title : View, Icon : View :-) Title ... a view ? is there a documentation to help me read documentation :-)
11
0
1.3k
Jan ’21
UIKit to SwiftUI design question: EnvironmentObject versus Protocol-Delegate, notification
I am considering converting my app to SwiftUI  My app receive data via bluetooth every second in my BluetoothManager.  This data is then send via protocol - delegate to another object that do math and other modification to those data.  From there different data are send via protocol or notification to others object to be save to file, other to be send to CoreData , and some to be displayed  So lot's of data move but rarely to be displayed.  Because most of this transfert is between object and rarely view, I wonder which one is better EnvironmentObject or via Protocol and/or  notification  I did look briefly at combine, and I am not sure if I would be able to use that in that case.
0
0
521
Feb ’21
Open source and AppleID
I would like to share my new project on an open source repository like GitHub. it need capabilities like iCloud. The problem is that I would prefer not have my appleid email being send to the open source repository. I saw that I can exclude files but I would be easier if the open source version had no Apple account associated with it. how should I manage the open source version vs the App Store one. Thank you
7
0
319
Oct ’24