Skip to content

Instantly share code, notes, and snippets.

View hellensoloviy's full-sized avatar

Hellen S. hellensoloviy

  • Kyiv
View GitHub Profile
@hellensoloviy
hellensoloviy / ExpenseList.swift
Created January 23, 2026 11:43
ToolBar button with popoverTip issue in SwiftUI, popoverTip is not showing fix variant
//
// ExpenseList.swift
// ExpensesListApp
//
// Created by Hellen Soloviy on 21.01.2026.
//
import SwiftUI
import TipKit
@hellensoloviy
hellensoloviy / NetworkHandler.swift
Created January 19, 2026 12:34
Simple NetworkHandler with generic http request and async await
//
// NetworkHandler.swift
// Auth SwiftUI App Test
//
// Created by Hellen Soloviy on 19.01.2026.
//
import Foundation
enum HTTPMethod: String {
import Foundation
protocol JSONDecodable {
func jsonParams() throws -> [String : Any]
}
extension JSONDecodable where Self : Codable {
func jsonParams() throws -> [String : Any] {
let encoder = JSONEncoder()
let data = try encoder.encode(self)
@hellensoloviy
hellensoloviy / RegexValidator.swift
Last active January 19, 2026 12:34
Simple RegexValidator for strings (+ Obj-c compatible)
import Foundation
@objc class RegexValidator: NSObject {
@objc enum ValidationPattern: Int {
case email = 0
case notEmpty
case stateInUSA
case stateInAustralia
case state