Skip to content

Instantly share code, notes, and snippets.

View hellensoloviy's full-sized avatar

Hellen S. hellensoloviy

  • Kyiv
View GitHub Profile
@warrenm
warrenm / ARQLThumbnailGenerator.swift
Created June 12, 2018 06:31
Generating thumbnail images of 3D model files for use with AR QuickLook
import Foundation
import SceneKit
class ARQLThumbnailGenerator {
private let device = MTLCreateSystemDefaultDevice()!
/// Create a thumbnail image of the asset with the specified URL at the specified
/// animation time. Supports loading of .scn, .usd, .usdz, .obj, and .abc files,
/// and other formats supported by ModelIO.
@hamdan
hamdan / MultipleTapLabel.swift
Last active November 15, 2023 21:26
Create Multiple Tappable Links in a UILabel
extension UITapGestureRecognizer {
func didTapAttributedTextInLabel(label: UILabel, targetText: String) -> Bool {
guard let attributedString = label.attributedText, let lblText = label.text else { return false }
let targetRange = (lblText as NSString).range(of: targetText)
//IMPORTANT label correct font for NSTextStorage needed
let mutableAttribString = NSMutableAttributedString(attributedString: attributedString)
mutableAttribString.addAttributes(
[NSAttributedString.Key.font: label.font ?? UIFont.smallSystemFontSize],
range: NSRange(location: 0, length: attributedString.length)
@yamaya
yamaya / xcode-clang-vers
Last active June 21, 2024 08:25
Xcode clang version record
# Xcode 4.3.3
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
# Xcode 4.3.2
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix