Skip to content

Instantly share code, notes, and snippets.

//:
//: UIView Animation Syntax Sugar
//:
//: Created by Andyy Hope on 18/08/2016.
//: Twitter: @andyyhope
//: Medium: Andyy Hope, https://medium.com/@AndyyHope
import UIKit
extension UIView {
@tadija
tadija / FontNames-iOS-17.4.swift
Last active April 19, 2024 02:47
iOS - All Font Names
/*
*** Academy Engraved LET ***
AcademyEngravedLetPlain
---------------------
*** Al Nile ***
AlNile
AlNile-Bold
---------------------
*** American Typewriter ***
AmericanTypewriter
@lukaskollmer
lukaskollmer / hack.m
Created June 21, 2016 15:30
UITextView: Allow tapping links from NSAttributedString, but disallow text selection
/**
Note to self:
This UITextView class extension gets calles every time iOS wants to add a new gesture recognizer to the textView.
It checks for the type of the gesture recognizer (Long Press) and then for the associated action.
Only if the action is ``smallDelayRecognizer:``, the gestuere recognizer will stay enabled.
All otheer long press gestures will be disabled.
Purpose:
Allow user interaction with the links in the attributedText, but disallow text selection
@joemasilotti
joemasilotti / ..md
Last active September 13, 2022 14:20
Resetting NSUserDefaults in UI Testing

Resetting NSUserDefaults in UI Testing

  1. Add "UI-Testing" to launchArguments before launching the app under test
  2. On launch, check for the argument in AppDelegate.swift
  3. If it exists remove everything for the app's domain from NSUserDefaults
/**
* 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具
*
* 参考 https://github.com/wandergis/coordtransform 实现的Java版本
* @author geosmart
*/
public class CoordinateTransformUtil {
static double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
// π
static double pi = 3.1415926535897932384626;
@jmaxhu
jmaxhu / .git-commit-template.txt
Last active August 21, 2023 06:29 — forked from adeekshith/.git-commit-template.txt
一份建议的git commit模板
# <类型>: (类型的值见下面描述) <主题> (最多50个字)
# 解释为什么要做这些改动
# |<---- 请限制每行最多72个字 ---->|
# 提供相关文章和其它资源的链接和关键字
# 例如: Github issue #23
# --- 提交 结束 ---
# 类型值包含
@ValCanBuild
ValCanBuild / Podfile
Created March 3, 2016 11:39
Using variables in your Podfile
platform :ios, '9.0'
use_frameworks!
$rxVersion = '~> 2.2.0'
target 'MyProject' do
pod 'RxSwift', $rxVersion
pod 'RxCocoa', $rxVersion
end
@adeekshith
adeekshith / .git-commit-template.txt
Last active February 21, 2024 12:06 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@nlutsenko
nlutsenko / yolo.sh
Last active February 26, 2024 16:10
Fast Xcode builds
defaults write xcodebuild PBXNumberOfParallelBuildSubtasks 4
defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4
defaults write com.apple.xcode PBXNumberOfParallelBuildSubtasks 4
defaults write com.apple.xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4