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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wangyaqing/LeetCode-swift | Solutions/19. Remove Nth Node From End of List.playground/Contents.swift | 1 | 937 | import UIKit
public class ListNode {
public var val: Int
public var next: ListNode?
public init(_ val: Int) {
self.val = val
self.next = nil
}
}
class Solution {
func removeNthFromEnd(_ head: ListNode?, _ n: Int) -> ListNode? {
let pre:ListNode? = ListNode(0)
pre?.n... | mit | 765873f9aa1dcff75ccdafc90d89077c | 18.93617 | 69 | 0.510139 | 3.808943 | false | false | false | false |
malcommac/Hydra | Sources/Hydra/Promise+Timeout.swift | 1 | 2776 | /*
* Hydra
* Fullfeatured lightweight Promise & Await Library for Swift
*
* Created by: Daniele Margutti
* Email: hello@danielemargutti.com
* Web: http://www.danielemargutti.com
* Twitter: @danielemargutti
*
* Copyright © 2017 Daniele Margutti
*
*
* Permission is hereby granted, free of charge, to any person obtain... | mit | 8970be790dd6a734dbcbbb430deff56e | 38.084507 | 107 | 0.736577 | 4.051095 | false | false | false | false |
rajmuhar/iosbridge-rottentomatoes | RottenTomatoesSwift/RottenTomatoesSwift/Downloader.swift | 7 | 1604 | //
// Downloader.swift
// RottenTomatoesSwift
//
// Created by Jeffrey Bergier on 9/12/15.
// Copyright © 2015 MobileBridge. All rights reserved.
//
import Foundation
protocol DownloaderDelegate: class {
func downloadFinishedForURL(finishedURL: NSURL)
}
class Downloader {
weak var delegate: Download... | mit | 00add93a3b347e4a0b27f0d6c32831b7 | 31.06 | 111 | 0.623206 | 5.307947 | false | true | false | false |
barteljan/VISPER | Example/VISPER-Wireframe-Tests/Mocks/MockRoutingHandlerContainer.swift | 1 | 2505 | //
// MockRoutingHandlerContainer.swift
// VISPER-Wireframe_Example
//
// Created by bartel on 02.12.17.
// Copyright © 2017 CocoaPods. All rights reserved.
//
import Foundation
import VISPER_Wireframe
import VISPER_Core
class MockRoutingHandlerContainer: NSObject, RoutingHandlerContainer {
var invokedAdd = ... | mit | 92d301d4820c6a69c5a80541b6780821 | 40.733333 | 128 | 0.748003 | 5.260504 | false | false | false | false |
dflax/Anagrams | Anagrams/TileView.swift | 1 | 2895 | //
// TileView.swift
// Anagrams
//
// Created by Daniel Flax on 4/29/15.
// Copyright (c) 2015 Caroline. All rights reserved.
//
import UIKit
// Delegate protocol to inform Game Controller that tile has dropped.
protocol TileDragDelegateProtocol {
func tileView(tileView: TileView, didDragToPoint: CGPoint)
}
//... | mit | e6739246768cc4a621701902e615a743 | 26.056075 | 101 | 0.720898 | 3.560886 | false | false | false | false |
xu6148152/binea_project_for_ios | ListerforAppleWatchiOSandOSX/Swift/ListerOSX/AppDelegate.swift | 1 | 2899 | /*
Copyright (C) 2015 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
The application delegate.
*/
import Cocoa
import ListerKit
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
// MARK: Properties
@IBOutlet wea... | mit | bbfb45544f2c692de87a86f4619f5d03 | 35.670886 | 193 | 0.645841 | 5.852525 | false | true | false | false |
SuPair/firefox-ios | Client/Frontend/Browser/PrintHelper.swift | 16 | 968 | /* 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
import WebKit
class PrintHelper: TabContentScript {
fileprivate weak var tab:... | mpl-2.0 | 80699f12c188962494ada6ec2205d4f5 | 30.225806 | 132 | 0.683884 | 4.792079 | false | false | false | false |
codergaolf/DouYuTV | DouYuTV/DouYuTV/Classes/Tools/Extension/UIBarButtonItem-Extension.swift | 1 | 1357 | //
// UIBarButtonItem-Extension.swift
// DouYuTV
//
// Created by 高立发 on 2016/11/12.
// Copyright © 2016年 GG. All rights reserved.
//
import UIKit
extension UIBarButtonItem {
/*
class func creatItem(imgName : String, highLighted : String, size : CGSize) -> UIBarButtonItem {
let btn = UIButton()
... | mit | f71783229e1b1930a55944b99bb123e3 | 26.478261 | 100 | 0.56962 | 3.95 | false | false | false | false |
Vadim-Yelagin/ImageLoading | ImageLoading/FadeInImageLoadingView.swift | 1 | 868 | //
// FadeInImageLoadingView.swift
//
// Created by Vadim Yelagin on 20/06/15.
// Copyright (c) 2015 Fueled. All rights reserved.
//
import Foundation
import UIKit
open class FadeInImageLoadingView: ImageLoadingView {
open override func transition(
from oldState: Task.State,
ofTask oldTask: Task?,
to newSta... | mit | 4e2b93f5c0469775b47eb6d88e2e8507 | 20.170732 | 83 | 0.669355 | 3.214815 | false | false | false | false |
jm-schaeffer/JMWebImageView | JMWebImageView/JMWebImageView.swift | 1 | 5598 | //
// JMWebImageView.swift
// JMWebImageView
//
// Copyright (c) 2016 J.M. Schaeffer
//
// 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 limitat... | mit | e9473c2dc3a28834d7c2b6589b386f80 | 33.343558 | 198 | 0.605395 | 5.084469 | false | false | false | false |
RobotPajamas/ble113-ota-ios | ble113-ota/BaseBluetoothPeripheral.swift | 1 | 6238 | //
// BaseBluetoothPeripheral.swift
// ble113-ota
//
// Created by Suresh Joshi on 2016-06-13.
// Copyright © 2016 Robot Pajamas. All rights reserved.
//
import LGBluetooth
class BaseBluetoothPeripheral {
enum StandardServices {
static let deviceInformation: String = "180A";
}
enum StandardC... | mit | 4f1886b57a347e726bc27720b4464f6f | 34.844828 | 171 | 0.65865 | 4.946075 | false | false | false | false |
justindaigle/grogapp-ios | GroGApp/GroGApp/DetailViewController.swift | 1 | 4637 | //
// DetailViewController.swift
// GroGApp
//
// Created by Justin Daigle on 3/26/15.
// Copyright (c) 2015 Justin Daigle (.com). All rights reserved.
//
import UIKit
class DetailViewController: UIViewController {
@IBOutlet var displayNameLabel:UILabel!
@IBOutlet var userNameLabel:UILabel!
@IBOu... | mit | ac2ef46ad82f28a6d4fc01ced50f1074 | 34.669231 | 106 | 0.634246 | 5.135105 | false | false | false | false |
BlurredSoftware/BSWInterfaceKit | Sources/BSWInterfaceKit/ViewControllers/Presentations/CardPresentation.swift | 1 | 11509 | //
// Copyright © 2018 TheLeftBit SL. All rights reserved.
// Created by Pierluigi Cifani.
//
#if canImport(UIKit)
import UIKit
/**
This abstraction will create the appropiate `UIViewControllerAnimatedTransitioning`
instance for a card-like modal animation.
- Attention: To use it:
```
extension FooVC: UIViewC... | mit | 443b6acef827e0e7cc57d4fbfaed0eb2 | 41.780669 | 328 | 0.686044 | 5.944215 | false | false | false | false |
KailinLi/LeetCode-Solutions | 328. Odd Even Linked List/solution.swift | 1 | 1033 | /**
* Definition for singly-linked list.
* public class ListNode {
* public var val: Int
* public var next: ListNode?
* public init(_ val: Int) {
* self.val = val
* self.next = nil
* }
* }
*/
class Solution {
func oddEvenList(_ head: ListNode?) -> ListNode? {
if hea... | mit | 79cf38957e57960f548b51189e096efe | 23.046512 | 54 | 0.418199 | 4.322176 | false | false | false | false |
mdmsua/Ausgaben.iOS | Ausgaben/Ausgaben/AppDelegate.swift | 1 | 4847 | //
// AppDelegate.swift
// Ausgaben
//
// Created by Dmytro Morozov on 11.01.16.
// Copyright © 2016 Dmytro Morozov. All rights reserved.
//
import UIKit
import CoreData
import Fabric
import Crashlytics
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var c... | mit | ea78e0e6867dfbc0d54d3da1d06d3e2b | 48.958763 | 291 | 0.705324 | 5.748517 | false | false | false | false |
francisykl/PagingMenuController | Example/PagingMenuControllerDemo/GistsViewController.swift | 4 | 2018 | //
// GistsViewController.swift
// PagingMenuControllerDemo
//
// Created by Yusuke Kita on 5/10/15.
// Copyright (c) 2015 kitasuke. All rights reserved.
//
import UIKit
class GistsViewController: UITableViewController {
var gists = [[String: AnyObject]]()
class func instantiateFromStoryboard() -> Gi... | mit | 75cef7213f8331c5c3f5b2b1904de5c1 | 32.633333 | 123 | 0.643707 | 5.09596 | false | false | false | false |
verloop/verloop_ios | VerloopSDK/Verloop/VerloopChatViewController.swift | 1 | 2175 | //
// VerloopChatViewController.swift
// VerloopSDK
//
// Created by Prashanta Kumar Nayak on 24/05/17.
// Copyright © 2017 Verloop. All rights reserved.
//
import Foundation
import UIKit
class VerloopChatViewController: UIViewController {
var urlString:String?
var webView:UIWebView?
var cancelButto... | mit | a0215da87be7f47cf11a7032edf71bac | 34.639344 | 199 | 0.674793 | 4.596195 | false | false | false | false |
P0ed/SWLABR | SWLABR/Model/Components/InputComponent.swift | 1 | 731 | import Foundation
final class InputComponent: ControlComponent {
let inputController: InputController
var thrusters = 0.0
init(_ inputController: InputController) {
self.inputController = inputController
}
func update(node: EntityNode, inEngine engine: GameEngine) {
let input = inputController.currentInput... | mit | 53737b2a8c28ff43847408a9f84a4fcb | 21.84375 | 63 | 0.708618 | 3.020661 | false | false | false | false |
sufangliang/LiangDYZB | LiangDYZB/Classes/Main/View/PageContentView.swift | 1 | 5811 | //
// PageContentView.swift
// LiangDYZB
//
// Created by qu on 2017/1/12.
// Copyright © 2017年 qu. All rights reserved.
//
import UIKit
protocol PageContentViewDelegate : class {
func pageContentView(_ contentView : PageContentView, progress : CGFloat, sourceIndex : Int, targetIndex : Int)
}
private let i... | mit | aa8bc3d2e8dc53fb3a25f452b3cb2636 | 31.17341 | 121 | 0.636903 | 5.182495 | false | false | false | false |
alisidd/iOS-WeJ | WeJ/Play Tracks/HubViewController.swift | 1 | 7424 | //
// LyricsViewController.swift
// WeJ
//
// Created by Mohammad Ali Siddiqui on 3/15/17.
// Copyright © 2017 Mohammad Ali Siddiqui. All rights reserved.
//
import UIKit
class HubViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
weak var delegate: PartyViewControllerInfoDele... | gpl-3.0 | 63816e9c1f1d3dba41eed7cbd114351a | 33.207373 | 144 | 0.624411 | 5.351839 | false | false | false | false |
vmanot/swift-package-manager | Sources/Utility/BuildFlags.swift | 1 | 1156 | /*
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 http://swift.org/LICENSE.txt for license information
See http://swift.org/CONTRIBUTORS.txt for Swift project au... | apache-2.0 | 1f50eab5bcc2452596a397bb1cff7530 | 27.9 | 77 | 0.654844 | 4.173285 | false | false | false | false |
nodekit-io/nodekit-darwin | src/samples/sample-nodekit/platform-darwin/SamplePlugin.swift | 1 | 2602 | /*
* nodekit.io
*
* Copyright (c) 2016 OffGrid Networks. 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 re... | apache-2.0 | c4cad24f2800a92a0f43038052d28a84 | 32.358974 | 196 | 0.694466 | 4.525217 | false | false | false | false |
sarvex/SwiftRecepies | Concurrency/Playing Audio in the Background/Playing Audio in the Background/AppDelegate.swift | 1 | 3763 | //
// AppDelegate.swift
// Playing Audio in the Background
//
// Created by Vandad Nahavandipoor on 7/7/14.
// Copyright (c) 2014 Pixolity Ltd. All rights reserved.
//
// These example codes are written for O'Reilly's iOS 8 Swift Programming Cookbook
// If you use these solutions in your apps, you can give attrib... | isc | 21eac957465dd70bbd597e33ce915938 | 30.621849 | 83 | 0.650545 | 5.255587 | false | false | false | false |
peferron/algo | EPI/Hash Tables/Implement an ISBN cache/swift/main.swift | 1 | 1976 | private struct CachedValue {
let price: Int
var olderISBN: String?
var newerISBN: String?
}
public struct ISBNCache {
public let capacity: Int
private var cache: [String: CachedValue]
private var oldestISBN: String?
private var newestISBN: String?
public init(capacity: Int) {
s... | mit | a44b96747ae9bd9ad26e546ca1451d50 | 28.058824 | 97 | 0.574393 | 4.420582 | false | false | false | false |
peferron/algo | EPI/Sorting/Count the frequencies of characters in a sentence/swift/test.swift | 1 | 1116 | import Darwin
func == <T: Equatable, U: Equatable>(lhs: [(T, U)], rhs: [(T, U)]) -> Bool {
guard lhs.count == rhs.count else {
return false
}
for (i, lt) in lhs.enumerated() {
let rt = rhs[i]
guard lt.0 == rt.0 && lt.1 == rt.1 else {
return false
}
}
retu... | mit | a5830712171c0a41a9e020b037a685ff | 21.32 | 98 | 0.445341 | 3.4875 | false | true | false | false |
sshams/puremvc-swift-standard-framework | PureMVC/org/puremvc/swift/patterns/observer/Notification.swift | 1 | 2831 | //
// Notification.swift
// PureMVC SWIFT Standard
//
// Copyright(c) 2015-2025 Saad Shams <saad.shams@puremvc.org>
// Your reuse is governed by the Creative Commons Attribution 3.0 License
//
/**
A base `INotification` implementation.
PureMVC does not rely upon underlying event models such
as the one provided wi... | bsd-3-clause | df7d7f165e30ace057de4048733c45ea | 31.170455 | 86 | 0.697987 | 4.263554 | false | false | false | false |
marcelganczak/swift-js-transpiler | test/types/tuple.swift | 1 | 594 | let unnamedUntypedTuple = (4, 25)
print(unnamedUntypedTuple.0)
print(unnamedUntypedTuple.1)
let unnamedTypedTuple:(Int, Int) = (4, 25)
print(unnamedTypedTuple.0)
print(unnamedTypedTuple.1)
let unnamedUntypedVariadicTuple = (4, "string")
print(unnamedUntypedVariadicTuple.0)
print(unnamedUntypedVariadicTuple.1)
let na... | mit | 5a9c27b54eff70d4741be928b4776b87 | 24.869565 | 48 | 0.784512 | 2.911765 | false | false | false | false |
gregomni/swift | test/refactoring/ConvertAsync/convert_function.swift | 10 | 32579 | // REQUIRES: concurrency
// RUN: %empty-directory(%t)
enum CustomError : Error {
case Bad
}
func run(block: () -> Bool) -> Bool { return false }
func makeOptionalError() -> Error? { return nil }
func makeOptionalString() -> String? { return nil }
func simple(_ completion: @escaping (String) -> Void) { }
func simpl... | apache-2.0 | fd1481d93638407dfe14b2a8bff580b6 | 46.980854 | 183 | 0.695202 | 3.200609 | false | false | false | false |
firebase/quickstart-ios | database/DatabaseExampleSwift/SignInViewController.swift | 1 | 4970 | //
// Copyright (c) 2015 Google 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 agre... | apache-2.0 | 2d784a410c67a9a389897f41f1e1dcf9 | 29.490798 | 96 | 0.649095 | 4.774256 | false | false | false | false |
firebase/firebase-ios-sdk | FirebaseMLModelDownloader/Sources/ModelDownloader.swift | 1 | 27475 | // Copyright 2021 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | apache-2.0 | d9f31fea2755e7a6983c73f2d46638c4 | 42.131868 | 166 | 0.643094 | 5.479657 | false | false | false | false |
nixzhu/MonkeyKing | Sources/MonkeyKing/MonkeyKing+handleOpenURL.swift | 1 | 18661 |
import UIKit
import Security
extension MonkeyKing {
public class func handleOpenUserActivity(_ userActivity: NSUserActivity) -> Bool {
guard
userActivity.activityType == NSUserActivityTypeBrowsingWeb,
let url = userActivity.webpageURL
else {
return false
... | mit | c75fe251e98b20267941209541581a5e | 35.662083 | 256 | 0.536734 | 5.187934 | false | false | false | false |
givingjan/SMTagView | TagViewSample/ViewController.swift | 1 | 2137 | //
// ViewController.swift
// TagViewSample
//
// Created by JaN on 2017/7/5.
// Copyright © 2017年 givingjan. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet var m_tagViewSingle: SMTagView!
@IBOutlet var m_tagViewMultiple: SMTagView!
@IBOutlet var m_btnChange: ... | mit | d295e3904708646d7c2addf28672ab11 | 28.130435 | 152 | 0.620398 | 3.465517 | false | false | false | false |
ksco/swift-algorithm-club-cn | Combinatorics/Combinatorics.swift | 1 | 2660 | /* Calculates n! */
func factorial(n: Int) -> Int {
var n = n
var result = 1
while n > 1 {
result *= n
n -= 1
}
return result
}
/*
Calculates P(n, k), the number of permutations of n distinct symbols
in groups of size k.
*/
func permutations(n: Int, _ k: Int) -> Int {
var n = n
var answer = n... | mit | 6f60291ffd46f473fefc63abe8b601b0 | 21.166667 | 74 | 0.586466 | 3.133098 | false | false | false | false |
LoopKit/LoopKit | LoopKitUI/View Controllers/SingleValueScheduleTableViewController.swift | 1 | 11387 | //
// SingleValueScheduleTableViewController.swift
// Naterade
//
// Created by Nathan Racklyeft on 2/13/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//
import UIKit
import LoopKit
public enum RepeatingScheduleValueResult<T: RawRepresentable> {
case success(scheduleItems: [RepeatingSchedule... | mit | 7cf07b213c4f63073c22fc6072b4178d | 36.953333 | 194 | 0.651765 | 6.157923 | false | false | false | false |
LoopKit/LoopKit | MockKitUI/View Controllers/IssueAlertTableViewController.swift | 1 | 5268 | //
// IssueAlertTableViewController.swift
// MockKitUI
//
// Created by Rick Pasetto on 4/24/20.
// Copyright © 2020 LoopKit Authors. All rights reserved.
//
import UIKit
import LoopKit
import LoopKitUI
import MockKit
final class IssueAlertTableViewController: UITableViewController {
let cgmManager: MockCG... | mit | 2c85fa1383b61f7a2c29d81c08db99cf | 34.113333 | 143 | 0.621416 | 5.15362 | false | false | false | false |
PureSwift/GATT | Sources/DarwinGATT/PeripheralContinuation.swift | 1 | 2565 | //
// PeripheralContinuation.wift
//
//
// Created by Alsey Coleman Miller on 20/12/21.
//
#if canImport(CoreBluetooth)
import Foundation
import Bluetooth
import GATT
#if DEBUG
internal struct PeripheralContinuation<T, E> where E: Error {
private let function: String
private let continuation: Ch... | mit | 84ccc769049f9631c5c125b2f614846b | 25.173469 | 98 | 0.681481 | 4.596774 | false | false | false | false |
buyiyang/iosstar | iOSStar/AppAPI/DealAPI/DealSocketAPI.swift | 3 | 3902 |
//
// DealSocketAPI.swift
// iOSStar
//
// Created by J-bb on 17/6/8.
// Copyright © 2017年 YunDian. All rights reserved.
//
import Foundation
class DealSocketAPI: BaseSocketAPI, DealAPI{
func allOrder(requestModel:DealRecordRequestModel,OPCode:SocketConst.OPCode,complete: CompleteBlock?, error: ErrorBloc... | gpl-3.0 | eec15091cd169aad17574ef7228a5c3c | 45.573171 | 137 | 0.699398 | 4.508855 | false | false | false | false |
cruisediary/Diving | Diving/Scenes/UserList/UserListConfigurator.swift | 1 | 1574 | //
// UserListConfigurator.swift
// Diving
//
// Created by CruzDiary on 5/23/16.
// Copyright (c) 2016 DigitalNomad. All rights reserved.
//
// This file was generated by the Clean Swift Xcode Templates so you can apply
// clean architecture to your iOS and Mac projects, see http://clean-swift.com
//
import UIK... | mit | 02a21d5ad6dfdff073a9ffff83ff934a | 25.677966 | 81 | 0.670267 | 5.229236 | false | true | false | false |
opudrovs/SampleTableViewJSON | SampleTableViewJSON/FeedViewController.swift | 1 | 8506 | //
// FeedViewController.swift
// SampleTableViewJSON
//
// Created by Olga Pudrovska on 3/28/15.
// Copyright (c) 2016 Olga Pudrovska. All rights reserved.
//
import UIKit
let ContentItemVCShowSegueIdentifier = "ShowContentItem"
class FeedViewController: UIViewController, UITableViewDataSource, UITableViewDeleg... | gpl-3.0 | 99cfab48eab911a909c6d0d0e565cf95 | 37.125561 | 215 | 0.687956 | 5.270924 | false | false | false | false |
ChrisAU/PapyrusCore | PapyrusCore/Array+Solution.swift | 1 | 794 | //
// Array+Solution.swift
// PapyrusCore
//
// Created by Chris Nevin on 13/08/2016.
// Copyright © 2016 CJNevin. All rights reserved.
//
import Foundation
internal extension Array where Element: SolutionType {
func best(forDifficulty difficulty: Difficulty = .hard) -> Element? {
if isEmpty { return ... | bsd-2-clause | 308a8213bc1a1c9f94e9cfd3d6d4587d | 30.72 | 74 | 0.615385 | 3.868293 | false | false | false | false |
johnboyer/Enroller | Enroller/AppDelegate.swift | 1 | 5152 | //
// AppDelegate.swift
// Enroller
//
//
/*
Created by John Boyer on 4/14/16.
Copyright © 2016 Rodax Software, 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
h... | apache-2.0 | 3f5aba283ad21df86939b487bf10499f | 36.59854 | 285 | 0.667637 | 5.130478 | false | false | false | false |
RobinFalko/Ubergang | Examples/TweenApp/TweenApp/TimelinesViewController.swift | 1 | 3589 | //
// ViewController.swift
// TweenApp
//
// Created by RF on 07/01/16.
// Copyright © 2016 Robin Falko. All rights reserved.
//
import UIKit
import Ubergang
class TimelinesViewController: ExampleViewController {
@IBOutlet weak var tweenStatusView0: TweenStatusView!
@IBOutlet weak var tweenStatusView1: Tw... | apache-2.0 | f5d1a1c53cfa5804c8a829760c44f0f2 | 35.242424 | 74 | 0.574972 | 4.6658 | false | false | false | false |
TouchInstinct/LeadKit | TIUIElements/Sources/Helpers/DefaultAnimators/TransitionAnimator.swift | 1 | 466 | import UIKit
final public class TransitionAnimator: CollapsibleViewsAnimator {
public var fractionComplete: CGFloat = 0 {
didSet {
navBar?.topItem?.titleView?.transition(to: fractionComplete)
}
}
public var currentContentOffset = CGPoint.zero
private weak var navBar: UINav... | apache-2.0 | d28167563c1042ead7fb9ecb4d350c51 | 24.888889 | 72 | 0.667382 | 4.957447 | false | false | false | false |
gyro-n/PaymentsIos | GyronPayments/Classes/Models/ResponseItems.swift | 1 | 665 | //
// ResponseItems.swift
// GyronPayments
//
// Created by Ye David on 11/2/16.
// Copyright © 2016 gyron. All rights reserved.
//
import Foundation
open class ResponseItems<T: BaseModel>: BaseModel {
public var items: [T]
public var hasMore: Bool
override open func mapFromObject(map: ResponseDa... | mit | 2e3bab1f69baaa0708daacb75dffc1a4 | 21.896552 | 60 | 0.563253 | 3.905882 | false | false | false | false |
GloomySunday049/TMCommon | TMCommon/TMCommonTests/FileManagerExtensions.swift | 1 | 1830 | //
// FileManagerExtensions.swift
// TMCommon
//
// Created by 孟钰丰 on 2016/10/19.
// Copyright © 2016年 Petsknow. All rights reserved.
//
import Foundation
extension FileManager {
static var temporaryDirectoryPath: String {
return NSTemporaryDirectory()
}
static var temporaryDirectory... | mit | fae94d5e9ea40ff0fcd3494f405659c4 | 26.179104 | 117 | 0.618891 | 4.97541 | false | false | false | false |
IBM-MIL/IBM-Ready-App-for-Banking | HatchReadyApp/apps/Hatch/iphone/native/Hatch/Controllers/Watson/WatsonImportanceViewController.swift | 1 | 2796 | /*
Licensed Materials - Property of IBM
© Copyright IBM Corporation 2015. All Rights Reserved.
*/
import UIKit
/**
* This view controller is 2/5 of the Watson questionnaire, and asks the user which option is most important in an account.
*/
class WatsonImportanceViewController: UIViewController {
@IBOutl... | epl-1.0 | 4fabdc94195ccdaa1c8a600b441cd985 | 31.882353 | 218 | 0.6161 | 4.894921 | false | false | false | false |
MadAppGang/SmartLog | iOS/Pods/CoreStore/Sources/CSObjectMonitor.swift | 2 | 5507 | //
// CSObjectMonitor.swift
// CoreStore
//
// Copyright © 2016 John Rommel Estropia
//
// 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 limitat... | mit | 43118ba8374d1d78e07758b868f584ea | 32.987654 | 185 | 0.664729 | 5.060662 | false | false | false | false |
jacobwhite/firefox-ios | Shared/Extensions/KeychainWrapperExtensions.swift | 22 | 2439 | /* 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 XCGLogger
import SwiftKeychainWrapper
private let log = Logger.keychainLogger
public ex... | mpl-2.0 | 2edbf79ac47a7092e670bf7f9c4da16d | 38.33871 | 125 | 0.607626 | 5.167373 | false | false | false | false |
wordpress-mobile/WordPress-iOS | WordPress/Classes/ViewRelated/Likes/LikesListController.swift | 2 | 14555 | import Foundation
import UIKit
import WordPressKit
/// Convenience class that manages the data and display logic for likes.
/// This is intended to be used as replacement for table view delegate and data source.
@objc protocol LikesListControllerDelegate: AnyObject {
/// Reports to the delegate that the header ... | gpl-2.0 | c40e21d956fbee8f2add5661e7a8bfb9 | 33.166667 | 152 | 0.62494 | 5.410781 | false | false | false | false |
pabloroca/PR2StudioSwift | Source/PR2Dates.swift | 1 | 4053 | //
// PR2Dates.swift
// FashionBrowserPablo
//
// Created by Pablo Roca Rozas on 27/1/16.
// Copyright © 2016 PR2Studio. All rights reserved.
//
import Foundation
extension String {
public func PR2DateFormatterFromWeb() -> Date {
return DateFormatter.PR2DateFormatterFromWeb.date(from: self)!
}
... | mit | d74f9035e00eee1a208a06c67f54c658 | 28.576642 | 73 | 0.673495 | 4.467475 | false | false | false | false |
SwiftTools/Switt | Switt/Source/Converting/Swift/Module/File/Support/FunctionSignatureFromContextConverter.swift | 1 | 999 | import SwiftGrammar
protocol FunctionSignatureFromContextConverter {
func convert(context: SwiftParser.Function_signatureContext?) -> FunctionSignature?
}
class FunctionSignatureFromContextConverterImpl: FunctionSignatureFromContextConverter {
private let assembly: ConvertingAssembly
init(assembly: C... | mit | e3ffa5327b41733b49ec1f8787fd0e4f | 33.482759 | 89 | 0.678679 | 5.61236 | false | false | false | false |
tullie/CareerCupAPI | CCAnswersSearch.swift | 1 | 2385 | //
// CCAnswersSearch.swift
// AlgorithmMatch
//
// Created by Tullie on 24/03/2015.
// Copyright (c) 2015 Tullie. All rights reserved.
//
import UIKit
class CCAnswersSearch: NSObject {
// Retrive answers from question ID
func loadAnswersWithID(id: String) -> [CCAnswer] {
var answers: [CCAnswe... | mit | 76e1b736f9e036667e15acfbb673ee99 | 38.098361 | 119 | 0.626834 | 4.713439 | false | false | false | false |
duycao2506/SASCoffeeIOS | SAS Coffee/View/KasperButton.swift | 1 | 1905 | //
// KasperButton.swift
// SAS Coffee
//
// Created by Duy Cao on 9/3/17.
// Copyright © 2017 Duy Cao. All rights reserved.
//
import UIKit
@IBDesignable
class KasperButton: UIButton {
/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance ... | gpl-3.0 | 99ca0416974f0391650aabbfd8172c7d | 26.594203 | 94 | 0.615021 | 4.736318 | false | false | false | false |
24/ios-o2o-c | gxc/Common/GXMap.swift | 1 | 6364 | //
// GXMap.swift
// gxc
//
// Created by gx on 14/12/3.
// Copyright (c) 2014年 zheng. All rights reserved.
//
import Foundation
import CoreLocation
class GXMap {
//转换过后,算经纬度
func distanceBetweenOrderBy(lat1:Double,lat2:Double,lng1:Double,lng2:Double) ->Double
{
var curLocation: CLLo... | mit | b00dae175decafce14512ae5396faecf | 27.547945 | 139 | 0.519674 | 3.299208 | false | false | false | false |
Charlisim/Palette-iOS | Palette/UIView+ColorAtPoint.swift | 1 | 2003 | //The MIT License (MIT)
//
//Copyright (c) 2015 Carlos Simón
//
//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, mo... | mit | ccab14614e3f5e5db877baa1519bcdf1 | 46.666667 | 160 | 0.733267 | 4.429204 | false | false | false | false |
xedin/swift | stdlib/public/Darwin/Accelerate/vDSP_Geometry.swift | 2 | 17903 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2019 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 | bd22934947944b14974c05724afdd054 | 40.009195 | 101 | 0.46701 | 4.197412 | false | false | false | false |
HabitRPG/habitrpg-ios | Habitica API Client/Habitica API Client/Decoding-Extensions.swift | 1 | 3792 | //
// Decoding-Extensions.swift
// Habitica API Client
//
// Created by Phillip Thelen on 11.06.18.
// Copyright © 2018 HabitRPG Inc. All rights reserved.
//
import Foundation
//https://stackoverflow.com/a/46049763
struct JSONCodingKeys: CodingKey {
var stringValue: String
init?(stringValue: String) ... | gpl-3.0 | b33d63b1224564c02ca06fffbaee5346 | 34.101852 | 122 | 0.581113 | 4.43911 | false | false | false | false |
VolodymyrShlikhta/InstaClone | InstaClone/User.swift | 1 | 1405 | //
// User.swift
// InstaClone
//
// Created by Relorie on 6/19/17.
// Copyright © 2017 Relorie. All rights reserved.
//
import Foundation
import UIKit
class User {
var profilePictureURL: URL?
var profileName: String?
var posts = [Post]()
var postCount: Int? {
get {
return self... | mit | 430fa08ebba38c30007ac1a6d709c24a | 27.08 | 175 | 0.611111 | 4.254545 | false | false | false | false |
LNTUORG/LntuOnline-iOS-Swift | eduadmin/SelfInfoTableViewController.swift | 1 | 3370 | //
// SelfInfoTableViewController.swift
// eduadmin
//
// Created by Li Jie on 3/7/16.
// Copyright © 2016 PUPBOSS. All rights reserved.
//
import UIKit
class SelfInfoTableViewController: UITableViewController {
let normalIdentifier = "InfoNormalCell"
let eduIdentifier = "InfoEduCell"
let familyIdent... | gpl-2.0 | 80a3b2f767cd865d4559d5af810e1047 | 33.030303 | 157 | 0.688335 | 5.486971 | false | false | false | false |
szk-atmosphere/SAParallaxViewControllerSwift | SAParallaxViewControllerSwiftExample/Pods/SABlurImageView/SABlurImageView/SABlurImageView.swift | 1 | 5743 | //
// UIImageView+BlurEffect.swift
// SABlurImageView
//
// Created by 鈴木大貴 on 2015/03/27.
// Copyright (c) 2015年 鈴木大貴. All rights reserved.
//
import UIKit
import Foundation
import QuartzCore
open class SABlurImageView: UIImageView {
//MARK: - Static Properties
fileprivate struct Const {
static l... | mit | 0bcb6d7e797ab4b58c6e06c208f8d88c | 38.212329 | 145 | 0.630742 | 4.576339 | false | false | false | false |
shopgun/shopgun-ios-sdk | Sources/TjekPublicationViewer/PagedPublication/PagedPublicationView+HotspotOverlayView.swift | 1 | 16047 | ///
/// Copyright (c) 2018 Tjek. All rights reserved.
///
import UIKit
protocol HotspotOverlayViewDelegate: AnyObject {
func didTapHotspot(overlay: PagedPublicationView.HotspotOverlayView, hotspots: [PagedPublicationView.HotspotModel], hotspotRects: [CGRect], locationInOverlay: CGPoint, pageIndex: Int, loca... | mit | 98864200c82edfc6ddf08e339b5c4af0 | 44.717949 | 237 | 0.578114 | 5.504974 | false | false | false | false |
jfosterdavis/Charles | Charles/Clue.swift | 1 | 1168 | //
// Clue.swift
// Charles
//
// Created by Jacob Foster Davis on 6/16/17.
// Copyright © 2017 Zero Mu, LLC. All rights reserved.
//
import Foundation
import UIKit
/******************************************************/
/*******************///MARK: Data needed to present the user with a clue on how to play this... | apache-2.0 | 53c9fbfa8a098285a8a54ae7d2806834 | 21.882353 | 107 | 0.513282 | 4.052083 | false | false | false | false |
Glenmax-ltd/GLXSegmentedControl | GLXSegmentedControl/GLXSegmentedControl.swift | 1 | 15633 | //
// GLXSegmentedControl.swift
// GLXSegmentedControlController
//
// Created by Si Ma on 01/10/15.
// Copyright © 2015 Si Ma and Glenmax Ltd. All rights reserved.
//
import UIKit
extension UILabel {
func fontFitsCurrentFrame(_ font:UIFont) -> Bool {
let attributes = [NSFontAttributeName:font]
... | mit | b28db61f34cbfe1b1fa7441412b84772 | 33.056645 | 214 | 0.565571 | 5.441002 | false | false | false | false |
imclean/JLDishWashers | JLDishwasher/Availability.swift | 1 | 1828 | //
// Availability.swift
// JLDishwasher
//
// Created by Iain McLean on 21/12/2016.
// Copyright © 2016 Iain McLean. All rights reserved.
//
import Foundation
public class Availability {
public var message : String?
public var availabilityStatus : String?
public var stockLevel : Int?
/**
Returns ... | gpl-3.0 | 39bf9884f525f2a7acd5e9fdaf2070ea | 26.268657 | 99 | 0.679803 | 4.872 | false | false | false | false |
blockchain/My-Wallet-V3-iOS | Modules/Money/Sources/MoneyKit/CurrencyRepresentation/Crypto/CryptoFormatter.swift | 1 | 6020 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import BigInt
import Foundation
/// A precision level for formatting a `CryptoValue` into a `String`.
public enum CryptoPrecision: String {
/// The currency's display precision.
case short
/// The currency's full precision.
case long
... | lgpl-3.0 | 51ca1881b3923ee0e5cef3376830dc23 | 31.535135 | 123 | 0.614886 | 5.345471 | false | false | false | false |
jensmeder/DarkLightning | Sources/Daemon/Sources/Devices/USBDevice.swift | 1 | 6152 | /**
*
* DarkLightning
*
*
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Jens Meder
*
* 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 lim... | mit | 0071368f9d0602c6135c30535f4b708e | 36.060241 | 139 | 0.471554 | 5.771107 | false | false | false | false |
kiwitechnologies/ServiceClientiOS | Example/ServiceSample/ViewController.swift | 1 | 10993 | //
// ViewController.swift
// LoginSample
//
// Created by Yogesh Bhatt on 07/04/16.
// Copyright © 2016 kiwitech. All rights reserved.
//
import UIKit
import TSGServiceClient
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var apiResult: UITextView!
@IBOutlet weak var progre... | mit | 271b4a6fce04de6d57396e34adfdd362 | 34.80456 | 291 | 0.619632 | 4.976007 | false | false | false | false |
sora0077/QiitaKit | QiitaKit/src/Endpoint/Tagging/CreateTagging.swift | 1 | 1413 | //
// CreateTagging.swift
// QiitaKit
//
// Created on 2015/06/08.
// Copyright (c) 2015年 林達也. All rights reserved.
//
import Foundation
import APIKit
import Result
/**
* 投稿にタグを追加します。Qiita:Teamでのみ有効です。
*/
public struct CreateTagging {
public let id: Item.Identifier
/// タグを特定するための一意な名前
/// exampl... | mit | 88e28e3bc36f8fba690f5ab50d54cce6 | 18.925373 | 119 | 0.610487 | 4.021084 | false | false | false | false |
sora0077/QiitaKit | QiitaKit/src/Endpoint/Template/UpdateTemplate.swift | 1 | 1913 | //
// UpdateTemplate.swift
// QiitaKit
//
// Created on 2015/06/08.
// Copyright (c) 2015年 林達也. All rights reserved.
//
import Foundation
import APIKit
import Result
/**
* テンプレートを更新します。
*/
public struct UpdateTemplate {
public let id: Template.Identifier
/// テンプレートの本文
/// example: Weekly MTG on ... | mit | ec8dab59996b052615cb5d40f4b750e3 | 21.111111 | 119 | 0.581798 | 3.754717 | false | false | false | false |
joemcsorley/ios-local-storage-client | Pod/LSAPIClient_NOPE.swift | 1 | 4016 | //
// LSAPIClient.swift
// LSAPIClient
//
// Created by Joe McSorley on 12/22/15.
// Copyright © 2015 Lampo Licensing, LLC. All rights reserved.
//
import Foundation
//import PromiseKit
/*
typealias responseTransformerBlockType = ([NSObject : AnyObject]!) -> [NSObject : AnyObject]!
private let userID = "AXIDLOC... | mit | af54da35919382cc654122045bbdc438 | 32.466667 | 158 | 0.639103 | 3.277551 | false | false | false | false |
someoneAnyone/Nightscouter | Common/Protocols/SegueHandlerType.swift | 1 | 3211 | //
// SegueHandler.swift
// Nightscouter
//
// Created by Peter Ina on 9/26/16.
// Copyright © 2016 Peter Ina. All rights reserved.
//
import Foundation
/*
Copyright (C) 2016 Apple Inc. All Rights Reserved.
See LICENSE.txt for this sample’s licensing information
Abstract:
Contains types / typealiases for cr... | mit | 1ac04f1f8b0220bfa13a3a0e4a4be9e0 | 35.044944 | 149 | 0.714464 | 5.293729 | false | false | false | false |
eburns1148/CareKit | Sample/OCKSample/InsightsBuilder.swift | 2 | 6504 | /*
Copyright (c) 2016, Apple Inc. 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 follow... | bsd-3-clause | fcfa8b32fbcb44d2545127727eba3e8b | 43.855172 | 126 | 0.653598 | 5.645833 | false | false | false | false |
silence0201/Swift-Study | Note/Day 01/03-创建对象补充.playground/Contents.swift | 2 | 962 | //: Playground - noun: a place where people can play
import UIKit
// 需求: 创建UIView对象,并且在UIView中添加UIButton
// 1.创建UIView对象
// OC : [[UIView alloc] initWithFrame:CGRect]
let rect = CGRect(x: 0, y: 0, width: 100, height: 100)
let view : UIView = UIView(frame: rect)
// 2.给View设置属性
view.backgroundColor = UIColor.red
//... | mit | 90fd32d923fb04bf5791f5475b7e3ef6 | 19.457143 | 54 | 0.701117 | 2.594203 | false | false | false | false |
bitboylabs/selluv-ios | selluv-ios/Pods/Moya/Source/Moya+Internal.swift | 4 | 13361 | import Foundation
import Result
/// Internal extension to keep the inner-workings outside the main Moya.swift file.
internal extension MoyaProvider {
// Yup, we're disabling these. The function is complicated, but breaking it apart requires a large effort.
// swiftlint:disable cyclomatic_complexity
// swif... | mit | 4be554131bbc199eda03287395c5cfc3 | 46.379433 | 279 | 0.616571 | 5.5532 | false | false | false | false |
stripe/stripe-ios | StripePayments/StripePayments/API Bindings/Models/Shared/STPIntentAction.swift | 1 | 13400 | //
// STPIntentAction.swift
// StripePayments
//
// Created by Yuki Tokuhiro on 6/27/19.
// Copyright © 2019 Stripe, Inc. All rights reserved.
//
//
// STPIntentNextAction.m
// Stripe
//
// Created by Yuki Tokuhiro on 6/27/19.
// Copyright © 2019 Stripe, Inc. All rights reserved.
//
import Foundation
/// Typ... | mit | 17888d746fd8d61d945d86cbd186caaf | 39.234234 | 131 | 0.659501 | 4.653699 | false | false | false | false |
stripe/stripe-ios | StripePaymentSheet/StripePaymentSheet/Internal/API Bindings/Link/STPAPIClient+Link.swift | 1 | 15773 | //
// STPAPIClient+Link.swift
// StripePaymentSheet
//
// Created by Cameron Sabol on 4/21/21.
// Copyright © 2021 Stripe, Inc. All rights reserved.
//
import Foundation
@_spi(STP) import StripeCore
@_spi(STP) import StripePayments
@_spi(STP) import StripePaymentsUI
extension STPAPIClient {
func lookupC... | mit | 0f843c88aec8088ae2d163ef042ca806 | 32.628998 | 135 | 0.588321 | 5.448014 | false | false | false | false |
GeekYong/JYMagicMove | JYMagicMove/JYMagicMove/JYMagicPopTransion.swift | 1 | 2042 | //
// JYMagicPopTransion.swift
// JYMagicMove
//
// Created by 杨勇 on 16/8/16.
// Copyright © 2016年 JackYang. All rights reserved.
//
import UIKit
class JYMagicPopTransion: NSObject ,UIViewControllerAnimatedTransitioning{
func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) ->... | mit | c4fb0eed3d65f7c9be530963d414db68 | 40.9375 | 146 | 0.705912 | 5.751429 | false | false | false | false |
NoryCao/zhuishushenqi | zhuishushenqi/TXTReader/Reader/View/ZSChapterPayView.swift | 1 | 2718 | //
// ZSChapterPayView.swift
// zhuishushenqi
//
// Created by caony on 2019/2/15.
// Copyright © 2019年 QS. All rights reserved.
//
import Foundation
class ZSChapterPayView: UIView {
var titleLabel:UILabel!
var tipLabel:UILabel!
var payButton:UIButton!
var leftLineView:UIView!
var rightLi... | mit | e6ee950260c80d8bedd5af27556ceb33 | 36.375 | 162 | 0.648086 | 4.028443 | false | false | false | false |
mono0926/firebase-verifier | Sources/Verifier.swift | 1 | 2074 | import Foundation
import JWT
public protocol Verifier {
func verify(token: String, allowExpired: Bool) throws -> User
}
extension Verifier {
public func verify(token: String) throws -> User {
return try verify(token: token, allowExpired: false)
}
}
public struct JWTVerifier: Verifier {
public... | mit | 95edeca30e8481283672fc9ebb1246de | 37.407407 | 130 | 0.667792 | 4.528384 | false | false | false | false |
manavgabhawala/swift | test/Serialization/noinline.swift | 1 | 1430 | // RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -emit-module -sil-serialize-all -o %t %S/Inputs/def_noinline.swift
// RUN: llvm-bcanalyzer %t/def_noinline.swiftmodule | %FileCheck %s
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -emit-silgen -sil-link-... | apache-2.0 | 02d84928f6ba16dc3579f2b629aacd2b | 56.2 | 190 | 0.686014 | 3.25 | false | true | false | false |
Esri/arcgis-runtime-samples-ios | arcgis-ios-sdk-samples/Scenes/Animate 3D graphic/PlaneStatsViewController.swift | 1 | 2537 | //
// Copyright 2017 Esri.
//
// 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 writi... | apache-2.0 | a0a6055745907f405d63a3af1aea5753 | 34.732394 | 124 | 0.669689 | 5.104628 | false | false | false | false |
tardieu/swift | test/expr/unary/selector/property.swift | 6 | 10418 | // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-objc-attr-requires-foundation-module -typecheck -primary-file %s %S/Inputs/property_helper.swift -verify -swift-version 4
import ObjectiveC
// REQUIRES: objc_interop
@objc class HelperClass: NSObject {}
struct Wrapper {
var objcInstance = ObjCC... | apache-2.0 | ab38c02c56cbde47d26017cc3e563845 | 42.957806 | 192 | 0.728355 | 4.008465 | false | true | false | false |
Solar1011/- | 我的微博/我的微博/Classes/Module/NewFeature/NewFeatureViewController.swift | 1 | 5753 | //
// NewFeatureViewController.swift
// 我的微博
//
// Created by teacher on 15/7/30.
// Copyright © 2015年 itheima. All rights reserved.
//
import UIKit
private let reuseIdentifier = "Cell"
class NewFeatureViewController: UICollectionViewController {
/// 图像总数
private let imageCount = 4
/// 布局属性
... | mit | e71f746ac76ed947d11d776174a0f6b5 | 30.803681 | 179 | 0.639082 | 5.003861 | false | false | false | false |
RaviiOS/Swift_ReusableCode | RKSwift3Plus/RKSwift3Plus/Utitlities/KeyChainWrapper.swift | 1 | 16918 | //
// KeyChainWrapper.swift
// RKSwift3Plus
//
// Created by Ravi on 04/08/17.
// Copyright © 2017 RKSolutions. All rights reserved.
//
import Foundation
//
// Keychain helper for iOS/Swift.
//
// https://github.com/marketplacer/keychain-swift
//
// This file was automatically generated by combining multiple Swift... | mit | b3b9445069c91fe5ccb471c653d6f266 | 38.069284 | 380 | 0.667908 | 5.642762 | false | false | false | false |
53ningen/todo | TODO/Domain/Entity/Milestone.swift | 1 | 2572 | /// マイルストンを表すエンティティ
public final class MilestoneInfo: EntityInfo {
public let state: MilestoneState
public let description: String
public let createdAt: Date
public let updatedAt: Date
public let dueOn: Date?
public let openIssuesCount: Int?
public let closedIssuesCount: Int?
publ... | mit | 45333b2eabad964724ebcf5ad186518b | 28.905882 | 169 | 0.647522 | 4.250836 | false | false | false | false |
sergdort/CleanArchitectureRxSwift | CleanArchitectureRxSwift/Scenes/CreatePost/CreatePostViewModel.swift | 1 | 1747 | //
// Created by sergdort on 19/02/2017.
// Copyright (c) 2017 sergdort. All rights reserved.
//
import Foundation
import RxSwift
import RxCocoa
import Domain
final class CreatePostViewModel: ViewModelType {
private let createPostUseCase: PostsUseCase
private let navigator: CreatePostNavigator
init(crea... | mit | 53dea936b5a36f8d58eb11af36a2d78e | 29.12069 | 91 | 0.627361 | 4.734417 | false | true | false | false |
zhouxinv/SwiftThirdTest | SwiftTest/AlamofireController.swift | 1 | 6217 | //
// AlamofireController.swift
// SwiftTest
//
// Created by GeWei on 2017/1/10.
// Copyright © 2017年 GeWei. All rights reserved.
//
import UIKit
import Alamofire
import SwiftyJSON
class AlamofireController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.titl... | mit | 4ac60b1e6d648e91f4353d70fac55c58 | 34.464286 | 201 | 0.574354 | 3.71215 | false | false | false | false |
wireapp/wire-ios | Wire-iOS Tests/Authentication/AuthenticationInterfaceBuilderTests.swift | 1 | 6725 | //
// Wire
// Copyright (C) 2019 Wire Swiss GmbH
//
// 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 3 of the License, or
// (at your option) any later version.
//
// This progr... | gpl-3.0 | 2e86dde245f13048c5ea386c3921813e | 35.748634 | 149 | 0.693532 | 4.912345 | false | true | false | false |
mozilla-mobile/firefox-ios | Client/Frontend/Home/Wallpapers/v1/UI/WallpaperCollectionViewCell.swift | 2 | 5309 | // 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 UIKit
class WallpaperCollectionViewCell: UICollectionViewCell, ReusableCell {
private struct UX {
... | mpl-2.0 | d504a8eef48c87b60195b89ea5b14009 | 35.613793 | 95 | 0.695611 | 5.524454 | false | false | false | false |
benlangmuir/swift | test/Generics/unify_concrete_types_1.swift | 9 | 861 | // RUN: %target-typecheck-verify-swift -dump-requirement-machine 2>&1 | %FileCheck %s
struct Foo<A, B> {}
protocol P1 {
associatedtype X where X == Foo<Y1, Z1>
associatedtype Y1
associatedtype Z1
}
protocol P2 {
associatedtype X where X == Foo<Y2, Z2>
associatedtype Y2
associatedtype Z2
}
struct MergeTe... | apache-2.0 | 9ec2f4d68a62ae22bff7b5e3dd4b0884 | 26.612903 | 85 | 0.602804 | 2.418079 | false | false | false | false |
jejefcgb/ProjetS9-iOS | Projet S9/Topology.swift | 1 | 1061 | //
// Topology.swift
// Projet S9
//
// Created by Guillaume SCHAHL on 04/01/2015.
// Copyright (c) 2015 Jérémie Foucault. All rights reserved.
//
import Foundation
private let _TopologySharedInstance = Topology()
/**
Data entity that represents a topologys.
Subclasses NSObject to enable Obj-C instantiation.
*/... | apache-2.0 | 2123ca479825bbbb58bcd804c0535425 | 20.2 | 71 | 0.624174 | 3.996226 | false | false | false | false |
zweigraf/march-thirteen | MarchThirteen/MarchThirteen/WalkieTalkie/CommunicatorMessage.swift | 1 | 1786 | //
// CommunicatorMessage.swift
// MarchThirteen
//
// Created by Luis Reisewitz on 18.03.17.
// Copyright © 2017 ZweiGraf. All rights reserved.
//
import Foundation
fileprivate enum DictionaryKeys: String {
case meta
case payload
}
/// Represents a message.
public struct CommunicatorMessage<PayloadType:... | mit | 6e0dcfd6e97ebe07e077f50f699a74fa | 30.175439 | 101 | 0.657288 | 4.603627 | false | false | false | false |
caicai0/ios_demo | load/thirdpart/SwiftSoup/OrderedSet.swift | 3 | 12621 | //
// OrderedSet.swift
// SwiftSoup
//
// Created by Nabil Chatbi on 12/11/16.
// Copyright © 2016 Nabil Chatbi. All rights reserved.
//
import Foundation
/// An ordered, unique collection of objects.
public class OrderedSet<T: Hashable> {
public typealias Index = Int
fileprivate var contents = [T: Index]() // N... | mit | 68222e8ec350f3cb50ebf1bff1739880 | 27.359551 | 117 | 0.695246 | 3.631655 | false | false | false | false |
sr-tune/RBGenericFilterController | C4GenericFilter/Classes/Filter/cell/FilterValidationCell.swift | 1 | 2788 | //
// FilterValidationCell.swift
// Carrefour_FR_V2
//
// Created by rboyer on 10/08/2016.
//
import UIKit
protocol FilterValidatorDelegate {
func validateSelections()
func cancelFilterSelection()
func reinitFilter()
}
class FilterValidationCell: FilterGenericCell {
var btnValidator = UIButton()
var ... | mit | f706b3c15cc29fe0feea27f2997c8df4 | 30.681818 | 203 | 0.67396 | 4.969697 | false | false | false | false |
IamAlchemist/DemoDynamicCollectionView | DemoDynamicCollectionView/SampleCalendarEvent.swift | 1 | 1003 | //
// SampleCalendarEvent.swift
// DemoDynamicCollectionView
//
// Created by Wizard Li on 1/11/16.
// Copyright © 2016 morgenworks. All rights reserved.
//
import UIKit
class SampleCalendarEvent : CalendarEvent {
static func randomEvent() -> CalendarEvent {
let randomID = Int(arc4random_uniform(... | mit | 93f79e918b908cc5c5779f7cdfdb4ec6 | 27.657143 | 125 | 0.648703 | 4.106557 | false | false | false | false |
bitboylabs/selluv-ios | selluv-ios/selluv-ios/Classes/Base/Model/ReqModel/Valet.swift | 1 | 1049 | //
// Valet.swift
// selluv-ios
//
// Created by 조백근 on 2017. 1. 18..
// Copyright © 2017년 BitBoy Labs. All rights reserved.
//
import Foundation
import ObjectMapper
class Valet: Mappable {
var category1: CategoryP?
var category2: CategoryP?
var category3: CategoryP?
var category4: CategoryP?... | mit | 417013fa40cf5e1a16343d0be2500ad6 | 22.111111 | 55 | 0.547115 | 3.895131 | false | false | false | false |
rhwood/Doing-Time | Event/Event.swift | 1 | 7399 | //
// Event.swift
// Doing Time
//
// Created by Randall Wood on 2020-11-21.
//
// Copyright 2020 Randall Wood DBA Alexandria Software
//
// 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 ... | mit | 7a6d5b0fd670d48d1e7df2cca94c795e | 36.75 | 115 | 0.634951 | 4.459916 | false | false | false | false |
jiecao-fm/SwiftTheme | Source/ThemeManager+Plist.swift | 3 | 2279 | //
// ThemeManager+Plist.swift
// SwiftTheme
//
// Created by Gesen on 16/9/18.
// Copyright © 2016年 Gesen. All rights reserved.
//
import UIKit
@objc extension ThemeManager {
public class func value(for keyPath: String) -> Any? {
return currentTheme?.value(forKeyPath: keyPath)
}
pub... | mit | 54a1d1d71b9d624355030a9260344b78 | 32.970149 | 94 | 0.59051 | 4.811839 | false | false | false | false |
dedykuncoro/BlinkingLabel | Example/BlinkingLabel/ViewController.swift | 1 | 1278 | //
// ViewController.swift
// BlinkingLabel
//
// Created by Ujuizi Lab's on 08/27/2016.
// Copyright (c) 2016 Ujuizi Lab's. All rights reserved.
//
import UIKit
import BlinkingLabel
class ViewController: UIViewController {
var isBlinking = false
let blinkingLabel = BlinkingLabel(frame: CGRectMake(10... | mit | f1703d85bebec8e248a157520a6e240c | 28.045455 | 96 | 0.63928 | 4.768657 | false | false | false | false |
longjianjiang/BlogDemo | VCInteractiveNavigationAnimation/VCInteractiveNavigationAnimation/InteractiveTransition.swift | 1 | 1525 | //
// InteractiveTransition.swift
// VCInteractiveNavigationAnimation
//
// Created by longjianjiang on 2017/10/13.
// Copyright © 2017年 Jiang. All rights reserved.
//
import UIKit
class InteractiveTransition: UIPercentDrivenInteractiveTransition {
var navigationController: UINavigationController!
var tra... | apache-2.0 | d12e39cc8f87e66a01695947223dd994 | 30.061224 | 104 | 0.644547 | 5.340351 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.