text stringlengths 8 1.32M |
|---|
//
// Splash.swift
// PalmTree
//
// Created by SprintSols on 3/7/20.
// Copyright © 2020 apple. All rights reserved.
//
import UIKit
import NVActivityIndicatorView
import CoreLocation
class LocationVC: UIViewController, CLLocationManagerDelegate
{
//MARK:- Properties
@IBOutlet weak var lblTitle: UILab... |
//
// DateTransformer.swift
// Long Box
//
// Created by Frank Michael on 10/19/14.
// Copyright (c) 2014 Frank Michael Sanchez. All rights reserved.
//
import Foundation
class DateTransformer: NSValueTransformer {
override func transformedValue(value: AnyObject?) -> AnyObject? {
let date = valu... |
//
// DemodulateWFM.swift
// SimpleSDR3
//
// https://en.wikipedia.org/wiki/FM_broadcasting#Technology
// https://www.law.cornell.edu/cfr/text/47/73.310
//
// Created by Andy Hooper on 2020-02-26.
// Copyright © 2020 Andy Hooper. All rights reserved.
//
import SimpleSDRLibrary
class DemodulateWFM:DemodulateAudi... |
//
// PromiseCoordinator.swift
// MinervaExample
//
// Copyright © 2019 Optimize Fitness, Inc. All rights reserved.
//
import Foundation
import UIKit
import Minerva
public class PromiseCoordinator<T: PromiseDataSource, U: ViewController>: MainCoordinator<T, U>, DataSourceUpdateDelegate {
public typealias Refre... |
//
// Plot.swift
// Decision
//
// Created by Yuri Chervonyi on 3/14/19.
// Copyright © 2019 CHRGames. All rights reserved.
//
import Foundation
class Plot {
static let instance = Plot()
private(set) var vault: [String : Stage]!
static let FIRST_STAGE = "AA000"
private var _startSt... |
//
// DetailsPresenter.swift
// NTGTags
//
// Created by Mena Gamal on 2/16/20.
// Copyright © 2020 Mena Gamal. All rights reserved.
//
import Foundation
import UIKit
protocol DetailsPresenterDelegate {
}
class DetailsPresenter: DetailsPresenterDelegate{
//private var cachedObj:ArrayOfCachedMod... |
import Foundation
import Runtime
func resolveArguments(for value: Any, using type: Any.Type, isNil: Bool = false) throws -> [FunctionArgument] {
if let type = type as? MethodCallResolvable.Type {
return try type.arguments(value: value, isNil: isNil)
}
let (kind, genericTypes, properties) = try ty... |
//
// StyleManager.swift
// Quizzical
//
// Created by Casey Conway on 4/29/19.
// Copyright © 2019 Casey Conway. All rights reserved.
//
//ABOUT - This file includes all the color settings for the app
import UIKit
struct StyleManager {
//Colors for result text field when right or wrong answer selected
s... |
//
// EntityJsonDecoderTests.swift
// CoreDataJsonParserTests
//
// Created by Alex Belozierov on 9/23/19.
// Copyright © 2019 Alex Belozierov. All rights reserved.
//
import XCTest
import CoreData
@testable import CoreDataJsonParser
class EntityJsonDecoderTests: XCTestCase {
func testJsonDecodersFuncs()... |
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var swipeView: UIView!
@IBAction func showArrayTable(sender: AnyObject) {
self.performSegueWithIdentifier("showArrayTable", sender: self)
}
override func viewDidLoad() {
super.viewDidLoad()
... |
//
// NewsNetworkManager.swift
// StyleOfMe
//
// Created by MattHew Phraxayavong on 1/8/21.
//
import Foundation
class NewsNetworkManager {
static let shared = NewsNetworkManager()
let imageCache = NSCache<NSString, NSData>()
private let baseURL = "https://newsapi.org/v2/"
private let USTopHe... |
//
// BaseService.swift
// RiBoScheduleAssistant
//
// Created by Rin Pham on 3/14/18.
// Copyright © 2018 Rin Pham. All rights reserved.
//
import UIKit
import Alamofire
import SwiftyJSON
typealias Completion = (_ data: JSON, _ statusCode: Int?, _ error: String?) -> Void
typealias Result = (_ data: Any, _ status... |
//
// AppLaunch.swift
// Piicto
//
// Created by OkuderaYuki on 2018/01/06.
// Copyright © 2018年 SmartTech Ventures Inc. All rights reserved.
//
import Foundation
final class AppLaunch: NSObject {
/// アプリ初回起動済みの状態を保存する
static func completedFirstLaunch() {
UserDefaults().set(true, forKey: .complet... |
//
// ViewController.swift
// test
//
// Created by Michael Nienaber on 9/12/2015.
// Copyright © 2015 Michael Nienaber. All rights reserved.
//
import Foundation
import UIKit
class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextFieldDelegate {
@IB... |
//
// House.swift
// CatanProbGenerator
//
// Created by FredLohner on 5/Dec/15.
// Copyright (c) 2015 FredLohner. All rights reserved.
//
// Generated by PaintCode (www.paintcodeapp.com)
//
import UIKit
class CatanHouse: UIView {
override func drawRect(rect: CGRect) {
House.drawCanvas1()
}
}
... |
//
// ViewController.swift
// Fira
//
// Created by 1181432 on 29/1/16.
// Copyright © 2016 FIB. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, SwitchClickDelegate{
var selectedIndexPath:NSIndexPath!
var selectedManuals = [Int:NSIn... |
//
// WinningDetailCell1.swift
// DaLeTou
//
// Created by 刘明 on 2017/3/7.
// Copyright © 2017年 刘明. All rights reserved.
//
import UIKit
class WinningDetailCell1: UITableViewCell {
static let heightOfCell: CGFloat = 60
let poolLabel = UILabel()
let poolMoneyLabel = UILabel()
let salesLabel = ... |
//
// ContentView.swift
// Pocker_Reminder
//
// Created by rui cai on 2019/12/27.
// Copyright © 2019 Buct. All rights reserved.
//
import SwiftUI
import Alamofire
struct ContentView: View {
var body: some View {
VStack{
Button(action: {
Alamofire.request("https://httpbin.... |
//
// Entry.swift
// JournalCK
//
// Created by Jon Corn on 2/4/20.
// Copyright © 2020 Jon Corn. All rights reserved.
//
import Foundation
import CloudKit
// MARK: - String helpers
struct EntryStrings {
static let recordTypeKey = "Entry"
fileprivate static let titleKey = "title"
fileprivate static le... |
//
// TbRouter.swift
// luffy
//
// Created by 季勤强 on 2020/5/12.
// Copyright © 2020 dyljqq. All rights reserved.
//
import Foundation
enum TbRouter {
case itemInfo(_ itemId: Int)
}
extension TbRouter: URLRequestConvertible {
var baseURLString: String {
return "http://h5api.m.taobao.com"
}
var ... |
//
// Dawn.swift
// Pods
//
// Created by Meniny on 2017-08-01.
//
//
import Foundation
public struct Dawn {
public static var calendar: Calendar = Calendar.current
public var calendar: Calendar
public init(calendar c: Calendar) {
calendar = c
}
// MARK: - Leap Year
... |
//
// ViewController.swift
// ActivityIndicator
//
// Created by AMANBOLAT BALABEKOV on 15.09.16.
// Copyright © 2016 AMANBOLAT BALABEKOV. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
var indicatorView: AmanIndicator?
override func viewDidLoad() {
super.viewDidLoad()
... |
//
// SignInView.swift
// Twitter
//
// Created by Mark on 19/12/2019.
// Copyright © 2019 Twitter. All rights reserved.
//
import UIKit
protocol SignInDelegate {
func signIn(emailAddress: String, password: String) -> Void
func register() -> Void
}
class SignInView: UIView {
var didTapSignIn: Si... |
//
// AddressTableViewCell.swift
// MarketPlace
//
// Created by Administrator on 25/08/16.
// Copyright © 2016 inpanr07. All rights reserved.
//
import UIKit
class AddressTableViewCell: UITableViewCell {
@IBOutlet weak var addTitleLabel: UILabel!
@IBOutlet weak var editaddressLabel: UIText... |
//
// CountriesISO.swift
// Covid-19
//
// Created by yosef elbosaty on 5/27/20.
// Copyright © 2020 yosef elbosaty. All rights reserved.
//
import Foundation
import SwiftyJSON
struct CountriesISO{
var countryName: String
init?(dict: [String:JSON]){
guard let countryName = dict["name"]?.toString e... |
//
// Game+Universe+Extension.swift
// Game of Life
//
// Created by Béla Szomathelyi on 2018. 11. 05..
// Copyright © 2018. Béla Szomathelyi. All rights reserved.
//
import UIKit
extension Game.Model.Universe {
typealias Dimensions = Game.Model.Dimensions
typealias Universe = Game.Model.Universe
init(d... |
/**
* Copyright IBM Corporation 2016
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
//
// RouteCourierDetailCell.swift
// Vozon
//
// Created by Дастан Сабет on 31.05.2018.
// Copyright © 2018 Дастан Сабет. All rights reserved.
//
import UIKit
class RouteCourierDetailCell: UITableViewCell {
lazy var transportIcon: UIImageView = {
let icon = UIImageView()
icon.tintColor = UIC... |
//
// MockTimer.swift
// AudioProcessorPackageDescription
//
// Created by Sam Meech-Ward on 2017-11-25.
//
@testable import AudioIO
import Foundation
import AudioIO
class MockTimer: TimerType {
var started = false
var stopped = false
var block: (() -> (Void))?
func tick() {
block... |
//
// ContentView.swift
// Bookworm
//
// Created by /fam on 2/24/21.
//
import SwiftUI
import CoreData
struct PushButton: View{
let title:String
@Binding var isOn: Bool
var onColors = [Color.red,Color.yellow]
var offColors = [Color(white:0.6),Color(white:0.4)]
var body: some View {
But... |
import Foundation
@testable import Element
@testable import Utils
class StatUtils{
/**
* Returns an index that can be used when toggeling time levels
*/
static func mouseLocIdx(_ mouseX:CGFloat, _ totalWidth:CGFloat, _ itemWidth:CGFloat) -> Int{
let rndTo:CGFloat = mouseX.roundTo(itemWidth)
... |
//
// BaseCoordinator.swift
// Favorites Food
//
// Created by Pavel Kurilov on 19.11.2018.
// Copyright © 2018 Pavel Kurilov. All rights reserved.
//
import UIKit
protocol BaseCoordinatorDelegate: class {
func coordinatorRootViewControllerDidDeinit(coordinator: BaseCoordinator)
}
protocol BaseCoordinator: B... |
//
// YoutubeVideoFetcher.swift
// J.YoutubeWatcher
//
// Created by JinYoung Lee on 21/02/2019.
// Copyright © 2019 JinYoung Lee. All rights reserved.
//
import Foundation
import UIKit
import Alamofire
class YoutubeVideoFetcher: ContentFetcher {
private var searchKeyword: String = ""
private var onLoadRe... |
import Foundation
extension FileManager {
// https://gist.github.com/brennanMKE/a0a2ee6aa5a2e2e66297c580c4df0d66
func directoryExistsAtPath(_ path: URL) -> Bool {
var isDirectory = ObjCBool(true)
let exists = self.fileExists(atPath: path.absoluteString, isDirectory: &isDirectory)
return exists && isD... |
//
// CitySearchView.swift
// weather
//
// Created by Kirill Titov on 13.11.2020.
//
import UIKit
class CitySearchView: UIView {
@IBOutlet weak var additionalInfo: UIButton!{
didSet {
additionalInfo.translatesAutoresizingMaskIntoConstraints = false
additionalInfo.backgroundColor = .white
}
}
@IBOutl... |
//
// BookDetailTableViewCell.swift
// WindReadBook
//
// Created by 张旭 on 16/1/13.
// Copyright © 2016年 张旭. All rights reserved.
//
import UIKit
class BookDetailTableViewCell: UITableViewCell {
@IBOutlet weak var otherLabel: UILabel!
@IBOutlet weak var authorLabel: UILabel!
@IBOutlet weak var nameLabel: UI... |
//
// ImageCollectionViewCell.swift
// PizzaDemo
//
// Created by Pietro Gandolfi on 02/01/2019.
// Copyright © 2019 Pietro Gandolfi. All rights reserved.
//
import UIKit
class ImageCollectionViewCell: UICollectionViewCell {
static let identifier: String = "imageCell"
@IBOutlet weak var cellImageView: U... |
//
// ViewController.swift
// demopapperscissorstone
//
// Created by Daniel on 2020/1/4.
// Copyright © 2020 Daniel. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var upImageView: UIImageView!
@IBOutlet weak var downImageView: UIImageView!
@IBOut... |
//
// ViewController.swift
// Project28
//
// Created by Anton Makeev on 24.04.2021.
//
import UIKit
import LocalAuthentication
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet var secret: UITextView!
override func viewDidLoad() {
super.viewDidLoad()
title = "Not... |
import Foundation
import TinyConstraints
typealias StateConstraints = [String: Constraints]
typealias StateColor = [String: UIColor]
enum State: String, CaseIterable {
case first
case second
case third
case fourth
func next() -> State? {
switch self {
case .first: return .seco... |
//
// Created by Jasmin Suljic on 02/09/2020.
// Copyright (c) 2020 CocoaPods. All rights reserved.
//
import Foundation
import Alamofire
import Monri
public class OrdersRepository {
public let authenticityToken: String
public init(authenticityToken: String) {
self.authenticityToken = authenticityTo... |
//
// TodoDetailViewController.swift
// J.Todo
//
// Created by JinYoung Lee on 24/07/2019.
// Copyright © 2019 JinYoung Lee. All rights reserved.
//
import Foundation
import UIKit
import RxCocoa
import RxSwift
class TodoDetailViewController: UIViewController {
private var dataModel: TodoDataModel?
@IBOut... |
//
// WidgetSettingsSkeletonCell.swift
// WavesWallet-iOS
//
// Created by rprokofev on 06.08.2019.
// Copyright © 2019 Waves Platform. All rights reserved.
//
import UIKit
import Extensions
final class WidgetSettingsSkeletonCell: SkeletonTableCell, Reusable {
@IBOutlet weak var viewContainer: UIView!
... |
// Mission Day 17 - Part 1 - Simple Sorting
func simpleSorting(_ arr: [Int]?) -> [Int]? {
if let array = arr {
return array.sorted()
}
return nil
}
let array = [14, 2, 1, 12]
if let arraySorted = simpleSorting(array) {
print(arraySorted)
}
|
//
// option.swift
// D2020
//
// Created by MacBook Pro on 3/16/20.
// Copyright © 2020 Abdallah Eslah. All rights reserved.
//
import Foundation
struct OptionFilter {
enum FilterType {
case nearest
case top_rate
}
var name: String
var type: FilterType
}
|
//
// PoiPopOverViewController.swift
// VacationPlanner
//
// Created by Cem Atilgan on 2019-03-23.
// Copyright © 2019 Cem Atilgan. All rights reserved.
//
import UIKit
import GooglePlaces
class PoiPopOverViewController: UIViewController {
@IBOutlet weak var topLevelStackView: UIStackView!
@IBOutlet w... |
//
// ViewController.swift
// JokeApp
//
// Created by Patrick Aloueichek on 11/18/17.
// Copyright © 2017 Patrick Aloueichek. All rights reserved.
//
import UIKit
import CoreData
class MenuVC: UIViewController {
var jokeManagerSave : JokeManagerSave? = nil
var jokeManagerFetch : JokeManagerFetch? = ... |
//
// EditProfileVC.swift
// Surface
//
// Created by Arvind Rawat on 02/04/18.
// Copyright © 2018 Appinventiv. All rights reserved.
//
import UIKit
import GooglePlaces
class EditProfileVC: UIViewController,UpdatePhoneNumber {
//MARK:- IBOUTLET
//===============
@IBOutlet weak var ... |
//
// Theme.swift
// cs193p2017Assignment
//
// Created by klioop on 2021/07/16.
//
import Foundation
enum Theme: String {
case face
case halloween
case construction
}
struct EmojiCollection {
static var faceEmojis = ["🤐", "😵💫", "🤢", "🤮", "🤧", "😷", "👺", "🤑"]
static var hallowinEmojis... |
//
// WinguSingleDotPageControl.swift
// winguSDK
//
// Created by Jakub Mazur on 31/03/2017.
// Copyright © 2017 wingu AG. All rights reserved.
//
import UIKit
class WinguSingleDotPageControl: NibLoadingView {
@IBOutlet weak var dotHeight: NSLayoutConstraint!
@IBOutlet weak var fillerHeight: NSLayou... |
//
// TodayViewCell.swift
// todayWidget
//
// Created by Drew Lanning on 10/25/17.
// Copyright © 2017 Drew Lanning. All rights reserved.
//
import UIKit
import CoreData
class TodayViewCell: UITableViewCell {
@IBOutlet weak var activityTitle: UILabel!
@IBOutlet weak var newIncidentBtn: IncrementButton!
... |
//
// ToolbarView.swift
// CatalystSampler
//
// Created by Kazuya Ueoka on 2020/01/18.
// Copyright © 2020 fromKK. All rights reserved.
//
import SwiftUI
import UIKit
struct ToolbarView: View {
var body: some View {
VStack {
Text("toolbar")
}
}
}
struct ToolbarView_Preview: P... |
import UIKit
import Quick
import Nimble
import Blindside
import CBGPromise
import SwiftyJSON
@testable import reddit_news_swift
class JSONClientSpec: QuickSpec {
override func spec() {
describe("JSONClientSpec") {
var urlSessionClient: URLSessionClientMock!
var subject: JSONClient!
beforeEach ... |
//
// Created by Daniel Heredia on 2/27/18.
// Copyright © 2018 Daniel Heredia. All rights reserved.
//
// Intersection
// Solution using the slop-intercept equation form instead of the standard form
import Foundation
enum IntersectionType {
case noIntersection
case sameLine
case point
}
struct Point... |
//
// CGRequestCallbackModel.swift
// TestCG_CGKit
//
// Created by DY on 2017/5/25.
// Copyright © 2017年 apple. All rights reserved.
//
import UIKit
/// 数据请求回调对象
struct CGRequestCallbackModel {
let identifier : String?
let task : URLSessionTask
let successBlock : CGRequestSuccessBlock?
... |
//
// HikesBadge.swift
// Landmarks
//
// Created by Matt Burke on 1/16/21.
//
import SwiftUI
struct HikesBadge: View {
var name: String
var body: some View {
VStack {
Badge()
.frame(width: 300.0, height: 300.0)
.scaleEffect(1.0 / 3.0)
.f... |
import UIKit
extension UIView {
func rotate360Degrees(_ duration: CFTimeInterval = 1.0, completionDelegate: CAAnimationDelegate? = nil) {
let rotateAnimation = CABasicAnimation(keyPath: "transform.rotation")
rotateAnimation.fromValue = 0.0
rotateAnimation.toValue = CGFloat(M_PI * 2.0)
rotateAnimation.duration... |
//
// UserAction+CoreDataProperties.swift
// react-swift-test
//
// Created by ShichoChin on 2018/09/30.
// Copyright © 2018 Chin ShiCho. All rights reserved.
//
//
import Foundation
import CoreData
extension UserAction {
@nonobjc public class func fetchRequest() -> NSFetchRequest<UserAction> {
retu... |
//
// ImageCollectionViewCell.swift
// ImageWithDescriptionUploader
//
// Created by Jora on 11/9/18.
// Copyright © 2018 Jora. All rights reserved.
//
import UIKit
class ImageCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var numberLabel: UILabel!
override func prepareForReuse() {
super.... |
//
// LoginController.swift
// Instagram-Clone-iOS
//
// Created by Arthur Octavio Jatobá Macedo Leite - ALE on 08/04/21.
//
import UIKit
import Firebase
class LoginController: UIViewController {
@IBOutlet weak var emailTextField: UITextField!
@IBOutlet weak var passwordTextField: UITextField!
@IBOutl... |
public class GildedRose {
var items:[Item]
public init(items:[Item]) {
self.items = items
}
public func updateQuality() {
items.forEach { item in
if !item.isAgedBrie, !item.isBackstagePass {
if !item.isSulfuras {
item.setQuality(b... |
//
// LeBaluchon.swift
// Le BaluchonTests
//
// Created by jullianm on 27/11/2017.
// Copyright © 2017 jullianm. All rights reserved.
//
import XCTest
@testable import Le_Baluchon
class LeBaluchon: XCTestCase {
var currencyRequest: CurrencyRatesRequest!
var translationRequest: TranslationRequest!
... |
//
// ZGModel.swift
// ZGUIDemo
//
//
import UIKit
import ZGNetwork
open class ZGModel {
//用于pv打点, 任意取一个设置了statistic_AnalysisData的item
public var pageViewItem:ZGBaseUIItem?
open var items : [Any]
open var sections : [ZGCollectionReusableViewItem]
open var pageSize : Int = 20
open var pa... |
//
// FirebaseDatabase.swift
// PansChat2
//
// Created by Jakub Iwaszek on 30/09/2020.
//
import Foundation
import Firebase
class FirebaseDatabase {
static let shared = FirebaseDatabase()
var ref: DatabaseReference! = Database.database().reference()
var storageRef = Storage.storage().reference()
... |
//
// URLSession+Extension.swift
// ParisWeather
//
// Created by Xav Mac on 07/03/2020.
// Copyright © 2020 ParisWeather. All rights reserved.
//
import Foundation
extension URLSession: NetworkSession {
func performRequest(urlRequest: URLRequest,
completion: @escaping (Data?, URL... |
//
// ViewController2.swift
// schoolCountdownApp
//
// Created by Brian on 10/31/16.
// Copyright © 2016 WAINOM. All rights reserved.
//
import UIKit
class ViewController2: UIViewController {
@IBOutlet weak var dateLabel: UILabel!
@IBOutlet weak var markerLabel: UILabel!
let formatter = NSDateFormat... |
//
// Questions.swift
// Game Quiz
//
// Created by Илья Карась on 05/05/2019.
// Copyright © 2019 Ilia Karas. All rights reserved.
//
struct Question {
var text: String
var type: ResponseType
var answers: [Answer]
}
extension Question {
static func loadData() -> [Question] {
... |
import UIKit
// Properties
class ExampleClass {
var property1: Int = 0
var property2: String = ""
let constProperty: Int = 20
}
var ec = ExampleClass()
ec.property1
ec.property2
ec.constProperty
// Fails (Constant can not modied) => ec.constProperty = 20
struct Example2 {
var name: String = "Jo... |
//
// CellManagerContainer.swift
// OSOM_app
//
// Created by Miłosz Bugla on 18/07/2017.
// Copyright © 2017 ITEO Sp. z o.o. All rights reserved.
//
import Foundation
class CellManagerContainer {
}
|
import XCTest
import SwiftCheck
import Bow
import BowOptics
import BowOpticsLaws
import BowLaws
class AffineTraversalTest: XCTestCase {
func testAffineTraversalLaws() {
AffineTraversalLaws.check(affineTraversal: AffineTraversal<String, String>.identity)
}
func testSetterLaws() {
SetterLaw... |
import Foundation
/*
Q061. Rotate List
Given a linked list, rotate the list to the right by k places, where k is non-negative.
Example 1:
Input: 1->2->3->4->5->NULL, k = 2
Output: 4->5->1->2->3->NULL
Explanation:
rotate 1 steps to the right: 5->1->2->3->4->NULL
rotate 2 steps to the right: 4->5->1->2->3-... |
//
// AppDelegate.swift
// photopizza
//
// Created by Gary Cheng on 7/9/16.
// Copyright © 2016 Gary Cheng. All rights reserved.
//
import UIKit
import FBSDKCoreKit
import FBSDKShareKit
import FBSDKLoginKit
import Firebase
import FirebaseAuth
import SwiftyJSON
var currentUser : User = User()
var ref: FIRDatabase... |
//
// WahooAdvancedFitnessMachineService.swift
// SwiftySensorsTrainers iOS
//
// Created by Josh Levine on 5/9/18.
// Copyright © 2018 Kinetic. All rights reserved.
//
import CoreBluetooth
import SwiftySensors
import Signals
open class WahooAdvancedFitnessMachineService: Service, ServiceProtocol {
publi... |
//
// Date+Extension.swift
// AccountBook
//
// Created by Mason Sun on 2019/11/23.
// Copyright © 2019 Mason Sun. All rights reserved.
//
import Foundation
extension Calendar {
static var currentMonth: Int {
return Calendar.current.component(.month, from: Date())
}
static var currentYear: In... |
//
// StringExtension.swift
// florafinder
//
// Created by Andrew Tokeley on 3/02/16.
// Copyright © 2016 Andrew Tokeley . All rights reserved.
//
import Foundation
extension String
{
func numberOfMatches(searchText: String) -> Int
{
do
{
let regEx = try NSRegularExpression(p... |
import SwiftUI
@available(OSX 10.15, *)
public struct GreenView: View {
public init() {
}
public var body: some View {
Color.green
}
}
#if os(macOS)
#else
@available(tvOS 13.0, iOS 13.0, *)
public struct ActivityIndicatorView: UIViewRepresentable {
@Binding public... |
//
// CameraOptions.swift
// yourservice-ios
//
// Created by Игорь Сорокин on 29.10.2020.
// Copyright © 2020 spider. All rights reserved.
//
import Foundation
struct CameraOptions: OptionSet {
let rawValue: UInt8
static let photo = CameraOptions(rawValue: 1 << 0)
static let video = CameraOption... |
//
// Post.swift
// DogFound
//
// Created by Peter Zaporowski on 18.03.2017.
// Copyright © 2017 Peter Zaporowski. All rights reserved.
//
import Foundation
class Post: NSObject, NSCoding {
private var _imagePath: String!
private var _title: String!
private var _postDesc: String! // using v... |
//
// URLQueryDataAdapter.swift
// BotanicalGarden
//
// Created by 黃偉勛 Terry on 2021/4/18.
//
import Foundation
struct URLQueryDataAdapter: RequestAdapter {
let parameters: [String: Any]
func adapted(request: URLRequest) throws -> URLRequest {
guard let url = request.url else {
throw ... |
//
// UIScrollViewExtension.swift
// StickyHeader
//
// Created by Yannick Heinrich on 25.08.16.
// Copyright © 2016 yageek. All rights reserved.
//
import UIKit
import ObjectiveC
private var xoStickyHeaderKey: UInt8 = 0
public extension UIScrollView {
var stickyHeader: StickyHeader! {
var header = ... |
struct Address: Equatable {
let raw: String
let domain: String?
init(raw: String, domain: String? = nil) {
self.raw = raw.trimmingCharacters(in: .whitespacesAndNewlines)
self.domain = domain?.trimmingCharacters(in: .whitespacesAndNewlines)
}
var title: String {
domain ?? ra... |
//
// Settings.swift
// Mercury
//
// Created by toco on 22/01/17.
// Copyright © 2017 tocozakura. All rights reserved.
//
import Foundation
import UIKit
enum Settings {
enum Size {
static let collectionCellSize = CGSize(width: 150.0, height: 200.0)
static let roomTableViewCellSize: CGFloat = 80.0
... |
//
// ViewController.swift
// CatumblrMac
//
// Created by gleb on 11/21/14.
// Copyright (c) 2014 gleb. All rights reserved.
//
import Cocoa
import Alamofire
import SwiftyJSON
class ViewController: NSViewController {
@IBOutlet weak var TempLabel: NSTextField!
@IBOutlet weak var BlogCaption: ... |
//
// ETCCardTableViewController.swift
// Dash
//
// Created by Yuji Nakayama on 2020/01/19.
// Copyright © 2020 Yuji Nakayama. All rights reserved.
//
import UIKit
import CoreData
class ETCCardTableViewController: UITableViewController, NSFetchedResultsControllerDelegate {
enum Section: Int, CaseIterable {
... |
protocol MultiSetProtocol {
associatedtype T
mutating func add(element: T)
mutating func remove(element: T)
func count(element: T) -> Int
func totalCount() -> Int
}
struct MultiSet<T: Hashable>: MultiSetProtocol {
private var dict = [T: Int]()
mutating func add(element: T) {
... |
import UIKit
struct ImageName {
static let Background = "Background"
static let Ground = "Ground"
static let Water = "Water"
static let CrocMouthClosed = "CrocMouthClosed"
static let CrocMouthOpen = "CrocMouthOpen"
static let CrocMask = "CrocMask"
static let VineRoot = "VineRoot"
static... |
/**
--| ADAPTIVE RUNTIME PLATFORM |----------------------------------------------------------------------------------------
(C) Copyright 2013-2015 Carlos Lozano Diez t/a Adaptive.me <http://adaptive.me>.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance wi... |
//
// FlatMode.swift
// ikalendar2
//
// Created by Tianwei Zhang on 4/12/21.
//
import Foundation
/// Data model for the flattened game modes.
enum FlatMode: String, Equatable, Identifiable, CaseIterable {
case regular
case gachi
case league
case salmon
var id: String { rawValue }
var name: String {... |
//
// TunerViewController.swift
// tune-final-project
//
// Created by Aneesh Ashutosh.
// Copyright © 2019 Aneesh Ashutosh. All rights reserved.
//
import UIKit
import WMGaugeView
import AudioKit
/*
* View controller for the tuner view.
*/
class TunerViewController: UIViewController, UIViewControllerTransitio... |
//
// PathologyTests.swift
// PathologyTests
//
// Created by Kyle Truscott on 3/1/16.
// Copyright © 2016 keighl. All rights reserved.
//
import XCTest
@testable import Pathology
class PathologyTests: XCTestCase {
let testPath: CGPath = {
let path = CGPathCreateMutable()
CGPathMoveToPoin... |
//
// EventTableViewCell.swift
// StudyBuddy
//
// Created by Vikram Idury on 10/31/17.
// Copyright © 2017 Alexander You. All rights reserved.
//
import UIKit
import FirebaseDatabase
import FirebaseAuth
import FirebaseStorage
import MapKit
class EventTableViewCell: UITableViewCell {
@IBOutlet weak var event... |
import Domain
import Foundation
final class Repository {
let id: Int64
let name: String
let fullName: String?
let owner: User?
let url: URL
let forksCount: Int?
let openIssuesCount: Int?
let watchersCount: Int?
let stargazersCount: Int?
let language: String?
let updatedAt: D... |
//
// ViewController.swift
// TempusFugit
//
// Created by Jasmee Sengupta on 21/03/18.
// Copyright © 2018 Jasmee Sengupta. All rights reserved.
// next: create a timer app
//separate this timeout sign out app
import UIKit
var count = 0
var testTimeOut = 10.0
class ViewController: UIViewController {
overri... |
//
// PokemonManager.swift
// Pokemon-Index
//
// Created by Mikołaj Szadkowski on 06/05/2020.
// Copyright © 2020 Mikołaj Szadkowski. All rights reserved.
//
import UIKit
import CoreData
protocol PokemonRequestDelegate {
func pokemonRequestDidFinish()
func pokemonRequestDidFinishWithError()
}
struct P... |
//
// RootTabBarNavigator.swift
// CaptainDemo
//
// Created by Vincent Esche on 6/6/18.
// Copyright © 2018 Vincent Esche. All rights reserved.
//
import UIKit
import Captain
class RootTabBarNavigator {
var _source: Source
var presentingNavigator: AnyNavigator?
required init(source: Source) {
... |
//
// RestaurantContentView.swift
// caffinho-iOS
//
// Created by Rodolfo Mantovani on 6/10/16.
// Copyright © 2016 venturus. All rights reserved.
//
import Foundation
import UIKit
public class RestaurantContentView: UIView{
@IBOutlet weak var continueButton: UIButton!
@IBOutlet weak var restaurantPick... |
//
// EtcInject.swift
// DHBC
//
// Created by Kiều anh Đào on 7/3/20.
// Copyright © 2020 Anhdk. All rights reserved.
//
import Swinject
import RxSwift
import EventKit
final class EtcInject {
static let shared = EtcInject()
let container = Container()
private init() {
container.register(... |
//
// TimelineRefreshCell.swift
// J.YoutubeWatcher
//
// Created by JinYoung Lee on 24/04/2019.
// Copyright © 2019 JinYoung Lee. All rights reserved.
//
import Foundation
import UIKit
class TimelineRefreshCell: UITableViewCell {
@IBOutlet weak var activityController: UIActivityIndicatorView!
overrid... |
//
// RDGliderViewController.swift
// GliderSample
//
// Created by Guillermo Delgado on 25/04/2017.
// Copyright © 2017 Guillermo Delgado. All rights reserved.
//
import UIKit
@objc public protocol RDGliderViewControllerDelegate: class {
/**
Delegate method to notify invoke object when offset has change... |
//
// ViewController.swift
// Target13-Machine
//
// Created by Air_chen on 2016/11/7.
// Copyright © 2016年 Air_chen. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var picker:UIPickerView!
@IBOutlet weak var beginBtn:UIButton!
@IBOutlet weak var lab:UILa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.