Skip to content

Instantly share code, notes, and snippets.

PJayRushton / TextRecognitionEngine.swift
Last active June 30, 2021 05:10
iOS 13 Vision Swift Text Detection
View TextRecognitionEngine.swift
import Foundation
import Vision
import VisionKit
@available(iOS 13.0, *)
class TextRecognitionEngine {
private var requests = [VNRequest]()
private let textRecognitionWorkQueue = DispatchQueue(label: "TextRecognitionQueue", qos: .userInitiated, attributes: [], autoreleaseFrequency: .workItem)
private var resultingText = ""
PJayRushton / gist:2ca9a4b008280cca5cd7782127f8fe89
Created February 23, 2017 16:07 — forked from zetachang/gist:4111314
Instruction on adding a Acknowledgements Settings.bundle
View gist:2ca9a4b008280cca5cd7782127f8fe89
  • To add Settings.bundle in Xcode. Command N and in Resource, choose Settings Bundle .
  • Open Root.plist in source code, paste the code below to replace it,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
PJayRushton /
Last active July 7, 2017 13:45
UIStackView demo

UIStackViews Demo

Initial setup

  1. Start a blank, single view application
  2. Add a UIStackView to the main view controller with 4 UIView subviews.
    • Set the stack views properties as follows:
      • Axis: Horizontal
      • Alignment: Fill
      • Distribution: FillEqually
      • Spacing: Whatever u want (But don't go crazy)
  • Set different background colors for each UIView
PJayRushton / iOS Interview
Last active September 14, 2016 14:11
Some iOS interview questions I've come accross
View iOS Interview

##iOS interview questions ###UIKit

  1. Walk me through setting up a table view.
  2. What is the difference between a UITableViewController and a UIViewController with a table view? When would you use one over the other?
  3. Briefly explain the view controller lifecycle.
  4. What does an application's AppDelegate subclass? By default, what protocol does it implement? Name some of those delegate functions?
  5. What is your favorite UIKit API?
  6. What type of UICollectionView layouts have you used?
  7. Have you ever written your own custom control? What was it? Why did you need to use that instead of a standard one?
  8. Name something you could present in a UIViewController that is not a subclass of UIView.