Skip to content

Instantly share code, notes, and snippets.

View pilot34's full-sized avatar

Gleb pilot34

  • Booking.com
  • Amsterdam
View GitHub Profile
Privacy Policy
Your privacy is important to us. It is ParkingGuru's policy to respect your privacy regarding any information we may collect from you across our website, http://parkinggu.ru, and other sites we own and operate.
We only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.
We only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorized access, disclosure, copying, use or modification.
We don’t share any personally identifying information publicly or with third-parties, except when required to by law.
Our website may link to external sites that are not operated by us. Please be aware that we have no control over the content and practices of these sites, and cannot acce
class MyView: UIView {
private var preferredMaxLayoutWidth: CGFloat? {
didSet {
invalidateIntrinsicContentSize()
setNeedsLayout()
}
}
override var intrinsicContentSize: CGSize {
return performLayout(changeFrames: false, width: preferredMaxLayoutWidth)
class MyView: UILabel {
init() {
super.init(frame: .zero)
numberOfLines = 0
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@pilot34
pilot34 / ConstantAreaView.swift
Last active July 7, 2023 13:05
Dynamic intrinsicContentSize example
//
// ViewController.swift
// ConstantArea
//
// Created by Gleb Tarasov on 24.05.2020.
// Copyright © 2020 Gleb Tarasov. All rights reserved.
//
import UIKit
@pilot34
pilot34 / LaunchTime.swift
Last active January 21, 2021 16:32
What is included into XCTApplicationLaunchMetric
@objc class AppDelegate: UIResponder, UIApplicationDelegate {
override init() {
debugPrint("AppDelegate.init")
super.init()
}
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {