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
orospakr/suppressor
suppressorTests/suppressorTests.swift
1
916
// // suppressorTests.swift // suppressorTests // // Created by Andrew Clunis on 2014-11-01. // Copyright (c) 2014 Andrew Clunis. All rights reserved. // import Cocoa import XCTest class suppressorTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This metho...
apache-2.0
LacieJiang/Custom-2048
Custom-2048/Custom-2048/AppDelegate.swift
1
2102
// // AppDelegate.swift // Custom-2048 // // Created by liyinjiang on 6/17/14. // Copyright (c) 2014 liyinjiang. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UI...
bsd-2-clause
zenangst/Faker
Source/Data/Parser.swift
1
2753
import SwiftyJSON public class Parser { public var locale: String { didSet { if locale != oldValue { loadData() } } } var data: JSON = [] var provider: Provider public init(locale: String = Config.defaultLocale) { self.provider = Provider() self.locale = locale load...
mit
xilosada/TravisViewerIOS
TVView/BuildTableViewModeling.swift
1
306
// // BuildTableViewModeling.swift // TravisViewerIOS // // Created by X.I. Losada on 09/02/16. // Copyright © 2016 XiLosada. All rights reserved. // import TVModel import RxSwift public protocol BuildTableViewModeling { func getBuilds(repoId: Int) -> Observable<[BuildTableViewCellModeling]> }
mit
mrlegowatch/JSON-to-Swift-Converter
JSON to Swift Converter/ViewController.swift
1
7441
// // ViewController.swift // JSON to Swift Converter // // Created by Brian Arnold on 2/20/17. // Copyright © 2018 Brian Arnold. All rights reserved. // import Cocoa extension NSButton { var isChecked: Bool { return self.state == .on } } extension String { /// Returns an attri...
mit
airspeedswift/swift-compiler-crashes
crashes-fuzzing/01957-swift-typechecker-resolvetypeincontext.swift
1
277
// 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 i<S { func f { for c { } { } } enum a { { } protocol e : b { } } protocol b : BooleanType { } struct c
mit
flowsprenger/RxLifx-Swift
RxLifxApi/RxLifxApi/Light.swift
1
10987
/* Copyright 2017 Florian Sprenger Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, s...
mit
gkye/TheMovieDatabaseSwiftWrapper
Sources/TMDBSwift/Client/Client_Trending.swift
1
374
import Foundation extension Client { static func trending(baseURL: String, completion: @escaping (ClientReturn) -> Void) { let url = "https://api.themoviedb.org/3/trending/" + baseURL networkRequest(url: url, parameters: [:]) { apiReturn in if apiReturn.error == nil { ...
mit
JohnEstropia/CoreStore
Sources/AttributeProtocol.swift
1
1940
// // AttributeProtocol.swift // CoreStore // // Copyright © 2018 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 limit...
mit
vojto/NiceKit
NiceKit/EditableTableRowView.swift
1
1239
// // CustomTableRowView.swift // FocusPlan // // Created by Vojtech Rinik on 5/11/17. // Copyright © 2017 Median. All rights reserved. // import Foundation import AppKit open class EditableTableRowView: NSTableRowView { open var isEditing = false } open class CustomTableRowView: EditableTableRowView { s...
mit
saraford/AttemptOne
AttemptOne/ViewController.swift
1
10986
// // ViewController.swift // AttemptOne // // Created by Sara Ford on 8/29/15. // Copyright (c) 2015 Sara Ford. All rights reserved. // import UIKit class ViewController: UIViewController, UITextFieldDelegate { var gameScenes = [GameScene]() var gameEngine:GameEngine! // var validCommands:ValidComman...
mit
infobip/mobile-messaging-sdk-ios
Example/Tests/MobileMessagingTests/UtilsTests.swift
1
740
// // UtilsTests.swift // MobileMessagingExample // // Created by Andrey Kadochnikov on 12.03.2021. // import XCTest @testable import MobileMessaging class UtilsTests: XCTestCase { func testChecksAnyValuesForNil() { let megaOptionalString: String?????? = nil let nilString: String? = nil ...
apache-2.0
andrewferrier/imbk
imbk/AppDelegate.swift
1
3247
// // AppDelegate.swift // imbk // // Created by Andrew Ferrier on 10/05/2016. // Copyright © 2016 Andrew Ferrier. All rights reserved. // import UIKit import HockeySDK @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplic...
mit
pine613/SwiftyPopover
Example/Tests/Tests.swift
1
1180
// https://github.com/Quick/Quick import Quick import Nimble import SwiftyPopover class TableOfContentsSpec: QuickSpec { override func spec() { describe("these will fail") { it("can do maths") { expect(1) == 2 } it("can read") { expect(...
mit
iluuu1994/2048
2048/Classes/GameOverScene.swift
1
2291
// // GameOverScene.swift // 2048 // // Created by Ilija Tovilo on 31/07/14. // Copyright (c) 2014 Ilija Tovilo. All rights reserved. // import Foundation @objc(TFGameOverScene) class GameOverScene: CCScene { // MARK: Instanc Variables private let _score: Int lazy private var _backgroun...
bsd-3-clause
tokyovigilante/CesiumKit
CesiumKit/Core/Matrix4.swift
1
56037
// // Matrix4.swift // CesiumKit // // Created by Ryan Walklin on 13/07/14. // Copyright (c) 2014 Test Toast. All rights reserved. // import Foundation import simd /** * A 4x4 matrix, indexable as a column-major order array. * Constructor parameters are in row-major order for code readability. * @alias Matrix4 * ...
apache-2.0
v-andr/LakestoneCore
Source/PersistentPropertyList.swift
1
12465
// // PersistentPropertyList.swift // LakestoneCore // // Created by Taras Vozniuk on 6/13/16. // Copyright © 2016 GeoThings. All rights reserved. // // -------------------------------------------------------- // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except...
apache-2.0
theodinspire/FingerBlade
FingerBlade/SampleCountTableViewCell.swift
1
928
// // SampleCountTableViewCell.swift // FingerBlade // // Created by Eric T Cormack on 3/8/17. // Copyright © 2017 the Odin Spire. All rights reserved. // import UIKit class SampleCountTableViewCell: UITableViewCell { @IBOutlet weak var countLabel: UILabel! @IBOutlet weak var countStepper: UIStepper! ...
gpl-3.0
cristiannomartins/Tree-Sets
Tree Sets/PopulateDB.swift
1
28037
// // PopulateDB.swift // Tree Sets // // Created by Cristianno Vieira on 29/12/16. // Copyright © 2016 Cristianno Vieira. All rights reserved. // import Foundation import CoreData import UIKit class PopulateDB { // MARK: -- Local variables declarations static let encoding: String.Encoding = String.Encodin...
mit
DerrickQin2853/SinaWeibo-Swift
SinaWeibo/SinaWeibo/Classes/View/EmoticonKeyboard/View/DQEmoticonToolBar.swift
1
2614
// // DQEmoticonToolBar.swift // SinaWeibo // // Created by admin on 2016/10/8. // Copyright © 2016年 Derrick_Qin. All rights reserved. // import UIKit enum EmoticonType: Int { case RECENT = 0 case DEFAULT case EMOJI case LXH } class DQEmoticonToolBar: UIStackView { override init(frame: CGRe...
mit
ios-ximen/DYZB
斗鱼直播/Pods/Kingfisher/Sources/UIButton+Kingfisher.swift
68
19447
// // UIButton+Kingfisher.swift // Kingfisher // // Created by Wei Wang on 15/4/13. // // Copyright (c) 2017 Wei Wang <onevcat@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 S...
mit
emilstahl/swift
validation-test/compiler_crashers/26939-swift-patternbindingdecl-setpattern.swift
9
329
// 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 P{{S:{enum S<T where A<T>:P{class a{let a=[{let a{struct b{var d{var _=c{class d{{}class d{le...
apache-2.0
emilstahl/swift
test/SourceKit/CodeFormat/indent-closure.swift
10
1478
func foo() { bar() { var abc = 1 let a: String = { let b = "asdf" return b }() } } class C { private static let durationTimeFormatter: NSDateComponentsFormatter = { return timeFormatter }() } func foo1(a: Int, handler : ()->()) {} func foo2(handler : () ->()) {}...
apache-2.0
jbennett/Issues
IssuesKit/TrackingService.swift
1
763
// // TrackingService.swift // Issues // // Created by Jonathan Bennett on 2015-12-25. // Copyright © 2015 Jonathan Bennett. All rights reserved. // import Foundation public enum TrackingService: String { case Github case Sifter public func title() -> String { switch self { case .Sifter: return "Si...
mit
SmartCodeLab/SwiftDevTools
SwiftDevTools/Classes/DeviceTools.swift
1
807
// // DeviceTools.swift // Pods // // Created by FengJerry on 17/7/3. // // import Foundation /* * 获取设备token */ public func getDeviceToken() -> String { return (UIDevice.current.identifierForVendor?.uuidString)! } /* * 获取设备名称 */ public func getDeviceName() -> String { return UIDevice.current.name } /...
mit
JamieScanlon/AugmentKit
AugmentKit/Renderer/Passes/DrawCall.swift
1
17939
// // DrawCall.swift // AugmentKit // // MIT License // // Copyright (c) 2018 JamieScanlon // // 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 ...
mit
mrdepth/Neocom
Legacy/Neocom/Neocom/FittingMenu.swift
2
549
// // FittingMenu.swift // Neocom // // Created by Artem Shimanski on 11/23/18. // Copyright © 2018 Artem Shimanski. All rights reserved. // import Foundation import Futures enum FittingMenu: Assembly { typealias View = FittingMenuViewController case `default` func instantiate(_ input: View.Input) -> Future<...
lgpl-2.1
ganchau/Happiness
Happiness/HappinessTests/HappinessTests.swift
1
974
// // HappinessTests.swift // HappinessTests // // Created by Gan Chau on 11/5/15. // Copyright © 2015 GC App. All rights reserved. // import XCTest @testable import Happiness class HappinessTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is c...
mit
alessioborraccino/reviews
reviewsTests/ViewModel/AddReviewViewModelTests.swift
1
1565
// // AddReviewViewModelTests.swift // reviews // // Created by Alessio Borraccino on 16/05/16. // Copyright © 2016 Alessio Borraccino. All rights reserved. // import XCTest @testable import reviews class AddReviewViewModelTests: XCTestCase { private let reviewAPI = ReviewAPIMock() private lazy var addRe...
mit
philphilphil/isaacitems-ios
TrackerItems+CoreDataProperties.swift
1
490
// // TrackerItems+CoreDataProperties.swift // Isaac Items // // Created by Philipp Baum on 07/11/15. // Copyright © 2015 Thinkcoding. All rights reserved. // // Choose "Create NSManagedObject Subclass…" from the Core Data editor menu // to delete and recreate this implementation file for your updated model. // ...
mit
ollieatkinson/Expectation
Expectation/Source/Matchers/Expectation+HavePrefix.swift
1
521
// // Expectation+HavePrefix.swift // Expectation // // Created by Oliver Atkinson on 08/12/2015. // Copyright © 2015 Oliver. All rights reserved. // public extension Expectation where T: ExpressibleByStringLiteral { public func havePrefix(_ other: T, _ description: String = "") { if let expect = exp...
mit
Bartlebys/Bartleby
BartlebysUI/BartlebysUI/IdentificationStates.swift
1
1298
// // IdentificationStates.swift // BartlebyKit // // Created by Benoit Pereira da silva on 06/03/2017. // // import Foundation import BartlebyKit // You should start by the IdentityWindowController to understand the variety of possible workflows. // Bartleby supports a lot variations from distributed execution, ...
apache-2.0
cailingyun2010/swift-keyboard
01-表情键盘/ViewController.swift
1
1125
// // ViewController.swift // 01-表情键盘 // // Created by nimingM on 16/4/6. // Copyright © 2016年 蔡凌云. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var textView: UITextView! override func viewDidLoad() { super.viewDidLoad() //...
mit
khizkhiz/swift
validation-test/compiler_crashers_fixed/28041-swift-typechecker-lookupunqualified.swift
1
399
// Test is no longer valid as there is no longer `map` as a free function in Swift 3 // XFAIL: * // DUPLICATE-OF: 26813-generic-enum-tuple-optional-payload.swift // RUN: not --crash %target-swift-frontend %s -parse // Distributed under the terms of the MIT license // Test case submitted to project by https://github.co...
apache-2.0
tkremenek/swift
validation-test/Sema/type_checker_perf/fast/rdar42672946.swift
28
175
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1 func f(tail: UInt64, byteCount: UInt64) { if tail & ~(1 << ((byteCount & 7) << 3) - 1) == 0 { } }
apache-2.0
sammeadley/responder-chain
ResponderChain/ViewController.swift
1
3795
// // ViewController.swift // ResponderChain // // Created by Sam Meadley on 03/01/2016. // Copyright © 2016 Sam Meadley. All rights reserved. // import UIKit // Gross global variable to suppress print output until touch event received. There is almost certainly a better way. Maybe 100 better ways. var touchRecei...
mit
functionaldude/XLPagerTabStrip
Example/Example/ReloadExampleViewController.swift
1
3204
// ReloadExampleViewController.swift // XLPagerTabStrip ( https://github.com/xmartlabs/XLPagerTabStrip ) // // Copyright (c) 2017 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 "Softw...
mit
guumeyer/MarveListHeroes
MarvelHeroes/Extensions/UIViewController+ NVActivityIndicatorView.swift
1
685
// // UIViewController+ NVActivityIndicatorView.swift // MarvelHeros // // Created by gustavo r meyer on 8/13/17. // Copyright © 2017 gustavo r meyer. All rights reserved. // import UIKit import NVActivityIndicatorView extension UIViewController:NVActivityIndicatorViewable{ func showActivityIndicatory() ...
apache-2.0
radex/swift-compiler-crashes
crashes-duplicates/09994-swift-valuedecl-overwritetype.swift
11
277
// 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 { struct d { struct c<d : a struct d<T where g = b " " { typealias e = n } class func a func a func a
mit
radex/swift-compiler-crashes
crashes-fuzzing/08875-swift-archetypebuilder-resolvearchetype.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 class A{deinit{{}struct c<H{{}{}struct B<T where H.e=c
mit
radex/swift-compiler-crashes
crashes-duplicates/20137-no-stacktrace.swift
11
229
// 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 c { func a { for in { for { protocol A { class case ,
mit
acort3255/Emby.ApiClient.Swift
Emby.ApiClient/model/connect/ConnectPassword.swift
2
873
// // ConnectPassword.swift // Emby.ApiClient // // Created by Vedran Ozir on 07/10/15. // Copyright © 2015 Vedran Ozir. All rights reserved. // import Foundation //package mediabrowser.model.connect; extension String { func replace(what: String, with: String) -> String { //return self.stringByR...
mit
ruddfawcett/VerticalTextView
Source/VerticalTextView.swift
1
2870
// VerticalTextView.swift // Copyright (c) 2015 Brendan Conron // // 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, co...
mit
openhab/openhab.ios
openHAB/UIAlertView+Block.swift
1
1884
// Copyright (c) 2010-2022 Contributors to the openHAB project // // See the NOTICE file(s) distributed with this work for additional // information. // // This program and the accompanying materials are made available under the // terms of the Eclipse Public License 2.0 which is available at // http://www.eclipse.org/...
epl-1.0
GabrielGhe/SwiftProjects
App3/App3Tests/App3Tests.swift
1
873
// // App3Tests.swift // App3Tests // // Created by Gabriel on 2014-06-19. // Copyright (c) 2014 Gabriel. All rights reserved. // import XCTest class App3Tests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each t...
mit
soxjke/Redux-ReactiveSwift
Example/Simple-Weather-App/Simple-Weather-App/Store/AppStore.swift
1
5542
// // AppStore.swift // Simple-Weather-App // // Created by Petro Korienev on 10/30/17. // Copyright © 2017 Sigma Software. All rights reserved. // import Foundation import Redux_ReactiveSwift extension AppState: Defaultable { static var defaultValue: AppState = AppState(location: AppLocation(locationState: ....
mit
hkellaway/Gloss
Sources/GlossTests/Test Models/TestKeyPathModelCustomDelimiter.swift
1
1219
// // TestKeyPathModelCustomDelimiter.swift // GlossExample // // Created by Maciej Kołek on 10/18/16. // Copyright © 2016 Harlan Kellaway. All rights reserved. // import Foundation import Gloss struct TestKeyPathModelCustomDelimiter: Glossy { let id: Int? let url: URL? init?(json: JSON) { ...
mit
kenjitayama/MustacheMultitypeRender
Example/Tests/Tests.swift
1
2813
import UIKit import XCTest import MustacheMultitypeRender 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...
mit
DeliciousRaspberryPi/MockFive
MockFiveTests/MockFiveTests.swift
1
11771
import Quick import Nimble @testable import MockFive protocol MyMockableProtocol { func myComplexMethod(description: String?, price: Int, accessories: Any...) -> (Int, String) func myOptionalMethod(arg: Int) -> String? func mySimpleMethod() } protocol MockFiveTests: MyMockableProtocol, Mock {} struct Te...
apache-2.0
jschmid/couchbase-chat
ios-app/couchbase-chat/Controllers/LoginViewController.swift
1
1676
// // LoginViewController.swift // couchbase-chat // // Created by Jonas Schmid on 13/07/15. // Copyright © 2015 schmid. All rights reserved. // import UIKit class LoginViewController: UIViewController { @IBOutlet weak var usernameTextField: UITextField! @IBOutlet weak var passwordTextField: UITextField!...
mit
corichmond/turbo-adventure
project4/Project4/AppDelegate.swift
20
2048
// // AppDelegate.swift // Project4 // // Created by Hudzilla on 19/11/2014. // Copyright (c) 2014 Hudzilla. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWit...
unlicense
kickstarter/ios-oss
KsApi/models/lenses/GraphCategoriesEnvelopeLenses.swift
1
267
import Prelude extension RootCategoriesEnvelope { public enum lens { public static let categories = Lens<RootCategoriesEnvelope, [Category]>( view: { $0.rootCategories }, set: { part, _ in RootCategoriesEnvelope(rootCategories: part) } ) } }
apache-2.0
Foild/SugarRecord
example/SugarRecordExample/Shared/Models/CoreDataModel.swift
12
289
// // CoreDataModel.swift // SugarRecordExample // // Created by Robert Dougan on 10/12/14. // Copyright (c) 2014 Robert Dougan. All rights reserved. // import Foundation import CoreData @objc(CoreDataModel) class CoreDataModel: NSManagedObject { @NSManaged var text: String }
mit
majia144119/MarKingForGitHub
marking/marking/ViewController.swift
1
494
// // ViewController.swift // marking // // Created by mac on 15/10/13. // Copyright © 2015年 majia. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from...
mit
antonio081014/LeeCode-CodeBase
Swift/distribute-candies.swift
2
370
/** * https://leetcode.com/problems/distribute-candies/ * * */ // Date: Mon Mar 1 11:31:09 PST 2021 class Solution { func distributeCandies(_ candyType: [Int]) -> Int { var count: [Int : Int] = [:] for candy in candyType { count[candy, default: 0] += 1 } return mi...
mit
ZhaoBingDong/EasySwifty
EasySwifty/Classes/Easy+UIView.swift
1
6230
// // Easy+UIView.swift // EaseSwifty // // Created by 董招兵 on 2017/8/6. // Copyright © 2017年 大兵布莱恩特. All rights reserved. // import Foundation import UIKit //public func kScaleWidth(_ value : CGFloat) -> CGFloat { // return UIScreen.main.autoScaleW(value) //} // public func kScaleWidth(_ value : CGFloat) -> C...
apache-2.0
szpnygo/firefox-ios
Client/Frontend/Reader/ReadabilityBrowserHelper.swift
20
2103
/* 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 WebKit protocol ReadabilityBrowserHelperDelegate { func readabilityBrowserHelper(rea...
mpl-2.0
davejlong/ResponseDetective
ResponseDetective/Source Files/PlainTextInterceptor.swift
1
2463
// // PlainTextInterceptor.swift // // Copyright (c) 2015 Netguru Sp. z o.o. All rights reserved. // import Foundation /// Intercepts plain text requests and responses. public final class PlainTextInterceptor { /// The output stream used by the interceptor. public private(set) var outputStream: OutputStreamType...
mit
flodev/DbMigration
DbMigration/ViewController.swift
1
544
// // ViewController.swift // DbMigration // // Created by Florian Biewald on 19/08/14. // Copyright (c) 2014 Florian Biewald. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any ...
mit
watr/PTPPT
PTP/PTPDataSet.swift
1
6522
import Foundation public protocol PTPDataSet { init?(data: Data) } public struct GetDeviceInfoDataSet: PTPDataSet, CustomStringConvertible { public typealias StandardVersion = UInt16 public let standardVersion: StandardVersion public typealias VendorExtensionID = UInt32 public let vendorExte...
mit
pyze/iOS-Samples
PyzeWatchOSInApp/PyzeWatchOSInApp WatchKit Extension/NotificationController.swift
1
2916
import WatchKit import Foundation import UserNotifications import Pyze class NotificationController: WKUserNotificationInterfaceController { override init() { // Initialize variables here. super.init() // Configure interface objects here. } override func willActivate() {...
mit
think-dev/UIRefreshableScrollView
UIRefreshableScrollView/Refreshable.swift
1
1320
import UIKit public protocol Refreshable { var customRefreshView: UIRefreshControlContentView? { get set } var pullToRefreshControl: UIRefreshControl? { get set } var refreshDelegate: UIRefreshableScrollViewDelegate? { get set } func insertRefreshControl(using customView: UIView?) func update...
mit
gitkong/FLTableViewComponent
FLTableComponent/FLBaseHandlerProtocol.swift
2
2547
// // FLBaseHandlerProtocol.swift // FLComponentDemo // // Created by 孔凡列 on 2017/7/29. // Copyright © 2017年 gitKong. All rights reserved. // import UIKit // MARK : modifily components protocol FLTableViewHandlerProtocol { func component(by identifier: String) -> FLTableBaseComponent? func component...
mit
SusanDoggie/Doggie
Sources/DoggieGraphics/ApplePlatform/Performance/CIContextPool.swift
1
4143
// // CIContextPool.swift // // The MIT License // Copyright (c) 2015 - 2022 Susan Cheng. 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 Software without restriction,...
mit
duycao2506/SASCoffeeIOS
Pods/ExSwift/ExSwift/Range.swift
1
1866
// // Range.swift // ExSwift // // Created by pNre on 04/06/14. // Copyright (c) 2014 pNre. All rights reserved. // import Foundation public extension Range { /** For each element in the range invokes function. :param: function Function to call */ func times (function: ()...
gpl-3.0
mindbody/Conduit
Tests/ConduitTests/Networking/Serialization/SOAPEnvelopeFactoryTests.swift
1
2228
// // SOAPEnvelopeFactoryTests.swift // ConduitTests // // Created by John Hammerlund on 7/10/17. // Copyright © 2017 MINDBODY. All rights reserved. // import XCTest @testable import Conduit class SOAPEnvelopeFactoryTests: XCTestCase { func testProducesSOAPBodyElements() { let sut = SOAPEnvelopeFacto...
apache-2.0
mohamede1945/quran-ios
Quran/AudioDownloadsNavigationController.swift
1
1453
// // AudioDownloadsNavigationController.swift // Quran // // Created by Mohamed Afifi on 4/17/17. // // Quran for iOS is a Quran reading application for iOS. // Copyright (C) 2017 Quran.com // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Publi...
gpl-3.0
omondigeno/ActionablePushMessages
PushedActionableMessages/DodoDistrib.swift
1
78403
// // Dodo // // A message bar for iOS. // // https://github.com/marketplacer/Dodo // // This file was automatically generated by combining multiple Swift source files. // // ---------------------------- // // DodoAnimation.swift // // ---------------------------- import UIKit /// A closure that is called for anima...
apache-2.0
justindarc/firefox-ios
Account/FxAState.swift
2
13469
/* 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 FxA import Shared import SwiftyJSON // The version of the state schema we persist. let S...
mpl-2.0
tomasharkema/R.swift
Sources/RswiftCore/ResourceTypes/Storyboard.swift
1
9853
// // Storyboard.swift // R.swift // // Created by Mathijs Kadijk on 09-12-15. // From: https://github.com/mac-cain13/R.swift // License: MIT License // import Foundation private let ElementNameToTypeMapping = [ "viewController": Type._UIViewController, "tableViewCell": Type(module: "UIKit", name: "UITableVi...
mit
samburnstone/SwiftStudyGroup
Swift Language Guide Playgrounds/SwiftQuickstart.playground/Sources/SupportCode.swift
1
203
// // This file (and all other Swift source files in the Sources directory of this playground) will be precompiled into a framework which is automatically made available to SwftQuickstart.playground. //
mit
Zewo/Data
Package.swift
1
1424
// Package.swift // // The MIT License (MIT) // // Copyright (c) 2015 Zewo // // 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
ps2/rileylink_ios
MinimedKitTests/Messages/FindDeviceMessageBodyTests.swift
1
932
// // FindDeviceMessageBodyTests.swift // RileyLink // // Created by Pete Schwamb on 3/7/16. // Copyright © 2016 Pete Schwamb. All rights reserved. // import XCTest @testable import MinimedKit class FindDeviceMessageBodyTests: XCTestCase { func testValidFindDeviceMessage() { let message = Pum...
mit
rymcol/Linux-Server-Side-Swift-Benchmarking
KituraPress/Sources/IndexHandler.swift
1
1701
#if os(Linux) import Glibc #else import Darwin #endif struct IndexHandler { func generateContent() -> String { var post = "No matching post was found" var finalContent = "<section id=\"content\"><div class=\"container\"><div class=\"row\"><div class=\"banner center-block\"><div><img src=\"/img/ba...
apache-2.0
utahiosmac/jobs
Sources/JobContext.swift
2
653
// // JobContext.swift // Jobs // import Foundation public struct JobContext: Observable { private let state: JobState internal init(state: JobState) { self.state = state } public var isCancelled: Bool { return state.isCancelled } public func add(observer: Observer) { ...
mit
davidcairns/IntroToXcodeGA
DCDrawingStore.swift
1
1187
// // DCDrawingStore.swift // Drawr // // Created by David Cairns on 5/17/15. // Copyright (c) 2015 David Cairns. All rights reserved. // import UIKit public class DCDrawingStore { static let sharedInstance = DCDrawingStore() var images: [UIImage] private let kCachedImagesKey = "kCachedImagesKey" init() {...
mit
tutsplus/iOSFromScratch-AutoLayoutBasics
Auto Layout/ViewController.swift
1
510
// // ViewController.swift // Auto Layout // // Created by Bart Jacobs on 16/12/15. // Copyright © 2015 Envato Tuts+. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the vi...
bsd-2-clause
grahamgilbert/munki-dnd
MSC DND/AppDelegate.swift
1
1732
// // AppDelegate.swift // MSC DND // // Created by Graham Gilbert on 05/07/2015. // Copyright (c) 2015 Graham Gilbert. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet weak var window: NSWindow! let statusItem = NSStatusBar.systemStat...
apache-2.0
CaueAlvesSilva/DropDownAlert
DropDownAlert/DropDownAlert/ExampleViewController/ExampleViewController.swift
1
3893
// // ExampleViewController.swift // DropDownAlert // // Created by Cauê Silva on 06/06/17. // Copyright © 2017 Caue Alves. All rights reserved. // import Foundation import UIKit // MARK: Enum for button pressed enum ButtonPressed: Int { case success case custom case fail } class ExampleViewControll...
mit
SwiftGen/SwiftGen
Sources/SwiftGenCLI/Config/Config+Example.swift
1
4023
// // SwiftGen // Copyright © 2022 SwiftGen // MIT Licence // extension Config { public static func example(versionForDocLink: String, commentAllLines: Bool = true) -> String { var content = exampleYAMLContent(version: versionForDocLink) if commentAllLines { // Comment all lines, except empty lines. ...
mit
mfitzpatrick79/BidHub-iOS
AuctionApp/CategoryVC/CategoryViewController.swift
1
3608
// // CategoryViewController.swift // AuctionApp // // Created by Michael Fitzpatrick on 5/28/17. // Copyright © 2017 fitz.guru. All rights reserved. // import Foundation import UIKit protocol CategoryViewControllerDelegate { func categoryViewControllerDidFilter(_ viewController: CategoryViewController, onCat...
apache-2.0
roambotics/swift
validation-test/compiler_crashers_fixed/01476-swift-lexer-getlocforendoftoken.swift
65
690
// 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
TrustWallet/trust-wallet-ios
Trust/Transfer/Types/DAppRequster.swift
1
140
// Copyright DApps Platform Inc. All rights reserved. import Foundation struct DAppRequester { let title: String? let url: URL? }
gpl-3.0
jdkelley/Udacity-OnTheMap-ExampleApps
TheMovieManager-v2/TheMovieManager/BorderedButton.swift
2
2649
// // BorderedButton.swift // MyFavoriteMovies // // Created by Jarrod Parkes on 1/23/15. // Copyright (c) 2015 Udacity. All rights reserved. // import UIKit // MARK: - BorderedButton: Button class BorderedButton: UIButton { // MARK: Properties // constants for styling and configuration let dar...
mit
toohotz/Alamofire
Tests/TLSEvaluationTests.swift
69
16725
// TLSEvaluationTests.swift // // Copyright (c) 2014–2015 Alamofire Software Foundation (http://alamofire.org/) // // 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, incl...
mit
SergeyVorontsov/SimpleNewsApp
SimpleNewsApp/DataProvider/NewsCache.swift
1
6168
// // NewsCache.swift // Simple News // // Created by Sergey Vorontsov // Copyright (c) 2015 Sergey. All rights reserved. // import Foundation private let NewsListKey = "NewsListKey" private let NewsTextKey = "NewsTextKey" private let LikesKey = "LikesKey" private let PendingLikesKey = "PendingLikesKey" /** * S...
mit
easyui/SwiftMan
SwiftMan/Extension/Foundation/NSObject/NSObject+Man.swift
1
392
// // NSObject+Man.swift // SwiftMan // // Created by yangjun on 16/5/4. // Copyright © 2016年 yangjun. All rights reserved. // import Foundation extension NSObject { /// 类名 public var m_className: String { return type(of: self).m_className } /// 类名 public static var m_classNa...
mit
iOSWizards/AwesomeMedia
Example/Pods/AwesomeCore/AwesomeCore/Classes/Model/QuestMediaContent.swift
1
934
// // QuestMediaContent.swift // AwesomeCore // // Created by Leonardo Vinicius Kaminski Ferreira on 15/05/19. // import Foundation public struct QuestMediaContent: Codable { public let contentAsset: QuestAsset? public let coverAsset: QuestAsset? public let position: Int? public let title: Str...
mit
huonw/swift
test/Serialization/noinline.swift
4
1446
// RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_noinline.swift // RUN: llvm-bcanalyzer %t/def_noinline.swiftmodule | %FileCheck %s // RUN: %target-swift-frontend -emit-sib -I %t %s -o %t/noinline.sib // RUN: %target-sil-opt -performance-linker %t/noinline.sib -I %t | %FileCh...
apache-2.0
huonw/swift
test/expr/edge-contraction/paren-expr.swift
66
116
// RUN: %target-typecheck-verify-swift let x = [1,2,3] func fun() -> Float { return 1 + (x.count == 1 ? 0 : 21) }
apache-2.0
tgu/HAP
Sources/HAP/Endpoints/pairSetup().swift
1
4573
import Cryptor import func Evergreen.getLogger import Foundation import SRP fileprivate let logger = getLogger("hap.pairSetup") fileprivate typealias Session = PairSetupController.Session fileprivate let SESSION_KEY = "hap.pair-setup.session" fileprivate enum Error: Swift.Error { case noSession } // swiftlint:dis...
mit
kysonyangs/ysbilibili
Pods/SwiftDate/Sources/SwiftDate/Date+Components.swift
5
18652
// // SwiftDate, Full featured Swift date library for parsing, validating, manipulating, and formatting dates and timezones. // Created by: Daniele Margutti // Main contributors: Jeroen Houtzager // // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated...
mit
Jnosh/swift
test/Driver/driver-compile.swift
3
5075
// RUN: rm -rf %t && mkdir -p %t // RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s 2>&1 > %t.simple.txt // RUN: %FileCheck %s < %t.simple.txt // RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -sdk %S/../Inputs/clang-importer-sdk -Xfrontend -foo -Xfrontend -bar -Xl...
apache-2.0
fellipecaetano/Democracy-iOS
Pods/RandomKit/Sources/RandomKit/Extensions/Swift/UnicodeScalar+RandomKit.swift
1
4506
// // UnicodeScalar+RandomKit.swift // RandomKit // // The MIT License (MIT) // // Copyright (c) 2015-2017 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...
mit
cszwdy/Genome
Genome.playground/Sources/Logging.swift
2
248
public var loggers: [ErrorType -> Void] = [defaultLogger] private func defaultLogger(error: ErrorType) { print(error) } internal func logError(error: ErrorType) -> ErrorType { loggers.forEach { $0(error) } return error }
mit
karwa/swift-corelibs-foundation
Foundation/NSConcreteValue.swift
3
6283
// 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
rporzuc/FindFriends
FindFriends/ManagedObjectSubclasses/Messages+CoreDataProperties.swift
1
710
// // Messages+CoreDataProperties.swift // FindFriends // // Created by MacOSXRAFAL on 09/11/17. // Copyright © 2017 MacOSXRAFAL. All rights reserved. // import Foundation import CoreData extension Messages { @nonobjc public class func fetchRequest() -> NSFetchRequest<Messages> { return NSFetchReque...
gpl-3.0
sufan/dubstepocto
Shared/Models/TVImageModel.swift
1
163
// // TVImageModel.swift // Potpourri // // Created by sufan on 8/19/20. // struct TVImageModel: Decodable { let medium: String let original: String }
mit
knorrium/MemeMe
MemeMe/SentMemesTableViewController.swift
1
2255
// // SentMemesTableViewController.swift // MemeMe // // Created by Felipe Kuhn on 10/16/15. // Copyright © 2015 Knorrium. All rights reserved. // import UIKit class SentMemesTableViewController: UIViewController, UITableViewDataSource { @IBOutlet var tableView: UITableView! let appDelegate = UIAppl...
mit
SSamanta/SSNetworking
DemoClient/DemoClient/ViewController.swift
1
644
// // ViewController.swift // DemoClient // // Created by Susim Samanta on 20/05/15. // Copyright (c) 2015 Susim Samanta. All rights reserved. // import UIKit import SSHTTPClient class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let client = SSHTTPClie...
mit