Skip to content

Instantly share code, notes, and snippets.

View RoundedTextField.swfit
//
// RoundedTextField.swfit
//
// Created by Maysam Shahsavari on 2020-07-30.
// Copyright © 2020 Maysam Shahsavari. All rights reserved.
//
import UIKit
/// Configuration for `RoundedTextField`
View ConsoleLogger.swift
//
// ConsoleLogger.swift
//
// Created by Maysam Shahsavari on 2020-07-20.
// Copyright © 2020 Maysam Shahsavari. All rights reserved.
//
import Foundation
struct ConsoleLogger {
static func log(_ error: Error, file: String = #file, function: String = #function, line: Int = #line) {
@maysamsh
maysamsh / UIView+Ext.swift
Created Jun 13, 2020
Create snapshot using drawHierarchy() to include child views
View UIView+Ext.swift
//
// UIView+Ext.swift
// tahrir
//
// Created by Maysam Shahsavari on 9/14/19.
// Copyright © 2019 Maysam Shahsavari. All rights reserved.
//
import Foundation
import UIKit
View UIImage+Ext.swift
//
// UIImage+Ext.swift
// frazeit
//
// Created by Maysam Shahsavari on 9/24/19.
// Copyright © 2019 Maysam Shahsavari. All rights reserved.
//
import Foundation
import UIKit
@maysamsh
maysamsh / FibonacciSequence.playground
Last active Jan 26, 2019
A FibonacciSequence type
View FibonacciSequence.playground
import Foundation
struct FibsIterator: IteratorProtocol {
private var state:(UInt, UInt) = (0, 1)
private var upTo: Int
private var counter = 0
init(upTo: Int) {
self.upTo = upTo
}
@maysamsh
maysamsh / UISearchBar+Ext.swift
Last active Jul 14, 2020
A small extension for UISearchBar which shows an UIActivityIndicator while searching
View UISearchBar+Ext.swift
//
// UISearchBar+Ext.swift
// frazeit
//
// Created by Maysam Shahsavari on 7/30/18.
// Updated on 9/26/19.
// Copyright © 2018 Maysam Shahsavari. All rights reserved.
// Updated: 10/02/2020.
import Foundation
You can’t perform that action at this time.