Skip to content

Instantly share code, notes, and snippets.

:octocat:

Marcos Griselli marcosgriselli

:octocat:
Block or report user

Report or block marcosgriselli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marcosgriselli
marcosgriselli / bitrise.yml
Created Dec 17, 2018
Bitrise.yml configuration for ViewAnimator
View bitrise.yml
---
format_version: '6'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: fastlane
app:
envs:
- FASTLANE_XCODE_LIST_TIMEOUT: '120'
- opts:
is_expand: false
FASTLANE_WORK_DIR: "."
@marcosgriselli
marcosgriselli / Array + Util.swift
Last active May 17, 2018
Array utility functions
View Array + Util.swift
import Foundation
// MARK: - Array
public extension Array {
/// Safe subscript for element at index
///
/// - Parameter index: array's index to subscript.
/// - Returns: Optional array element if it exists in that index.
public func item(at index: Int) -> Element? {
@marcosgriselli
marcosgriselli / ViewMorphing.swift
Created May 5, 2018
Morph a view to another view's via transforms or frame
View ViewMorphing.swift
//
// Morphable.swift
// Morphable
//
// Created by marcosgriselli on 05/05/2018.
// Copyright (c) 2018 marcosgriselli. All rights reserved.
//
import UIKit
@marcosgriselli
marcosgriselli / BasicSearch.swift
Created Apr 21, 2018
Basic implementation of a UISearchController reusing the same type of UIViewController as the base and results.
View BasicSearch.swift
import UIKit
protocol Searchable {
func update(text: String?)
}
class BaseSearchResultUpdating: NSObject, UISearchResultsUpdating {
func updateSearchResults(for searchController: UISearchController) {
guard let searchable = searchController.searchResultsController as? Searchable else {
fatalError("The searchResultsController is does not conform to Searchable.")
View ReusableCells.swift
//
// ReusableCells.swift
// ella
//
// Created by Marcos Griselli on 12/17/17.
// Copyright © 2017 Hirsh Group LLC. All rights reserved.
//
import UIKit
@marcosgriselli
marcosgriselli / AudioLoader.swift
Created Oct 2, 2017
Play an audio file from resources or .xcassets
View AudioLoader.swift
import AVFoundation
var audioPlayer: AVAudioPlayer?
enum AudioLoader {
case fromResource(URL)
case fromAsset(NSDataAsset)
}
enum AudioLoaderError: Error {
case resourceNotFound
@marcosgriselli
marcosgriselli / UIImageView+URL.swift
Created Aug 30, 2017
Bridge between Kingfisher and UIImageView for easy swapping between 3rd party image download libraries
View UIImageView+URL.swift
//
// UIImageView+URL.swift
// marcosgriselli
//
// Created by Marcos Griselli.
// Copyright © 2017 marcosgriselli. All rights reserved.
//
import Kingfisher
@marcosgriselli
marcosgriselli / UIImage+Resize.swift
Last active Dec 4, 2019
UIImage Resize/Scaling
View UIImage+Resize.swift
//
// UIImage+Resize.swift
//
// Created by Marcos Griselli on 6/9/17.
// Copyright © 2017 Marcos Griselli. All rights reserved.
//
import Foundation
import UIKit
You can’t perform that action at this time.