Skip to content

Instantly share code, notes, and snippets.

@MathieuWhite
MathieuWhite / FacebookManager.swift
Created April 2, 2016 12:46
Facebook user management for login and logout in Swift.
//
// FacebookManager.swift
//
// Created by Mathieu White on 2016-02-07.
// Copyright © 2016 Mathieu White. All rights reserved.
//
import UIKit
import FBSDKCoreKit
import FBSDKLoginKit
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active December 23, 2024 15:56 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@mukhortov
mukhortov / UIView+backgroundImage.swift
Last active April 12, 2021 20:26
Add background image to UIView
import UIKit
extension UIView {
func backgroundImage(named: String) {
let backgroundImage = UIImageView(frame: self.frame)
backgroundImage.image = UIImage(named: named)
backgroundImage.contentMode = .scaleAspectFill
backgroundImage.translatesAutoresizingMaskIntoConstraints = false
backgroundImage.center = self.center
backgroundImage.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin, .flexibleTopMargin, .flexibleBottomMargin]
@Gujci
Gujci / CustomTextField.swift
Last active November 16, 2022 17:42
Simple snippet how to disable actions in a UITextField
import UIKit
@IBDesignable
class CustomTextField: UITextField {
@IBInspectable var isPasteEnabled: Bool = true
@IBInspectable var isSelectEnabled: Bool = true
@IBInspectable var isSelectAllEnabled: Bool = true