Post

Replies

Boosts

Views

Activity

Comment on How To Create Heatmap From Array CLCoordinate2D In A SwiftUI Map
@robnotyou quick question. Since MKMapView doesnt require a binding to region, my map shows empty blue (probably in the middle of the sea). @State private var region = MKCoordinateRegion() MapView(region: region) .edgesIgnoringSafeArea(.all) .onAppear() {     region = ... array of CLLocationCoordinate2D } This used to work when it was Map since i just had to go $region since the parameter required has to be binding but now it is not. How can it re-render once the region variable is set?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
Comment on Using if condition in Kingfisher.shared.retrieveImage
The image can actually be accessed via result.get().image but then it seems my if result == .success doesnt work. error message Cannot convert value of type 'Result<RetrieveImageResult, KingfisherError>' to expected argument type 'DispatchTimeoutResult' Thank you. Yours works. I think for a beginner it is hard if one if not familiar when code just goes .something instead of adding the struct or class name to it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’22
Comment on How To Create Heatmap From Array CLCoordinate2D In A SwiftUI Map
Tsk. It is? Grrr.. already invested some time using SwiftUI Map. Might as well use Google Maps. I have a question. Ive seen sample tutorials on how they do it but basically its just one ViewController with map in it all the features in it based on the example But the way they do it cannot be reused. I want to be able to reuse the map.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Create Heatmap From Array CLCoordinate2D In A SwiftUI Map
Thanks. Sucks that there's no choice haha
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Create Heatmap From Array CLCoordinate2D In A SwiftUI Map
@robnotyou quick question. Since MKMapView doesnt require a binding to region, my map shows empty blue (probably in the middle of the sea). @State private var region = MKCoordinateRegion() MapView(region: region) .edgesIgnoringSafeArea(.all) .onAppear() {     region = ... array of CLLocationCoordinate2D } This used to work when it was Map since i just had to go $region since the parameter required has to be binding but now it is not. How can it re-render once the region variable is set?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Create Heatmap From Array CLCoordinate2D In A SwiftUI Map
Reason why i am doing this is that i may have a feature where i zoom to countries based on e.g. button actions. Right now if i supply region in the constructor of MapView it all works out. But even in onAppear it does not refresh
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Create Heatmap From Array CLCoordinate2D In A SwiftUI Map
ok ill post a new question for this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How To Create Heatmap From Array CLCoordinate2D In A SwiftUI Map
I just posted the question. But. i realized that the code to render should not be in makeUIView. it should be in updateUIView. doh
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How to Shorten if let variable = optionalVariable { }
nice i didnt know that. it is so much better than having to redeclare a var. 👌
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Most Optimal Way To Fetch Data In A SwiftUI View Once?
ahh. i didnt expect a @State would be enough. will try this out thank you.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on How to Shorten if let variable = optionalVariable { }
My nested ifs are actually from using json objects. it has no method to check like even if a key exists. so i have a lot of nested let ifs. thanks
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Callouts in Map Marker
Hi. Yes, i saw some tutorial creating a callout manually. it was intuitive making use of existing system image symbols. I thought at first that it's built in.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Help Setting Google Maps
oh i see. that is what i am currently doing now actually.. using xcode with rosetta. havent tried deploying to release. maybe that is when the issue will bug me?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on What is the opposite of if let variable { }
Thanks for confirming. yes it is bizarre. it just what came to my mind at the time of writing.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Using if condition in Kingfisher.shared.retrieveImage
The image can actually be accessed via result.get().image but then it seems my if result == .success doesnt work. error message Cannot convert value of type 'Result<RetrieveImageResult, KingfisherError>' to expected argument type 'DispatchTimeoutResult' Thank you. Yours works. I think for a beginner it is hard if one if not familiar when code just goes .something instead of adding the struct or class name to it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on What is the opposite of if let variable { }
Thanks. I like this better. I will be using this from now on instead of if var == nil
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Comment on Any related Library for General Poly Clipper Algorithm
You are right. i made a mistake in describing. The convex hull was another java class i have called GrahamScan and I used the gpcj library to clip the polgyons before passing them to the GrahamScan class.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22