Post

Replies

Boosts

Views

Activity

Comment on Generic View Returning a Closure Option
I think I got a working prototype that is simple to get me started. My remaining issue is that content closure seems to accept only a view and nothing else. I cannot declare a variable. Is there a way for that? Something like FetchUrlContentView(url: "https://www.test.com/", loading: true) { data in let test = String(data.count) MyView(test) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
Comment on Live Preview Window - Show/Hide?
I am still new to xcode. but where is Canvas? For now I only depended on the keystroke.
Replies
Boosts
Views
Activity
Sep ’22
Comment on Help!!! How to eliminate the ">" nav link symbol from list items?
This works! Is there any way to have the left and right spacing be removed or adjusted? The gap is just too big.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on How To Make Optional Variables in SwiftUI View
LOL. That quick? I just recently installed this like a month ago. I am on 13.4.1. I didnt get any notification about updates though. Thank you, will upgrade.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on How To Make Optional Variables in SwiftUI View
By the way, just letting you know what I did. The View need not be supplied with the variable as long as I set it to nil upon declaration e.g. let someClass: SomeClass? = nil
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on Generic View Returning a Closure Option
I think I got a working prototype that is simple to get me started. My remaining issue is that content closure seems to accept only a view and nothing else. I cannot declare a variable. Is there a way for that? Something like FetchUrlContentView(url: "https://www.test.com/", loading: true) { data in let test = String(data.count) MyView(test) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22
Comment on Why Doesn't Date have a way to get the timezone?
I see. Any idea how to do this? Seems pretty hassle to have to convert a date object to a string and use DateFormatter to convert string back to date (Since you can set the timezone here).
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on What kind of string interpolation is this in Swift? {0} ...
I saw this. But I was wondering if there is a way to reuse my existing strings where placeholders are based on curly braces with index number as the order. e.g. "Hi, {0} {1}", "First", "Second" which results in "Hi, First Second". I guess this is not supported then.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How to disable cache in URLSession.shared.data in SwiftUI
Thanks! This works! Never really found this one. I have a question, URLSession.shared, is there no way to change its configuration? if I instantiate a new URLSession every request, is it resource heavy compared to using URLSession.shared? unless there is no choice.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on SwiftUI MapKit Callouts
It's sad that there is no easy way to do this. Even for just a simple title/subtitle. It should have been integrated into MapMarker and MapPin
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on NSAttributedString conversion: Bold, <b>-tag, not working
Doesnt work in Swift 5
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on What Happened to NSAttributedString in Swift 5? Bold Doesnt work?
Hi. I found the culprit. I keep calling .htmlString which returns a plain string. I also opted to use markdown instead since in html it uses a diff font helvetica and reduces font size to 12
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Why Does Method Force Me To Add Mutating
Hi thanks. Seems mutating has to be used here. I was trying to avoid using it but it seems since it is a struct then this is a necessity. The code sample for that is to place that inside a struct View and have that variable and method. But your sample code already gave an explanation. Thank you.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Zoom In Using northeast, southwest and center coordinate In Swiftui Map
Hi @robnotyou this works! Thank you. I wish to ask regarding a different topic, on what to use (if you have an idea). I am also trying to create an MKCoordinateRegion from an array of coordinates. Which classes are involved?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Zoom In Using northeast, southwest and center coordinate In Swiftui Map
Its alright, i got the array part
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Declare A Variable of Type Function and Pass Function To it?
Thank you! I still have a lot to learn :D
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22