Update
I've moved this gist to https://github.com/phynet/iOS-Schemes please check it there ;)
import Foundation | |
/// An abstract class that makes building simple asynchronous operations easy. | |
/// Subclasses must implement `execute()` to perform any work and call | |
/// `finish()` when they are done. All `NSOperation` work will be handled | |
/// automatically. | |
open class AsynchronousOperation: Operation { | |
// MARK: - Properties |
I've moved this gist to https://github.com/phynet/iOS-Schemes please check it there ;)
import SwiftUI | |
class MyModel: ObservableObject { | |
@Published var attempted: Bool = false | |
@Published var firstname: String = "" { | |
didSet { updateDismissability() } | |
} | |
@Published var lastname: String = "" { |
import Foundation | |
import ObjectiveC.runtime | |
let myString = "foobar" as NSString | |
println(myString.description) | |
let myBlock : @objc_block (AnyObject!) -> String = { (sself : AnyObject!) -> (String) in | |
"✋" | |
} |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
// | |
// ContentView.swift | |
// | |
// Created by Chris Eidhof on 20.04.20. | |
// Copyright © 2020 objc.io. All rights reserved. | |
// | |
import SwiftUI | |
import UIKit |
Generated within the iPhone Simulator (iOS Version 8.4 (12H141))
XS | S | M | L | XL | XXL | XXXL | Accessibility M | AccessibilityL | AccessibilityXL | AccessibilityXXL | AccessibilityXXXL | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
UIFontTextStyleHeadline | 14.0 | 15.0 | 16.0 | 17.0 | 19.0 | 21.0 | 23.0 | 23.0 | 23.0 | 23.0 | 23.0 | 23.0 |
UIFontTextStyleSubheadline | 12.0 | 13.0 | 14.0 | 15.0 | 17.0 | 19.0 | 21.0 | 21.0 | 21.0 | 21.0 | 21.0 | 21.0 |
UIFontTextStyleBody | 14.0 | 15.0 | 16.0 | 17.0 | 19.0 | 21.0 | 23.0 | 28.0 | 33.0 | 40.0 | 47.0 | 53.0 |
UIFontTextStyleFootnote | 12.0 | 12.0 | 12.0 | 13.0 | 15.0 | 17.0 | 19.0 | 19.0 | 19.0 | 19.0 | 19.0 | 19.0 |
UIFontTextStyleCaption1 | 11.0 | 11.0 | 11.0 | 12.0 | 14.0 | 16.0 | 18.0 | 18.0 | 18.0 | 18.0 | 18.0 | 18.0 |
UIFontTextStyleCaption2 | 11.0 | 11.0 | 11.0 | 11.0 | 13.0 | 15.0 | 17.0 | 17.0 | 17.0 | 17.0 | 17.0 | 17.0 |
// iOS 9 allows you to animate between visual effects, which gives you the | |
// ability to manipulate the blur radius. this can be useful for animating | |
// a backdrop for a custom modal, and with a few tricks, can even be set | |
// indirectly, allowing you to "scrub" between them back and forth with | |
// a gesture, just like when you pull down Spotlight. | |
// these are the two effects you want to transition between | |
UIVisualEffect *startEffect = nil; // "nil" means no blur/tint/vibrancy (plain, fully-transparent view) | |
UIVisualEffect *endEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; |
// | |
// UIView+SafeAnchors.swift | |
// | |
extension UIView { | |
var safeTopAnchor: NSLayoutYAxisAnchor { return optionalSafeAreaLayoutGuide?.topAnchor ?? topAnchor } | |
var safeBottomAnchor: NSLayoutYAxisAnchor { return optionalSafeAreaLayoutGuide?.bottomAnchor ?? bottomAnchor } | |
var safeLeftAnchor: NSLayoutXAxisAnchor { return optionalSafeAreaLayoutGuide?.leftAnchor ?? leftAnchor } |