Skip to content

Instantly share code, notes, and snippets.

View rsaenzi's full-sized avatar
🏠
Working from home

Rigoberto Sáenz Imbacuán rsaenzi

🏠
Working from home
View GitHub Profile
@rsaenzi
rsaenzi / Textfield+Placeholder.swift
Created July 6, 2019 22:57
Set the Placeholder color of UITextfield for iOS
//
// Textfield+Placeholder.swift
//
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/)
// Copyright © 2019. All rights reserved.
//
import UIKit
extension UITextField {
@rsaenzi
rsaenzi / ExportFramework.bash
Created June 30, 2019 18:54
Script to export iOS Frameworks for Simulator and Devices
// Taken from: https://instabug.com/blog/ios-binary-framework/
FRAMEWORK_NAME="HelloLoggingFramework"
SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"
DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework"
DEVICE_BCSYMBOLMAP_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos"
@rsaenzi
rsaenzi / UITextField+PhoneMask.swift
Last active October 17, 2019 02:38
Extension to add Phone Number mask on a textfield in iOS
//
// UITextField+PhoneMask.swift
//
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/)
// Copyright © 2019. All rights reserved.
//
import UIKit
extension UITextField {
@rsaenzi
rsaenzi / PointAtMouse.cs
Last active August 9, 2023 10:57
Script to make a gameobject look at the mouse position in Unity
//
// PointAtMouse.cs
//
// Created by Rigoberto Sáenz Imbacuán (https://linkedin.com/in/rsaenzi/)
// Copyright © 2021. All rights reserved.
//
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@rsaenzi
rsaenzi / CommonTextfieldValidations.swift
Created June 15, 2019 05:03
Function that contains common validations for a textfield
//
// CommonTextfieldValidations.swift
//
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/)
// Copyright © 2019. All rights reserved.
//
extension MyViewController: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
@rsaenzi
rsaenzi / podfile
Last active July 22, 2019 13:58
List of common iOS libraries that can be installed using Cocoapods
#
# podfile
#
# Created by Rigoberto Sáenz Imbacuán (https:#www.linkedin.com/in/rsaenzi/)
# Copyright © 2019. All rights reserved.
#
# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'
@rsaenzi
rsaenzi / UIApplication+AppVersion.swift
Created June 12, 2019 17:51
Functions to get the version and build numbers in an iOS app
//
// UIApplication+AppVersion.swift
//
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/)
// Copyright © 2019. All rights reserved.
//
import UIKit
extension UIApplication {
@rsaenzi
rsaenzi / AppDelegate.swift
Last active June 12, 2019 17:50
Small function to get the App Delegate of any iOS app
//
// AppDelegate.swift
//
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/)
// Copyright © 2019. All rights reserved.
//
extension AppDelegate {
static func getDelegate() -> AppDelegate {
@rsaenzi
rsaenzi / NextResponder.swift
Created June 8, 2019 19:57
Functions to find the next responder in an iOS app
//
// NextResponder.swift
//
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/)
// Copyright © 2019. All rights reserved.
//
extension NextResponder: UITextFieldDelegate {
private func setupInitLogic() {
@rsaenzi
rsaenzi / Theme.swift
Last active June 6, 2019 17:51
Theme controller to apply a color set over all UI views in an iOS app
//
// Theme.swift
//
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/)
// Copyright © 2019. All rights reserved.
//
import UIKit
class Theme {