Skip to content

Instantly share code, notes, and snippets.

View csr's full-sized avatar
🐶

Cesare De Cal csr

🐶
View GitHub Profile
@justsml
justsml / fetch-api-examples.md
Last active February 24, 2024 18:05
JavaScript Fetch API Examples
import UIKit
import ImageRow
import Eureka
class CustomImagePickerController: ImagePickerController {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default // For dark status bar
//return .lightContent // For light status bar
}
}
@raulriera
raulriera / ConcealingTitleView.swift
Last active February 12, 2023 21:54
Final implementation for the Medium article "The case of the disappearing titleView" https://medium.com/shopify-mobile/the-case-of-the-disappearing-titleview-%EF%B8%8F-e516ffd2fea2
import Foundation
final class ConcealingTitleView: UIView {
private let label = UILabel()
private var contentOffset: CGFloat = 0 {
didSet {
label.frame.origin.y = titleVerticalPositionAdjusted(by: contentOffset)
}
}
var text: String = "" {
@Pretz
Pretz / uiviewcontroller-playground.swift
Created December 8, 2015 23:37
UIViewController Playground: because getting a UIViewController/UINavigationController to display properly in a playground is a little non-obvious
import UIKit
let vc = UIViewController()
vc.view.backgroundColor = .whiteColor()
vc.navigationItem.title = "This is a view controller"
let searchController = UISearchController(searchResultsController: nil)
//searchController.searchBar.barTintColor = UIColor(red:0.16, green:0.45, blue:0.72, alpha:1)