Skip to content

Instantly share code, notes, and snippets.

View ekazaev's full-sized avatar
🎓
Looking for an interesting job. Coding for fun since 1994, for food since 2003.

Eugene Kazaev ekazaev

🎓
Looking for an interesting job. Coding for fun since 1994, for food since 2003.
View GitHub Profile
@susanstevens
susanstevens / iphone-popover.md
Last active September 8, 2023 02:25
How to Create a Popover on iPhone

How to Create a Popover on iPhone

Storyboard set up

Add your view controllers in storyboard. In the Size Inspector, change the simulated size of the popover view controller to "Freeform". This doesn't change the popover's size when you run the app, but it does make it easier to lay out subviews correctly.

storyboard

When adding the segue between view controllers, select "Present as Popover".

@Qata
Qata / JSON.swift
Last active April 18, 2019 00:27
A JSONDecoder that wraps a JSONParser that isomorphically preserves the values of floating point numbers by treating all numbers as strings until instantiation of the exact type.
import Foundation
public indirect enum JSON: Equatable {
case null
case string(String)
case number(String)
case bool(Bool)
case dictionary([String: JSON])
case array([JSON])
}