This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zsh | |
cp **/*.pdf /targetfolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frame variable -d r MYVAR | |
fr var MYVAR | |
po MYVAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcrun simctl erase all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
/// Checkbox is a simple, animation free checkbox and UISwitch alternative designed | |
/// to be performant and easy to implement. | |
public class Checkbox: UIControl { | |
// MARK: - Enums | |
/// Shape of the center checkmark that appears when `Checkbox.isChecked == true`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PureLayout | |
extension UIViewController { | |
func addChildController(_ controller: UIViewController, containerView: UIView) { | |
addChild(controller) | |
// When your custom container calls the addChild(_:) method, it automatically calls the willMove(toParent:) method of the view controller to be added as a child before adding it. | |
containerView.addSubview(controller.view) | |
controller.view.translatesAutoresizingMaskIntoConstraints = false | |
controller.view.autoPinToSuperviewEdges() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppStoryboards.swift | |
// AppStoryboards | |
// | |
// Created by Gurdeep on 15/12/16. | |
// Copyright © 2016 Gurdeep. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Data { | |
var sizeMB: String{ | |
let formatter = ByteCountFormatter() | |
formatter.allowedUnits = [.useMB] | |
formatter.countStyle = .file | |
return formatter.string(fromByteCount: Int64(self.count)) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIViewController { | |
func add(_ child: UIViewController) { | |
addChildViewController(child) | |
view.addSubview(child.view) | |
child.didMove(toParentViewController: self) | |
} | |
func remove() { | |
guard parent != nil else { | |
return | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIViewController { | |
func add(_ child: UIViewController) { | |
addChildViewController(child) | |
view.addSubview(child.view) | |
child.didMove(toParentViewController: self) | |
} | |
func remove() { | |
guard parent != nil else { | |
return | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for family in UIFont.familyNames { | |
let sName: String = family as String | |
print("family: \(sName)") | |
for name in UIFont.fontNames(forFamilyName: sName) { | |
print("name: \(name as String)") | |
} | |
} |
NewerOlder