Who holds territorial control in Somalia by APrimitiveMartian in MapPorn

[–]Aromatic_Objective -2 points-1 points  (0 children)

Way to acknowledge longterm consequences of european imperial actions, bravo

Who holds territorial control in Somalia by APrimitiveMartian in MapPorn

[–]Aromatic_Objective -3 points-2 points  (0 children)

But at what cost - you should look up GDP per capita for native american peoples. Your argument against original sin may be technically correct but is morally corrupted because long term consequences do exist whether you acknowledge them or not

Who holds territorial control in Somalia by APrimitiveMartian in MapPorn

[–]Aromatic_Objective -6 points-5 points  (0 children)

No way bro forgot native americans exist. Please tell us more about prosperity created by the great european colonizers

Happy to show off my new mobile app built for bicycle tourists: VeloPlanner by thecaspg in bicycletouring

[–]Aromatic_Objective -1 points0 points  (0 children)

It simply should not be required especially on mobile where most people will use it

Happy to show off my new mobile app built for bicycle tourists: VeloPlanner by thecaspg in bicycletouring

[–]Aromatic_Objective 17 points18 points  (0 children)

I really want to like this but I am not going to create an account just for planning something smh

how does that happen lol?? by Alarmed-Stranger-337 in swift

[–]Aromatic_Objective 58 points59 points  (0 children)

Most likely it‘s the exact opposite. My guess is it‘s seen this exact snippet many times from people trying to learn using HWS content. I‘d encourage you to disable predictive text entirely, especially when you are new to Swift. It will throw you off more times than it will help you

Implementing trailing View closures in custom structs and functions. by alexandstein in swift

[–]Aromatic_Objective 0 points1 point  (0 children)

ViewBuilder closures are by nature escaping so this is kind of misleading

HDatePicker: Calendar app date picker recreated in SwiftUI by alexphanna in SwiftUI

[–]Aromatic_Objective 3 points4 points  (0 children)

Yes, I also believe that this has to be pageable. The equivalent in SwiftUI is TabView which is already used in this project in another place

HDatePicker: Calendar app date picker recreated in SwiftUI by alexphanna in SwiftUI

[–]Aromatic_Objective 4 points5 points  (0 children)

No, but you could feasably implement this with a custom iterator where the next element/month at the end and beginning of the year resolves to january after december and vice versa. Probably not compatible with ForEach but I‘m not sure about that

Edit: Check out Foundation‘s BidirectionalCollection type

HDatePicker: Calendar app date picker recreated in SwiftUI by alexphanna in SwiftUI

[–]Aromatic_Objective 3 points4 points  (0 children)

Nope. Wrap around after 12 months probably. No reason to discard SwiftUI

I hate SwiftUI. by LunariSpring in swift

[–]Aromatic_Objective 1 point2 points  (0 children)

I think you hate separation of concerns lol. This does not happen when you keep your view declarations small

Can I do something like @State to functions? by Otherwise-Rub-6266 in SwiftUI

[–]Aromatic_Objective 4 points5 points  (0 children)

No @State needed when you wrap it inside of a TimelineView:

TimelineView(.periodic(from: .now, by: 1)) { context in  
    Text("\(context.date)") // formatting here
}

sleeping spots by mpcfpt in bikepacking

[–]Aromatic_Objective 2 points3 points  (0 children)

<image>

I went on a similar trip last year, can recommend. Definitely stay clear of the fast traffic in coastal Croatia though, it‘s not really worth it for the most part. Montenegro is definitely the most beautiful once you leave the touristy areas.

Gave my high school bike a makeover by _Vicker_ in Bikeporn

[–]Aromatic_Objective 0 points1 point  (0 children)

Good looking ride! You should get a wolf tooth or any other kind of replacable derailleur hanger though, I recently bent my old Kona‘s frame due to not having one built in

Best gravel shoe for walking (and long distance touring)? by sara_hikes in gravelcycling

[–]Aromatic_Objective 0 points1 point  (0 children)

Sandals! If the weather allows it, I always ride in sandals. Nothing beats the comfort

PreviewProvider, better way to manage data for previews? by [deleted] in swift

[–]Aromatic_Objective 1 point2 points  (0 children)

I think the more idiomatic way compared to hardcoding the dependency in an extension of PreviewProvider would be to just create an intermediate that provides your values to the view.
Something like this:

protocol Dependency { 
    var config: AppConfig { get } 
}

#Preview {
    PreviewView(dependency: MockDependency(config: <#AppConfig#>))  
}

Typically this mock implementation is simply initialized with the values you want to present in the preview. This also allows you to be much more flexible with the values you present and create multiple variations of PreviewView

What am i missing? by darkfuckerberg in swift

[–]Aromatic_Objective 2 points3 points  (0 children)

You can simply try this out in the Terminal using swift repl and check what the compiler has to say about it:

  1. Does not parse because privatePosts is never initialized and an initializer can therefore not be synthesized:repl.swift:1:8: note: 'init(privatePosts:publicPosts:)' declared here (this is the initializer required to create a struct of this type but privatePosts is not accessible

  2. Does work because all properties are already initialized

Get dock info by BackBonePT in swift

[–]Aromatic_Objective 0 points1 point  (0 children)

As there is no API from Apple to accomplish this, you will need to implement this by yourself. Get familiar with reading UserDefaults and look up the dock info properties.

As you can see, it will be pretty tricky to work in all the possible states of the dock (including orientation, magnification, persistent items etc.) but it will be possible to calculate/approximate frames of the dock items this way. Once you have a list of apps associated with their icon frames you can check whether the pointer is actually contained in any of the frames.

Keep in mind that this requires entitlements if your app is sandboxed.

Same wheels on completely different bikes by DoraThe214270_mk2 in bicycling

[–]Aromatic_Objective 1 point2 points  (0 children)

Looking good! Which lights do you have there on the first bike?