This file contains hidden or 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
| /// This is a list of Hypertext Transfer Protocol (HTTP) response status codes. | |
| /// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes. | |
| /// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum. | |
| enum HTTPStatusCode: Int, Error { | |
| /// The response class representation of status codes, these get grouped by their first digit. | |
| enum ResponseType { | |
| /// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. | |
| case informational |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override |
This file contains hidden or 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
| // Create a UIViewPropertyAnimator object. Here's a simple one with a UIKit animation curve: | |
| let colorChange = UIViewPropertyAnimator(duration: 0.3, curve: .easeIn, animations: { [weak self] in | |
| self?.view.backgroundColor = UIColor(red: 255.0/255.0, green: 80.0/255.0, blue: 43.0/255.0, alpha: 1.0) | |
| }) | |
| // There's also support for easy spring-based animations - all you need to set is a damping ratio (a value between 0 and 1). Alternatively, you can create your own curves by adopting the UITimingCurveProvider protocol. | |
| let alphaChange = UIViewPropertyAnimator(duration: 0.3, dampingRatio: 0.6, animations: { [weak self] in | |
| self?.circleView.alpha = 0.0 | |
| }) |
This file contains hidden or 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
| import Foundation | |
| extension UnicodeScalar { | |
| /// Note: This method is part of Swift 5, so you can omit this. | |
| /// See: https://developer.apple.com/documentation/swift/unicode/scalar | |
| var isEmoji: Bool { | |
| switch value { | |
| case 0x1F600...0x1F64F, // Emoticons | |
| 0x1F300...0x1F5FF, // Misc Symbols and Pictographs | |
| 0x1F680...0x1F6FF, // Transport and Map |
This file contains hidden or 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
| import Foundation | |
| import Reachability | |
| //Reachability | |
| //declare this property where it won't go out of scope relative to your listener | |
| fileprivate var reachability: Reachability! | |
| protocol ReachabilityActionDelegate { | |
| func reachabilityChanged(_ isReachable: Bool) |
This file contains hidden or 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
| class ReachabilityHandler: ReachabilityObserverDelegate { | |
| //MARK: Lifecycle | |
| required init() { | |
| try? addReachabilityObserver() | |
| } | |
| deinit { | |
| removeReachabilityObserver() |
This file contains hidden or 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
| import Foundation | |
| import SystemConfiguration | |
| class Reachability | |
| { | |
| var hostname: String? | |
| var isRunning = false | |
| var isReachableOnWWAN: Bool | |
| var reachability: SCNetworkReachability? | |
| var reachabilityFlags = SCNetworkReachabilityFlags() |
This file contains hidden or 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
| /** | |
| * Copyright (c) 2017 Razeware LLC | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
This file contains hidden or 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
| // | |
| // Theme.swift | |
| // SHSH Host | |
| // | |
| // Created by ninja on 31/12/19. | |
| // Copyright © 2019 arx8x.net. All rights reserved. | |
| // | |
| import UIKit |
NewerOlder