Skip to content

Instantly share code, notes, and snippets.

António Nunes SintraWorks

Block or report user

Report or block SintraWorks

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
@SintraWorks
SintraWorks / PleasantNavigationController.swift
Last active Jan 16, 2019
A navigation controller that does a better job at communicating navigation events
View PleasantNavigationController.swift
//
// PleasantNavigationController.swift
// NavControllerTest
//
// Created by Antonio Nunes on 23/08/2018.
// Copyright © 2018 SintraWorks. All rights reserved.
//
import UIKit
@SintraWorks
SintraWorks / ScrollingStackView.swift
Last active Jun 15, 2019
A scrolling capable drop-in replacement for UIStackView.
View ScrollingStackView.swift
//
// ScrollingStackView.swift
//
// Created by Antonio Nunes on 05/08/2018.
// Copyright © 2018 SintraWorks. All rights reserved.
//
// 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
@SintraWorks
SintraWorks / MiniAutoLayoutDSL_r2.playground
Last active Jan 6, 2018
Mini Auto Layout DSL revisited
View MiniAutoLayoutDSL_r2.playground
import UIKit
import PlaygroundSupport
typealias Constraint = (_ view: UIView, _ otherView: UIView?) -> NSLayoutConstraint
enum ConstraintRelation {
case equal, greaterThanOrEqual, lessThanOrEqual
}
func constraint<Anchor, AnchorType>(_ keyPath: KeyPath<UIView, Anchor>,
View MicroLayoutDSL.playground
//: A UIKit based Playground for presenting user interface
import UIKit
import PlaygroundSupport
typealias PairedConstraint = (_ view: UIView, _ otherView: UIView) -> NSLayoutConstraint
typealias UnpairedConstraint = (_ view: UIView) -> NSLayoutConstraint
enum ConstraintRelation {
case equal, greaterThanOrEqual, lessThanOrEqual
View buggywuggy.swift
import Foundation
/// Provides NSRegularExpression pattern matching against strings
/// in `switch` expressions
///
/// Regular expressions are expensive to construct. The built-in
/// class cache stores already-constructed pattern instances using
/// the pattern string (coerced to `NSString`) as its keys. Modify
/// matching options at the `match(_, options:)` call-site if needed.
///
You can’t perform that action at this time.