label int64 0 1 | text stringlengths 0 2.8M |
|---|---|
0 | //
// KeychainManager.swift
// CoatCode
//
// Created by 강민석 on 2020/10/05.
// Copyright © 2020 MinseokKang. All rights reserved.
//
import Foundation
import KeychainAccess
class KeychainManager {
static let shared = KeychainManager()
fileprivate let usernameKey = "usernameKey"
private init() { }
... |
0 | //
// PreviewUI.swift
// ReformTools
//
// Created by Laszlo Korte on 30.08.15.
// Copyright © 2015 Laszlo Korte. All rights reserved.
//
public final class MaskUI {
public enum State {
case disabled
case clip(x: Double, y: Double, width: Double, height: Double)
}
public var state : St... |
0 | import Foundation
import UIKit
/**
A view controller that supports interaction to start removing transiton.
It works as a wrapper for another view controller or using with subclassing.
If you have already implementation of view controller and want to get flexibility, you can use this class as a wrapper.
```swift... |
0 | import Foundation
import MapKit
protocol Region {
// Internal representation
var points:[CLLocationCoordinate2D] { get }
var title:String { get }
// Map presentation
var annotations:[MKAnnotation] { get }
var overlays:[MKOverlay] { get }
// Serialization
func toJSON() -> String
st... |
0 | //
// UIColor+TweaksTests.swift
// SwiftTweaks
//
// Created by Bryan Clark on 11/20/15.
// Copyright © 2015 Khan Academy. All rights reserved.
//
import XCTest
@testable import SwiftTweaks
class UIColor_TweaksTests: XCTestCase {
// MARK: Hex-To-Color
private struct HexToColorTestCase {
let string: String
... |
0 | // 378. Kth Smallest Element in a Sorted Matrix
/**
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.
Note that it is the kth smallest element in the sorted order, not the kth distinct element.
Example:
matrix = [
[ 1, 5, 9],
[... |
0 | //
// FilterViewController.swift
// Ookami
//
// Created by Maka on 22/2/17.
// Copyright © 2017 Mikunj Varsani. All rights reserved.
//
import UIKit
import Cartography
//A View controller for displaying a list of filters
class FilterViewController: UIViewController {
//The table view
lazy var tableV... |
0 | //
// ViewController.swift
// transitions
//
// Created by Daniel Alpizar on 4/9/21.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func SegueTapped(_ sender: An... |
0 | //
// TLStoryOverlayControlView.swift
// TLStoryCamera
//
// Created by GarryGuo on 2017/5/31.
// Copyright © 2017年 GarryGuo. All rights reserved.
//
import UIKit
protocol TLStoryOverlayControlDelegate: NSObjectProtocol {
func storyOverlayCameraRecordingStart()
func storyOverlayCameraRecordingFinish(type:... |
0 | //
// SettingsTableViewController.swift
// WeatherApp
//
// Created by Suraj Shandil on 7/29/21.
//
import UIKit
class SettingsTableViewController: UITableViewController {
@IBOutlet weak var unitsSegment: UISegmentedControl!
@IBOutlet weak var mapTypeSegment: UISegmentedControl!
@IBOutlet weak var res... |
0 | //
// LogsTool.swift
// Baymax
//
// Created by Simon Mitchell on 01/04/2020.
// Copyright © 2020 3 SIDED CUBE. All rights reserved.
//
import Foundation
/// A tool for displaying logs collated using `Logger` objects
public class LogsTool: DiagnosticTool {
/// Disables or enables Baymax logging
publi... |
0 | //
// ViewController.swift
// Chambas
//
// Created by David Velarde on 11/3/16.
// Copyright © 2016 Area51. All rights reserved.
//
import UIKit
class ViewController: UIViewController,UITableViewDataSource,UITableViewDelegate {
var arrayEmpresas = [Empresa]()
var empresaSeleccionada : Empresa?
... |
0 | //
// Character.swift
// GOT-Challenge-Swift
//
// Created by Conrado Mateu Gisbert on 08/03/17.
// Copyright © 2017 conradomateu. All rights reserved.
//
import Foundation
@testable import GOT_Challenge_Swift
extension GOT_Challenge_Swift.Character: Equatable {
}
public func == (lhs: GOT_Challenge_Swift.Charact... |
0 | import Syft
enum SongExpressionError: Error {
case unknown
}
protocol SongExpression {
func evaluate() -> String
}
struct SongNumber: SongExpression {
let value: Int
func evaluate() -> String {
return "\(value)"
}
}
//func song() -> Pipeline<SongExpression> {
//// let input = "[].len... |
0 | //
// FontMetrics.swift
// Capable
//
// Created by Christoph Wendt on 31.03.18.
//
import Foundation
import UIKit
class FontMetrics: FontMetricsProtocol {
var osVersionProvider: OsVersionProviderProtocol
init() {
self.osVersionProvider = OsVersionProvider()
}
var scaler: CGFloat... |
0 | //
// FunctionalSwiftExampleUITests.swift
// FunctionalSwiftExampleUITests
//
// Created by Daniel Mandea on 06/05/2019.
// Copyright © 2019 Daniel Mandea. All rights reserved.
//
import XCTest
class FunctionalSwiftExampleUITests: XCTestCase {
override func setUp() {
// Put setup code here. This meth... |
0 | //
// RSSItem.swift
// SwiftRSS_Example
//
// Created by Thibaut LE LEVIER on 28/09/2014.
// Copyright (c) 2014 Thibaut LE LEVIER. All rights reserved.
//
import UIKit
class RSSItem: NSObject, NSCoding {
var title: String?
var link: NSURL?
func setLink(let linkString: String!)
{
link ... |
0 | //
// AddItemViewController.swift
// ToDoList
//
// Created by Alex Paul on 1/9/19.
// Copyright © 2019 Alex Paul. All rights reserved.
//
import UIKit
class AddItemViewController: UIViewController {
@IBOutlet weak var titleTextView: UITextView!
@IBOutlet weak var descriptionTextView: UITextView!
priv... |
0 | //
// Cache+Switch.swift
// George Tsifrikas
//
// Created by George Tsifrikas on 12/06/2017.
// Copyright © 2017 George Tsifrikas. All rights reserved.
//
import Foundation
public enum CacheSwitchResult {
/// The first Cache of the switch
case cacheA
/// The second Cache of the switch
case cacheB... |
0 | //
// RegisterViewController.swift
// register_login_template
//
// Created by Sarvad shetty on 1/18/18.
// Copyright © 2018 Sarvad shetty. All rights reserved.
//
import UIKit
import Firebase
class RegisterViewController: UIViewController {
//MARK: Outlets
@IBOutlet weak var regButton: UIButton!
... |
0 | //===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIB... |
0 | //
// Selfinfo.swift
// FeedMyFit
//
// Created by 祁汝鑫 on 2020/8/6.
//
import Foundation
// MARK: - Request
// Id=xxxxxxx&Token=xxxxxxx
// MARK: - Return
struct Selfinfo: Codable {
var Phonenumber: String
var Avatar: String?
var Username: String
var Sex: String
var Height: Double
var... |
0 | //
// StringEx.swift
// AppSpawnKey
//
// Created by TKOxff on 2021/03/14.
//
import Foundation
extension String {
// App Name.app -> App Name
var splitedAppName : String {
let substrings = self.split(separator: ".")
return String(substrings.first ?? "")
}
}
|
0 | //
// storage.swift
// NebulaeCommission
//
// Created by Mayur.Patel.653 on 07/07/21.
//
import Foundation
public class Storage{
static let shared = Storage()
private let defaults = UserDefaults.standard
var notificationToken : String? = nil
// func setConnectionMode(cMode :... |
0 | //
// ATHMPurchaseResponse.swift
// athmovil-checkout
//
// Created by Hansy Enrique on 7/19/20.
// Copyright © 2020 Evertec. All rights reserved.
//
import Foundation
@objc(ATHMPaymentResponse)
final public class ATHMPaymentResponse: NSObject {
/// Current payment, it is the same object that the cli... |
0 | import Foundation
import Shared
public struct SPM {
public struct Package: Decodable {
public static func load() throws -> Self {
let shell = Shell()
let jsonString = try shell.exec(["swift", "package", "describe", "--type", "json"], stderr: false)
guard let jsonData = ... |
0 | //
// ViewController.swift
// TwilioTest
//
// Created by fawad on 22/01/2017.
// Copyright © 2017 fawad. All rights reserved.
//
import UIKit
import Alamofire
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func availab... |
0 | import UIKit
class GameView: UIView {
weak var delegate: GameViewDelegate?
init() {
super.init(frame: .zero)
backgroundColor = UIColor(color: .darkPurple383357)
addSubviews()
setupLayout()
configurePauseButtonAction()
configureRestartButtonAction()
}
r... |
0 | //
// AppDelegate.swift
// AppStoreReviews
//
// Created by Dmitrii Ivanov on 21/07/2020.
// Copyright © 2020 ING. All rights reserved.
//
import Foundation
struct Review: Codable {
let author: String
let version: String
let rating: Int
let title: String
let id: String
let content: String
... |
0 | //
// SelectionTypeModule.swift
// UsbongKit
//
// Created by Chris Amanse on 26/05/2016.
// Copyright © 2016 Usbong Social Systems, Inc. All rights reserved.
//
import Foundation
/// Protocol for selection type
public protocol SelectionTypeModule: Module {
var selectedIndices: [Int] { get }
func selectIn... |
0 | //
// ChartAxisValuesGeneratorNice.swift
// SwiftCharts
//
// Created by ischuetz on 04/08/16.
// Copyright © 2016 ivanschuetz. All rights reserved.
//
import UIKit
open class ChartAxisValuesGeneratorNice: ChartAxisGeneratorMultiplier {
open override var first: Double? {
return Double(minValue)
... |
0 | import XCTest
@testable import WordPress
class DashboardStatsViewModelTests: XCTestCase {
func testReturnCorrectDataFromAPIResponse() {
// Given
let statsData = BlogDashboardRemoteEntity.BlogDashboardStats(views: 1, visitors: 2, likes: 3, comments: 0)
let apiResponse = BlogDashboardRemoteE... |
0 | /// The declaration of a nominal type.
public protocol NominalTypeDecl: NamedDecl {
/// The semantic type represented by the declaration.
var type: BareType? { get }
}
|
0 | //
// Foundation+Tips.swift
// RxTips
//
// Created by Yu Sugawara on 2019/11/07.
// Copyright © 2019 Yu Sugawara. All rights reserved.
//
import Foundation
import Then
extension JSONEncoder: Then {}
extension JSONEncoder {
static var `default`: JSONEncoder {
return JSONEncoder().then {
$0.dateEnco... |
0 | //
// GenericProtocolTest.swift
// Cuckoo
//
// Created by Matyáš Kříž on 26/11/2018.
//
import XCTest
import Cuckoo
private class GenericProtocolConformerClass<C: AnyObject, V>: GenericProtocol {
let readOnlyPropertyC: C
var readWritePropertyV: V
let constant: Int = 0
var optionalProperty: V?
... |
0 |
import UIKit
extension String {
public var CGColor: CGColorRef {
return self.CGColor(1)
}
public var UIColor: UIKit.UIColor {
return self.UIColor(1)
}
public func CGColor (alpha: CGFloat) -> CGColorRef {
return self.UIColor(alpha).CGColor
}
public func UIColor (alpha: CGFloat) -> UIK... |
0 | //
// PieChartView.swift
// Charts
//
// Created by Daniel Cohen Gindi on 4/3/15.
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
// A port of MPAndroidChart for iOS
// Licensed under Apache License 2.0
//
// https://github.com/danielgindi/ios-charts
//
import Foundation
import UIKit
/// View that rep... |
0 | //
// InfoView.swift
// Pods
//
// Created by Anatoliy Voropay on 5/11/16.
//
//
import UIKit
/**
Position of arrow in a view
- Parameter None: View will be without arrow
- Parameter Automatic: We will try to select most suitable position
- Parameter Left, Right, Top, Bot... |
0 | // swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "nickdonald-boilerplate",
platforms: [
.macOS(.v12)
],
products: [
// Products define the executables and l... |
0 | //
// Objects.swift
// Notes
//
// Created by Eric Saba on 1/31/16.
// Copyright © 2016 Eric Saba. All rights reserved.
//
import Foundation
import MapKit
import QuartzCore
let ACCENT_COLOR: UIColor = UIColor(red: 14.0 / 255, green: 127.0 / 255, blue: 255.0 / 255, alpha: 1.0)
let SCENERY_COLOR: UIColor = UIColor(... |
0 | import XCTest
import Combine
@testable import Bitkub
final class BitkubTests: XCTestCase {
var cancellables: Set<AnyCancellable> = Set<AnyCancellable>()
func testLoadCoins() {
let expectation = XCTestExpectation(description: "Coin values recovered from Bitkub")
let controller = BitkubController()
controller.l... |
0 | //
// FVRecognitionTrainController.swift
// FaceTrainerPackageDescription
//
// Created by Arman Galstyan on 12/17/17.
//
import Foundation
import LASwift
import AppKit
public final class FVPerson {
private var _faceID: String!
public var faceID: String {
return _faceID
}
public init(... |
0 | /*:
# Closures
Closures are self-contained blocks of functionality that can be passed around
and used in your code.
Functions are actually special cases of closures. Closures take one of three forms:
- Global functions are closures that **have a name** and do not capture any values.
- Nested functions are... |
0 | import UIKit
import LoyaltyStation
class ViewController: UIViewController {
@IBOutlet weak var views: UIView!
@IBAction func open(_ sender: Any) {
LoyaltyStation.open(on: self)
}
@IBAction func login(_ sender: Any) {
LoyaltyStation.login(user: User(id: "test-id", firstName: "... |
0 | import UIKit
import StorageKit
import RxSwift
public class Kit {
private static let supportedCurrencies = [
Currency(code: "AUD", symbol: "A$", decimal: 2),
Currency(code: "BRL", symbol: "R$", decimal: 2),
Currency(code: "CAD", symbol: "C$", decimal: 2),
Currency(code: "CHF", sym... |
0 | //
// AppDelegate.swift
// HaroldExample
//
// Created by Lacy Rhoades on 6/28/17.
// Copyright © 2017 Lacy Rhoades. All rights reserved.
//
import UIKit
import Harold
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var scanner: Harold?
func a... |
0 | //
// BaseController.swift
// NewToday
//
// Created by 吴腾通 on 2020/3/2.
// Copyright © 2020 FL SMART. All rights reserved.
//
import UIKit
class BaseController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func touchesEnded(_ touches: Set... |
0 | extension PhotoEditorController: UITextViewDelegate {
public func textViewDidChange(_ textView: UITextView) {
let rotation = atan2(textView.transform.b, textView.transform.a)
if rotation == 0 {
let oldFrame = textView.frame
let sizeToFit = textView.sizeThatFits(CGSize(width: oldFrame.width, height... |
0 | //
// AppDelegate.swift
// YiMaiPatient
//
// Created by ios-dev on 16/8/13.
// Copyright © 2016年 yimai. All rights reserved.
//
import UIKit
import CoreData
import UMSocialCore
import UMSocialNetwork
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
var window: UIWind... |
0 | //
// TriggerActionHandler.swift
//
// Created by ToKoRo on 2017-09-03.
//
import HomeKit
protocol TriggerActionHandler {
func handleRemove(_ trigger: HMTrigger)
}
|
0 | //
// HighlightableRoundedButtonTests.swift
// AHDownloadButton_Tests
//
// Created by Amer Hukic on 28/01/2019.
// Copyright © 2019 CocoaPods. All rights reserved.
//
import XCTest
@testable import AHDownloadButton
class HighlightableRoundedButtonTests: XCTestCase {
var highlightableRoundedButton: Highl... |
0 | //
// CreateContestCoordinator.swift
// lily
//
// Created by Nathan Chan on 9/13/17.
// Copyright © 2017 Nathan Chan. All rights reserved.
//
import UIKit
protocol CreateContestCoordinatorDelegate: class {
func createContestCoordinatorDelegateDidCancel(_ createContestCoordinator: CreateContestCoordinator)
... |
0 | //
// Utils.swift
// App
//
// Created by Luis Vasquez on 19/05/20.
// Copyright © 2020 Cisco. All rights reserved.
//
import UIKit
class Utils: NSObject {
static func showAlert(controller: UIViewController, title: String, message: String){
let alert = UIAlertController(title: "Network Error", me... |
0 | //
// SCDefinitionDisplayView.swift
// AussieDataHelper
//
// Created by Stephen Cao on 29/6/19.
// Copyright © 2019 Stephencao Cao. All rights reserved.
//
import UIKit
protocol SCDefinitionDisplayViewDelegate: NSObjectProtocol {
func didClickKeyboardSearchKey(view: SCDefinitionDisplayView)
func didScroll... |
0 | // The MIT License (MIT)
// Copyright © 2017 Ivan Vorobei (vvkpx@example.com)
//
// 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 right... |
0 | //
// SceneDelegate.swift
// BetterReads
//
// Created by Ciara Beitel on 4/16/20.
// Copyright © 2020 Labs23. All rights reserved.
//
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene,
willConnectTo session: UISceneSe... |
0 | //
// ModifierMatchController.swift
// MonTennis
//
// Created by Thomas Luquet on 01/07/2015.
// Copyright (c) 2015 Thomas Luquet. All rights reserved.
//
import UIKit
class ModifierMatchController: UITableViewController {
internal var match: Match!
internal var id: Int!
override func viewDidLo... |
0 | //
// AUParamsApp
// AudioUnitViewController.swift
//
// last build: macOS 10.13, Swift 4.0
//
// Created by Gene De Lisa on 5/25/18.
// Copyright ©(c) 2018 Gene De Lisa. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source ... |
End of preview. Expand in Data Studio
- Downloads last month
- 10