Skip to content

Instantly share code, notes, and snippets.

View RaziPour1993's full-sized avatar
😊

Mohammed Razipour RaziPour1993

😊
View GitHub Profile
@beader
beader / InfiniteTabView.swift
Last active September 9, 2024 13:15
Infinite Scrollable TabView using SwiftUI
//
// ContentView.swift
// InfinityTabView
//
// Created by beader on 2022/10/9.
//
import SwiftUI
struct ContentView: View {
@metin-atalay
metin-atalay / ScrollViewRTL.swift
Created August 10, 2022 14:14
SwiftUI RTL ScrollView
import SwiftUI
struct ScrollViewRTL<Content: View>: View {
@ViewBuilder var content: Content
@Environment(\.layoutDirection) private var layoutDirection
var type: RowType
init(type: RowType, @ViewBuilder content: () -> Content) {
self.type = type
self.content = content()
@sameersyd
sameersyd / TwoDirectionalSnapList.swift
Last active September 18, 2023 06:41
SwiftUI - Two Directional SnapList
// Checkout the explanation article here - https://sameer-syd.medium.com/swiftui-two-directional-snaplist-95cb852957be
import SwiftUI
import Combine
struct HomeView: View {
@StateObject var viewModel: HomeViewModel
struct LazyView<Content: View>: View {
let build: () -> Content
init(_ build: @autoclosure @escaping () -> Content) {
self.build = build
}
var body: Content {
build()
}
}
@afshin-hoseini
afshin-hoseini / Swizzeling main bundle.swift
Created November 20, 2017 07:12
Forcing change localization for first iOS application run
//First, define a custom bundle class as like as below
import Foundation
//A key used for exchanging associated object
var _BUNDLE_KEY = 0
class BundleEx : Bundle {
override func localizedString(forKey key: String, value: String?, table tableName: String?) -> String {
@lattner
lattner / TaskConcurrencyManifesto.md
Last active September 14, 2024 20:24
Swift Concurrency Manifesto
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)