repo_name stringlengths 7 91 | path stringlengths 8 658 | copies stringclasses 125
values | size stringlengths 3 6 | content stringlengths 118 674k | license stringclasses 15
values | hash stringlengths 32 32 | line_mean float64 6.09 99.2 | line_max int64 17 995 | alpha_frac float64 0.3 0.9 | ratio float64 2 9.18 | autogenerated bool 1
class | config_or_test bool 2
classes | has_no_keywords bool 2
classes | has_few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
quangpc/HQPagerViewController | HQPagerViewController/HQPagerViewController/Controllers/SampleViewController.swift | 1 | 2007 | //
// SampleViewController.swift
// HQPagerViewController
//
// Created by quangpc on 11/11/16.
// Copyright © 2016 quangpc. All rights reserved.
//
import UIKit
let titles = ["Trending", "Search", "Recents", "Me"]
let colors = [UIColor.hexColor(hex: "82b840"), UIColor.hexColor(hex: "26abfc"), UIColor.hexColor(he... | mit | 48645ad89c5fccce21918d7f939ae5e1 | 35.472727 | 181 | 0.702393 | 4.313978 | false | false | false | false |
delannoyk/SoundcloudSDK | sources/SoundcloudSDK/request/Request.swift | 1 | 5825 | //
// Request.swift
// SoundcloudSDK
//
// Created by Kevin DELANNOY on 15/03/15.
// Copyright (c) 2015 Kevin Delannoy. All rights reserved.
//
import Foundation
class JSONObject {
let value: Any?
var index: Int = 0
init(_ value: Any?) {
self.value = value
}
subscript(index: Int) -> ... | mit | 108b65b0e3c46f002a3a66bda11ad50d | 25.843318 | 207 | 0.552446 | 4.572214 | false | false | false | false |
nathanlentz/rivals | Rivals/Rivals/FirebaseService.swift | 1 | 4188 | //
// FirebaseService.swift
// Rivals
//
// Created by Nate Lentz on 4/16/17.
// Copyright © 2017 ntnl.design. All rights reserved.
//
// This service should be used to pull all Firebase usage out of the view controllers
//
import Foundation
import Firebase
var ref = FIRDatabase.database().reference()
func cr... | apache-2.0 | 1ee387ee0c0f22ad00636a54e2a93ee4 | 23.343023 | 197 | 0.624313 | 4.025962 | false | false | false | false |
1985apps/PineKit | Pod/Classes/PineFluidGridLayout.swift | 2 | 2035 | //
// PineFluidLayout.swift
// Pods
//
// Created by Prakash Raman on 05/04/16.
//
//
import UIKit
open class PineFluidGridLayout: UIView {
open var items : [UIView] = []
open var containers : [UIView] = []
open var maxColumns: Int = 3
open var rows : Int = 0
public init(views: [UIVie... | mit | e9ecd09451d0db7dd685b1a0b3503177 | 23.817073 | 102 | 0.499754 | 4.311441 | false | false | false | false |
resmio/TastyTomato | TastyTomato/Code/Types/CustomViews/ZoomView/ZoomToPointScrollView.swift | 1 | 3008 | //
// ZoomToPointScrollView.swift
// TastyTomato
//
// Created by Jan Nash on 6/30/17.
// Copyright © 2017 resmio. All rights reserved.
//
import UIKit
// MARK: // Internal
// MARK: Interface
extension ZoomToPointScrollView {
func zoom(to zoomPoint: CGPoint, with scale: CGFloat, animated: Bool = true) {
... | mit | 6c0278fa3947253237086fd19c4e0c69 | 33.965116 | 107 | 0.621217 | 4.691108 | false | false | false | false |
SafeCar/iOS | Pods/TextFieldEffects/TextFieldEffects/TextFieldEffects/MadokaTextField.swift | 2 | 6460 | //
// MadokaTextField.swift
// TextFieldEffects
//
// Created by Raúl Riera on 05/02/2015.
// Copyright (c) 2015 Raul Riera. All rights reserved.
//
import UIKit
/**
A MadokaTextField is a subclass of the TextFieldEffects object, is a control that displays an UITextField with a customizable visual effect around ... | mit | e5b852bfa65bf48b630efa70a7bbd2a5 | 33.913514 | 173 | 0.640656 | 5.378018 | false | false | false | false |
Sephiroth87/C-swifty4 | C64/Utils/CircularBuffer.swift | 1 | 1219 | //
// CircularBuffer.swift
// C64
//
// Created by Fabio Ritrovato on 30/11/2015.
// Copyright © 2015 orange in a day. All rights reserved.
//
import Foundation
public final class CircularBuffer<T: CustomStringConvertible> {
fileprivate var buffer: Array<T?>
fileprivate var index = 0
public ... | mit | 4022ce276971de8f23996412eab88f2d | 21.145455 | 65 | 0.519704 | 4.35 | false | false | false | false |
wangjianquan/wjq-weibo | weibo_wjq/Tool/Transition/WjPresentationCoutro.swift | 1 | 1351 | //
// WjPresentationCoutro.swift
// weibo_wjq
//
// Created by landixing on 2017/5/25.
// Copyright © 2017年 WJQ. All rights reserved.
//
import UIKit
class WjPresentationCoutro: UIPresentationController {
var presentedFrame:CGRect = CGRect.zero
override func containerViewWillLayoutSubviews() {
... | apache-2.0 | a56a92f4e270684b9a35812913f2837e | 24.333333 | 112 | 0.646382 | 4.421818 | false | false | false | false |
googlemaps/maps-sdk-for-ios-samples | GooglePlaces-Swift/GooglePlacesSwiftDemos/Swift/Samples/Autocomplete/AutocompleteWithTextFieldController.swift | 1 | 5831 | // Copyright 2020 Google LLC. All rights reserved.
//
//
// 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... | apache-2.0 | e73ee0d658c48ab6d928feb47d716d4b | 34.339394 | 96 | 0.749957 | 5.344638 | false | false | false | false |
spf2/FirebaseAdapter | FirebaseAdapterTests/Fakebase.swift | 1 | 3809 | //
// Fakebase.swift
// FirebaseAdapter
//
// Created by Steve Farrell on 8/31/15.
// Copyright (c) 2015 Movem3nt, Inc. All rights reserved.
//
import FirebaseAdapter
import Firebase
func paths(paths: (Int, Int)...) -> [NSIndexPath] {
return paths.map { NSIndexPath(forRow: $0.1, inSection: $0.0) }
}
class Te... | mit | 30eb87a197fee95c5be84e372773209b | 24.059211 | 113 | 0.592281 | 4.08691 | false | false | false | false |
Telll/receiver | TelllClient/Movie.swift | 3 | 1266 | //
// Movie.swift
// TelllClient
//
// Created by Fernando Oliveira on 26/11/15.
// Copyright © 2015 FCO. All rights reserved.
//
import Foundation
import SwiftyJSON
/*
{
"category" : "NYI",
"author" : "NYI",
"player" : {
"_" : "NYI"
},
"id" : "0",
"image": "http://pugim.com.br/pudim.jpg"
"media" : {
"_" : "NYI"
... | agpl-3.0 | a64682b411364c6c7ec99ff7e47b2f7e | 19.403226 | 52 | 0.509091 | 3.382353 | false | false | false | false |
Czajnikowski/TrainTrippin | Pods/RxCocoa/RxCocoa/CocoaUnits/Driver/Driver+Subscription.swift | 3 | 6434 | //
// Driver+Subscription.swift
// RxCocoa
//
// Created by Krunoslav Zaher on 9/19/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
#if !RX_NO_MODULE
import RxSwift
#endif
private let driverErrorMessage = "`drive*` family of methods can be only called from `MainThread`.\n" +
"Th... | mit | ddac8d0bcc2ed933e13086df46317726 | 43.061644 | 134 | 0.703093 | 4.833208 | false | false | false | false |
Luavis/Async.swift | Classes/AsyncWhilstTaskManager.swift | 1 | 1416 | //
// AsyncWhilstTaskManager.swift
// Async
//
// Created by 강성일 on 3/10/15.
// Copyright (c) 2015 Luavis. All rights reserved.
//
import Foundation
class AsyncWhilstTaskManager<ResultType> : AsyncTaskManager<AsyncCallbackType<ResultType>.WhilstTaskCallback, ResultType> {
// property
var completedCount ... | mit | 80ea77492c3982a90e3f173159352b34 | 22.5 | 129 | 0.643262 | 4.028571 | false | false | false | false |
CNKCQ/oschina | OSCHINA/ViewModels/Home/NewsViewModel.swift | 1 | 1949 | ////
//// Copyright © 2016年 KingCQ. All rights reserved.
//// Created by KingCQ on 16/9/1.
import Moya
import ObjectMapper
import RxSwift
import Alamofire
class NewsViewModel {
lazy var disposeBag = DisposeBag()
var provider: RxMoyaProvider<OSCIOService>
var backgroundScheduler: OperationQueueScheduler!... | mit | 7aa309594a4784979359b2288431a092 | 31.266667 | 85 | 0.594525 | 4.768473 | false | false | false | false |
huonw/swift | test/IRGen/objc_ns_enum.swift | 1 | 6486 | // RUN: %empty-directory(%t)
// RUN: %build-irgen-test-overlays
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop
import Foundation
import gizmo
// CHECK: @"$SSo16NSRuncingOptionsVWV" = linkonce_odr hidden consta... | apache-2.0 | 03ab420eae91cd84b252589e1205ebf9 | 42.530201 | 251 | 0.705674 | 3.274104 | false | false | false | false |
testpress/ios-app | Testpress iOS AppUITests/Testpress_iOS_AppUITests.swift | 1 | 1945 | //
// Testpress_iOS_AppUITests.swift
// Testpress iOS AppUITests
//
// Created by Karthik on 02/01/19.
// Copyright © 2019 Testpress. All rights reserved.
//
import XCTest
class Testpress_iOS_AppUITests: XCTestCase {
override func setUp() {
// Put setup code here. This method is called before the inv... | mit | 77d8ea4f660ff00455a4246f0a0c05f6 | 39.458333 | 257 | 0.667353 | 4.221739 | false | true | false | false |
53ningen/todo | TODO/UI/Issue/IssueViewController.swift | 1 | 5106 |
import UIKit
final class IssueViewController: BaseViewController {
fileprivate lazy var viewModel: IssueViewModel? = nil
func setViewModel(_ viewModel: IssueViewModel) {
self.viewModel = viewModel
}
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var editButton: UIBarBu... | mit | 81d5d3e29529f520daec4e15f353ee5c | 33.734694 | 123 | 0.562476 | 5.357817 | false | false | false | false |
MartinOSix/DemoKit | dSwift/SwiftSyntaxDemo/SwiftSyntaxDemo/ViewController_Class.swift | 1 | 1907 | //
// ViewController_Class.swift
// SwiftSyntaxDemo
//
// Created by runo on 16/12/27.
// Copyright © 2016年 com.runo. All rights reserved.
//
import UIKit
/*
使用类的好处
继承获得一个类的属性到其他类
类型转换使用户能够在运行时检查类的类型
初始化器需要处理释放内存资源
引用计数允许类实例有一个以上的参考
类和结构的共同特征
属性被定义为存储值
下标被定义为提供访问值
方法被初始化来... | apache-2.0 | 77586c760f5b6e9c22da23d7409c780d | 15.787234 | 161 | 0.524081 | 3.506667 | false | false | false | false |
tardieu/swift | test/PrintAsObjC/classes.swift | 7 | 31956 | // Please keep this file in alphabetical order!
// REQUIRES: objc_interop
// RUN: rm -rf %t
// RUN: mkdir -p %t
// FIXME: BEGIN -enable-source-import hackaround
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs/clang-importer-sdk -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/Objec... | apache-2.0 | 1868bddf498f99f21c5067561535707b | 42.067385 | 287 | 0.717768 | 3.767952 | false | true | false | false |
RoRoche/iOSSwiftStarter | iOSSwiftStarter/Pods/SwiftTask/SwiftTask/_Atomic.swift | 3 | 1948 | //
// _Atomic.swift
// SwiftTask
//
// Created by Yasuhiro Inami on 2015/05/18.
// Copyright (c) 2015年 Yasuhiro Inami. All rights reserved.
//
import Darwin
internal final class _Atomic<T>
{
private var _spinlock = OS_SPINLOCK_INIT
private var _rawValue: T
internal init(_ rawValue: T)
{
... | apache-2.0 | 26d2ce2846c60eb185d6171a0816ac73 | 19.28125 | 68 | 0.514388 | 4.30531 | false | false | false | false |
sora0077/KeyboardBoundsKit | KeyboardBoundsKit/src/KeyboardBoundsView.swift | 1 | 7684 | //
// KeyboardBoundsView.swift
// KeyboardBoundsKit
//
// Created by 林達也 on 2015/09/24.
// Copyright © 2015年 jp.sora0077. All rights reserved.
//
import UIKit
/// KeyboardBoundsView
@IBDesignable
public final class KeyboardBoundsView: UIView {
/// if keyboard did appear then `true`
public fileprivate... | mit | ef7af7c0f850c5dc3e5570414f0b5272 | 33.572072 | 158 | 0.581368 | 5.60219 | false | false | false | false |
tjw/swift | test/IRGen/big_types_corner_cases.swift | 1 | 11252 |
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-large-loadable-types %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// REQUIRES: optimized_stdlib
public struct BigStruct {
var i0 : Int32 = 0
var i1 : Int32 = 1
var i2 : Int32 = 2
var i3 : ... | apache-2.0 | bee32b133a9ecff27f6116cc64066008 | 42.953125 | 450 | 0.702986 | 3.368862 | false | false | false | false |
hsoi/RxSwift | RxCocoa/iOS/Proxies/RxActionSheetDelegateProxy.swift | 2 | 914 | //
// RxActionSheetDelegateProxy.swift
// RxCocoa
//
// Created by Carlos García on 8/7/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
#if os(iOS)
import UIKit
#if !RX_NO_MODULE
import RxSwift
#endif
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official s... | mit | e887a285bfeb11cce03dafb092473742 | 27.5 | 104 | 0.675439 | 4.956522 | false | false | false | false |
maoyi16/Eight-Ball-Game | Eight Ball Pool Game/MenuScene.swift | 1 | 2050 | //
// MenuScene.swift
// Eight Ball Pool Game
//
// Created by 毛易 on 2/12/17.
// Copyright © 2017 Yi Mao. All rights reserved.
//
import SpriteKit
import GameplayKit
class MenuScene: SKScene {
var pvpLabel: SKLabelNode!
var pveLabel: SKLabelNode!
override func touchesBegan(_ touches: Set<UIT... | mit | d2ee5a9c1bc0acef0bd46ce457aa550c | 36.181818 | 115 | 0.494866 | 5.036946 | false | false | false | false |
YPaul/YXToolFile | YXToolFile/toolFile/YXSearchBar.swift | 1 | 1753 | //
// YXSearchBar.swift
// XY微博
//
// Created by paul-y on 16/1/6.
// Copyright © 2016年 YX. All rights reserved.
//--创建一个搜索框API--
//MARK:
//MARK:--使用指导--
/*
let searchItem = YXSearchBar()// 创建
searchItem.placeholder = "大家都在搜:"//设置placeholder,如果有的话
searchItem.leftImage = UIImage(named: "searchbar_second_textfield_... | apache-2.0 | 333fcc3731dd4bcf19a187b3d0b26183 | 27.403509 | 208 | 0.666873 | 3.917676 | false | false | false | false |
pfvernon2/swiftlets | iOSX/iOS/UIViewController+Utilities.swift | 1 | 2241 | //
// File.swift
// swiftlets
//
// Created by Frank Vernon on 5/20/16.
// Copyright © 2016 Frank Vernon. All rights reserved.
//
import UIKit
public extension UIViewController {
class func topViewControllerForRoot(_ rootViewController:UIViewController?) -> UIViewController? {
guard let rootViewContro... | apache-2.0 | 6ac06d4e3e20463f7bb7ca21571eaf8d | 34.555556 | 103 | 0.629464 | 5.879265 | false | false | false | false |
noppoMan/aws-sdk-swift | Sources/Soto/Services/ServerlessApplicationRepository/ServerlessApplicationRepository_Shapes.swift | 1 | 44881 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2020 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for t... | apache-2.0 | 7e192b92ca15d4f17c0dc9364fefb7e5 | 41.181391 | 424 | 0.6386 | 5.283847 | false | false | false | false |
dpricha89/DrApp | Source/TableCells/IconCell.swift | 1 | 1199 | //
// IconCell.swift
// Venga
//
// Created by David Richards on 6/26/17.
// Copyright © 2017 David Richards. All rights reserved.
//
import UIKit
import SnapKit
open class IconCell: UICollectionViewCell {
var collectionImageView = UIImageView()
var collectionImageTitle = UILabel()
open over... | apache-2.0 | 8ae5e695f3d6e58f580e63ff83d40ab2 | 30.526316 | 73 | 0.659432 | 4.607692 | false | false | false | false |
whipsterCZ/WeatherTest | WeatherTest/Classes/Models/Settings.swift | 1 | 5122 | //
// Settings.swift
// WeatherTest
//
// Created by Daniel Kouba on 14/02/15.
// Copyright (c) 2015 Daniel Kouba. All rights reserved.
//
import Foundation
import UIKit
enum LengthUnit: String {
case Metric = "Metric"
case Imperial = "Imperial"
}
enum TempreatureUnit: String {
case Celsius = "Celsi... | apache-2.0 | 852171b783fd9323c5b5132f5342e9c5 | 33.153333 | 111 | 0.667903 | 4.90613 | false | false | false | false |
witekbobrowski/Stanford-CS193p-Winter-2017 | Faceit/Faceit/BlinkingFaceViewController.swift | 1 | 1492 | //
// BlinkingFaceViewController.swift
// Faceit
//
// Created by Witek on 13/09/2017.
// Copyright © 2017 Witek Bobrowski. All rights reserved.
//
import UIKit
class BlinkingFaceViewController: FaceViewController {
private struct BlinkRate {
static let closedDuration: TimeInterval = 0.4
stat... | mit | 6702b91b4c7df5958f8fafa558101674 | 26.109091 | 117 | 0.59222 | 4.718354 | false | false | false | false |
zapdroid/RXWeather | Pods/RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift | 1 | 3188 | //
// RxTableViewReactiveArrayDataSource.swift
// RxCocoa
//
// Created by Krunoslav Zaher on 6/26/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
#if os(iOS) || os(tvOS)
import UIKit
#if !RX_NO_MODULE
import RxSwift
#endif
// objc monkey business
class _RxTableViewRe... | mit | d15f7df0bef9c4d1b9da62c901045571 | 30.245098 | 114 | 0.628491 | 5.773551 | false | false | false | false |
keithrdavis/Camping-Directory | Camping Directory/SearchController.swift | 1 | 9020 | //
// SearchController.swift
// Camping Directory
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// Th... | gpl-2.0 | d0c0f5b7f89ddea00b7481624ec8f7b1 | 35.362903 | 294 | 0.621091 | 4.82246 | false | false | false | false |
freshOS/ws | Sources/ws/WSModelJSONParser.swift | 2 | 1414 | //
// WSModelJSONParser.swift
// ws
//
// Created by Sacha Durand Saint Omer on 06/04/16.
// Copyright © 2016 s4cha. All rights reserved.
//
import Arrow
import Foundation
open class WSModelJSONParser<T> {
public init() { }
fileprivate func resourceData(from json: JSON, keypath: String?) -> JSON... | mit | 52b219fbe587da067d9cd3c48ee9cb51 | 23.789474 | 86 | 0.585987 | 3.798387 | false | false | false | false |
tlax/GaussSquad | GaussSquad/Controller/LinearEquations/CLinearEquationsPolynomial.swift | 1 | 3692 | import UIKit
class CLinearEquationsPolynomial:CController
{
weak var polynomial:DPolynomial?
weak var viewPolynomial:VLinearEquationsPolynomial!
init(polynomial:DPolynomial)
{
self.polynomial = polynomial
super.init()
}
required init?(coder:NSCoder)
{
retur... | mit | 3ecdefe4017da5624f3a6045e9b691df | 25 | 118 | 0.574215 | 5.983793 | false | false | false | false |
Ryce/flickrpickr | Carthage/Checkouts/judokit/Source/BillingCountryInputField.swift | 2 | 4786 | //
// BillingCountryInputField.swift
// JudoKit
//
// Copyright (c) 2016 Alternative Payments Ltd
//
// 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 wi... | mit | 6c0d7bbd43a440caa3b3e1c33a850127 | 28.726708 | 148 | 0.672587 | 5.140709 | false | false | false | false |
BellAppLab/AdorableContacts | AdorableContacts/ViewControllers.swift | 1 | 6205 | //
// ViewController.swift
// AdorableContacts
//
// Created by André Abou Chami Campana on 08/12/15.
// Copyright © 2015 Bell App Lab. All rights reserved.
//
import UIKit
import Backgroundable
import CoreData
import UILoader
import Alertable
class ListViewController: BackgroundableTableViewController, Adorable... | mit | 46cb99862ee009d123e9798be26f854e | 32.896175 | 209 | 0.659358 | 5.479682 | false | false | false | false |
fgengine/quickly | Quickly/Extensions/UIDevice.swift | 1 | 2706 | //
// Quickly
//
public enum QDeviceFamily : Int {
case unknown
case iPhone
case iPad
case iPod
case simulator
}
public enum QDeviceDisplaySize : Int {
case unknown
case iPad
case iPad_10_5
case iPad_12_9
case iPhone_3_5
case iPhone_4
case iPhone_4_7
case iPhone_5_... | mit | cfeb60ee0052839d1cc63698389284de | 29.066667 | 95 | 0.504065 | 5.164122 | false | false | false | false |
saeta/penguin | Sources/PenguinCSV/UTF8Iterator.swift | 1 | 3501 | // Copyright 2020 Penguin Authors
//
// 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 t... | apache-2.0 | 1d122647d287f7c523255562f790794f | 35.092784 | 106 | 0.642674 | 3.960407 | false | false | false | false |
remlostime/one | one/one/Views/UserInfoViewCell.swift | 1 | 3009 | //
// UserInfoViewCell.swift
// one
//
// Created by Kai Chen on 12/30/16.
// Copyright © 2016 Kai Chen. All rights reserved.
//
import UIKit
import Parse
class UserInfoViewCell: UITableViewCell {
@IBOutlet weak var contentTextField: UITextField!
@IBOutlet weak var iconImageView: UIImageView!
le... | gpl-3.0 | de9341c973f02a2e626f8656a15f65af | 28.203883 | 76 | 0.412899 | 6.151329 | false | false | false | false |
zouguangxian/VPNOn | VPNOn/LTVPNCreateViewController.swift | 1 | 4566 | //
// LTVPNCreateViewController.swift
// VPN On
//
// Created by Lex Tang on 12/4/14.
// Copyright (c) 2014 LexTang.com. All rights reserved.
//
import UIKit
import CoreData
class LTVPNCreateViewController: UITableViewController, UITextFieldDelegate {
@IBOutlet weak var titleTextField: UITextField!
@... | mit | 4bfbc136338324cc4f94a9f2e5f5be40 | 32.086957 | 106 | 0.634034 | 6.079893 | false | false | false | false |
samodom/UIKitSwagger | UIKitSwagger/Dynamics/UIDynamicAnimatorAdditionSyntax.swift | 1 | 1580 | //
// UIDynamicAnimatorAdditionSyntax.swift
// UIKitSwagger
//
// Created by Sam Odom on 12/14/14.
// Copyright (c) 2014 Swagger Soft. All rights reserved.
//
import UIKit
/**
Convenience operator for adding a dynamic behavior to an animator.
- parameter animator: Dynamic animator to which the behavior should be ... | mit | d0d9cf3b6e091c62bb7b011de4778607 | 34.111111 | 82 | 0.767089 | 4.674556 | false | false | false | false |
plivesey/BuildTimeAnalyzer-for-Xcode | BuildTimeAnalyzer/CMCompileMeasure.swift | 1 | 1659 | //
// CMCompileMeasure.swift
// BuildTimeAnalyzer
//
// Created by Robert Gummesson on 02/05/2016.
// Copyright © 2016 Robert Gummesson. All rights reserved.
//
import Foundation
struct CMCompileMeasure {
var time: Double
var path: String
var code: String
var filename: String
private... | mit | db312afd263a3d3dce66cdcecd769449 | 26.196721 | 112 | 0.582027 | 4.517711 | false | false | false | false |
DuckDeck/GrandTime | GrandTimeDemo/TimerViewController.swift | 1 | 3301 | //
// TimerViewController.swift
// GrandTimeDemo
//
// Created by Stan Hu on 2020/3/17.
//
import UIKit
class TimerViewController: UIViewController {
let lblTImerBlock = UILabel()
let lblTimer = UILabel()
var timer:GrandTimer?
var timer2:GrandTimer?
var seco = 0
var seco2 = 0
var isPaus... | mit | 8603a54561b74f75945a3efab0a680ce | 35.329545 | 194 | 0.570848 | 4.036616 | false | false | false | false |
weby/Stencil | Sources/ForTag.swift | 1 | 2548 | public class ForNode : NodeType {
let variable:Variable
let loopVariable:String
let nodes:[NodeType]
let emptyNodes: [NodeType]
public class func parse(parser:TokenParser, token:Token) throws -> NodeType {
let components = token.components()
guard components.count == 4 && components[2] == "in"... | bsd-2-clause | 5ae5b9d0b5a166c5f18c14b672d82cc2 | 32.526316 | 110 | 0.569466 | 4.446771 | false | false | false | false |
bartekchlebek/SwiftHelpers | Example/Pods/Nimble/Sources/Nimble/DSL.swift | 1 | 2467 | import Foundation
/// Make an expectation on a given actual value. The value given is lazily evaluated.
public func expect<T>(_ expression: @autoclosure @escaping () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation<T> {
return Expectation(
expression: Expression(
expre... | mit | fbf89496e5d6feee51ff34794bb5cbc3 | 36.953846 | 141 | 0.634779 | 4.253448 | false | false | false | false |
mercadopago/px-ios | MercadoPagoSDK/MercadoPagoSDK/Flows/OneTap/UI/Offline methods/PXOfflineMethodsViewController.swift | 1 | 21005 | import Foundation
import MLUI
protocol PXOfflineMethodsViewControllerDelegate: class {
func didEnableUI(enabled: Bool)
}
final class PXOfflineMethodsViewController: MercadoPagoUIViewController {
let viewModel: PXOfflineMethodsViewModel
var callbackConfirm: ((PXPaymentData, Bool) -> Void)
let callbackF... | mit | 1a4d1d6cbf695ed31bc8956a0ef723bf | 39.786408 | 275 | 0.688931 | 5.406692 | false | false | false | false |
Awalz/ark-ios-monitor | ArkMonitor/SwiftyArk+Extensions.swift | 1 | 6780 | // Copyright (c) 2016 Ark
//
// 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, ... | mit | b4f75edde7512692707d70fc594389d4 | 32.073171 | 137 | 0.628024 | 5.113122 | false | false | false | false |
ktatroe/MPA-Horatio | Horatio/Horatio/Classes/JSON/JSONParsing.swift | 2 | 7953 | //
// Copyright © 2016 Kevin Tatroe. All rights reserved.
// See LICENSE.txt for this sample’s licensing information
import Foundation
public typealias JSONObject = [String : Any]
/// Options for parsing and validating JSON using the `JSONParser` class.
public struct JSONParsingOptions: OptionSet {
public le... | mit | c3d744972d91709fe09b64394a3674a8 | 28.014599 | 123 | 0.568176 | 5.009452 | false | false | false | false |
findmybusnj/findmybusnj-swift | findmybusnj-common/Presenter/ETAPresenter.swift | 1 | 3661 | //
// ETAPresenter.swift
// findmybusnj
//
// Created by David Aghassi on 4/19/16.
// Copyright © 2016 David Aghassi. All rights reserved.
//
import UIKit
// Dependecies
import SwiftyJSON
/**
* Base protocol representing a presenter that handles ETA cell formatting
*/
public protocol ETAPresenter {
var sani... | gpl-3.0 | 6b348f72ab7fe318f6de099099217fa5 | 28.047619 | 92 | 0.684973 | 4.017563 | false | false | false | false |
DarlingXIe/WeiBoProject | WeiBo/WeiBo/Classes/Tools/Temp/XDLQRToolBarController.swift | 1 | 11780 | //
// XDLTempViewController.swift
// WeiBo
//
// Created by DalinXie on 16/9/11.
// Copyright © 2016年 itcast. All rights reserved.
//
/*
static var token: dispatch_once_t = 0
func whatDoYouHear() {
print("All of this has happened before, and all of it will happen again.")
dispatch_once(&token) {
print("Except... | mit | 22b13c6a5281557fd017d983db6dff8f | 34.248503 | 167 | 0.570543 | 5.014055 | false | false | false | false |
Coderian/SwiftedGPX | SwiftedGPX/Elements/Metadata.swift | 1 | 4952 | //
// Metadata.swift
// SwiftedGPX
//
// Created by 佐々木 均 on 2016/02/16.
// Copyright © 2016年 S-Parts. All rights reserved.
//
import Foundation
/// GPX Metadata
///
/// [GPX 1.1 schema](http://www.topografix.com/GPX/1/1/gpx.xsd)
///
/// <xsd:element name="metadata" type="metadataType" minOccurs="0">
/// ... | mit | 1e226c51bf2b91ffabb7df506958ac06 | 36.653846 | 128 | 0.550562 | 3.897293 | false | false | false | false |
fedepo/phoneid_iOS | Pod/Classes/ui/views/controls/WebImageView.swift | 2 | 2576 | //
// WebImageView.swift
// phoneid_iOS
//
// Copyright 2015 phone.id - 73 knots, Inc.
//
// 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/LICE... | apache-2.0 | f784c8baa0a8dc438c00040a98197059 | 31.607595 | 168 | 0.63354 | 4.878788 | false | false | false | false |
zhxnlai/Emoticon | EmoticonKeyboard/EmoticonKeyboard/EKQueryEmoticonsCollectionViewController.swift | 1 | 1579 | //
// EKRecentEmoticonsCollectionViewController.swift
// EmoticonKeyboard
//
// Created by Zhixuan Lai on 5/10/15.
// Copyright (c) 2015 Zhixuan Lai. All rights reserved.
//
import UIKit
class EKQueryEmoticonsCollectionViewController: UICollectionViewController {
var dataSourceDelegate = EKQueryEmoticons... | mit | 14124c46f5c029b51acd84bce0d39c59 | 38.475 | 184 | 0.732742 | 6.634454 | false | false | false | false |
mkaply/firefox-ios | Client/Frontend/Home/FirefoxHomeViewController.swift | 4 | 49072 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import Shared
import UIKit
import Storage
import SDWebImage
import XCGLogger
import SyncTelemetry
import SnapKit
... | mpl-2.0 | dc4513ee09f3342753e42967c40f92ad | 42.197183 | 218 | 0.667957 | 5.299924 | false | false | false | false |
JunDang/SwiftFoundation | Sources/SwiftFoundation/RegularExpressionCompileOption.swift | 1 | 2281 | //
// RegularExpressionCompileOption.swift
// SwiftFoundation
//
// Created by Alsey Coleman Miller on 8/9/15.
// Copyright © 2015 PureSwift. All rights reserved.
//
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
import Darwin.C
#elseif os(Linux)
import Glibc
#endif
public extension RegularExpression {... | mit | ed681957e662ca6d9c0a4bc97c662ea2 | 29.72973 | 246 | 0.558047 | 4.640816 | false | false | false | false |
larcus94/ImagePickerSheetController | ImagePickerSheetController/ImagePickerSheetController/Sheet/Preview/PreviewCollectionView.swift | 2 | 1752 | //
// PreviewCollectionView.swift
// ImagePickerSheet
//
// Created by Laurin Brandner on 07/09/14.
// Copyright (c) 2014 Laurin Brandner. All rights reserved.
//
import UIKit
class PreviewCollectionView: UICollectionView {
var bouncing: Bool {
if contentOffset.x < -contentInset.left { return tru... | mit | 61f6cd1260636a0f839b73971559bd11 | 29.736842 | 123 | 0.618721 | 5.440994 | false | false | false | false |
RMizin/PigeonMessenger-project | FalconMessenger/Contacts/ViewPlaceholder.swift | 1 | 3743 | //
// ViewPlaceholder.swift
// Pigeon-project
//
// Created by Roman Mizin on 11/6/17.
// Copyright © 2017 Roman Mizin. All rights reserved.
//
import UIKit
enum ViewPlaceholderPriority: CGFloat {
case low = 0.1
case medium = 0.5
case high = 1.0
}
enum ViewPlaceholderPosition {
case top
case center
}
... | gpl-3.0 | bbf0c1b44cb99c670b56f148d6bf7572 | 33.256881 | 102 | 0.732994 | 4.526061 | false | false | false | false |
lxcid/LXStateMachine | LXStateMachine/LXStateMachine/StateMachine.swift | 1 | 2063 | //
// StateMachine.swift
// LXStateMachine
//
// Created by Stan Chang Khin Boon on 29/9/15.
// Copyright © 2015 lxcid. All rights reserved.
//
import Foundation
public protocol EventType {
}
public protocol StateType {
typealias Event: EventType
}
public struct Transition<State: StateType> {
public let... | mit | e004557a9387e82d274e5de0ab8aaf28 | 32.803279 | 157 | 0.71969 | 4.697039 | false | false | false | false |
umer-hai/xiniuzhujia-swift | xiniuzhujia/CustomViews/KindView.swift | 1 | 2168 | //
// KindView.swift
// xiniuzhujia
//
// Created by 海广盼 on 16/5/22.
// Copyright © 2016年 22. All rights reserved.
//
import UIKit
///1.声明一个协议 :NSObjectProtocol, 只有这样才能在设置代理的时候前面添加weak
protocol KindViewDelegate : NSObjectProtocol{
//2.在协议中声明一个代理方法
func buttonClick(_ btn : UIButton)
}
class KindVie... | mit | 4082cf7344b6ba3f320ae06ca3845a6c | 27.585714 | 117 | 0.573713 | 3.747191 | false | false | false | false |
curiousurick/BluetoothBackupSensor-iOS | CSS427Bluefruit_Connect/BLE Test/BLEDevice.swift | 4 | 7425 | //
// BLEDevice.swift
// Adafruit Bluefruit LE Connect
//
// Used to represent an unconnected peripheral in scanning/discovery list
//
// Created by Collin Cunningham on 10/17/14.
// Copyright (c) 2014 Adafruit Industries. All rights reserved.
//
import Foundation
import CoreBluetooth
class BLEDevice {
... | mit | 09ecded97e6378f4805fdb65352a7e54 | 29.064777 | 123 | 0.55165 | 5.064802 | false | false | false | false |
LoganWright/vapor | Tests/Vapor/RouteTests.swift | 1 | 3894 | //
// RouteTests.swift
// Vapor
//
// Created by Matthew on 20/02/2016.
// Copyright © 2016 Tanner Nelson. All rights reserved.
//
import XCTest
@testable import Vapor
class RouteTests: XCTestCase {
static var allTests: [(String, RouteTests -> () throws -> Void)] {
return [
("testNestedRou... | mit | a52228eaa9d97c5f5e812b9e062e0538 | 25.304054 | 98 | 0.521449 | 4.39887 | false | true | false | false |
couchbase/couchbase-lite-ios | Swift/ArrayExpressionSatisfies.swift | 1 | 2766 | //
// ArrayExpressionSatisfies.swift
// CouchbaseLite
//
// Copyright (c) 2017 Couchbase, Inc All rights reserved.
//
// 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-2.0 | bf7013234ce8a8d621f2881c20a7ecaf | 35.394737 | 104 | 0.673897 | 4.564356 | false | false | false | false |
ecaselles/GameOfLife | GameOfLifeTests/CellSpec.swift | 1 | 2300 | //
// CellSpec.swift
// GameOfLifeTests
//
// Created by Edu Caselles on 10/8/16.
// Copyright © 2016 Edu Caselles. All rights reserved.
//
import Quick
import Nimble
@testable import GameOfLife
class CellSpec: QuickSpec {
override func spec() {
describe(".nextEvolution") {
contex... | mit | d90fee76051777c804b11c57d2ae2c24 | 32.808824 | 78 | 0.419313 | 5.334107 | false | false | false | false |
dleonard00/firebase-user-signup | Pods/Material/Sources/MenuViewController.swift | 1 | 6648 | /*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above... | mit | d53c2c050ebe542b163b57e640ce3ddb | 33.989474 | 223 | 0.772413 | 4.613463 | false | false | false | false |
moyazi/SwiftDayList | SwiftDayList/Days/Day6/InterestCollectionViewCell.swift | 1 | 1222 | //
// InterestCollectionViewCell.swift
// SwiftDayList
//
// Created by leoo on 2017/6/27.
// Copyright © 2017年 Het. All rights reserved.
//
import UIKit
class InterestCollectionViewCell: UICollectionViewCell {
var imageView:UIImageView!
var title:UILabel!
var interest: Interest! {
didSet... | mit | a4e5a534ec69506a6854896cbec8ec61 | 26.088889 | 129 | 0.609516 | 4.247387 | false | false | false | false |
listen-li/DYZB | DYZB/DYZB/Classes/Home/Controller/GameViewController.swift | 1 | 4713 | //
// GameViewController.swift
// DYZB
//
// Created by admin on 17/8/16.
// Copyright © 2017年 smartFlash. All rights reserved.
//
import UIKit
private let kEdgeMargin :CGFloat = 30
private let kItemW :CGFloat = (kScreenW - 2 * kEdgeMargin) / 3
private let kItemH :CGFloat = kItemW * 6 / 5
private let kHeaderViewH... | mit | db674e75ca6efc0af7a23ec6854f3294 | 35.806452 | 192 | 0.682954 | 5.252014 | false | false | false | false |
jum/Charts | Source/Charts/Renderers/AxisRendererBase.swift | 8 | 6939 | //
// AxisRendererBase.swift
// Charts
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
// A port of MPAndroidChart for iOS
// Licensed under Apache License 2.0
//
// https://github.com/danielgindi/Charts
//
import Foundation
import CoreGraphics
@objc(ChartAxisRendererBase)
open class AxisRendererBase: ... | apache-2.0 | 4ee641d52278c9fb0251aa65b0189af7 | 30.830275 | 130 | 0.529903 | 5.162946 | false | false | false | false |
chenms-m2/M7Kit | Example/M7Kit/AppDelegate.swift | 1 | 3166 | //
// AppDelegate.swift
// M7Kit
//
// Created by chenms-m2 on 12/02/2016.
// Copyright (c) 2016 chenms-m2. All rights reserved.
//
import UIKit
import M7Kit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var tabBarViewController: M7TabBarViewController?
... | mit | d8fea6f1ccf2f763c3edcfed4b019e39 | 39.589744 | 285 | 0.718572 | 5.60354 | false | false | false | false |
sadawi/PrimarySource | Pod/iOS/BooleanCell.swift | 1 | 1134 | //
// BooleanCell.swift
// Pods
//
// Created by Sam Williams on 11/30/15.
//
//
import UIKit
open class BooleanCell:FieldCell<Bool> {
}
open class SwitchCell:BooleanCell, TappableTableCell {
var switchControl:UISwitch?
override open func buildView() {
super.buildView()
let control =... | mit | 389135cc368a059bbbb731f6d464b80c | 24.2 | 111 | 0.637566 | 4.311787 | false | false | false | false |
wordpress-mobile/WordPress-iOS | WordPress/Classes/Extensions/UIImageView+SiteIcon.swift | 1 | 9682 | import AlamofireImage
import Alamofire
import AutomatticTracks
import Foundation
import Gridicons
/// UIImageView Helper Methods that allow us to download a SiteIcon, given a website's "Icon Path"
///
extension UIImageView {
/// Default Settings
///
struct SiteIconDefaults {
/// Default SiteIcon's... | gpl-2.0 | 6f2be3f66575d8ef051501bf0b4f3fdd | 33.091549 | 155 | 0.623838 | 4.625896 | false | false | false | false |
kickstarter/ios-oss | Kickstarter-iOS/Features/PledgePaymentMethods/Views/Cells/PledgePaymentMethodAddCell.swift | 1 | 3567 | import KsApi
import Library
import Prelude
import UIKit
final class PledgePaymentMethodAddCell: UITableViewCell, ValueCell {
// MARK: - Properties
private lazy var selectionView: UIView = { UIView(frame: .zero) }()
private lazy var addButton: UIButton = { UIButton(type: .custom) }()
private lazy var containe... | apache-2.0 | a6940c9d27d881f262466d7b46fe911a | 27.766129 | 104 | 0.702832 | 4.712021 | false | false | false | false |
pdx-ios/watchkit-workshop | RoShamBo/RoShamBo/Game.swift | 1 | 3198 | //
// Choice.swift
// RoShamBo
//
// Created by Ryan Arana on 3/26/15.
// Copyright (c) 2015 PDX-iOS. All rights reserved.
//
import Foundation
public enum Choice: Int {
case Rock = 1
case Paper
case Scissors
case Spock
case Lizard
public var name: String {
switch self {
c... | mit | b2ad08a9bcdb52be7192a1e41804f42b | 22.865672 | 104 | 0.476861 | 4.32747 | false | false | false | false |
antonio081014/LeeCode-CodeBase | Swift/maximum-product-of-splitted-binary-tree.swift | 2 | 1277 | /**
* https://leetcode.com/problems/maximum-product-of-splitted-binary-tree/
*
*
*/
// Date: Thu Aug 19 10:42:57 PDT 2021
/**
* Definition for a binary tree node.
* public class TreeNode {
* public var val: Int
* public var left: TreeNode?
* public var right: TreeNode?
* public init() { sel... | mit | 8843efe0db333d977412edbf7be19fda | 30.170732 | 85 | 0.534064 | 3.517906 | false | false | false | false |
narner/AudioKit | Examples/iOS/Particles/AudioKitParticles/ViewController.swift | 1 | 5521 | //
// ViewController.swift
// AudioKitParticles
//
// Created by Simon Gladman on 28/12/2015.
// Copyright © 2015 Simon Gladman. All rights reserved.
//
import AudioKit
import UIKit
class ViewController: UIViewController {
let statusLabel = UILabel()
let floatPi = Float.pi
var gravityWellAngle: Float... | mit | 09eef7c25e6b1d995ad58fc11aa8824f | 30.907514 | 101 | 0.610326 | 4.419536 | false | false | false | false |
narner/AudioKit | AudioKit/Common/Nodes/Effects/Distortion/Complex Distortion/AKDistortion.swift | 1 | 9460 | //
// AKDistortion.swift
// AudioKit
//
// Created by Aurelius Prochazka, revision history on Github.
// Copyright © 2017 Aurelius Prochazka. All rights reserved.
//
/// AudioKit version of Apple's Distortion Audio Unit
///
open class AKDistortion: AKNode, AKToggleable, AUEffect, AKInput {
// MARK: - Properti... | mit | e773e130e5feded53fa0fd0c3334c112 | 35.380769 | 113 | 0.605667 | 4.146865 | false | false | false | false |
planvine/Line-Up-iOS-SDK | Pod/Classes/PaymentViewController/ViewTableCellPaymentCheckout.swift | 1 | 3186 | /**
* Copyright (c) 2016 Line-Up
*
* 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, d... | mit | 770f103dcdaaf1c10280a55c129bbe9f | 42.054054 | 302 | 0.700565 | 5.105769 | false | false | false | false |
itaen/30DaysSwift | 003_PlayLocalVideo/PlayLocalVideo/PlayLocalVideo/ViewController.swift | 1 | 2468 | //
// ViewController.swift
// PlayLocalVideo
//
// Created by itaen on 17/07/2017.
// Copyright © 2017 itaen. All rights reserved.
//
import UIKit
import AVFoundation
import AVKit
class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
@IBOutlet weak var videoTableView: UI... | mit | ecb443a5e2dff514e584a41998179b29 | 33.263889 | 112 | 0.656668 | 4.690114 | false | false | false | false |
kharrison/CodeExamples | RefreshScroll/RefreshScroll/SignUpViewController.swift | 1 | 2791 | //
// SignUpViewController.swift
//
// Created by Keith Harrison http://useyourloaf.com
// Copyright (c) 2016 Keith Harrison. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redist... | bsd-3-clause | 0fc29602a0e9da19cb663b8f0eddaba3 | 41.938462 | 86 | 0.707273 | 4.992844 | false | false | false | false |
SteveBarnegren/SBSwiftUtils | SBSwiftUtils/Extensions/Array/Array+SortBySteps.swift | 1 | 2757 | //
// Array+SortBySteps.swift
// SBSwiftUtils
//
// Created by Steve Barnegren on 11/02/2018.
// Copyright © 2018 SteveBarnegren. All rights reserved.
//
import Foundation
public extension Array {
class SortStep<Input> {
public enum Result {
case ascending
case de... | mit | 8f4905d0ec6ca2243386ffea778dfb8b | 27.708333 | 104 | 0.489115 | 5.259542 | false | false | false | false |
Bunn/firefox-ios | Client/Frontend/Settings/ThemeSettingsController.swift | 1 | 8827 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import Foundation
import Shared
class ThemeSettingsController: ThemedTableViewController {
struct UX {
... | mpl-2.0 | 92e896c8700fda024e52e787196fcfc4 | 43.135 | 221 | 0.674975 | 5.320675 | false | false | false | false |
beeth0ven/CKSIncrementalStore | CKSIncrementalStore/CKSIncrementalStoreSyncOperationTokenHandler.swift | 1 | 2597 | // CKSIncrementalStoreSyncOperationTokenHandler.swift
//
// The MIT License (MIT)
//
// Copyright (c) 2015 Nofel Mahmood (https://twitter.com/NofelMahmood)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Softw... | mit | a802f874b7f051c12ba7c2011694543d | 38.953846 | 180 | 0.721987 | 5.003854 | false | false | false | false |
slimpp/CocoaSLIMPP | CocoaMQTT/CocoaMQTTMessage.swift | 1 | 1237 | //
// CocoaMQTTMessage.swift
// CocoaMQTT
//
// Created by Feng Lee<feng.lee@nextalk.im> on 14/8/3.
// Copyright (c) 2014年 slimpp.io. All rights reserved.
//
import Foundation
/**
* MQTT Messgae
*/
class CocoaMQTTMessage {
var topic: String
var payload: [Byte]
//utf8 bytes array to stri... | mit | eefe3575430ac6925f1e6225e3a7dcaf | 19.245902 | 110 | 0.582186 | 3.664688 | false | false | false | false |
TrustWallet/trust-wallet-ios | Trust/Wallet/ViewControllers/ImportMainWalletViewController.swift | 1 | 4741 | // Copyright DApps Platform Inc. All rights reserved.
import Foundation
import UIKit
import Eureka
import QRCodeReaderViewController
import TrustCore
protocol ImportMainWalletViewControllerDelegate: class {
func didImportWallet(wallet: WalletInfo, in controller: ImportMainWalletViewController)
func didSkipImp... | gpl-3.0 | 3306087bd18ff565520ab26b4a29d1af | 32.864286 | 131 | 0.629192 | 4.892673 | false | false | false | false |
blockchain/My-Wallet-V3-iOS | Modules/FeatureWalletConnect/Sources/FeatureWalletConnectData/Services/WalletConnectService.swift | 1 | 11361 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import AnalyticsKit
import Combine
import DIKit
import EthereumKit
import FeatureWalletConnectDomain
import Foundation
import PlatformKit
import ToolKit
import WalletConnectSwift
final class WalletConnectService {
// MARK: - Private Properties
p... | lgpl-3.0 | 82c43882492114df6c5c79194d74b07a | 31.927536 | 117 | 0.581778 | 5.325832 | false | false | false | false |
farion/eloquence | Eloquence/Core/EloConnections.swift | 1 | 1112 | import Foundation
import CoreData
import XMPPFramework
@objc
protocol EloConnectionsDelegate: NSObjectProtocol {
}
class EloConnections: MulticastDelegateContainer {
static let sharedInstance = EloConnections();
typealias DelegateType = EloConnectionsDelegate;
var multicastDelegate = [EloConne... | apache-2.0 | 5a9d96c777edd3d29b112478f306f80a | 24.295455 | 70 | 0.632194 | 5.077626 | false | false | false | false |
nathantannar4/InputBarAccessoryView | Sources/Views/InputTextView.swift | 1 | 16807 | //
// InputTextView.swift
// InputBarAccessoryView
//
// Copyright © 2017-2020 Nathan Tannar.
//
// 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 withou... | mit | d3a8bc2135854ee9d39619fed0aa205c | 40.191176 | 170 | 0.6268 | 5.755479 | false | false | false | false |
xivol/Swift-CS333 | playgrounds/uiKit/uiKitCatalog/UIKitCatalog/SearchBarEmbeddedInNavigationBarViewController.swift | 3 | 1739 | /*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
A view controller that demonstrates how to present a search controller's search bar within a navigation bar.
*/
import UIKit
class SearchBarEmbeddedInNavigationBarViewController... | mit | 5b4d250e1648cda57cf904c42018a5c7 | 40.357143 | 183 | 0.71848 | 6.579545 | false | false | false | false |
Peyotle/CircularControl | Example/CircularControl/ViewController.swift | 1 | 1164 | //
// ViewController.swift
// CircularControl
//
// Created by Peyotle on 06/28/2017.
// Copyright (c) 2017 Peyotle. All rights reserved.
//
import UIKit
import CircularControl
class ViewController: UIViewController {
let valueLabel = UILabel()
override func viewDidLoad() {
super.viewDidLoad()
... | mit | 1197110e1f1b49c41f3250d9427dacef | 24.304348 | 98 | 0.638316 | 4.37594 | false | false | false | false |
wikimedia/apps-ios-wikipedia | Wikipedia/Code/ArticleLocationController.swift | 2 | 2238 | import Foundation
@objc class ArticleLocationController: NSObject {
let migrationKey = "WMFDidCompleteQuadKeyMigration"
@objc func needsMigration(managedObjectContext: NSManagedObjectContext) -> Bool {
do {
let keyValueRequest = WMFKeyValue.fetchRequest()
keyValueRequest.pr... | mit | 07ec62433486163bf5ddb3ebbac83511 | 38.964286 | 152 | 0.573727 | 5.595 | false | false | false | false |
Raizlabs/BonMot | Tests/Helpers.swift | 1 | 7776 | //
// Helpers.swift
// BonMot
//
// Created by Brian King on 8/29/16.
// Copyright © 2016 Rightpoint. All rights reserved.
//
@testable import BonMot
import XCTest
#if os(OSX)
#else
import UIKit
let titleTextStyle = UIFont.TextStyle.title1
let differentTextStyle = UIFont.TextStyle.title2
@availabl... | mit | 63f61fdbb23e3947a6803075946fc018 | 29.120155 | 132 | 0.642517 | 4.471231 | false | false | false | false |
Brightify/Cuckoo | Source/Initialization/ThreadLocal.swift | 2 | 1185 | //
// ThreadLocal.swift
// Cuckoo
//
// Created by Tadeas Kriz on 7/6/18.
//
import Foundation
internal class ThreadLocal<T> {
private let dictionaryKey = "ThreadLocal.\(UUID().uuidString)"
internal var value: T? {
get {
let dictionary = Thread.current.threadDictionary
if l... | mit | da8e890d403decab873c009ee10deca9 | 25.931818 | 187 | 0.571308 | 5.152174 | false | false | false | false |
justinhester/hacking-with-swift | src/Project28/Project28/ViewController.swift | 1 | 5607 | //
// ViewController.swift
// Project28
//
// Created by Justin Lawrence Hester on 2/17/16.
// Copyright © 2016 Justin Lawrence Hester. All rights reserved.
//
import LocalAuthentication
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var secret: UITextView!
override func viewDidLoa... | gpl-3.0 | 7b2558637e194b8d7d7309c4bbffac80 | 33.604938 | 107 | 0.499643 | 6.518605 | false | false | false | false |
malcommac/SwiftRichString | Sources/SwiftRichString/Extensions/AttributedString+Attachments.swift | 1 | 4580 | //
// SwiftRichString
// Elegant Strings & Attributed Strings Toolkit for Swift
//
// Created by Daniele Margutti.
// Copyright © 2018 Daniele Margutti. All rights reserved.
//
// Web: http://www.danielemargutti.com
// Email: hello@danielemargutti.com
// Twitter: @danielemargutti
//
//
// Permission is ... | mit | 8b843abf27b0a5499f0a87160f3789d1 | 35.927419 | 98 | 0.627211 | 4.710905 | false | false | false | false |
ydi-core/nucleus-ios | Nucleus/LoginController.swift | 1 | 22972 | //
// LoginController.swift
// Nucleus
//
// Created by Bezaleel Ashefor on 27/10/2017.
// Copyright © 2017 Ephod. All rights reserved.
//
import UIKit
import Alamofire
import ImagePicker
class LoginController: UIViewController, UITextFieldDelegate, ImagePickerDelegate {
let mainStoryBoard : UIStoryboard... | bsd-2-clause | aea274106b7c56ed5ca88ca35d83abe9 | 42.178571 | 227 | 0.526838 | 5.422805 | false | false | false | false |
TMTBO/TTAImagePickerController | TTAImagePickerController/Classes/Views/TTAPreviewNavigationBar.swift | 1 | 5764 | //
// TTAPreviewNavigationBar.swift
// Pods-TTAImagePickerController_Example
//
// Created by TobyoTenma on 02/07/2017.
//
import Photos
protocol TTAPreviewNavigationBarDelegate: class {
func previewNavigationBar(_ navigationBar: TTAPreviewNavigationBar, didClickBack button: UIButton)
func canOperate() -> ... | mit | e285de4f535815ad886439d3fa3760e9 | 36.673203 | 179 | 0.648334 | 5.034061 | false | false | false | false |
b0oh/mal | swift/env.swift | 1 | 2246 | //******************************************************************************
// MAL - env
//******************************************************************************
import Foundation
typealias EnvironmentVars = [MalSymbol: MalVal]
let kSymbolAmpersand = MalSymbol(symbol: "&")
class Environment {
init(... | mpl-2.0 | a14cc7593246cc40d981f7c3cdb192d7 | 35.225806 | 152 | 0.475957 | 4.659751 | false | false | false | false |
ello/ello-ios | Sources/Model/Regions/Asset.swift | 1 | 6629 | ////
/// Asset.swift
//
import SwiftyJSON
let AssetVersion = 1
@objc(Asset)
final class Asset: Model {
enum AttachmentType {
case optimized
case mdpi
case hdpi
case xhdpi
case original
case large
case regular
}
let id: String
var optimized: A... | mit | 2883e94747b428977b9ec74cd4e1ceb7 | 28.331858 | 89 | 0.579122 | 4.285068 | false | false | false | false |
wxxsw/GSRefresh | Sources/Observer.swift | 1 | 5569 | //
// Observer.swift
// GSRefresh
// https://github.com/wxxsw/GSRefresh
//
// Created by Gesen on 2017/5/20.
//
// Copyright © 2017 Gesen <i@gesen.me>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to dea... | mit | 0d256630945fea7c6f4ba2562dd84590 | 29.26087 | 103 | 0.604705 | 5.043478 | false | false | false | false |
BillZong/OneProgramOneDay | D44_FoodPin/FoodPin/DetailViewController.swift | 1 | 3774 | //
// DetailViewController.swift
// FoodPin
//
// Created by BillZong on 15-1-23.
// Copyright (c) 2015年 BillZong. All rights reserved.
//
import UIKit
class DetailViewController: UIViewController, UITableViewDataSource, UITableViewDelegate{
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak v... | lgpl-3.0 | d704514003961f5bc13ab618bd2cb181 | 36.7 | 188 | 0.655703 | 5.026667 | false | false | false | false |
raymondshadow/SwiftDemo | SwiftApp/Pods/RxCocoa/RxCocoa/Foundation/URLSession+Rx.swift | 3 | 8590 | //
// URLSession+Rx.swift
// RxCocoa
//
// Created by Krunoslav Zaher on 3/23/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
import struct Foundation.URL
import struct Foundation.URLRequest
import struct Foundation.Data
import struct Foundation.Date
import struct Foundation.TimeInterval
import cl... | apache-2.0 | 4061f1be3f71ee3ce2d7f3f83d216c6d | 34.345679 | 119 | 0.63919 | 5.275799 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.