See also: UIApplicationDelegate
documentation
// AppDelegate.swift
@main
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
See also: UIApplicationDelegate
documentation
// AppDelegate.swift
@main
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
import UIKit | |
final class Slider: UISlider { | |
private let baseLayer = CALayer() // Step 3 | |
private let trackLayer = CAGradientLayer() // Step 7 | |
override func draw(_ rect: CGRect) { | |
super.draw(rect) | |
setup() |
Click on the project you want to rename in the "Project navigator" in the left panel of the Xcode window.
In the right panel, select the "File inspector", and the name of your project should be found under "Identity and Type". Change it to your new name.
When the dialog asks whether to rename or not rename the project's content items, click "Rename". Say yes to any warning about uncommitted changes.
// | |
// ContentView.swift | |
// TemperatureControl | |
// | |
// Created by Anik on 10/9/20. | |
// | |
import SwiftUI | |
struct ContentView: View { |
import AVFoundation | |
import Combine | |
// simply use | |
// player.periodicTimePublisher() | |
// .receive(on: RunLoop.main) | |
// .assign(to: \SomeClass.elapsedTime, on: someInstance) | |
// .store(in: &cancelBag) |
// | |
// Inject.swift | |
// | |
// Created by Iurii Iaremenko on 11.01.2020. | |
// | |
import Foundation | |
@propertyWrapper | |
public class Inject<Value> { |
#!/bin/bash | |
## postinstall script to remove CCDA applications | |
# remove any existing version of the tool | |
echo "Moving the CC Cleaner app to Utilities in case users need it later" | |
rm -rf /Applications/Utilities/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app ||: | |
mv /Applications/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app /Applications/Utilities/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app | |
# run the cleaner tool to remove EVERYTHING! | |
echo "Running the CC Cleaner app with 'removeAll=All' option" |
@discardableResult | |
private func performRequest<T:Decodable>(route: APIRouter, decoder: JSONDecoder = JSONDecoder(), completion:@escaping (Int, Result<T>)->Void) -> DataRequest { | |
return Alamofire.request(route).responseData() { responseData in | |
guard let response = responseData.response else { | |
completion(APIClient.responseErrorCode, .failure(ApiError.internalServerError(NSLocalizedString("service_error", comment: AppConstant.EMPTY)))) | |
return | |
} | |
extension UIAlertController { | |
// MARK: - Typealias | |
typealias Alert = UIAlertController | |
typealias Action = UIAlertAction | |
typealias Block = ((Alert) -> Void)? | |
// MARK: - Static function | |