Skip to content

Instantly share code, notes, and snippets.

@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active October 15, 2025 12:25
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
@romyilano
romyilano / appleSearchBarSample.swift
Last active June 15, 2022 17:14
Various search bar implementations. Including an RxSwift / reactive swift version too
//https://developer.apple.com/library/content/samplecode/TableSearch_UISearchController/Introduction/Intro.html
// MARK: - UISearchResultsUpdating
func updateSearchResults(for searchController: UISearchController) {
// Update the filtered array based on the search text.
let searchResults = products
// Strip out all the leading and trailing spaces.
let whitespaceCharacterSet = CharacterSet.whitespaces
//
// UIAlertController+Rx.swift
//
import Foundation
import RxSwift
protocol RxAlertActionType {
associatedtype Result
//
// PaginationNetworkLogic.swift
//
// Created by Daniel Tartaglia on 4/9/17.
// Copyright © 2019 Daniel Tartaglia. MIT License
//
import RxSwift
struct PaginationUISource {
@kean
kean / Client.swift
Last active September 16, 2022 03:41
API Client (Archived)
// The MIT License (MIT)
//
// Copyright (c) 2017 Alexander Grebenyuk (github.com/kean).
import Foundation
import Alamofire
import RxSwift
import RxCocoa
// This post is **archived**. For a modern version that uses Async/Await and Actors, see the new article
@mminer
mminer / Reducer.swift
Created November 13, 2017 02:32
Example of a Redux-esque store powered by RxSwift.
typealias Reducer<StateType, ActionType> = (_ state: StateType, _ action: ActionType) -> StateType
@kean
kean / AutoRetry.swift
Last active November 2, 2024 15:47
Smart Auto Retry using RxSwift
// The MIT License (MIT)
//
// Copyright (c) 2017 Alexander Grebenyuk (github.com/kean).
import Foundation
import RxSwift
import RxCocoa
extension ObservableType {
@lpbas
lpbas / FadeView.swift
Last active May 26, 2025 06:44
Fade a UIView in iOS using Gradient (Swift Extension)
//
// This program is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What The Fuck You Want
// To Public License, Version 2, as published by Sam Hocevar. See
//
// http://sam.zoy.org/wtfpl/COPYING
//
// for more details.
//
@dannyhertz
dannyhertz / TalkDockViewController.swift
Created December 21, 2018 18:52
VC & VM from FuncConf Talk "From Sketch to Xcode: Building Functional Reactive View Models from the Ground Up"
//
// TalkDockViewController.swift
// Dockee
//
// Created by Danny Hertz on 11/30/18.
// Copyright © 2018 Danny Hertz. All rights reserved.
//
import Foundation
import RxCocoa