Skip to content

Instantly share code, notes, and snippets.

View Chronos2500's full-sized avatar

ビスター Chronos2500

View GitHub Profile
@sebjvidal
sebjvidal / ViewController.swift
Created November 4, 2025 09:21
UIGlassContainerEffect-Demo
//
// ViewController.swift
// UIGlassContainerEffect-Demo
//
// Created by Seb Vidal on 04/11/2025.
//
import UIKit
import MapKit
@Kyle-Ye
Kyle-Ye / ContentView.swift
Last active October 14, 2025 01:49
SwiftUI implicitRootType Playground
// Usage: ViewGraph.current.append(feature: HStackImplicitFeature())
struct HStackImplicitFeature: ViewGraphFeature {
func modifyViewInputs(inputs: inout _ViewInputs, graph: ViewGraph) {
inputs.implicitRootType = _HStackLayout.self
}
}
struct ContentView: View {
var body: some View {
ChildView1()
@Kyle-Ye
Kyle-Ye / kdebug_interpose.c
Created October 3, 2025 12:15
Make kdebug_is_enabled always return true
// kdebug_interpose.c
#include <stdbool.h>
#include <stdint.h>
#include <dlfcn.h>
// Forward declare the original
extern bool kdebug_is_enabled(uint32_t debugid);
// Our replacement
@Yuki2718
Yuki2718 / gist:1c2171acaccb50fe05d030f0bf80fc81
Created September 23, 2025 05:10
ニコニ広告用DNRルール
---
action:
type: block
condition:
urlFilter: ||nicoad.nicovideo.jp^
---
//
// ContentView.swift
// MapModeButton-Demo
//
// Created by Seb Vidal on 30/07/2025.
//
import SwiftUI
struct ContentView: View {

(Summary generated by ChatGPT based on the automatic transcription. Transcript is attached to this Gist)

Q: What's the best approach to updating my app's UI for the new design?

A:

I think the best approach is to start from either the top down or the bottom up---however you perceive the hierarchy of your application. Focus on the big structural parts, since they tend to be most affected by the design and are often reflected in your code structure. Start there, then focus on the smaller elements.

Follow-up (Mohammed):

@Koshimizu-Takehito
Koshimizu-Takehito / ColorSegmentedControl.swift
Last active May 5, 2025 14:12
A demo screen showcasing a custom color-based segmented control component.
import SwiftUI
// MARK: - Demo Screen
/// A demo screen showcasing a custom color-based segmented control component.
/// Displays a list of segments and shows the selected segment's value in a large, bold title.
struct ColorSegmentedControlDemoScreen: View {
/// The static list of selectable segments.
private static let demoItems: [ColorItem] = [
ColorItem(value: "Apple", color: .red),
@Koshimizu-Takehito
Koshimizu-Takehito / StrokeModifier.swift
Last active April 27, 2025 02:34
ビューに枠線を引く
import SwiftUI
// MARK: - Demo Screen
/// A sample screen demonstrating three stacked stroke effects produced by
/// `StrokeModifier`.
/// Each call to `.stroke(_:width:)` adds an additional blurred outline,
/// resulting in a multi-layered border.
struct StrokeModifierDemoScreen: View {
var body: some View {
@ObuchiYuki
ObuchiYuki / VariableBlurView.swift
Last active September 17, 2025 01:14
SwiftUI Progressive / Variable Blur View (using private api)
//
// VariableBlurView.swift
// MFileViewer
//
// Created by yuki on 2025/04/21.
//
import SwiftUI
import UIKit
import CoreImage
// See also: Pro SwiftUI, Chapter 4 Custom Layouts
import SwiftUI
struct RelativeHStack: Layout {
enum Alignment {
case top, center, bottom
}
var alignment: Alignment = .center