repo_name stringlengths 6 91 | path stringlengths 6 999 | copies stringclasses 283
values | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|---|
MihaiDamian/Dixi | Dixi/Dixi/Extensions/ViewOperators.swift | 1 | 9196 | //
// UIViewOperators.swift
// Dixi
//
// Created by Mihai Damian on 28/02/15.
// Copyright (c) 2015 Mihai Damian. All rights reserved.
//
import Foundation
#if os(iOS)
import UIKit
#else
import AppKit
#endif
/**
Trailing distance to view operator. See also -| (the leading distance operator).
:p... | mit |
ali-zahedi/AZViewer | AZViewer/AZHeader.swift | 1 | 4313 | //
// AZHeader.swift
// AZViewer
//
// Created by Ali Zahedi on 1/14/1396 AP.
// Copyright © 1396 AP Ali Zahedi. All rights reserved.
//
import Foundation
public enum AZHeaderType {
case title
case success
}
public class AZHeader: AZBaseView{
// MARK: Public
public var title: String = ""{
... | apache-2.0 |
MenloHacks/ios-app | Menlo Hacks/Pods/Parchment/Parchment/Extensions/UIEdgeInsets.swift | 1 | 160 | import UIKit
extension UIEdgeInsets {
var horizontal: CGFloat {
return left + right
}
var vertical: CGFloat {
return top + bottom
}
}
| mit |
KeithPiTsui/Pavers | Pavers/Pavers.playground/Pages/UIGradientView.xcplaygroundpage/Contents.swift | 2 | 1217 | //: Playground - noun: a place where people can play
import PaversFRP
import PaversUI
import UIKit
import PlaygroundSupport
import Foundation
let colors = [UIColor.random.cgColor, UIColor.random.cgColor, UIColor.random.cgColor]
let locations = [NSNumber(value: 0),NSNumber(value: 0.25),NSNumber(value: 0.5)]
let sp =... | mit |
XCEssentials/UniFlow | Sources/7_ExternalBindings/ExternalBindingBDD_ThenContext.swift | 1 | 2581 | /*
MIT License
Copyright (c) 2016 Maxim Khatskevich (maxim@khatskevi.ch)
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 ... | mit |
codespy/HashingUtility | Hashing Utility/Hmac.swift | 1 | 3617 | // The MIT License (MIT)
//
// Copyright (c) 2015 Krzysztof Rossa
//
// 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 ri... | mit |
AHuaner/Gank | Gank/Class/Home/AHHomeWebViewController.swift | 1 | 7521 | //
// AHHomeWebViewController.swift
// Gank
//
// Created by AHuaner on 2017/1/7.
// Copyright © 2017年 CoderAhuan. All rights reserved.
//
import UIKit
class AHHomeWebViewController: BaseWebViewController {
// MARK: - property
var gankModel: GankModel?
// 文章是否被收藏
fileprivate var isCollected: ... | mit |
RocketChat/Rocket.Chat.iOS | Rocket.Chat/Controllers/Drawing/DrawingBrushColorViewModel.swift | 1 | 1325 | //
// DrawingBrushColorViewModel.swift
// Rocket.Chat
//
// Created by Artur Rymarz on 12.02.2018.
// Copyright © 2018 Rocket.Chat. All rights reserved.
//
import Foundation
final class DrawingBrushColorViewModel {
internal let cellIdentifier = "DrawingBrushColorCell"
internal var selectedColorLabel: Str... | mit |
emilstahl/swift | validation-test/compiler_crashers/26950-swift-constraints-constraintsystem-solve.swift | 9 | 262 | // RUN: not --crash %target-swift-frontend %s -parse
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
{{let a{class T{struct
c{class d<T:T.h
| apache-2.0 |
A-Kod/vkrypt | Pods/SwiftyVK/Library/Sources/Extensions/OperationConvertible.swift | 2 | 217 | public protocol OperationConvertible {
func toOperation() -> Operation
func cancel()
}
extension OperationConvertible where Self: Operation {
func toOperation() -> Operation {
return self
}
}
| apache-2.0 |
ben-ng/swift | validation-test/compiler_crashers_fixed/27206-llvm-foldingset-swift-classtype-nodeequals.swift | 1 | 470 | // This source file is part of the Swift.org open source project
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the li... | apache-2.0 |
ben-ng/swift | test/IRGen/generic_class_anyobject.swift | 4 | 464 | // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop
func foo<T: AnyObject>(_ x: T) -> T { return x }
// CHECK-LABEL: define hidden %objc_object* @_TF23generic_class_anyobject3barFPs9AnyObject_PS0_... | apache-2.0 |
LeonardoCardoso/InfiniteBlocks | iOS/InfiniteBlocks/InfiniteBlocksTests/InfiniteBlocksTests.swift | 1 | 923 | //
// InfiniteBlocksTests.swift
// InfiniteBlocksTests
//
// Created by Leonardo Cardoso on 7/21/15.
// Copyright (c) 2015 leocardz. All rights reserved.
//
import UIKit
import XCTest
class InfiniteBlocksTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. Thi... | apache-2.0 |
kareman/SwiftShell | Sources/SwiftShell/Context.swift | 1 | 5042 | /*
* Released under the MIT License (MIT), http://opensource.org/licenses/MIT
*
* Copyright (c) 2015 Kåre Morstøl, NotTooBad Software (nottoobadsoftware.com)
*
*/
import Foundation
public protocol Context: CustomDebugStringConvertible {
var env: [String: String] { get set }
var stdin: ReadableStream { get set ... | mit |
Chan4iOS/SCMapCatch-Swift | SCMapCatch-Swift/UserDefaults+MC.swift | 1 | 5345 |
// UserDefault+MC.swift
// SCMapCatch-Swift_Demo
//
// Created by 陈世翰 on 17/4/17.
// Copyright © 2017年 Coder Chan. All rights reserved.
//
import Foundation
extension UserDefaults{
/*
UserDefaults set object by level keys , it will auto choose to create elements on the path if the elements on the path h... | mit |
piv199/LocalisysChat | LocalisysChat/Sources/Modules/Common/Chat/Components/LocalisysChatToolbarView.swift | 1 | 2699 | //
// ToolbarView.swift
// LocalisysChat
//
// Created by Olexii Pyvovarov on 6/26/17.
// Copyright © 2017 Olexii Pyvovarov. All rights reserved.
//
import UIKit
final class LocalisysChatToolbarView: UIView {
// MARK: - UI
internal lazy var textArea: AutoTextView = ChatTextInputArea()
internal var actionB... | unlicense |
cplaverty/KeitaiWaniKani | WaniKaniKit/Database/Table/KanjiTable.swift | 1 | 1231 | //
// KanjiTable.swift
// WaniKaniKit
//
// Copyright © 2017 Chris Laverty. All rights reserved.
//
final class KanjiTable: Table, SubjectTable {
let id = Column(name: "id", type: .int, nullable: false, primaryKey: true)
let createdAt = Column(name: "created_at", type: .float, nullable: false)
let level... | mit |
hedjirog/QiitaFeed | Pods/ReactiveCocoa/ReactiveCocoa/Swift/Atomic.swift | 1 | 1653 |
//
// Atomic.swift
// ReactiveCocoa
//
// Created by Justin Spahr-Summers on 2014-06-10.
// Copyright (c) 2014 GitHub. All rights reserved.
//
/// An atomic variable.
internal final class Atomic<T> {
private var spinlock = OS_SPINLOCK_INIT
private var _value: T
/// Atomically gets or sets the value of the va... | mit |
tbergmen/TableViewModel | Example/Tests/SampleCell2.swift | 1 | 1199 | /*
Copyright (c) 2016 Tunca Bergmen <tunca@bergmen.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... | mit |
nearfri/Strix | Tests/StrixTests/Core/ParserTests.swift | 1 | 5291 | import XCTest
@testable import Strix
private enum Seed {
static let state1: ParserState = .init(stream: "123456")
static let state2: ParserState = state1.withStream(state1.stream.dropFirst())
static let intErrors: [ParseError] = [.expected(label: "integer")]
static let strErrors: [ParseError] = [.... | mit |
hacktoolkit/htk-ios-Twitter | Twitter/AppDelegate.swift | 1 | 3058 | //
// AppDelegate.swift
// Twitter
//
// Created by Jonathan Tsai on 9/26/14.
// Copyright (c) 2014 Hacktoolkit. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var storyboard = UIStoryboard(name: "Main", bundle: nil)
... | mit |
srn214/Floral | Floral/Pods/CLImagePickerTool/CLImagePickerTool/CLImagePickerTool/AnotherPickView/CLImagePickerAnotherViewController.swift | 2 | 7276 | //
// CLImagePickerAnotherViewController.swift
// CLImagePickerTool
//
// Created by darren on 2017/11/17.
// Copyright © 2017年 陈亮陈亮. All rights reserved.
//
import UIKit
import Photos
class CLImagePickerAnotherViewController: UIViewController {
@IBOutlet weak var sureBtn: UIButton!
@IBOutlet weak var ca... | mit |
mitochrome/complex-gestures-demo | apps/GestureRecognizer/Carthage/Checkouts/swift-protobuf/Sources/SwiftProtobuf/BinaryDelimited.swift | 4 | 8486 | // Sources/SwiftProtobuf/BinaryDelimited.swift - Delimited support
//
// Copyright (c) 2014 - 2017 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/master/LICENSE.txt
//
... | mit |
zhfish/XMMediator | XMMediator/Categories/ModuleA/XMMediator+A.swift | 1 | 610 | //
// XMMediator+A.swift
// XMMediator
//
// Created by 王晨 on 2017/3/5.
// Copyright © 2017年 天星宿命. All rights reserved.
//
import UIKit
extension XMMediator {
func A_viewController() -> UIViewController {
let vc = performWith(targetName: "A", actionName: "viewController", params: nil, shouldCacheTarget... | mit |
swiftcodex/Swift-Radio-Pro | SwiftRadio/Libraries/Spring/SpringAnimation.swift | 4 | 3757 | // The MIT License (MIT)
//
// Copyright (c) 2015 Meng To (meng@designcode.io)
//
// 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 righ... | mit |
radex/swift-compiler-crashes | crashes-fuzzing/09020-swift-parser-parsedeclstruct.swift | 11 | 310 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
func a( ) -> {
{
}
struct d<T where T: a {
struct g<g : e {
class B {
{
}
func a( ) {
{
}
{
}
struct A {
{
}
protocol A {
{
}
{
{
}
}
struct
| mit |
radex/swift-compiler-crashes | crashes-fuzzing/05807-llvm-foldingset-swift-normalprotocolconformance-getnodeprofile.swift | 11 | 232 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
[]func<{class A{{{}}class A{class A{struct d{class b{func a<b:a | mit |
VaclavLustek/VLFramework | Pod/Classes/View/Table/Cells/VLBaseCell.swift | 1 | 2283 | //
// VLBaseCell.swift
// Pods
//
// Created by Václav Luštěk.
//
//
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Import
import UIKit
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---... | mit |
svdo/swift-SecurityExtensions | SecurityExtensionsTests/SecKey+KeychainTests.swift | 1 | 1060 | // Copyright (c) 2016 Stefan van den Oord. All rights reserved.
import Quick
import Nimble
import SecurityExtensions
class SecKey_KeychainTests: QuickSpec {
override func spec() {
it("can return the keychain tag of a key") {
let keys = testKeyPair()
expect(keys.privateKey.keychainT... | mit |
Vadim-Yelagin/DataSource | DataSourceTests/CompositeDataSourceTests.swift | 1 | 1003 | //
// CompositeDataSourceTests.swift
// DataSourceTests
//
// Created by Aleksei Bobrov on 06/02/2019.
// Copyright © 2019 Fueled. All rights reserved.
//
import DataSource
import Nimble
import Quick
class CompositeDataSourceTests: QuickSpecWithDataSets {
override func spec() {
var dataSource: CompositeDataSou... | mit |
kickstarter/ios-oss | Library/EnvironmentTests.swift | 1 | 365 | @testable import Library
import XCTest
final class EnvironmentTests: XCTestCase {
func testInit() {
let env = Environment()
XCTAssertEqual(env.calendar, Calendar.current)
XCTAssertEqual(env.language, Language(languageStrings: Locale.preferredLanguages))
XCTAssertEqual(env.locale, Locale.current)
... | apache-2.0 |
kickstarter/ios-oss | Library/ViewModels/ManagePledgeViewModel.swift | 1 | 21169 | import KsApi
import Prelude
import ReactiveExtensions
import ReactiveSwift
public typealias ManagePledgeViewParamConfigData = (
projectParam: Param,
backingParam: Param?
)
public enum ManagePledgeAlertAction: CaseIterable {
case updatePledge
case changePaymentMethod
case chooseAnotherReward
case contactCr... | apache-2.0 |
iZirius/MovingHelper | MovingHelper/ViewControllers/DetailViewController.swift | 37 | 3116 | //
// DetailViewController.swift
// MovingHelper
//
// Created by Ellen Shapiro on 6/7/15.
// Copyright (c) 2015 Razeware. All rights reserved.
//
import UIKit
class DetailViewController: UIViewController {
//MARK: Properties
// @IBOutlet weak var editSaveButton: UIBarButtonItem!
@IBOutlet weak var ti... | mit |
apple/swift-nio | Sources/NIOCore/FileDescriptor.swift | 1 | 1278 | //===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIB... | apache-2.0 |
SmallElephant/FEDesignPattern | 8-StrategyPattern/8-StrategyPattern/ViewController.swift | 1 | 652 | //
// ViewController.swift
// 8-StrategyPattern
//
// Created by keso on 2017/6/3.
// Copyright © 2017年 FlyElephant. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the vie... | mit |
scheib/chromium | ios/chrome/browser/ui/popup_menu/overflow_menu/overflow_menu_view_provider.swift | 1 | 616 | // Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import SwiftUI
import UIKit
// A provider to provide the SwiftUI OverflowMenuView to Objective C. This is
// necessary because Objective C can't see Swif... | bsd-3-clause |
kvedula/WWDC2015 | Kamesh Vedula/TimelineView.swift | 1 | 12750 | //
// TimelineView.swift
// Kamesh Vedula
//
// Created by Kamesh Vedula on 4/25/15.
// Copyright (c) Kamesh Vedula. All rights reserved.
//
import UIKit
/**
Represents an instance in the Timeline. A Timeline is built using one or more of these TimeFrames.
*/
public struct TimeFrame{
/**
A description of the ... | mit |
SanjoDeundiak/Wardrobe | Sources/App/Models/Colors.swift | 1 | 726 | //
// Colors.swift
// Hello
//
// Created by Oleksandr Deundiak on 6/15/17.
//
//
import Foundation
enum ColorName: String {
case red = "red"
case green = "green"
case blue = "blue"
case yellow = "yellow"
case black = "black"
case white = "white"
}
enum Color {
case colorName(ColorName... | mit |
fe9lix/Protium | iOS/Protium/src/gifdetails/GifDetailsUI.swift | 1 | 2606 | import UIKit
import RxSwift
import RxCocoa
final class GifDetailsUI: InteractableUI<GifDetailsInteractor> {
@IBOutlet weak var copyEmbedLinkButton: UIButton!
@IBOutlet weak var openGiphyButton: UIButton!
let disposeBag = DisposeBag()
private var playerViewController: GifPlayerViewController?
... | mit |
ali-rantakari/Punos | PunosTests/ResponseMockingTests.swift | 1 | 15738 | //
// ResponseMockingTests.swift
// Punos
//
// Created by Ali Rantakari on 12.2.16.
// Copyright © 2016 Ali Rantakari. All rights reserved.
//
import XCTest
import Punos
class ResponseMockingTests: MockServerTestCase {
func testResponseMocking_defaultsWhenNoMockResponsesConfigured() {
request("G... | mit |
davidchiles/OSMKit-Swift | Tests/ModelTest.swift | 2 | 3149 | //
// ModelTest.swift
// OSMKit-Swift
//
// Created by David Chiles on 12/15/15.
// Copyright © 2015 David Chiles. All rights reserved.
//
import XCTest
@testable import OSMKit_Swift
let tags = ["key1":"value1","key2":"value2"]
let elementAttributes = ["version":"2","id":"35719005","visible":"true","timestamp":... | mit |
SteveRohrlack/CitySimCore | Tests/RessourceTypeTests.swift | 1 | 2101 | //
// RessourceTypeTests.swift
// CitySimCore
//
// Created by Steve Rohrlack on 08.06.16.
// Copyright © 2016 Steve Rohrlack. All rights reserved.
//
import XCTest
#if os(iOS)
@testable import CitySimCoreiOS
#endif
#if os(OSX)
@testable import CitySimCoreMacOS
#endif
class RessourceTypeTests: XCTestCas... | mit |
skedgo/tripkit-ios | Sources/TripKitUI/cards/TKUIRoutingResultsMapManager.swift | 1 | 7263 | //
// TKUIRoutingResultsMapManager.swift
// TripKit
//
// Created by Adrian Schoenig on 13/4/17.
// Copyright © 2017 SkedGo Pty Ltd. All rights reserved.
//
import Foundation
import MapKit
import RxSwift
import RxCocoa
import TGCardViewController
import TripKit
/// An item to be displayed on the map
public stru... | apache-2.0 |
shirokova/CustomAlert | CustomAlert/Classes/CustomAlert.swift | 1 | 1410 | //
// UIViewController+CustomAlert.swift
// Pods
//
// Created by Anna Shirokova on 11/09/2017.
//
//
import UIKit
public protocol CustomAlertDelegate: class {
func dismissAlert(animated: Bool)
func dismissAlert(animated: Bool, completion: @escaping () -> Void)
}
open class CustomAlertView: UIView {
p... | mit |
yariksmirnov/ExSwift | ExSwiftTests/ExSwiftNSDateTests.swift | 3 | 9763 | //
// ExSfitNSDateTests.swift
// ExSwift
//
// Created by Piergiuseppe Longo on 23/11/14.
// Copyright (c) 2014 pNre. All rights reserved.
//
import XCTest
class ExSwiftNSDataTests: XCTestCase {
let dateFormatter = NSDateFormatter()
var startDate: NSDate?
override func setUp() {
sup... | bsd-2-clause |
arvedviehweger/swift | test/IRGen/generic_class_anyobject.swift | 4 | 498 | // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=i386_or_x86_64
// REQUIRES: objc_interop
func foo<T: AnyObject>(_ x: T) -> T { return x }
// CHECK-LABEL: define hidden swiftcc %objc_object* @_T023generic_class_anyobject3bars9AnyObjec... | apache-2.0 |
duming91/Hear-You | Hear You/Extensions/CGRect+Extension.swift | 1 | 2217 | //
// CGRect+Hello.swift
// Hello
//
// Created by snow on 16/3/23.
// Copyright © 2016年 snow. All rights reserved.
//
import UIKit
extension CGRect {
var x: CGFloat {
get {
return self.origin.x
}
set {
self = CGRectMake(newValue, self.y, self.width, self.height... | gpl-3.0 |
Rep2/SimplerNews | Sources/App/Google.swift | 1 | 2971 | import Vapor
import HTTP
import Foundation
import Dispatch
final class Google {
let serverKey = "AIzaSyCBRqxdYBflBz764vRu6kjlBTx66VlROMM"
func login(request: Request) throws -> ResponseRepresentable {
guard let idToken = request.data["id_token"]?.string else {
throw Abort.custom(status: .... | mit |
apple/swift-syntax | Tests/SwiftParserTest/translated/EffectfulPropertiesTests.swift | 1 | 10435 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 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 |
lulee007/GankMeizi | GankMeizi/Search/SearchModel.swift | 1 | 1651 | //
// SearchModel.swift
// GankMeizi
//
// Created by 卢小辉 on 16/5/26.
// Copyright © 2016年 lulee007. All rights reserved.
//
import Foundation
import RxSwift
import CocoaLumberjack
import Kanna
import ObjectMapper
class SearchModel: BaseModel {
static let sharedInstance = SearchModel()
var searc... | mit |
lyimin/EyepetizerApp | EyepetizerApp/EyepetizerApp/Controllers/ChoiceController/EYEChoiceController.swift | 1 | 8566 | //
// EYEChoiceController.swift
// EyepetizerApp
//
// Created by 梁亦明 on 16/3/10.
// Copyright © 2016年 xiaoming. All rights reserved.
//
import UIKit
import Alamofire
class EYEChoiceController: EYEBaseViewController, LoadingPresenter, MenuPresenter {
//MARK: --------------------------- LifeCycle -------------... | mit |
skyfe79/RxPlayground | RxSectionedTableView/RxSectionedTableView/NumberSection.swift | 1 | 1412 | //
// NumberSection.swift
// RxSectionedTableView
//
// Created by burt.k(Sungcheol Kim) on 2016. 1. 20..
// Copyright © 2016년 burt. All rights reserved.
//
import Foundation
import RxDataSources
// MARK: Data
struct NumberSection {
var header: String
var numbers: [IntItem]
var updated: NSDate
... | mit |
nathawes/swift | test/Driver/bad_tmpdir.swift | 2 | 840 | // Check a handful of failures in the driver when TMPDIR can't be accessed.
//
// These particular error messages are kind of finicky to hit because they
// depend on what commands the driver needs to execute on each platform, so the
// test is somewhat artificially limited to macOS.
//
// REQUIRES: OS=macosx
// SR-12... | apache-2.0 |
IkeyBenz/Hijack | HighJacked.spritebuilder/Shot.swift | 1 | 456 | //
// Shot.swift
// HighJacked
//
// Created by Ikey Benzaken on 7/13/15.
// Copyright (c) 2015 Apportable. All rights reserved.
//
import Foundation
class Shot: CCNode, CCPhysicsCollisionDelegate {
var hasHit = false
func didLoadFromCCB(){
var delay = CCActionDelay(duration: 0.05)
va... | mit |
belkevich/DTModelStorage | DTModelStorage/Utilities/UINib+Existance.swift | 1 | 1776 | //
// UINib+Existance.swift
// DTModelStorageTests
//
// Created by Denys Telezhkin on 15.07.15.
// Copyright (c) 2015 Denys Telezhkin. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to ... | mit |
belkevich/DTModelStorage | DTModelStorage/Utilities/ModelTransfer.swift | 1 | 1849 | //
// ModelTransfer.swift
// DTModelStorageTests
//
// Created by Denys Telezhkin on 06.07.15.
// Copyright (c) 2015 Denys Telezhkin. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to de... | mit |
huang1988519/WechatArticles | WechatArticles/WechatArticles/Library/JLToast/JLToast.swift | 2 | 4140 | /*
* JLToast.swift
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* Version 2, December 2004
*
* Copyright (C) 2013-2015 Su Yeol Jeon
*
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as ... | apache-2.0 |
practicalswift/swift | stdlib/public/core/Availability.swift | 9 | 1711 | //===----------------------------------------------------------------------===//
//
// 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 |
blockchain/My-Wallet-V3-iOS | Modules/Platform/Sources/PlatformUIKit/Protocols/DrawerRouting.swift | 1 | 279 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import Foundation
public protocol DrawerRouting: AnyObject {
/// Closes or open the side menu, depending on its current state
func toggleSideMenu()
/// Closes the side menu
func closeSideMenu()
}
| lgpl-3.0 |
blockchain/My-Wallet-V3-iOS | Modules/FeatureCardPayment/Sources/FeatureCardPaymentDomain/Client/CardDeletionClientAPI.swift | 1 | 224 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import Combine
import Errors
public protocol CardDeletionClientAPI: AnyObject {
func deleteCard(by id: String) -> AnyPublisher<Void, NabuNetworkError>
}
| lgpl-3.0 |
blockchain/My-Wallet-V3-iOS | Modules/FeatureKYC/Tests/FeatureKYCUITests/Mock/MockKYCEnterPhoneNumberView.swift | 1 | 954 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
@testable import FeatureKYCUI
import XCTest
class MockKYCConfirmPhoneNumberView: KYCConfirmPhoneNumberView {
var didCallShowLoadingViewExpectation: XCTestExpectation?
var didCallStartVerifSuccessExpectation: XCTestExpectation?
var didCallShowE... | lgpl-3.0 |
proxpero/Placeholder | Placeholder/UserProfileViewController.swift | 1 | 2277 |
import UIKit
import CoreLocation
import MapKit
final class UserProfileViewController: UIViewController {
// MARK: IB Outlets & Actions.
@IBOutlet var nameLabel: UILabel!
@IBOutlet var usernameLabel: UILabel!
@IBOutlet var emailLabel: UILabel!
@IBOutlet var streetLabel: UILabel!
@IBOutlet var... | mit |
jopamer/swift | test/PCMacro/didset.swift | 1 | 1306 | // RUN: %empty-directory(%t)
// RUN: cp %s %t/main.swift
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
// RUN: %target-run %t/main | %FileCheck %s
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift ... | apache-2.0 |
iOSWizards/AwesomeMedia | Example/AwesomeMedia/Controllers/ViewController.swift | 1 | 12126 | //
// TableViewController.swift
// AwesomeMedia_Example
//
// Created by Evandro Harrison Hoffmann on 4/4/18.
// Copyright © 2018 CocoaPods. All rights reserved.
//
import UIKit
import AwesomeMedia
enum MediaType: String {
case video
case audio
case file
case image
case youtube
case vertic... | mit |
huonw/swift | validation-test/Serialization/Inputs/serialization_loops_helper.swift | 70 | 92 | import Foundation
open class Sub : Base {
public override init() {
print("hi")
}
}
| apache-2.0 |
huonw/swift | validation-test/StdlibUnittest/Filter.swift | 33 | 969 | // RUN: %target-build-swift %s -o %t.out
// RUN: %target-run %t.out --stdlib-unittest-filter abc | %FileCheck --check-prefix=CHECK-ABC %s
// RUN: %target-run %t.out --stdlib-unittest-filter xyz | %FileCheck --check-prefix=CHECK-XYZ %s
// CHECK-ABC: StdlibUnittest: using filter: abc{{$}}
// CHECK-ABC: [ RUN ] Filt... | apache-2.0 |
ObjectAlchemist/OOUIKit | Sources/View/Positioning/ViewStackVertical.swift | 1 | 2526 | //
// ViewStackVertical.swift
// OOSwift
//
// Created by Karsten Litsche on 01.09.17.
//
//
import UIKit
public let VerticalStretched: Float = -1
/**
A view container that presents it's contents in a vertical top based stack.
Note: Last view ignores it's height and stretches to end (use VerticalStretched to te... | mit |
JaSpa/swift | validation-test/compiler_crashers/28656-unreachable-executed-at-swift-lib-ast-type-cpp-1137.swift | 4 | 443 | // 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/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the li... | apache-2.0 |
gustavoavena/BandecoUnicamp | BandecoUnicamp/Cache.swift | 1 | 633 | //
// Cache.swift
// BandecoUnicamp
//
// Created by Gustavo Avena on 24/07/17.
// Copyright © 2017 Gustavo Avena. All rights reserved.
//
import UIKit
protocol CacheObserver {
func newData()
}
class Cache: NSObject {
private static var sharedCache: Cache = {
let cache = Cache()
... | mit |
faimin/ZDOpenSourceDemo | ZDOpenSourceSwiftDemo/Pods/lottie-ios/lottie-swift/src/Private/Model/Assets/Asset.swift | 1 | 564 | //
// Asset.swift
// lottie-swift
//
// Created by Brandon Withrow on 1/9/19.
//
import Foundation
public class Asset: Codable {
/// The ID of the asset
let id: String
private enum CodingKeys : String, CodingKey {
case id = "id"
}
required public init(from decoder: Decoder) throws {
let ... | mit |
bizz84/MVHorizontalPicker | MVHorizontalPickerDemo/AppDelegate.swift | 1 | 3140 | /*
MVHorizontalPicker - Copyright (c) 2016 Andrea Bizzotto bizz84@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, cop... | mit |
Fitbit/RxBluetoothKit | ExampleApp/ExampleApp/Screens/CentralSpecific/CentralSpecificView.swift | 2 | 1835 | import UIKit
class CentralSpecificView: UIView {
init() {
super.init(frame: .zero)
backgroundColor = .systemBackground
setupLayout()
}
required init?(coder: NSCoder) { nil }
// MARK: - Subviews
let serviceUuidTextField: UITextField = {
let textField = UITextField... | apache-2.0 |
maxoly/PulsarKit | PulsarKitExample/PulsarKitExample/Controllers/Basic/Insert/InsertSectionsViewController.swift | 1 | 370 | //
// InsertSectionsViewController.swift
// PulsarKitExample
//
// Created by Massimo Oliviero on 29/01/2021.
// Copyright © 2021 Nacoon. All rights reserved.
//
import UIKit
import PulsarKit
final class InsertSectionsViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad... | mit |
Makosa/BubbleControl-Swift | BubbleControl-Swift/ViewController.swift | 1 | 14060 | //
// ViewController.swift
// BubbleControl-Swift
//
// Created by Cem Olcay on 11/12/14.
// Copyright (c) 2014 Cem Olcay. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setupBubble()
}
... | mit |
luzefeng/iOS8-day-by-day | 31-touch-id/TouchyFeely/TouchyFeely/AppDelegate.swift | 44 | 921 | //
// Copyright 2014 Scott Logic
//
// 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 w... | apache-2.0 |
hejunbinlan/FileKit | FileKit/Core/FKDataType.swift | 5 | 1708 | //
// FKDataType.swift
// FileKit
//
// The MIT License (MIT)
//
// Copyright (c) 2015 Nikolai Vazquez
//
// 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, includ... | mit |
mac-cain13/game-of-life | Game of Life/Cell.swift | 1 | 319 | //
// Cell.swift
// Game of Life
//
// Created by Mathijs Kadijk on 15-03-15.
// Copyright (c) 2015 Mathijs Kadijk. All rights reserved.
//
enum Cell: Printable {
case Dead
case Alive
var description: String {
switch self {
case .Dead:
return " "
case .Alive:
return "O"
}
}
}
| mit |
robbdimitrov/pixelgram-ios | PixelGramTests/PixelGramTests.swift | 1 | 986 | //
// PixelGramTests.swift
// PixelGramTests
//
// Created by Robert Dimitrov on 10/24/17.
// Copyright © 2017 Robert Dimitrov. All rights reserved.
//
import XCTest
@testable import PixelGram
class PixelGramTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here.... | mit |
IntrepidPursuits/swift-wisdom | SwiftWisdom/Core/StandardLibrary/Set/Set+Utilities.swift | 1 | 925 | public extension Set {
func ip_toArray() -> [Element] {
return [Element](self)
}
@available (*, unavailable, message: "use allSatisfy(_:) instead")
func ip_passes(test: (Element) -> Bool) -> Bool {
for ob in self {
if test(ob) {
return true
}
... | mit |
SpectacularFigo/SwiftWB | SwiftWB/SwiftWB/Home/Model/FHStatues.swift | 1 | 1015 | //
// FHStatues.swift
// SwiftWB
//
// Created by Figo Han on 2017-02-16.
// Copyright © 2017 Figo Han. All rights reserved.
//
import UIKit
class FHStatues: NSObject {
// MARK:- properties
var created_at: String?
var idstr: String?
var text: String?
var source: String?
var user : FH... | apache-2.0 |
uias/Tabman | Sources/Tabman/Bar/BarIndicator/Types/TMBarIndicator+None.swift | 1 | 974 | //
// TMBarIndicator+None.swift
// Tabman
//
// Created by Merrick Sapsford on 28/09/2018.
// Copyright © 2022 UI At Six. All rights reserved.
//
import UIKit
extension TMBarIndicator {
/// Indicator that is zero height and hidden.
///
/// Use this if you do not want a visible indicator in the ba... | mit |
Vostro162/VaporTelegram | Sources/App/Contact+Extensions.swift | 1 | 892 | //
// Contact+Extensions.swift
// VaporTelegram
//
// Created by Marius Hartig on 11.05.17.
//
//
import Foundation
import Vapor
// MARK: - JSON
extension Contact: JSONInitializable {
public init(json: JSON) throws {
guard
let phoneNumber = json["phone_number"]?.string,
let... | mit |
russelhampton05/MenMew | App Prototypes/Menu_Server_App_Prototype_001/Menu_Server_App_Prototype_001/RestaurantTableViewController.swift | 1 | 4421 | //
// RestaurantTableViewController.swift
// Menu_Server_App_Prototype_001
//
// Created by Jon Calanio on 10/3/16.
// Copyright © 2016 Jon Calanio. All rights reserved.
//
import UIKit
var currentTicket: Ticket?
class RestaurantTableViewController: UITableViewController, SWRevealViewControllerDelegate {
... | mit |
dalbin/Eureka | Tests/HelperMethodTests.swift | 1 | 4253 | // HelperMethodTests.swift
// Eureka ( https://github.com/xmartlabs/Eureka )
//
// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.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 Sof... | mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/17808-no-stacktrace.swift | 11 | 223 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
let a {
case
let h = a( [ {
func a {
{
}
class
case ,
| mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/19328-getselftypeforcontainer.swift | 11 | 213 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
func a<d : Range<c>
protocol c : b {
func b
| mit |
lstanii-magnet/ChatKitSample-iOS | ChatMessenger/Pods/ChatKit/ChatKit/source/Views/ContactsCell.swift | 1 | 1751 | /*
* Copyright (c) 2016 Magnet Systems, Inc.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You
* may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | apache-2.0 |
austinzheng/swift-compiler-crashes | fixed/22154-swift-parser-parsestmtif.swift | 11 | 226 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
let end = Void{
let end = Void{
{
}
}
{
{
{
}
}
{
{
}
if
| mit |
raymondshadow/SwiftDemo | SwiftApp/Pods/Swiftz/Sources/Swiftz/Applicative.swift | 4 | 1525 | //
// Applicative.swift
// Swiftz
//
// Created by Maxwell Swadling on 15/06/2014.
// Copyright (c) 2014-2016 Maxwell Swadling. All rights reserved.
//
/// Applicative sits in the middle distance between a Functor and a Monad. An
/// Applicative Functor is a Functor equipped with a function (called point or
///... | apache-2.0 |
AliSoftware/Dip | Sources/Register.swift | 2 | 3421 | //
// Dip
//
// Copyright (c) 2015 Olivier Halligon <olivier@halligon.net>
//
// 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
/... | mit |
open-telemetry/opentelemetry-swift | Examples/Logging Tracer/Logger.swift | 1 | 548 | /*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
import Foundation
class Logger {
static let startTime = Date()
static func printHeader() {
print("TimeSinceStart | ThreadId | API")
}
static func log(_ s: String) {
let output = String(format: "%.9f ... | apache-2.0 |
bricepollock/HTMLRenderingTableView | HTMLRenderingTableView/AppDelegate.swift | 1 | 2171 | //
// AppDelegate.swift
// HTMLRenderingTableView
//
// Created by Brice Pollock on 4/27/15.
// Copyright (c) 2015 Brice Pollock. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplica... | mit |
RocketChat/Rocket.Chat.iOS | Pods/DifferenceKit/Sources/Extensions/UIKitExtension.swift | 1 | 8731 | #if os(iOS) || os(tvOS)
import UIKit
public extension UITableView {
/// Applies multiple animated updates in stages using `StagedChangeset`.
///
/// - Note: There are combination of changes that crash when applied simultaneously in `performBatchUpdates`.
/// Assumes that `StagedChangeset` has a... | mit |
luizlopezm/ios-Luis-Trucking | Pods/Eureka/Source/Rows/LabelRow.swift | 1 | 1013 | //
// LabelRow.swift
// Eureka
//
// Created by Martin Barreto on 2/23/16.
// Copyright © 2016 Xmartlabs. All rights reserved.
//
import Foundation
// MARK: LabelCell
public class LabelCellOf<T: Equatable>: Cell<T>, CellType {
required public init(style: UITableViewCellStyle, reuseIdentifier: String?) {... | mit |
aperritano/SimpleMQTTClient | TestClient/ViewController.swift | 1 | 520 | //
// ViewController.swift
// TestClient
//
// Created by Anthony Perritano on 4/21/16.
// Copyright © 2016 Gianluca Venturini. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after load... | mit |
everald/JetPack | Sources/UI/z_ImageView+PHAssetSource.swift | 1 | 3436 | // File name prefixed with z_ to avoid compiler crash related to type extensions, nested types and order of Swift source files.
// TODO
// - allow passing PHImageRequestOptions, copy it and set .synchronous to false
// - allow using a custom PHImageManager, e.g. PHCachingImageManager
import Photos
import UIKit
publ... | mit |
margotFilleton/mealShake | mealShake/Theme.swift | 1 | 271 | //
// Theme.swift
// mealShake
//
// Created by Margot Filleton on 09/04/2017.
// Copyright © 2017 Margot Filleton. All rights reserved.
//
import Foundation
import UIKit
import DynamicColor
public class Theme {
static let mainColor = UIColor(hex: 0xf27575)
}
| mit |
stendahls/AsyncTask | Tests/ThrowableTask.swift | 1 | 3229 | //
// ThrowableTask.swift
// AsyncTest
//
// Created by Thomas Sempf on 2017-03-06.
// Copyright © 2017 Stendahls. All rights reserved.
//
// 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 Sof... | mit |
codestergit/swift | test/IDE/comment_extensions.swift | 3 | 8737 | // RUN: %target-swift-ide-test -print-comments -source-filename %S/Inputs/comment_extensions.swift -comments-xml-schema %S/../../bindings/xml/comment-xml-schema.rng | %FileCheck %s
// Content is in separate file in ./Inputs due to the "requires" keyword getting
// recognized by lit.
// CHECK: {{.*}}DocCommentAsXML=[<... | apache-2.0 |
githubxiangdong/DouYuZB | DouYuZB/DouYuZB/Classes/Home/Controller/RecommendViewController.swift | 1 | 3510 | //
// RecommendViewController.swift
// DouYuZB
//
// Created by new on 2017/4/25.
// Copyright © 2017年 9-kylins. All rights reserved.
//
import UIKit
private let kAdViewH = kScreenW * 3/8 // 广告栏的高度
private let kGameH :CGFloat = 90 // 游戏推荐的高度
class RecommendViewController: BaseAnchorViewController {
// MARK:... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.