Skip to content

Instantly share code, notes, and snippets.

View VAndrJ's full-sized avatar

VAndrJ VAndrJ

  • Ukraine
  • 07:35 (UTC +02:00)
View GitHub Profile
@VAndrJ
VAndrJ / SearchableRefreshableMRE.swift
Created January 14, 2025 15:38
.searchable + .refreshable with ScrollView memory leak issue iOS 17.3+
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationStack {
NavigationLink("Next") {
TestView()
}
}
}
@VAndrJ
VAndrJ / SheetDetentsMRE.swift
Created January 28, 2025 10:50
Sheet presentation detents iOS 18.0+ issue
import SwiftUI
struct ContentView: View {
@State private var isSheetPresented = false
var body: some View {
Button("Open Sheet") {
isSheetPresented = true
}
.sheet(isPresented: $isSheetPresented) {
@VAndrJ
VAndrJ / TypedThrowsCrashMRE.swift
Created January 28, 2025 18:16
Typed throws issue in iOS lower 18
import SwiftUI
struct ContentView: View {
@StateObject private var someClass = SomeClass(someInjectedFunction: { _ in })
var body: some View {
Text("Example")
}
}
@VAndrJ
VAndrJ / ContentView.swift
Created April 18, 2025 06:40
Environment values example.
//
// ContentView.swift
// EnvironmentExample
//
// Created by VAndrJ on 4/18/25.
//
import SwiftUI
enum Destination {
@VAndrJ
VAndrJ / AlertDisabledButtonMRE.swift
Created April 29, 2025 09:07
MRE to check how TextField and disabled Button works with alert on different iOS versions.
//
// MRE.swift
//
// Created by VAndrJ on 4/29/25.
//
import SwiftUI
struct ContentView: View {
@State private var isAlertPresented = false
@VAndrJ
VAndrJ / OnAppearExample.swift
Created May 7, 2025 10:21
View onAppear example.
//
// MRE.swift
//
// Created by VAndrJ on 5/7/25.
//
import SwiftUI
struct ContentView: View {
@State private var isLogined = false