Skip to content

Instantly share code, notes, and snippets.

Working from home, Ekb

Aleksey Lobanov alobanov

Working from home, Ekb
View GitHub Profile
View PaginationNetworkLogic.swift
// PaginationNetworkLogic.swift
// Created by Daniel Tartaglia on 4/9/17.
// Copyright © 2019 Daniel Tartaglia. MIT License
import RxSwift
struct PaginationUISource {
View ScrollableViewController.swift
import UIKit
import SnapKit
class ScrollableViewController: UIViewController {
override func viewDidLoad() {
view.backgroundColor = UIColor.whiteColor()
let scrollView = UIScrollView()
AliSoftware / Coordinator.swift
Last active Jul 10, 2022
Coordinators & StateMachine - Concept
View Coordinator.swift
struct Coordinator {
let window: UIWindow
let navCtrl: UINavigationController?
func start() {
private func presentWelcomeScreen() {
let vc = WelcomeScreenViewController() // Instanciate from code, XIB, Storyboard, whatever your jam is
shadcn / gist:de147c42d7b3063ef7bc
Last active Sep 17, 2022
Convert a Hex string to UIColor in Swift
View gist:de147c42d7b3063ef7bc
// Creates a UIColor from a Hex string.
func colorWithHexString (hex:String) -> UIColor {
var cString:String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString
if (cString.hasPrefix("#")) {
cString = cString.substringFromIndex(1)
if (countElements(cString) != 6) {
return UIColor.grayColor()
mobilemind /
Last active Sep 26, 2022
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
kylefox / color.m
Created Jan 27, 2012
Generate a random color (UIColor) in Objective-C
View color.m
Distributed under The MIT License:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to