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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CraigZheng/KomicaViewer | KomicaViewer/KomicaViewer/ViewController/SettingsTableViewController.swift | 1 | 11206 | //
// SettingsTableViewController.swift
// KomicaViewer
//
// Created by Craig Zheng on 15/12/16.
// Copyright © 2016 Craig. All rights reserved.
//
import UIKit
import StoreKit
import SwiftMessages
import MBProgressHUD
class SettingsTableViewController: UITableViewController {
fileprivate let cellIdentifie... | mit | 132a06b618f9fb0a2e4bae654433d3d1 | 44.922131 | 161 | 0.498081 | 6.552632 | false | false | false | false |
erprashantrastogi/iPadCustomKeyboard | Keyboard/Helper/CircularArray.swift | 2 | 1275 | //
// CircularArray.swift
// ELDeveloperKeyboard
//
// Created by Eric Lin on 2014-07-02.
// Copyright (c) 2016 Kari Kraam. All rights reserved.
//
/**
A circular array that can be cycled through.
*/
class CircularArray<T> {
// MARK: Properties
private let items: [T]
private lazy... | apache-2.0 | 6d934627403629d958e9189620bb92e8 | 18.333333 | 69 | 0.449412 | 4.13961 | false | false | false | false |
KevinYangGit/DYTV | DYZB/DYZB/Classes/Main/Controller/CustomNavigationController.swift | 1 | 1134 | //
// CustomNavigationController.swift
// DYZB
//
// Created by boxfishedu on 2016/10/22.
// Copyright © 2016年 杨琦. All rights reserved.
//
import UIKit
class CustomNavigationController: UINavigationController {
override func viewDidLoad() {
super.viewDidLoad()
guard let systemGes = i... | mit | b826d1d2dc38b647adc156b7febb974a | 28.657895 | 90 | 0.64685 | 5.29108 | false | false | false | false |
ALiOSDev/ALTableView | ALTableViewSwift/ALTableView/ALTableView/ALTableViewClasses/Elements/Row/ALRowElement.swift | 1 | 4028 | //
// RowElement.swift
// ALTableView
//
// Created by lorenzo villarroel perez on 7/3/18.
// Copyright © 2018 lorenzo villarroel perez. All rights reserved.
//
import UIKit
public typealias ALCellPressedHandler = (UIViewController?, UITableViewCell) -> Void
public typealias ALCellCreatedHandler = (Any?, UITableV... | mit | 0f69720423c0313f5173509f903ac7b3 | 24.649682 | 122 | 0.654582 | 5.1169 | false | false | false | false |
abbeycode/Carthage | Source/carthage/Build.swift | 1 | 8740 | //
// Build.swift
// Carthage
//
// Created by Justin Spahr-Summers on 2014-10-11.
// Copyright (c) 2014 Carthage. All rights reserved.
//
import Box
import CarthageKit
import Commandant
import Foundation
import Result
import ReactiveCocoa
import ReactiveTask
public struct BuildCommand: CommandType {
public let ... | mit | 0ccdc2dfae6130904511d4400fb9fa9b | 31.681648 | 191 | 0.707541 | 4.068065 | false | false | false | false |
AnRanScheme/magiGlobe | magi/magiGlobe/Pods/SQLite.swift/Sources/SQLite/Typed/Query.swift | 25 | 36369 | //
// SQLite.swift
// https://github.com/stephencelis/SQLite.swift
// Copyright © 2014-2015 Stephen Celis.
//
// 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... | mit | b6f124b7794958d0f0419da37dbc30b8 | 30.268503 | 147 | 0.571861 | 4.341498 | false | false | false | false |
krzyzanowskim/Natalie | Sources/natalie/Natalie.swift | 1 | 14239 | //
// Natalie.swift
// Natalie
//
// Created by Marcin Krzyzanowski on 07/08/16.
// Copyright © 2016 Marcin Krzyzanowski. All rights reserved.
//
import Foundation
struct Natalie {
struct Header: CustomStringConvertible {
var description: String {
var output = String()
output ... | mit | 1bacf9f2280d06386deea00fd2c54f1a | 44.78135 | 192 | 0.524652 | 4.633257 | false | false | false | false |
BenEmdon/swift-algorithm-club | Ternary Search Tree/TST.playground/Sources/TernarySearchTree.swift | 1 | 2719 | //
// TernarySearchTree.swift
//
//
// Created by Siddharth Atre on 3/15/16.
//
//
import Foundation
public class TernarySearchTree<Element> {
var root: TSTNode<Element>?
public init() {}
//MARK: - Insertion
public func insert(data: Element, withKey key: String) -> Bool {
return insertN... | mit | f893a55babb364891603d9d152b5eb58 | 27.322917 | 137 | 0.549099 | 4.202473 | false | false | false | false |
AnirudhDas/AniruddhaDas.github.io | RedBus/RedBus/Model/BusesList.swift | 1 | 3607 | //
// BusesList.swift
// RedBus
//
// Created by Anirudh Das on 8/22/18.
// Copyright © 2018 Aniruddha Das. All rights reserved.
//
import Foundation
enum SortBusesBy {
case ratingAscending
case ratingDescending
case departureTimeAscending
case departureTimeDescending
case fareAscending
ca... | apache-2.0 | 44d0036a9b5fac98297ebaf4a9fb39a7 | 34.009709 | 127 | 0.546866 | 4.088435 | false | false | false | false |
dreamsxin/swift | validation-test/stdlib/CoreAudio.swift | 3 | 10091 | // RUN: %target-run-simple-swift
// REQUIRES: executable_test
// REQUIRES: objc_interop
// UNSUPPORTED: OS=watchos
import StdlibUnittest
import StdlibCollectionUnittest
import CoreAudio
// Used in tests below.
extension AudioBuffer : Equatable {}
public func == (lhs: AudioBuffer, rhs: AudioBuffer) -> Bool {
ret... | apache-2.0 | 1600bda809e77fb3fd7668a52ce77ac3 | 32.413907 | 91 | 0.758101 | 4.900923 | false | true | false | false |
codeforgreenville/trolley-tracker-ios-client | TrolleyTracker/Controllers/UI/Schedule/ScheduleController.swift | 1 | 2865 | //
// ScheduleController.swift
// TrolleyTracker
//
// Created by Austin Younts on 7/30/17.
// Copyright © 2017 Code For Greenville. All rights reserved.
//
import UIKit
class ScheduleController: FunctionController {
enum DisplayType: Int {
case route, day
static var all: [DisplayType] {
... | mit | aedf37fe42c89009130f810d512d89db | 26.538462 | 81 | 0.660615 | 5.648915 | false | false | false | false |
incetro/NIO | Example/NioExample-iOS/Models/Plain/AdditivePlainObject.swift | 1 | 825 | //
// AdditivePlainObject.swift
// Nio
//
// Created by incetro on 16/07/2017.
//
//
import NIO
import Transformer
// MARK: - AdditivePlainObject
class AdditivePlainObject: TransformablePlain {
var nioID: NioID {
return NioID(value: id)
}
let id: Int64
let name: String
... | mit | 831f7ca5a32859d08ef1e2300e369a31 | 19.121951 | 55 | 0.570909 | 3.784404 | false | false | false | false |
mapsme/omim | iphone/Maps/Bookmarks/Catalog/Dialogs/SubscriptionExpiredViewController.swift | 6 | 814 | class SubscriptionExpiredViewController: UIViewController {
private let transitioning = FadeTransitioning<AlertPresentationController>(cancellable: false)
private let onSubscribe: MWMVoidBlock
private let onDelete: MWMVoidBlock
init(onSubscribe: @escaping MWMVoidBlock, onDelete: @escaping MWMVoidBlock) {
s... | apache-2.0 | 88655fdef9d1ed1224a8f20ca4befd47 | 27.068966 | 96 | 0.737101 | 4.903614 | false | false | false | false |
CoderXiaoming/Ronaldo | SaleManager/SaleManager/Stock/Controller/SAMStockDetailController.swift | 1 | 5147 | //
// SAMStockDetailController.swift
// SaleManager
//
// Created by apple on 17/1/9.
// Copyright © 2017年 YZH. All rights reserved.
//
import UIKit
//库存明细重用标识符
private let SAMStockProductDetailCellReuseIdentifier = "SAMStockProductDetailCellReuseIdentifier"
class SAMStockDetailController: UIViewController {
... | apache-2.0 | ba345b7b3748456931d0d3a572c80863 | 33.055556 | 175 | 0.660481 | 5.09242 | false | false | false | false |
Bajocode/ExploringModerniOSArchitectures | Architectures/MVVM/ViewModel/ActorViewModel.swift | 1 | 2811 | //
// ActorViewModel.swift
// Architectures
//
// Created by Fabijan Bajo on 27/05/2017.
//
//
import Foundation
final class ActorViewModel: ViewModelInterface {
// MARK: - Properties
// Properties
fileprivate var actors = [Actor]() { didSet { modelUpdate?() } }
var count: Int { retu... | mit | 618136e6ec1c0a0179f61510941dd01c | 30.233333 | 126 | 0.657417 | 4.716443 | false | false | false | false |
KrishMunot/swift | test/IDE/print_ast_tc_decls.swift | 2 | 51675 | // RUN: rm -rf %t && mkdir %t
//
// Build swift modules this test depends on.
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/foo_swift_module.swift
//
// FIXME: BEGIN -enable-source-import hackaround
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs/clang-importer-sdk -I %t) -emit-module -o %t %... | apache-2.0 | a392b1cc9d6a462c4890ad2822877d09 | 36.74653 | 364 | 0.642284 | 3.630392 | false | false | false | false |
ShenghaiWang/FolioReaderKit | Source/FolioReaderAudioPlayer.swift | 3 | 16463 | //
// FolioReaderAudioPlayer.swift
// FolioReaderKit
//
// Created by Kevin Jantzer on 1/4/16.
// Copyright (c) 2015 Folio Reader. All rights reserved.
//
import UIKit
import AVFoundation
import MediaPlayer
open class FolioReaderAudioPlayer: NSObject {
var isTextToSpeech = false
var synthesizer: AVSpeechS... | bsd-3-clause | 878ce7dc6c5f634f0f7391a3037ca675 | 30.179924 | 141 | 0.574379 | 5.524497 | false | false | false | false |
thewisecity/declarehome-ios | CookedApp/TableViewControllers/AlertsTableViewController.swift | 1 | 5238 | //
// AlertsTableViewController.swift
// CookedApp
//
// Created by Dexter Lohnes on 10/21/15.
// Copyright © 2015 The Wise City. All rights reserved.
//
import UIKit
class AlertsTableViewController: PFQueryTableViewController {
var navDelegate: NavigationDelegate!
var statusLabel: UILabel!
... | gpl-3.0 | d82acca73fad2cd406b66f436ad4eb5b | 34.385135 | 138 | 0.616956 | 5.231768 | false | false | false | false |
SwiftFMI/iOS_2017_2018 | Upr/06.01.2018/PhotoLibraryDemo/PhotoLibraryDemo/PhotoLibrary.swift | 1 | 5824 | //
// PhotoLibrary.swift
// PhotoLibraryDemo
//
// Created by Dragomir Ivanov on 6.01.18.
// Copyright © 2018 Swift FMI. All rights reserved.
//
import Foundation
import Photos
fileprivate protocol ImageRepresentable {
var asset: PHAsset? { get }
var size: CGSize { get }
}
public struct Photo {
filep... | apache-2.0 | 3d0a8cdbd38be45f88bdbc49323e4b3a | 32.465517 | 215 | 0.615834 | 5.293636 | false | false | false | false |
jeffreybergier/Hipstapaper | Hipstapaper/Packages/V3Model/Sources/V3Model/Tag.swift | 1 | 2761 | //
// Created by Jeffrey Bergier on 2022/06/17.
//
// MIT License
//
// Copyright (c) 2021 Jeffrey Bergier
//
// 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, inc... | mit | 7235ed833a4bf182d8e9d39070f12eea | 33.08642 | 92 | 0.620427 | 4.586379 | false | false | false | false |
Finb/V2ex-Swift | Controller/LoginViewController.swift | 1 | 17442 | //
// LoginViewController.swift
// V2ex-Swift
//
// Created by huangfeng on 1/22/16.
// Copyright © 2016 Fin. All rights reserved.
//
import UIKit
import OnePasswordExtension
import Kingfisher
import SVProgressHUD
import Alamofire
public typealias LoginSuccessHandel = (String) -> Void
class LoginViewController: ... | mit | f64287d9f1d2c38cccc2616d68e1242d | 41.577114 | 158 | 0.630171 | 4.825486 | false | false | false | false |
ConanMTHu/animated-tab-bar | RAMAnimatedTabBarController/Animations/FrameAnimation/RAMFrameItemAnimation.swift | 1 | 3389 | // RAMFrameItemAnimation.swift
//
// Copyright (c) 11/10/14 Ramotion Inc. (http://ramotion.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 l... | mit | 5785cb9f8b0bad3161c8402ae08c390d | 38.418605 | 106 | 0.701387 | 5.270607 | false | false | false | false |
multinerd/Mia | Mia/Sugar/On/UIBarButtonItem.swift | 1 | 601 | import UIKit
public extension Container where Host: UIBarButtonItem {
func tap(_ action: @escaping Action) {
let target = BarButtonItemTarget(host: host, action: action)
self.barButtonItemTarget = target
}
}
class BarButtonItemTarget: NSObject {
var action: Action?
init(host: UIBar... | mit | 5137734d7c1bbf5aad9cce9466bfe72b | 17.78125 | 68 | 0.620632 | 4.55303 | false | false | false | false |
shorlander/firefox-ios | Client/Frontend/Home/HomePanels.swift | 6 | 3089 | /* 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 UIKit
import Shared
/**
* Data for identifying and constructing a HomePanel.
*/
struct... | mpl-2.0 | 46598b7ac57e261d35e1771ed691dae5 | 43.768116 | 150 | 0.644545 | 6.128968 | false | false | false | false |
sayheyrickjames/codepath-dev | week5/week5-homework-facebook-photos/week5-homework-facebook-photos/BaseTransition.swift | 4 | 3433 | //
// BaseTransition.swift
// transitionDemo
//
// Created by Timothy Lee on 2/22/15.
// Copyright (c) 2015 Timothy Lee. All rights reserved.
//
import UIKit
class BaseTransition: NSObject, UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning {
var duration: NSTimeInterval = 0.4
... | gpl-2.0 | a2b9eb8e49669c39d0ed1ebf87324ddb | 36.725275 | 220 | 0.716283 | 7.611973 | false | false | false | false |
dankogai/swift-numberkit | NumberKit/BigInt.swift | 1 | 25581 | //
// BigInt.swift
// NumberKit
//
// Created by Matthias Zenger on 12/08/2015.
// Copyright © 2015 Matthias Zenger. 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 Licen... | apache-2.0 | 4671e8320c57db47f816caa9e3a3d14f | 30.271394 | 100 | 0.602346 | 3.542936 | false | false | false | false |
onmyway133/Resolver | Pod/Classes/Container.swift | 1 | 789 | //
// Container.swift
// Pods
//
// Created by Khoa Pham on 12/18/15.
//
//
import Foundation
struct Container {
var registrations = [RegistrationKey: RegistrationType]()
mutating func register<F>(tag tag: String? = nil, factory: F) {
let key = RegistrationKey(tag: tag ?? "", factoryType: F.self)
... | mit | 1ccfa0a7e35de77457813e067f5a84cc | 25.3 | 77 | 0.617237 | 3.984848 | false | false | false | false |
julien-c/swifter | Sources/Swifter/DemoServer.swift | 1 | 3015 | //
// DemoServer.swift
// Swifter
// Copyright (c) 2015 Damian Kołakowski. All rights reserved.
//
import Foundation
public func demoServer(publicDir: String?) -> HttpServer {
let server = HttpServer()
if let publicDir = publicDir {
server["/resources/:file"] = HttpHandlers.directory(publicDir... | bsd-3-clause | 23fe391165b13b0d4b9d91c52d6ba715 | 33.25 | 211 | 0.534174 | 3.909209 | false | false | false | false |
gkaimakas/ReactiveBluetooth | ReactiveBluetooth/Classes/CBPeripheral/CBPeripheral+ConnectionOption.swift | 1 | 2053 | //
// CBPeripheral+ConnectionOption.swift
// ReactiveCoreBluetooth
//
// Created by George Kaimakas on 02/03/2018.
//
import CoreBluetooth
extension CBPeripheral {
public enum ConnectionOption: Equatable, Hashable {
public static func ==(lhs: ConnectionOption, rhs: ConnectionOption) -> Bool {
... | mit | 6f7e249039a41a651465564871b493d0 | 33.216667 | 100 | 0.616171 | 5.21066 | false | false | false | false |
castial/Quick-Start-iOS | Quick-Start-iOS/Utils/Constants/Constants.swift | 1 | 766 | //
// Constants.swift
// Quick-Start-iOS
//
// Created by work on 2016/10/14.
// Copyright © 2016年 hyyy. All rights reserved.
//
import UIKit
class Constants: NSObject {
struct Rect {
static let statusBarHeight = UIApplication.shared.statusBarFrame.size.height // 状态栏高度
static let navHe... | mit | 7928b9488a927af9e56b65f8a0cd526c | 28.291667 | 96 | 0.650071 | 3.949438 | false | false | false | false |
FirebaseExtended/firebase-video-samples | fundamentals/apple/auth-sign-in-with-apple/starter/Favourites/Shared/Auth/AuthenticationViewModel.swift | 1 | 6808 | //
// AuthenticationViewModel.swift
// Favourites
//
// Created by Peter Friese on 08.07.2022
// Copyright © 2022 Google LLC.
//
// 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
//
// htt... | apache-2.0 | 9b00789c7278d368506989c3a35812c6 | 25.589844 | 127 | 0.666079 | 4.534977 | false | false | false | false |
Webtrekk/webtrekk-ios-sdk | Source/Internal/Reachability/Reachability.swift | 1 | 11115 | /*
Copyright (c) 2014, Ashley Mills
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. Redistributions of source code must retain the above copyright notice, this
list of conditions and the foll... | mit | 06cf4ba8673348f1fb12d4295e3ef491 | 33.95283 | 135 | 0.674764 | 5.480769 | false | false | false | false |
JeeLiu/tispr-card-stack | TisprCardStackExample/TisprCardStackExample/TisprCardStackDemoViewCell.swift | 5 | 1847 | /*
Copyright 2015 BuddyHopp, 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/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | apache-2.0 | 0ead46a119cc8d27dbb9c039f93970d5 | 25.782609 | 103 | 0.656741 | 4.408115 | false | false | false | false |
yeziahehe/Gank | Pods/LeanCloud/Sources/Storage/DataType/Dictionary.swift | 1 | 5892 | //
// LCDictionary.swift
// LeanCloud
//
// Created by Tang Tianyong on 2/27/16.
// Copyright © 2016 LeanCloud. All rights reserved.
//
import Foundation
/**
LeanCloud dictionary type.
It is a wrapper of `Swift.Dictionary` type, used to store a dictionary value.
*/
@dynamicMemberLookup
public final class LCDi... | gpl-3.0 | f8590c42e39d97e8b5f34634a069c950 | 29.210256 | 192 | 0.615855 | 4.476444 | false | false | false | false |
sebreh/SquarePants | SquarePants/LazyProperty.swift | 1 | 2504 | //
// LazyProperty.swift
// SquarePants
//
// Created by Sebastian Rehnby on 28/08/15.
// Copyright © 2015 Sebastian Rehnby. All rights reserved.
//
import UIKit
public protocol LazyPropertyType {
associatedtype ValueType
var value: ValueType { get }
}
public struct LazyProperty<T>: LazyPropertyType {
p... | mit | a11af315034a6c890fa304d9f7a2863a | 21.54955 | 96 | 0.639233 | 4.076547 | false | false | false | false |
TwoRingSoft/SemVer | Vrsnr/File Types/PlistFile.swift | 1 | 1930 | //
// PlistFile.swift
// Vrsnr
//
// Created by Andrew McKnight on 7/9/16.
// Copyright © 2016 Two Ring Software. All rights reserved.
//
import Foundation
public struct PlistFile {
public let path: String
}
extension PlistFile: File {
public func getPath() -> String {
return path
}
p... | apache-2.0 | 2eb8015ed27e39baaf84cfcec2b7ed2c | 29.140625 | 189 | 0.638154 | 4.507009 | false | false | false | false |
VolodymyrShlikhta/InstaClone | InstaClone/SignInViewController.swift | 1 | 2700 | //
// SignInViewController.swift
// InstaClone
//
// Created by Relorie on 6/4/17.
// Copyright © 2017 Relorie. All rights reserved.
//
import UIKit
import FirebaseAuth
import SVProgressHUD
class SignInViewController: UIViewController {
@IBOutlet weak var passwordTextField: UITextField!
@IBOutlet weak var... | mit | d6b58f5fc057011918cf9fea75822184 | 37.557143 | 122 | 0.64987 | 5.408818 | false | false | false | false |
Shvier/Dota2Helper | Dota2Helper/Dota2Helper/Global/Network/DHNetworkRequestManager.swift | 1 | 4017 | //
// DHNetworkRequestManager.swift
// Dota2Helper
//
// Created by Shvier on 9/19/16.
// Copyright © 2016 Shvier. All rights reserved.
//
import UIKit
enum RequestType {
case POST
case GET
case DEFAULT
}
class DHNetworkRequestManager: NSObject {
static let sharedInstance = DHNetworkRequestManag... | apache-2.0 | 2637d3f0261c1ef5371a08220c347075 | 34.857143 | 140 | 0.611554 | 5.064313 | false | false | false | false |
marcusellison/lil-twitter | lil-twitter/ContainerViewController.swift | 1 | 7883 | //
// ContainerViewController.swift
// lil-twitter
//
// Created by Marcus J. Ellison on 5/31/15.
// Copyright (c) 2015 Marcus J. Ellison. All rights reserved.
//
import UIKit
enum SlideOutState {
case BothCollapsed
case LeftPanelExpanded
case RightPanelExpanded
}
class ContainerViewController: UIVi... | mit | f3b458b76fc049c5a0588ad0f2d79433 | 33.880531 | 144 | 0.671445 | 5.904869 | false | false | false | false |
teamVCH/sway | sway/RecordingControlView.swift | 1 | 2974 | //
// RecordingControlView.swift
// AudioTest
//
// Created by Christopher McMahon on 10/16/15.
// Copyright © 2015 codepath. All rights reserved.
//
import UIKit
protocol RecordingControlViewDelegate {
func setBackingAudio(view: RecordingControlView, url: NSURL)
func startRecording(view: RecordingCo... | mit | 358fd42e4790f3069e3881a39d0a859b | 27.04717 | 107 | 0.642449 | 5.038983 | false | false | false | false |
aryehToDog/DYZB | DYZB/DYZB/Class/Home/View/WKAmuseMenuViewCell.swift | 1 | 1898 | //
// WKAmuseMenuViewCell.swift
// DYZB
//
// Created by 阿拉斯加的狗 on 2017/9/3.
// Copyright © 2017年 阿拉斯加的🐶. All rights reserved.
//
import UIKit
fileprivate let kGameViewCellId = "kGameViewCellId"
class WKAmuseMenuViewCell: UICollectionViewCell {
var anchorGroupModel: [WKAnchorGroup]? {
d... | apache-2.0 | 4adf3d3ac96cf20c62b0167285b15c37 | 28.21875 | 126 | 0.652406 | 5.29745 | false | false | false | false |
marekhac/WczasyNadBialym-iOS | WczasyNadBialym/WczasyNadBialym/ViewControllers/Service/ServiceList/ServiceListViewController.swift | 1 | 2512 | //
// ServiceListViewController.swift
// WczasyNadBialym
//
// Created by Marek Hać on 26.04.2017.
// Copyright © 2017 Marek Hać. All rights reserved.
//
import UIKit
import SVProgressHUD
class ServiceListViewController: UITableViewController {
let backgroundImageName = "background_blue"
// these va... | gpl-3.0 | 98c094a94dce345c7482b578c8ca8b20 | 30.3625 | 130 | 0.639299 | 5.794457 | false | false | false | false |
AynurGaliev/Books-Shop | Sources/App/Models/Credential.swift | 1 | 2936 | import Vapor
import Fluent
import Foundation
final class Credential: Model {
private static let tokenTime: TimeInterval = 86400
//MARK: - Attributes
var id: Node?
var password: String
var login: String
var expiration_date: String?
var token: String?
//MARK: - Relationship... | mit | 3546d1f3cc7890199bad2055af951ff0 | 31.988764 | 137 | 0.582084 | 4.516923 | false | false | false | false |
blkbrds/intern09_final_project_tung_bien | MyApp/Model/Schema/CartItem.swift | 1 | 491 | //
// CartItem.swift
// MyApp
//
// Created by AST on 8/9/17.
// Copyright © 2017 Asian Tech Co., Ltd. All rights reserved.
//
import Foundation
import RealmS
import RealmSwift
final class CartItem: Object {
dynamic var id = 0
dynamic var name = ""
dynamic var thumbnailImage = ""
dynamic var deta... | mit | baacd04a7e495cb1786a965637f564a1 | 17.846154 | 62 | 0.62449 | 3.888889 | false | false | false | false |
teambition/SwipeableTableViewCell | SwipeableTableViewCellExample/BackgroundViewExampleViewController.swift | 1 | 5193 | //
// BackgroundViewExampleViewController.swift
// SwipeableTableViewCellExample
//
// Created by 洪鑫 on 16/6/5.
// Copyright © 2016年 Teambition. All rights reserved.
//
import UIKit
import SwipeableTableViewCell
class BackgroundViewExampleViewController: UITableViewController {
fileprivate(set) var pushEnable... | mit | 72a4f6fbc38da666f7ad1c4a22aad7cd | 41.661157 | 191 | 0.66079 | 5.198389 | false | false | false | false |
fe9lix/Muon | MuonTests/FeedParserSpec.swift | 2 | 2117 | import Quick
import Nimble
import Muon
let feed = "<rss><channel></channel></rss>"
class FeedParserSpec: QuickSpec {
override func spec() {
var subject : FeedParser! = nil
describe("Initializing a feedparser with empty string") {
beforeEach {
subject = FeedParser(strin... | mit | 1da8633048e6c94740122136ccd6f753 | 30.597015 | 93 | 0.487955 | 5.645333 | false | false | false | false |
shoheiyokoyama/Gemini | Example/Gemini/ViewControllers/RollRotationViewController.swift | 1 | 4464 | import UIKit
import Gemini
final class RollRotationViewController: UIViewController {
@IBOutlet private weak var collectionView: GeminiCollectionView! {
didSet {
let nib = UINib(nibName: cellIdentifier, bundle: nil)
collectionView.register(nib, forCellWithReuseIdentifier: cellIdenti... | mit | edb85e41101785ac5faa30a40b44e194 | 40.333333 | 142 | 0.711694 | 5.730424 | false | false | false | false |
digipost/ios | Digipost/InvoiceBankViewController.swift | 1 | 4218 | //
// Copyright (C) Posten Norge AS
//
// 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 agr... | apache-2.0 | 2473541b695822b462298da8bcacae9e | 42.927083 | 247 | 0.670382 | 4.311861 | false | false | false | false |
meninsilicium/apple-swifty | JSON.playground/contents.swift | 1 | 1873 | //: # Swifty.JSON
import Swift
import Swifty
import Foundation
import Darwin
//: # JSON examples
//: A json as a string
let json_string = "{ \"coordinate\" : { \"latitude\" : 46.2050295, \"longitude\" : 6.1440885, \"city\" : \"Geneva\" }, \"source\" : \"string\" }"
//: ## Initialization
//: with a raw string o... | mpl-2.0 | 24fe5189b5ab29cbeb686b1eaf7e958c | 18.510417 | 145 | 0.611853 | 3.246101 | false | false | false | false |
bitboylabs/selluv-ios | selluv-ios/selluv-ios/Classes/Base/Service/Network/BBS3.swift | 1 | 3543 | //
// BBS3
//
// creds = AmazonCredentials(...)
// data = NSData()
// uploader = ElloS3(credentials: credentials, data: data)
// .onSuccess() { (response : NSData) in }
// .onFailure() { (error : NSError) in }
// // NOT yet supported:
// //.onProgress() { (progress : Float) in }
// .start()
import Foundatio... | mit | 400989dc7d89c37e8df0a2e308a8aef3 | 36.294737 | 151 | 0.604572 | 4.927677 | false | false | false | false |
imobilize/Molib | Molib/Classes/Networking/DownloadManager/DownloaderOperation.swift | 1 | 2884 | import Foundation
protocol DownloaderOperationDelegate {
func downloaderOperationDidUpdateProgress(progress: Float, forTask: DownloaderTask)
func downloaderOperationDidStartDownload(forTask: DownloaderTask)
func downloaderOperationDidFailDownload(withError: Error, forTask: DownloaderTask)
func download... | apache-2.0 | c9b1ee93112bb5be5566a60c60dfba11 | 31.404494 | 129 | 0.716366 | 5.589147 | false | false | false | false |
tapwork/WikiLocation | WikiManager/WikiArticle.swift | 1 | 1496 | //
// WikiArticle.swift
// WikiLocation
//
// Created by Christian Menschel on 29.06.14.
// Copyright (c) 2014 enterprise. All rights reserved.
//
import Foundation
public class WikiArticle : NSObject {
//Mark: - Properties
public let distance:String!
public let identifier:Int!
public let lat... | mit | 64d7e4bedd529131be7f95db9e8f1b4b | 26.218182 | 90 | 0.572193 | 4.144044 | false | false | false | false |
LiskUser1234/SwiftyLisk | Lisk/Multisignature/MultisignatureAPI.swift | 1 | 6352 | /*
The MIT License
Copyright (C) 2017 LiskUser1234
- Github: https://github.com/liskuser1234
Please vote LiskUser1234 for delegate to support this project.
For donations:
- Lisk: 6137947831033853925L
- Bitcoin: 1NCTZwBJF7ZFpwPeQKiSgci9r2pQV3G7RG
Permission is hereby granted, free of charge, to any pers... | mit | e5a5680d10508a6b80cb6ace381e024e | 40.246753 | 139 | 0.610674 | 5.106109 | false | false | false | false |
kdw9/TIY-Assignments | MuttCutts/MuttCutts/MapViewController.swift | 1 | 1669 | //
// ViewController.swift
// MuttCutts
//
// Created by Keron Williams on 10/28/15.
// Copyright © 2015 The Iron Yard. All rights reserved.
//
import UIKit
import MapKit
import CoreLocation
class MapViewController: UIViewController
{
@IBOutlet weak var mapView: MKMapView!
override func viewDidL... | cc0-1.0 | d9274b9ba59a872d4d8532df7fe70a21 | 27.758621 | 73 | 0.672662 | 4.138958 | false | false | false | false |
nkirby/Humber | _lib/HMGithub/_src/Realm/GithubOverviewItem.swift | 1 | 741 | // =======================================================
// HMGithub
// Nathaniel Kirby
// =======================================================
import Foundation
import RealmSwift
// =======================================================
public class GithubOverviewItem: Object {
public dynamic var itemID =... | mit | 6a72d6748d69ff86b0d31d8dfe55efcc | 26.444444 | 58 | 0.497976 | 5.928 | false | false | false | false |
hffmnn/Swiftz | SwiftzTests/ThoseSpec.swift | 2 | 575 | //
// ThoseSpec.swift
// swiftz
//
// Created by Robert Widmann on 1/19/15.
// Copyright (c) 2015 TypeLift. All rights reserved.
//
import XCTest
import Swiftz
class ThoseSpec : XCTestCase {
func testThose() {
let this = Those<String, Int>.this("String")
let that = Those<String, Int>.that(1)
let both = Tho... | bsd-3-clause | 52693f697c7bb062a51c53709caacf9b | 24 | 77 | 0.641739 | 3.010471 | false | true | false | false |
imzyf/99-projects-of-swift | 031-stopwatch/031-stopwatch/ViewController.swift | 1 | 3284 | //
// ViewController.swift
// 031-stopwatch
//
// Created by moma on 2018/3/28.
// Copyright © 2018年 yifans. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
// MARK: - UI components
@IBOutlet weak var timerLabel: UILabel!
@IBOutlet weak var lapTimerLabel: UILabel!
... | mit | 1f8d61e743aa10ccbc28af6ffd66015b | 31.69 | 139 | 0.609055 | 4.730825 | false | false | false | false |
SuPair/firefox-ios | Client/Application/LeanplumIntegration.swift | 1 | 15188 | /* 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 AdSupport
import Shared
import Leanplum
private let LPAppIdKey = "LeanplumAppId"
private... | mpl-2.0 | 569101b4f70659c3c592a45d9123ab28 | 42.763689 | 173 | 0.674108 | 4.554889 | false | false | false | false |
orta/RxSwift | RxSwift/RxSwift/Observables/Implementations/Switch.swift | 1 | 4221 | //
// Switch.swift
// Rx
//
// Created by Krunoslav Zaher on 3/12/15.
// Copyright (c) 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
class Switch_<ElementType> : Sink<ElementType>, ObserverType {
typealias Element = Observable<ElementType>
typealias SwitchState = (
subscription: ... | mit | bbd70bf0366a3882313741dbf8319ead | 29.594203 | 119 | 0.552239 | 5.166463 | false | true | false | false |
airbnb/lottie-ios | Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift | 3 | 1504 | //
// PathNode.swift
// lottie-swift
//
// Created by Brandon Withrow on 1/16/19.
//
import CoreGraphics
import Foundation
// MARK: - ShapeNodeProperties
final class ShapeNodeProperties: NodePropertyMap, KeypathSearchable {
// MARK: Lifecycle
init(shape: Shape) {
keypathName = shape.name
path = Node... | apache-2.0 | 131398165a99f9a164cca56b0804f571 | 19.324324 | 88 | 0.714096 | 4.35942 | false | false | false | false |
codeOfRobin/ShadowKit | TestingModalPresentation/TestingModalPresentation/ViewController.swift | 1 | 5805 | //
// ViewController.swift
// TestingModalPresentation
//
// Created by Mayur on 05/04/17.
// Copyright © 2017 Mayur. All rights reserved.
//
import UIKit
import UIKit
class CardPresentationController: UIPresentationController {
let tappableDismissView: UIView
override init(presentedViewController: UIView... | mit | 3adb14e7e1c05bec616a582620f2fede | 47.773109 | 177 | 0.729841 | 5.718227 | false | false | false | false |
CaueAlvesSilva/DropDownAlert | DropDownAlert/DropDownAlert/DropDownView/DropDownView.swift | 1 | 3005 | //
// DropDownView.swift
// DropDownAlert
//
// Created by Cauê Silva on 06/06/17.
// Copyright © 2017 Caue Alves. All rights reserved.
//
import Foundation
import UIKit
class DropDownView: UIView {
@IBOutlet weak var iconImageView: UIImageView!
@IBOutlet weak var messageLabel: UILabel!
priv... | mit | 0ae7b42ca9f6adef5ff97af52bbdb4c1 | 34.329412 | 163 | 0.626041 | 5.333925 | false | false | false | false |
scottrhoyt/Jolt | Jolt/Source/FloatingTypeExtensions/FloatingTypeFFTExtensions.swift | 1 | 2345 | //
// FloatingTypeFFTExtensions.swift
// Jolt
//
// Created by Scott Hoyt on 9/10/15.
// Copyright © 2015 Scott Hoyt. All rights reserved.
//
import Accelerate
// TODO: Write FFT Tests
extension Double : VectorFFT {
static public func fft(input: [Double]) -> [Double] {
var real = [Double](input... | mit | e9b3925219fd101761fb91c04ace409b | 36.222222 | 128 | 0.640358 | 3.959459 | false | false | false | false |
mshhmzh/firefox-ios | Client/Frontend/Browser/ContextMenuHelper.swift | 4 | 4576 | /* 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 WebKit
protocol ContextMenuHelperDelegate: class {
func contextMenuHelper(contextMenuHelper: ContextMe... | mpl-2.0 | c849270c88acc8a42b852bdf9658e270 | 44.77 | 172 | 0.722465 | 5.912145 | false | false | false | false |
mozilla-mobile/firefox-ios | Shared/NSUserDefaultsPrefs.swift | 2 | 5096 | // 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
open class NSUserDefaultsPrefs: Prefs {
fileprivate let prefixWithDot: String
fileprivate l... | mpl-2.0 | 73369d290743ec732a7b8712b2e0c15f | 36.470588 | 97 | 0.667386 | 4.853333 | false | false | false | false |
drawRect/Instagram_Stories | InstagramStories/Source/ImageStorer/IGImageRequestable.swift | 1 | 1776 | //
// IGSetImage.swift
// InstagramStories
//
// Created by Boominadha Prakash on 02/04/19.
// Copyright © 2019 DrawRect. All rights reserved.
//
import Foundation
import UIKit
public typealias ImageResponse = (IGResult<UIImage, Error>) -> Void
protocol IGImageRequestable {
func setImage(urlString: String, p... | mit | 660a777680fb5ff3ddb7bd21d3dacb57 | 34.5 | 105 | 0.601127 | 5.362538 | false | false | false | false |
callam/Heimdall.swift | HeimdallTests/OAuthAccessTokenSpec.swift | 5 | 6737 | import Argo
import Heimdall
import Nimble
import Quick
import Result
class OAuthAccessTokenSpec: QuickSpec {
override func spec() {
describe("-copy") {
let accessToken = OAuthAccessToken(accessToken: "accessToken",
tokenType: "tokenType",
... | apache-2.0 | 968cf5f41465df41841ed06573b1b056 | 42.185897 | 139 | 0.546237 | 5.604825 | false | false | false | false |
1738004401/Swift3.0-- | SwiftCW/SwiftCW/Views/Home/SWHomeViewControllers.swift | 1 | 3494 | //
// SWHomeViewControllers.swift
// SwiftCW
//
// Created by YiXue on 17/3/16.
// Copyright © 2017年 赵刘磊. All rights reserved.
//
import UIKit
import SnapKit
import AFNetworking
class SWHomeViewControllers:BaseViewController {
let tableView:UITableView = {
let tableView = UITableView()
/... | mit | b1f5da6bd2c8e97744a0ac3f918b91da | 30.324324 | 156 | 0.595053 | 4.960057 | false | false | false | false |
wj2061/ios7ptl-swift3.0 | ch22-KVC/KVO/KVO/KVCTableViewController.swift | 1 | 2931 | //
// KVCTableViewController.swift
// KVO
//
// Created by wj on 15/11/29.
// Copyright © 2015年 wj. All rights reserved.
//
import UIKit
class KVCTableViewController: UITableViewController {
dynamic var now:Date = Date()
var timer : Timer?
override func viewDidLoad() {
super.viewDidLoad()
... | mit | 71940b1c79fbf1f38756a9ad1eb57f36 | 30.148936 | 157 | 0.664276 | 5.109948 | false | false | false | false |
jay18001/brickkit-ios | Example/Source/Examples/Interactive/HideBrickViewController.swift | 1 | 3746 | //
// HideBrickViewController.swift
// BrickKit
//
// Created by Ruben Cagnie on 6/16/16.
// Copyright © 2016 Wayfair LLC. All rights reserved.
//
import BrickKit
class HideBrickViewController: BrickApp.BaseBrickController {
override class var brickTitle: String {
return "Hide Bricks"
}
overr... | apache-2.0 | bbd8d4a63472510faf17a2f58e00ce8f | 35.715686 | 196 | 0.703338 | 5.053981 | false | true | false | false |
wokalski/Hourglass | Hourglass/State.swift | 1 | 2020 | import Foundation
import EventKit
typealias TaskIndex = [TaskID : Task]
struct EventLogTarget {
let calendar: EKCalendar
let eventStore: EKEventStore
}
struct State {
let currentSession: Session?
let tasks: TaskIndex
let selected: IndexPath?
let logTarget: EventLogTarget?
static let... | mit | 6cdf17b4ffe40ccf6b396dbbe27275e8 | 24.56962 | 59 | 0.539604 | 5.192802 | false | false | false | false |
practicalswift/swift | stdlib/public/core/ContiguousArrayBuffer.swift | 3 | 23693 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | apache-2.0 | a97ffd647de348528a7bbbf4f4aadc36 | 30.757373 | 110 | 0.699168 | 4.801581 | false | false | false | false |
steelwheels/KiwiScript | KiwiShell/Source/KHShellConverter.swift | 1 | 3030 | /**
* @file KHShellConverter.swift
* @brief Define KHShellConverter class
* @par Copyright
* Copyright (C) 2020 Steel Wheels Project
*/
import KiwiLibrary
import CoconutShell
import CoconutData
import Foundation
public func KHCompileShellStatement(statements stmts: Array<KHStatement>) -> Array<KHStatement>
{
... | lgpl-2.1 | 551b0a56fa1e8f8864731db52adddc9c | 27.317757 | 108 | 0.708251 | 3.304253 | false | false | false | false |
mightydeveloper/swift | test/1_stdlib/RangeTraps.swift | 9 | 2182 | //===--- RangeTraps.swift -------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... | apache-2.0 | a075bed309bdb60ef3d7a39f4b3f15e9 | 26.974359 | 88 | 0.649404 | 3.821366 | false | true | false | false |
jyxia/nostalgic-pluto-ios | nostalgic-pluto-ios/AppDelegate.swift | 1 | 6163 | //
// AppDelegate.swift
// nostalgic-pluto-ios
//
// Created by Jinyue Xia on 7/18/15.
// Copyright (c) 2015 Jinyue Xia. All rights reserved.
//
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UI... | mit | 5d5a981a3cc341ea9fda25a49d03d988 | 54.522523 | 290 | 0.715723 | 5.643773 | false | false | false | false |
PairOfNewbie/BeautifulDay | BeautifulDay/Controller/Album/AlbumDetailController.swift | 1 | 8869 | //
// AlbumDetailController.swift
// BeautifulDay
//
// Created by DaiFengyi on 16/5/4.
// Copyright © 2016年 PairOfNewbie. All rights reserved.
//
import UIKit
private let albumZanCellIdentifier = "AlbumZanCell"
private let albumCommentCellIdentifier = "AlbumCommentCell"
class AlbumDetailController: UITableViewC... | mit | 6773f05bdfabfc94a71dce564b8bfbfb | 35.504132 | 161 | 0.616935 | 5.429625 | false | false | false | false |
HabitRPG/habitrpg-ios | HabitRPG/Views/LoginEntryView.swift | 1 | 3878 | //
// LoginEntryView.swift
// Habitica
//
// Created by Phillip on 27.07.17.
// Copyright © 2017 HabitRPG Inc. All rights reserved.
//
import Foundation
@IBDesignable
class LoginEntryView: UIView, UITextFieldDelegate {
@IBInspectable var placeholderText: String? {
didSet {
if let text... | gpl-3.0 | 84fe9f857f136253e726daac3f2de6de | 26.496454 | 143 | 0.579056 | 5.422378 | false | false | false | false |
blockchain/My-Wallet-V3-iOS | Modules/FeatureDashboard/Sources/FeatureDashboardUI/Components/WalletActionCell/WalletActionTableViewCell.swift | 1 | 1790 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import PlatformUIKit
import UIKit
final class WalletActionTableViewCell: UITableViewCell {
// MARK: - Properties
var presenter: WalletActionCellPresenter! {
didSet {
badgeImageView.viewModel = presenter.badgeImageViewModel
... | lgpl-3.0 | eecd77e2b764804154a61e4bf63e4123 | 32.754717 | 98 | 0.690889 | 4.969444 | false | false | false | false |
pvbaleeiro/movie-aholic | movieaholic/movieaholic/recursos/view/ExploreHeaderView.swift | 1 | 14967 | //
// ExploreHeaderView.swift
// movieaholic
//
// Created by Victor Baleeiro on 24/09/17.
// Copyright © 2017 Victor Baleeiro. All rights reserved.
//
import UIKit
//-------------------------------------------------------------------------------------------------------------
// MARK: Delegate
//-----------------... | mit | 4aca001d17246327b7baea6f77917e8e | 42.606414 | 202 | 0.638898 | 5.490822 | false | false | false | false |
JarlRyan/IOSNote | Swift/City/City/ViewController.swift | 1 | 2863 | //
// ViewController.swift
// City
//
// Created by bingoogol on 14-6-15.
// Copyright (c) 2014年 bingoogol. All rights reserved.
//
import UIKit
class ViewController: UIViewController,UIPickerViewDelegate,UIPickerViewDataSource {
var _province:NSArray!
var _city:NSMutableDictionary!
... | apache-2.0 | 7e2a3b41f46b92c3eac7d155c6498e66 | 28.761364 | 110 | 0.57121 | 4.469283 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.