Keybase proof
I hereby claim:
- I am simme on github.
- I am simmelj (https://keybase.io/simmelj) on keybase.
- I have a public key ASADuVzngznoJZLHqpiRN_Xf1Ky1CmfWOBrffVicRrhCRAo
To claim this, I am signing this object:
enum MySpecialEnum { | |
case someCase | |
case someCaseWithAssociatedData(String) | |
case someCaseWithNumbers(Int) | |
} | |
func handleSpecialEnum(_ value: MySpecialEnum) { | |
switch value { | |
case .someCase: |
/** | |
This sample code is available under the MIT license. | |
*/ | |
@available(iOS 12.0, *) | |
public final class ShortcutManager { | |
/** | |
This enum specifies the different intents available in our app and their various properties for the `INIntent`. | |
Replace this with your own shortcuts. |
// | |
// ParallaxHeader.swift | |
// MealPlanUI | |
// | |
// Created by Simon Ljungberg on 2017-11-15. | |
// Copyright © 2017 Filibaba. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
I hereby claim:
To claim this, I am signing this object:
// MIT License applies. | |
import UIKit | |
/** | |
A `UILabel` subclass that provides a way of adding padding to the label. | |
*/ | |
open class Label: UILabel { | |
/// The amount of padding for each side in the label. |
// | |
// UIView+AutoLayout.swift | |
// | |
// Created by Simon Ljungberg on 28/12/16. | |
// Copyright © 2016 Redhill. All rights reserved. | |
// | |
import UIKit | |
public extension UIView { |
void setup() { | |
fullScreen(); | |
frameRate(15); | |
} | |
void draw() { | |
// Loads all pixels on screen into an array of size width*height | |
loadPixels(); | |
color onColor = #000000; | |
color offColor = #FFFFFF; |
extension UITabBarController { | |
/** | |
Show or hide the tab bar. | |
- Parameter hidden: `true` if the bar should be hidden. | |
- Parameter animated: `true` if the action should be animated. | |
- Parameter transitionCoordinator: An optional `UIViewControllerTransitionCoordinator` to perform the animation | |
along side with. For example during a push on a `UINavigationController`. | |
*/ |
extension UITextView { | |
var lineFrames: [CGRect] { | |
let numberOfGlyphs = layoutManager.numberOfGlyphs | |
var numberOfLines = 0 | |
var index = 0 | |
var lineRange = NSRange() | |
let maxNumberOfLines = textContainer.maximumNumberOfLines | |
var lineRects = [CGRect]() | |
while (index < numberOfGlyphs) { |