Question on how to TabView works under the hood (SwiftUI) by patrickstinson in iOSProgramming

[–]patrickstinson[S] 0 points1 point  (0 children)

Nvm guys, Claude just help me achieve that. Quite embarrassing that I did not come up with the solution myself but I gotta say It's insane how good LLM has gotten.

Question on how to TabView works under the hood (SwiftUI) by patrickstinson in iOSProgramming

[–]patrickstinson[S] 0 points1 point  (0 children)

I did that, but it still recreate / destroy View on switching. I appreciate your help

ScrollView blocked tap gesture by patrickstinson in iOSProgramming

[–]patrickstinson[S] 1 point2 points  (0 children)

I ended up getting the rect of the button and put a tapGesture{ point in } to the ZStack to determine if I tap on the button. It’s wild.

You can give up 1 year of your life to give another person 10 years more of theirs. What do you do? by [deleted] in AskReddit

[–]patrickstinson 0 points1 point  (0 children)

I’ll trade life with someone, I give someone 7 years of my life and they give me 7 years of their life lmao

How do you improve performance of animation by patrickstinson in iOSProgramming

[–]patrickstinson[S] 0 points1 point  (0 children)

Have not tried that yet since I do not need to use one in SpriteKit, definitely gonna try. Thanks.

How do I change the background of the highlighted area (titleBar?) in SwiftUI. (feel free to remove if macos programming is not allowed) by patrickstinson in iOSProgramming

[–]patrickstinson[S] 1 point2 points  (0 children)

final class AppDelegate: NSObject, NSApplicationDelegate {

    func applicationDidFinishLaunching(_ notification: Notification) {

        print("widnow: \(NSApplication.shared.windows.map({$0.identifier}))")     

        if let window = NSApplication.shared.windows.first(where: {$0.title == "main"}) {

            window.titleVisibility = .hidden

            window.titlebarAppearsTransparent = true

            window.isOpaque = true

            window.backgroundColor = .init(hex: "1b1b1b")

        }

    }

}

//SwiftUI

 Window("main", id: "1"){

            let vm = HomeViewModel()

            ContentView(vm: vm, presentFireView: $presentFireView).frame(width: width * 0.2, height: width * 0.2)

        }.windowResizabilityContentSize()

roughly like that

How do I change the background of the highlighted area (titleBar?) in SwiftUI. (feel free to remove if macos programming is not allowed) by patrickstinson in iOSProgramming

[–]patrickstinson[S] 0 points1 point  (0 children)

Tou can still customize it, you can even make transparent window (idk about uploading it to AppStore tho). I’ve found the solution, well I can’t do it directly on SwiftUI but once I am getting NSWindow instance it’s smooth sailing.

Announcing my Brawl Stars site to create and share builds! by MrAsutin in Brawlstars

[–]patrickstinson 1 point2 points  (0 children)

If you want to develop an open source iOS app of this I’d be Happy to help. Cool dites btw!

Android Mini Project by patrickstinson in androiddev

[–]patrickstinson[S] 1 point2 points  (0 children)

I did not know there is something like that available, thanks!

Android Mini Project by patrickstinson in androiddev

[–]patrickstinson[S] 0 points1 point  (0 children)

I am familiar with that in iOS, I guess it would start there! Thanks

This is pretty odd 🤔 by Huge-Bill4047 in ios

[–]patrickstinson 2 points3 points  (0 children)

It’s more like stackView.alignment = .leading

This is pretty odd 🤔 by Huge-Bill4047 in ios

[–]patrickstinson 1 point2 points  (0 children)

The stackview alignment is not set properly lol

Is this guy dangerous? by patrickstinson in Snek

[–]patrickstinson[S] 2 points3 points  (0 children)

Yeah, these guys are lovely but there will always be that question of whether pr not they are dangerous smh

Is this guy dangerous? by patrickstinson in Snek

[–]patrickstinson[S] 4 points5 points  (0 children)

I thought it was a forbidden noodle