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 |
|---|---|---|---|---|---|
austinzheng/swift-compiler-crashes | crashes-duplicates/12653-no-stacktrace.swift | 11 | 228 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
for {
func i{
let a {
class A {
{
}
init( )
{
class
case ,
| mit |
brave/browser-ios | Storage/Cursor.swift | 28 | 2957 | /* 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
/**
* Status results for a Cursor
*/
public enum CursorStatus {
case success
case fai... | mpl-2.0 |
manavgabhawala/swift | test/SourceKit/NameTranslation/basic.swift | 5 | 4483 | import Foo
var derivedObj = FooClassDerived()
func foo1(_ a : FooClassDerived) {
_ = a.fooProperty1
_ = a.fooInstanceFunc0()
fooFunc3(1,1,1,nil)
}
func foo2 (_ a : FooClassDerived) {
a.fooBaseInstanceFuncOverridden()
a.fooInstanceFunc0()
a.fooInstanceFunc1(2)
a.fooInstanceFunc2(2, withB: 2)
_ = a.foo... | apache-2.0 |
material-components/material-components-ios | components/Buttons/examples/supplemental/ButtonsTypicalUseSupplemental.swift | 2 | 2057 | // Copyright 2016-present the Material Components for iOS authors. 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
//... | apache-2.0 |
tuffz/pi-weather-app | Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ObjectCreationTests.swift | 1 | 53645 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Realm 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/li... | mit |
VanHack/binners-project-ios | ios-binners-project/UIImage+Extension.swift | 1 | 1263 | //
// UIImage+Extension.swift
// ios-binners-project
//
// Created by Matheus Ruschel on 4/11/16.
// Copyright © 2016 Rodrigo de Souza Reis. All rights reserved.
//
import Foundation
extension UIImage {
func makeImageWithColorAndSize(_ color: UIColor, size: CGSize) -> UIImage {
UIGraphicsBeginIma... | mit |
hansemannn/studentenfutter-app | extensions/Mensa/Mensa/ViewController.swift | 1 | 483 | //
// ViewController.swift
// Mensa
//
// Created by Hans Knöchel on 02.07.18.
// Copyright © 2018 Hans Knöchel. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically f... | mit |
cnoon/swift-compiler-crashes | fixed/26699-swift-expr-walk.swift | 7 | 220 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
class B<T where B:T{var b=nil
class d<b:a func a<e
| mit |
wenluma/swift | test/Generics/protocol_type_aliases.swift | 5 | 4258 | // RUN: %target-typecheck-verify-swift -typecheck %s
// RUN: %target-typecheck-verify-swift -typecheck -debug-generic-signatures %s > %t.dump 2>&1
// RUN: %FileCheck %s < %t.dump
func sameType<T>(_: T.Type, _: T.Type) {}
protocol P {
associatedtype A // expected-note{{'A' declared here}}
typealias X = A
}
pr... | mit |
cnoon/swift-compiler-crashes | crashes-duplicates/23751-swift-sildeserializer-readsilinstruction.swift | 10 | 216 | // 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 f : p}}Void{typealias e = j> Void{>:b(){
| mit |
cnoon/swift-compiler-crashes | crashes-duplicates/17108-no-stacktrace.swift | 11 | 234 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
protocol P {
let start = {
func d {
( [ {
if true {
class
case ,
| mit |
hadibadjian/GAlileo | planets/Planets/PlanetEntity+CoreDataProperties.swift | 1 | 505 | //
// PlanetEntity+CoreDataProperties.swift
// Planets
//
// Created by HB on 06/06/2016.
// Copyright © 2016 HB. All rights reserved.
//
// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu
// to delete and recreate this implementation file for your updated model.
//
import Foundation
imp... | mit |
ealeksandrov/SomaFM-miniplayer | Source/Networking/MusicSearchAPI.swift | 1 | 1898 | //
// MusicSearchAPI.swift
//
// Copyright © 2017 Evgeny Aleksandrov. All rights reserved.
import Foundation
public struct MusicSearchAPI {
static var trackSearchURL: URL?
static func searchTrack() {
trackSearchURL = nil
searchItunes()
}
}
private extension MusicSearchAPI {
// MAR... | mit |
abu0306/CnPhoto | CnPhotoTests/CnPhotoTests.swift | 1 | 957 | //
// CnPhotoTests.swift
// CnPhotoTests
//
// Created by abu on 2017/8/7.
// Copyright © 2017年 abu. All rights reserved.
//
import XCTest
@testable import CnPhoto
class CnPhotoTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before t... | mit |
avito-tech/Marshroute | Marshroute/Sources/Transitions/TransitionAnimations/ModalEndpointNavigation/Presentation/ModalEndpointNavigationPresentationAnimationContext.swift | 1 | 1593 | import UIKit
/// Описание параметров анимаций прямого модального перехода на конечный UINavigationController,
/// например, на MFMailComposeViewController, UIImagePickerController
public struct ModalEndpointNavigationPresentationAnimationContext {
/// навигационный контроллер, на который нужно осуществить прямой м... | mit |
tardieu/swift | validation-test/compiler_crashers_fixed/25861-swift-printingdiagnosticconsumer-handlediagnostic.swift | 65 | 472 | // 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 |
tardieu/swift | test/PrintAsObjC/swift_name.swift | 5 | 1883 | // Please keep this file in alphabetical order!
// REQUIRES: objc_interop
// RUN: rm -rf %t && mkdir -p %t
// FIXME: BEGIN -enable-source-import hackaround
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs/clang-importer-sdk -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC... | apache-2.0 |
kang77649119/DouYuDemo | DouYuDemo/DouYuDemo/Classes/Main/View/CollectionPrettyCell.swift | 1 | 973 | //
// CollectionPrettyCell.swift
// DouYuDemo
//
// Created by 也许、 on 16/10/9.
// Copyright © 2016年 K. All rights reserved.
//
import UIKit
import SDWebImage
class CollectionPrettyCell: UICollectionViewCell {
@IBOutlet weak var iconImg: UIImageView!
@IBOutlet weak var nickNameBtn: UIButton!
... | mit |
raykle/CustomTransition | CustomModelTransition/CustomModelTransition/PresentedViewController.swift | 1 | 409 | //
// PresentedViewController.swift
// CustomModelTransition
//
// Created by guomin on 16/3/16.
// Copyright © 2016年 iBinaryOrg. All rights reserved.
//
import UIKit
class PresentedViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func dismi... | mit |
galv/reddift | reddift/Network/Session+links.swift | 1 | 14584 | //
// Session+links.swift
// reddift
//
// Created by sonson on 2015/05/19.
// Copyright (c) 2015年 sonson. All rights reserved.
//
import Foundation
extension Session {
/**
Submit a new comment or reply to a message, whose parent is the fullname of the thing being replied to.
Its value changes the kin... | mit |
logkit/logkit | Sources/FileEndpoints.swift | 1 | 24826 | // FileEndpoints.swift
//
// Copyright (c) 2015 - 2016, Justin Pawela & The LogKit Project
// http://www.logkit.info/
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice ap... | isc |
wireapp/wire-ios-data-model | Source/Utilis/Protos/GenericMessage+Hashing.swift | 1 | 3685 | //
// Wire
// Copyright (C) 2018 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 |
hooman/swift | stdlib/public/Concurrency/AsyncDropFirstSequence.swift | 3 | 4982 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.... | apache-2.0 |
swilliams/DB5-Swift | Source/ThemeLoader.swift | 1 | 1148 | //
// ThemeLoader.swift
// DB5Demo
//
import UIKit
class ThemeLoader: NSObject {
var defaultTheme: Theme?
var themes: [Theme]
init(themeFilename filename: String) {
let themesFilePath = NSBundle.mainBundle().pathForResource(filename, ofType: "plist")
let themesDictionary = NSDictionary(... | mit |
HackerEcology/BeginnerCourse | tdjackey/GuidedTour.playground/section-48.swift | 3 | 62 | let sortedNumbers = sorted(numbers) { $0 > $1 }
sortedNumbers
| mit |
hstdt/GodEye | Carthage/Checkouts/AssistiveButton/Example/Tests/Tests.swift | 1 | 765 | import UIKit
import XCTest
import AssistiveButton
class Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. T... | mit |
apple/swift-lldb | packages/Python/lldbsuite/test/lang/swift/foundation_value_types/urlcomponents/main.swift | 2 | 1511 | // main.swift
//
// 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/CONTRIB... | apache-2.0 |
ziogaschr/SwiftPasscodeLock | PasscodeLockTests/Fakes/FakePasscodeState.swift | 1 | 691 | //
// FakePasscodeState.swift
// PasscodeLock
//
// Created by Yanko Dimitrov on 8/28/15.
// Copyright © 2015 Yanko Dimitrov. All rights reserved.
//
import Foundation
class FakePasscodeState: PasscodeLockStateType {
let title = "A"
let description = "B"
let isCancellableAction = true
var isT... | mit |
benlangmuir/swift | test/Generics/concrete_contraction_unrelated_typealias.swift | 6 | 3315 | // RUN: %target-swift-frontend -typecheck -verify %s -debug-generic-signatures -warn-redundant-requirements 2>&1 | %FileCheck %s
// Another GenericSignatureBuilder oddity, reduced from RxSwift.
//
// The requirements 'Proxy.Parent == P' and 'Proxy.Delegate == D' in the
// init() below refer to both the typealias and t... | apache-2.0 |
klundberg/swift-corelibs-foundation | TestFoundation/TestNSPropertyList.swift | 1 | 2144 | // 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 http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the l... | apache-2.0 |
cristov26/moviesApp | MoviesApp/Core/Services/Caching/Protocols/BaseService.swift | 1 | 2539 | //
// BaseService.swift
//
//
// Created by Cristian Tovar on 11/16/17.
// Copyright © 2017. All rights reserved.
//
import UIKit
import Alamofire
// TODO: Override this protocol in all the Services that need it
enum ServiceResponse {
case failure
case notConnectedToInternet
case success(response: [... | mit |
soffes/deck | Deck/Card.swift | 1 | 649 | //
// Card.swift
// Deck
//
// Created by Sam Soffes on 11/5/14.
// Copyright (c) 2014 Sam Soffes. All rights reserved.
//
public struct Card: Comparable {
public let suit: Suit
public let rank: Rank
public var shortDescription: String {
return "\(suit.shortDescription)\(rank.shortDescription)"
}
public v... | mit |
docopt/docopt.swift | Sources/Option.swift | 2 | 3103 | //
// Option.swift
// docopt
//
// Created by Pavel S. Mazurin on 2/28/15.
// Copyright (c) 2015 kovpas. All rights reserved.
//
import Foundation
internal class Option: LeafPattern {
internal var short: String?
internal var long: String?
internal var argCount: UInt
override internal var name: Str... | mit |
isgustavo/AnimatedMoviesMakeMeCry | iOS/Animated Movies Make Me Cry/Pods/Firebase/Samples/authentication/AuthenticationExampleSwift/AppDelegate.swift | 9 | 2751 | //
// Copyright (c) 2016 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 |
sol/aeson | tests/JSONTestSuite/parsers/test_Freddy_2_1_0/test_Freddy/main.swift | 12 | 771 | //
// main.swift
// test_Freddy
//
// Created by nst on 10/08/16.
// Copyright © 2016 Nicolas Seriot. All rights reserved.
//
import Foundation
func main() {
guard Process.arguments.count == 2 else {
let url = NSURL(fileURLWithPath: Process.arguments[0])
guard let programName = url.lastPa... | bsd-3-clause |
stepanhruda/libpq-darwin | Package.swift | 1 | 68 | import PackageDescription
let package = Package(
name: "libpq"
)
| mit |
SwiftGen/templates | Pods/StencilSwiftKit/Sources/SwiftIdentifier.swift | 2 | 3717 | //
// StencilSwiftKit
// Copyright (c) 2017 SwiftGen
// MIT Licence
//
import Foundation
private func mr(_ char: Int) -> CountableClosedRange<Int> {
return char...char
}
// Official list of valid identifier characters
// swiftlint:disable:next line_length
// from: https://developer.apple.com/library/ios/documentat... | mit |
nifty-swift/Nifty | Tests/NiftyTests/rand_test.swift | 2 | 2170 |
/***************************************************************************************************
* rand_test.swift
*
* This file tests the rand function.
*
* Author: Philip Erickson
* Creation Date: 22 Jan 2017
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this fi... | apache-2.0 |
realgreys/RGPageMenu | RGPageMenu/Classes/MenuItemView.swift | 1 | 3830 | //
// MenuItemView.swift
// paging
//
// Created by realgreys on 2016. 5. 10..
// Copyright © 2016 realgreys. All rights reserved.
//
import UIKit
class MenuItemView: UIView {
private var options: RGPageMenuOptions!
var titleLabel: UILabel = {
let label = UILabel(frame: .zero)
label.... | mit |
kstaring/swift | validation-test/compiler_crashers_fixed/02060-swift-constraints-constraintsystem-getfixedtyperecursive.swift | 11 | 479 | // 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 http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list... | apache-2.0 |
natecook1000/swift | stdlib/public/SDK/Foundation/Data.swift | 2 | 80964 | //===----------------------------------------------------------------------===//
//
// 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 |
overtake/TelegramSwift | Telegram-Mac/EditImageCanvasColorPicker.swift | 1 | 15701 | //
// EditImageCanvasColorPickerBackground.swift
// Telegram
//
// Created by Mikhail Filimonov on 16/04/2020.
// Copyright © 2020 Telegram. All rights reserved.
//
import Cocoa
import TGUIKit
class EditImageCanvasColorPickerBackground: Control {
override func draw(_ layer: CALayer, in ctx: CGContext)... | gpl-2.0 |
kstaring/swift | validation-test/compiler_crashers_fixed/01071-swift-modulefile-lookupvalue.swift | 11 | 468 | // 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 http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list... | apache-2.0 |
natecook1000/swift | test/Runtime/demangleToMetadataObjC.swift | 2 | 2656 | // RUN: %target-run-simple-swift-swift3
// REQUIRES: executable_test
// REQUIRES: objc_interop
import StdlibUnittest
import Foundation
import CoreFoundation
import CoreLocation
let DemangleToMetadataTests = TestSuite("DemangleToMetadataObjC")
@objc class C : NSObject { }
@objc enum E: Int { case a }
@objc protocol P... | apache-2.0 |
remirobert/MyCurrency | MyCurrency/CurrencyModel.swift | 1 | 617 | //
// CurrencyModel.swift
// MyCurrency
//
// Created by Remi Robert on 10/12/2016.
// Copyright © 2016 Remi Robert. All rights reserved.
//
import UIKit
struct CurrencyModel {
var to: Currency
var from: Currency
var rate: Double
init?(json: [String:AnyObject]) {
guard let to = C... | mit |
arvedviehweger/swift | test/IRGen/objc_pointers.swift | 4 | 1063 | // RUN: rm -rf %t && mkdir -p %t
// RUN: %build-irgen-test-overlays
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=x86_64
// REQUIRES: objc_interop
import Foundation
@objc class Foo : NSObject {
// CHECK: define internal void @_T013objc_poi... | apache-2.0 |
xebia/xtime-ios | xtime-ios/xtime-ios/XTimeProxyApi.swift | 1 | 1703 | //
// XTimeProxyApi.swift
// xtime-ios
//
// Created by Steven Mulder on 8/22/14.
// Copyright (c) 2014 Xebia Nederland B.V. All rights reserved.
//
import Foundation
class XTimeProxyApi : API {
func getWeekOverview(request: GetWeekOverviewRequest, callback: GetWeekOverviewResponse -> Void, error: NSErro... | apache-2.0 |
alokc83/rayW-SwiftSeries | RW_SwiftSeries-classes-chellenge8.playground/Contents.swift | 1 | 2384 | //: Playground - noun: a place where people can play
import UIKit
// Classes part 8 || challenge 8
class Account{
var firstName:String
var lastName:String
var balance: Double
var rate = 0.0
init(firstName:String, lastName:String, balance:Double){
self.firstName = firstName
s... | mit |
toohotz/IQKeyboardManager | Demo/Swift_Demo/ViewController/YYTextViewController.swift | 1 | 817 | //
// YYTextViewController.swift
// Demo
//
// Created by IEMacBook01 on 23/05/16.
// Copyright © 2016 Iftekhar. All rights reserved.
//
class YYTextViewController: UIViewController, YYTextViewDelegate {
@IBOutlet var textView : YYTextView!
override internal class func initialize() {
super.initi... | mit |
jmcalister1/iOS-Calculator | ClassCalculator/ViewController.swift | 1 | 1694 | //
// ViewController.swift
// ClassCalculator
//
// Created by Joshua McAlister on 1/24/17.
// Copyright © 2017 Harding University. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
var userIsTyping = false
var CPU = CalculatorCPU()
@IBOutlet weak var display... | mit |
mightydeveloper/swift | validation-test/compiler_crashers/25819-std-function-func-swift-type-subst.swift | 9 | 273 | // 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
class B<T{
enum P{class A{
enum S{
case c
let a=c
| apache-2.0 |
TouchInstinct/LeadKit | TIMapUtils/Sources/MapItem/Clusterable.swift | 1 | 1254 | //
// Copyright (c) 2022 Touch Instinct
//
// 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... | apache-2.0 |
WEIHOME/SliderExample-Swift | TipCalc.swift | 1 | 1208 | //
// TipCalc.swift
// TipCalc
//
// Created by Weihong Chen on 26/03/2015.
// Copyright (c) 2015 Weihong. All rights reserved.
//
import Foundation
class TipCalc {
var tipAmount: Float = 0
var taxAmount: Float = 0
var amountBeforeTax: Float = 0
var amountAfterTax: Float = 0
var... | mit |
optimizely/objective-c-sdk | Pods/Mixpanel-swift/Mixpanel/BaseNotificationViewController.swift | 2 | 2701 | //
// BaseNotificationViewController.swift
// Mixpanel
//
// Created by Yarden Eitan on 8/11/16.
// Copyright © 2016 Mixpanel. All rights reserved.
//
import UIKit
protocol NotificationViewControllerDelegate {
@discardableResult
func notificationShouldDismiss(controller: BaseNotificationViewController,
... | apache-2.0 |
beforeload/calculate-app | Calculate/ViewController.swift | 1 | 2652 | //
// ViewController.swift
// Calculate
//
// Created by daniel on 9/25/14.
// Copyright (c) 2014 beforeload. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
var lastNumber: String = ""
var endAllCalc: Bool = false
var endOneCalc: Bool = false
@IBOutlet weak var answe... | mit |
xusader/firefox-ios | Sync/State.swift | 2 | 13077 | /* 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 XCGLogger
// TODO: same comment as for SyncAuthState.swift!
private let lo... | mpl-2.0 |
huangboju/Moots | UICollectionViewLayout/MagazineLayout-master/Tests/RowOffsetTrackerTests.swift | 1 | 3957 | // Created by Bryan Keller on 5/23/19.
// Copyright © 2019 Airbnb Inc. All rights reserved.
import XCTest
@testable import MagazineLayout
final class RowOffsetTrackerTests: XCTestCase {
// MARK: Internal
func testOneRow() {
var rowOffsetTracker1 = RowOffsetTracker(numberOfRows: 1)
XCTAssert(rowOffsetT... | mit |
kesun421/firefox-ios | Client/Frontend/Browser/TabTrayController.swift | 2 | 43665 | /* 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 SnapKit
import Storage
import ReadingList
import Shared
struct TabTrayContr... | mpl-2.0 |
fsproru/ScoutReport | ScoutReportTests/FakePresenter.swift | 1 | 683 | import UIKit
@testable import ScoutReport
class FakePresenter: PresenterType {
var underlyingViewController: UIViewController?
var presentedViewController: UIViewController?
var animated: Bool?
var completion: (() -> Void)?
func present(underlyingViewController under... | mit |
VladislavJevremovic/Exchange-Rates-NBS | Exchange Rates NBS/Logic/Constants.swift | 1 | 1711 | //
// Constants.swift
// Exchange Rates NBS
//
// Created by Vladislav Jevremovic on 12/6/14.
// Copyright (c) 2014 Vladislav Jevremovic. All rights reserved.
//
import Foundation
import UIKit
struct Constants {
struct CustomColor {
static let Manatee = UIColor(red: 142.0 / 255.0, green: 142.0 / 255.... | mit |
catloafsoft/AudioKit | AudioKit/iOS/AudioKit/AudioKit.playground/Pages/Band Pass Filter.xcplaygroundpage/Contents.swift | 1 | 1326 | //: [TOC](Table%20Of%20Contents) | [Previous](@previous) | [Next](@next)
//:
//: ---
//:
//: ## Band Pass Filter
//: ### Band-pass filters allow audio above a specified frequency range and bandwidth to pass through to an output. The center frequency is the starting point from where the frequency limit is set. Adjusting... | mit |
blockchain/My-Wallet-V3-iOS | Modules/WalletPayload/Sources/WalletPayloadKit/Services/Sync/WalletSyncError.swift | 1 | 996 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import Errors
import Foundation
import Localization
import ToolKit
public enum WalletSyncError: LocalizedError, Equatable {
case unknown
case encodingError(WalletEncodingError)
case verificationFailure(EncryptAndVerifyError)
case networkFa... | lgpl-3.0 |
tzef/BmoViewPager | Example/BmoViewPager/CustomView/SegmentedView.swift | 1 | 1670 | //
// SegmentedView.swift
// BmoViewPager
//
// Created by LEE ZHE YU on 2017/6/4.
// Copyright © 2017年 CocoaPods. All rights reserved.
//
import UIKit
@IBDesignable
class SegmentedView: UIView {
@IBInspectable var strokeColor: UIColor = UIColor.black {
didSet {
self.setNeedsDisplay()
... | mit |
Schwenger/SwiftUtil | Sources/SwiftUtil/Extensions/Optional.swift | 1 | 1925 | //
// Optional.swift
// SwiftUtil
//
// Created by Maximilian Schwenger on 24.07.17.
//
infix operator +?: AdditionPrecedence
infix operator -?: AdditionPrecedence
infix operator *?: MultiplicationPrecedence
infix operator /?: MultiplicationPrecedence
infix operator ==?: ComparisonPrecedence
public extension Optio... | mit |
kstaring/swift | validation-test/compiler_crashers_fixed/01373-swift-valuedecl-getinterfacetype.swift | 11 | 699 | // 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 http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list... | apache-2.0 |
calkinssean/TIY-Assignments | Day 18/MoviesApp2/DetailViewController.swift | 1 | 1198 | //
// DetailViewController.swift
// MoviesApp2
//
// Created by Sean Calkins on 2/24/16.
// Copyright © 2016 Sean Calkins. All rights reserved.
//
import UIKit
class DetailViewController: UIViewController {
@IBOutlet weak var movieTitleLabel: UILabel!
@IBOutlet weak var movieImageView: UIImageView!
@I... | cc0-1.0 |
Bashta/ImageDownloader | ImageDownloader/View/ImageTableViewCustoCells/ImageTableViewCell.swift | 1 | 3440 | //
// ImageTableViewCell.swift
// ImageDownloader
//
// Created by Alb on 4/4/16.
// Copyright © 2016 10gic. All rights reserved.
//
import UIKit
import Kingfisher
protocol ImageDownloaderCellDelegate: class {
func cellFinishedDownloadingImage(image: UIImage, cellIndex: Int)
}
final class ImageTableViewCell:... | mit |
yarshure/Surf | Surf/TitleView.swift | 1 | 1641 | //
// TitleView.swift
// Surf
//
// Created by yarshure on 16/5/25.
// Copyright © 2016年 yarshure. All rights reserved.
//
import UIKit
class TitleView: UIView {
var titleLabel:UILabel
var subLabel:UILabel
override init(frame: CGRect) {
var y0:CGFloat = 10.0
var y1:CGFloat = 32.0
... | bsd-3-clause |
MillmanY/MMLocalization | Example/Tests/Tests.swift | 1 | 764 | import UIKit
import XCTest
import MMLocalization
class Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. Th... | mit |
megavolt605/CNLUIKitTools | CNLUIKitTools/CNLDatePickerView.swift | 1 | 5283 | //
// CNLDatePickerView.swift
// CNLUIKitTools
//
// Created by Igor Smirnov on 25/11/2016.
// Copyright © 2016 Complex Numbers. All rights reserved.
//
import UIKit
import CNLFoundationTools
public typealias CNLDatePickerValueChanged = (_ datePicker: CNLDatePicker, _ date: Date) -> Void
open class CNLDatePicke... | mit |
hyperoslo/Postman | Pod/Demo/ViewController.swift | 1 | 893 | import UIKit
class ViewController: UIViewController, PostmanDelegate {
var postman: Postman?
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
self.view.backgroundColor = UIColor.whiteColor()
let button = UIBarButtonItem(
title: "Send mail",
style: .Done,
... | mit |
Coderian/SwiftedKML | SwiftedKML/Elements/LinkName.swift | 1 | 1093 | //
// LinkName.swift
// SwiftedKML
//
// Created by 佐々木 均 on 2016/02/02.
// Copyright © 2016年 S-Parts. All rights reserved.
//
import Foundation
/// KML LinkName
///
/// [KML 2.2 shcema](http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd)
///
/// <element name="linkName" type="string"/>
public class LinkName:S... | mit |
caiodias/CleanerSkeeker | CleanerSeeker/CleanerSeeker/LoginViewController.swift | 1 | 2511 | //
// LoginScreenUI.swift
// CleanerSeeker
//
// Created by Orest Hazda on 29/03/17.
// Copyright © 2017 Caio Dias. All rights reserved.
//
import UIKit
class LoginViewController: BasicVC {
private enum ShowTabController: String {
case Worker = "workerTabController"
case JobPoster = "jobPoster... | mit |
Navdy/protobuf-swift | plugin/ProtocolBuffers/ProtocolBuffersTests/pbTests/ProtobufUnittest.UnittestLiteImportsNonlite.proto.swift | 1 | 13925 | // Generated by the Protocol Buffers 3.0 compiler. DO NOT EDIT!
// Source file "unittest_lite_imports_nonlite.proto"
// Syntax "Proto2"
import Foundation
import ProtocolBuffers
public extension ProtobufUnittest{}
public extension ProtobufUnittest {
public struct UnittestLiteImportsNonliteRoot {
public static... | apache-2.0 |
KanChen2015/DRCCamera | DRCCamera/DRCCameraSwiftTests/DRCCameraSwiftTests.swift | 1 | 996 | //
// DRCCameraSwiftTests.swift
// DRCCameraSwiftTests
//
// Created by Kan Chen on 9/28/15.
// Copyright © 2015 Kan Chen. All rights reserved.
//
import XCTest
@testable import DRCCameraSwift
class DRCCameraSwiftTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code ... | mit |
beforeload/love-finder-app | LoveFinderTests/LoveFinderTests.swift | 1 | 903 | //
// LoveFinderTests.swift
// LoveFinderTests
//
// Created by daniel on 9/28/14.
// Copyright (c) 2014 beforeload. All rights reserved.
//
import UIKit
import XCTest
class LoveFinderTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called b... | mit |
crspybits/SMSyncServer | iOS/iOSTests/Pods/SMSyncServer/SMSyncServer/Classes/Public/SMSyncServerUser.swift | 1 | 14600 | //
// SMSyncServerUser.swift
// SMSyncServer
//
// Created by Christopher Prince on 1/18/16.
// Copyright © 2016 Spastic Muffin, LLC. All rights reserved.
//
// Provides user sign-in & authentication for the SyncServer.
import Foundation
import SMCoreLib
// "class" so its delegate var can be weak.
internal proto... | gpl-3.0 |
nathawes/swift | test/SILOptimizer/global_init_opt.swift | 22 | 840 | // RUN: %target-swift-frontend -parse-as-library -O -module-name=test %s -emit-sil | %FileCheck %s
var gg: Int = {
print("gg init")
return 27
}()
// CHECK-LABEL: sil @$s4test3cseSiyF
// CHECK: builtin "once"
// CHECK-NOT: builtin "once"
// CHECK: [[G:%[0-9]+]] = load
// CHECK-NOT: builtin "once"
// CHECK:... | apache-2.0 |
roambotics/swift | test/Interop/SwiftToCxx/properties/getter-in-cxx.swift | 2 | 8589 | // RUN: %empty-directory(%t)
// RUN: %target-swift-frontend %s -typecheck -module-name Properties -clang-header-expose-decls=all-public -emit-clang-header-path %t/properties.h
// RUN: %FileCheck %s < %t/properties.h
// RUN: %check-interop-cxx-header-in-clang(%t/properties.h)
public struct FirstSmallStruct {
publi... | apache-2.0 |
dokun1/Lumina | Sources/Lumina/Camera/Extensions/FocusHandlerExtension.swift | 1 | 1852 | //
// FocusHandlerExtension.swift
// Lumina
//
// Created by David Okun on 11/20/17.
// Copyright © 2017 David Okun. All rights reserved.
//
import Foundation
import AVFoundation
extension LuminaCamera {
func handleFocus(at focusPoint: CGPoint) {
self.sessionQueue.async {
guard let input = self.videoI... | mit |
IngmarStein/swift | validation-test/IDE/crashers/016-swift-mangle-mangler-mangleidentifier.swift | 3 | 128 | // RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
var d{let:{func a#^A^#
| apache-2.0 |
crazypoo/PTools | Pods/FluentDarkModeKit/Sources/FluentDarkModeKit/Extensions/UITextField+DarkModeKit.swift | 1 | 1643 | //
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
extension UITextField {
override open func dmTraitCollectionDidChange(_ previousTraitCollection: DMTraitCollection?) {
super.dmTraitCollectionDidChange(previousTraitCollection)
if #available(iOS 13.0, *) ... | mit |
Fluffcorn/ios-sticker-packs-app | MessagesExtension/WAStickers code files/Limits.swift | 1 | 674 | //
// Copyright (c) WhatsApp Inc. and its affiliates.
// All rights reserved.
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
//
import UIKit
struct Limits {
static let MaxStickerFileSize: Int = 100 * 1024
static let MaxTra... | mit |
JamesBirchall/udemyiossamples | Pokedex/Pokedex/Constants.swift | 1 | 237 | //
// Constants.swift
// Pokedex
//
// Created by James Birchall on 29/07/2017.
// Copyright © 2017 James Birchall. All rights reserved.
//
import Foundation
let URL_BASE = "http://pokeapi.co"
let URL_POKEMON = "/api/v1/pokemon/"
| apache-2.0 |
caronae/caronae-ios | Caronae/AppDelegate+Notifications.swift | 1 | 6189 | import AudioToolbox
extension AppDelegate {
func handleNotification(_ userInfo: [AnyHashable: Any]) -> Bool {
guard let notificationType = userInfo["msgType"] as? String else {
handleUnknownNotification(userInfo)
return false
}
switch notificationType {
... | gpl-3.0 |
jeannustre/HomeComics | HomeComics/HCFormats.swift | 1 | 416 | //
// HCFormats.swift
// HomeComics
//
// Created by Jean Sarda on 11/05/2017.
// Copyright © 2017 Jean Sarda. All rights reserved.
//
import UIKit
import Haneke
final class HCFormats {
private init() { }
static let shared = HCFormats()
let reader = Format<UIImage>(name: "ReaderCache", ... | gpl-3.0 |
firebase/FirebaseUI-iOS | samples/swift/FirebaseUI-demo-swift/Samples/Auth/FUICustomAuthPickerViewController.swift | 1 | 799 | //
// Copyright (c) 2016 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 |
pascaljette/PokeBattleDemo | PokeBattleDemo/Pods/GearKit/Pod/GearKit/GKTable/TableConfiguration/TableSection/GKTableSectionBase.swift | 2 | 1654 | // The MIT License (MIT)
//
// Copyright (c) 2015 pascaljette
//
// 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 |
jeden/kocomojo-kit | KocomojoApp/KocomojoApp/extensions/String+Localization.swift | 2 | 263 | //
// String+Localization.swift
// KocomojoApp
//
// Created by Antonio Bello on 1/27/15.
// Copyright (c) 2015 Elapsus. All rights reserved.
//
import Foundation
extension String {
var localized: String { return NSLocalizedString(self, comment: "") }
} | mit |
fhisa/CocoaStudy | 20150905/LayoutSampleWithoutCode/LayoutSampleWithoutCode/ViewController.swift | 1 | 527 | //
// ViewController.swift
// LayoutSampleWithoutCode
//
// Created by fhisa on 2015/09/03.
// Copyright (c) 2015年 Hisakuni Fujimoto. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup afte... | mit |
podverse/podverse-ios | Podverse/UITabbarController+PlayerView.swift | 1 | 5800 | //
// UITabbarController+PlayerView.swift
// Podverse
//
// Created by Creon Creonopoulos on 7/16/17.
// Copyright © 2017 Podverse LLC. All rights reserved.
//
import UIKit
protocol PlayerViewProtocol {
func setupPlayerBar()
func hidePlayerView()
func showPlayerView()
func goToNowPlaying(isDataAva... | agpl-3.0 |
dduan/swift | validation-test/compiler_crashers_fixed/26040-swift-parser-parsetoken.swift | 11 | 430 | // 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 http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list... | apache-2.0 |
omaralbeik/SwifterSwift | Sources/Extensions/UIKit/UITableViewExtensions.swift | 1 | 7663 | //
// UITableViewExtensions.swift
// SwifterSwift
//
// Created by Omar Albeik on 8/22/16.
// Copyright © 2016 SwifterSwift
//
#if canImport(UIKit) && !os(watchOS)
import UIKit
// MARK: - Properties
public extension UITableView {
/// SwifterSwift: Index path of last row in tableView.
public var indexPath... | mit |
akrio714/Wbm | Wbm/Campaign/List/Model/CampaignListItemModel.swift | 1 | 1118 | //
// CampaignListItemModel.swift
// Wbm
//
// Created by akrio on 2017/7/14.
// Copyright © 2017年 akrio. All rights reserved.
//
import Foundation
import SwiftDate
import Moya_SwiftyJSONMapper
import SwiftyJSON
import RxDataSources
struct CampaignListItemModel:ALSwiftyJSONAble {
/// 唯一标示
let id:String
... | apache-2.0 |
hayashi311/iosdcjp2016app | iOSApp/iOSDCJP2016/Entities/Sponsor.swift | 1 | 702 | //
// Sponsor.swift
// iOSDCJP2016
//
// Created by hayashi311 on 7/10/16.
// Copyright © 2016 hayashi311. All rights reserved.
//
import Foundation
import Unbox
struct Sponsor: Unboxable {
let name: String
let description: String?
let image: String?
let url: String?
init(unboxer: Unboxe... | mit |
eburns1148/CareKit | testing/OCKTest/OCKTest/AppDelegate.swift | 1 | 3881 | /*
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 |
Muxing1991/Standford_Developing_iOS8_With_Swift | AxesDrawer.swift | 1 | 8479 | //
// AxesDrawer.swift
// Calculator
//
// Created by CS193p Instructor.
// Copyright (c) 2015 Stanford University. All rights reserved.
//
import UIKit
class AxesDrawer
{
private struct Constants {
static let HashmarkSize: CGFloat = 6
}
var color = UIColor.blueColor()
var minimumPoin... | mit |
JGiola/swift-package-manager | Sources/Workspace/InitPackage.swift | 1 | 13315 | /*
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 ... | apache-2.0 |
mownier/photostream | Photostream/Modules/Photo Capture/Presenter/PhotoCapturePresenterInterface.swift | 1 | 516 | //
// PhotoCapturePresenterInterface.swift
// Photostream
//
// Created by Mounir Ybanez on 10/11/2016.
// Copyright © 2016 Mounir Ybanez. All rights reserved.
//
import GPUImage
protocol PhotoCapturePresenterInterface: class {
var view: PhotoCaptureViewInterface! { set get }
var wireframe: PhotoCaptureW... | mit |
Donny8028/Swift-Animation | TabBarSwitch/TabBarSwitch/ReadLaterViewController.swift | 1 | 1343 | //
// ReadLaterViewController.swift
// TabBarSwitch
//
// Created by 賢瑭 何 on 2016/5/29.
// Copyright © 2016年 Donny. All rights reserved.
//
import UIKit
class ReadLaterViewController: UIViewController {
@IBOutlet weak var imageView: UIImageView!
override func viewDidLoad() {
super.viewDidLoa... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.