This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// Teeeeee | |
// | |
// Created by Bartleby Cartman on 23.11.2020. | |
// | |
import UIKit | |
class ViewController: UIViewController, UITextFieldDelegate { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL Schemes | |
Apple | |
Apple Music — music://geo.itunes.apple.com/us/albums/<albumID> | |
– music://geo.itunes.apple.com/us/artists/<artistID> | |
Apple News — applenews:// | |
App Store — itms-apps://itunes.apple.com/app/<appID> | |
Apple TV — videos:// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIViewController { | |
func topMostViewController() -> UIViewController { | |
if let presented = self.presentedViewController { | |
return presented.topMostViewController() | |
} | |
if let navigation = self as? UINavigationController { | |
return navigation.visibleViewController?.topMostViewController() ?? navigation | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open class LinearScale { | |
var domain: [CGFloat] | |
var range: [CGFloat] | |
public init(domain: [CGFloat] = [0, 1], range: [CGFloat] = [0, 1]) { | |
self.domain = domain | |
self.range = range | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSArray *)imageURLs | |
{ | |
if (!_imageURLs) | |
{ | |
NSMutableArray *imageURLs = [NSMutableArray array]; | |
for (NSInteger index = 0; index < 100; ++index) | |
{ | |
[imageURLs addObject:[NSString stringWithFormat: | |
@"http://dummyimage.com/200/%06X/%06X&text=%ld", |