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
wordlessj/Bamboo
Source/Auto/Expression/ConstraintItem.swift
1
2854
// // ConstraintItem.swift // Bamboo // // Copyright (c) 2017 Javier Zhang (https://wordlessj.github.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, incl...
mit
EricHein/Swift3.0Practice2016
00.ScratchWork/ParseServerStarterProject/ParseStarterProject/FeedTableViewCell.swift
1
632
// // FeedTableViewCell.swift // ParseStarterProject-Swift // // Created by Eric H on 26/12/2016. // Copyright © 2016 Parse. All rights reserved. // import UIKit class FeedTableViewCell: UITableViewCell { @IBOutlet var postedImage: UIImageView! @IBOutlet var usernameLabel: UILabel! @IBOutlet var mess...
gpl-3.0
swizzlr/swift-redis
Sources/RedisIntegrationTests/Environment.swift
1
361
struct Environment { static let Environment = env static let IP = env["REDIS_PORT_6379_TCP_ADDR"]! static let Port = Int(env["REDIS_PORT_6379_TCP_PORT"]!)! } func newContext() -> redisContext { return redisConnect(ip: Environment.IP, port: Environment.Port) } private let env = NSProcessInfo.processInfo().envir...
bsd-3-clause
Sajjon/Zeus
Zeus/Extensions/NSObject_Extension.swift
1
301
// // NSObject_Extension.swift // Zeus // // Created by Cyon Alexander on 22/08/16. // Copyright © 2016 com.cyon. All rights reserved. // import Foundation extension NSObject { class var className: String { return NSStringFromClass(self).components(separatedBy: ".").last! } }
apache-2.0
2RKowski/two-blobs
TwoBlobs/Observable+JustCompleted.swift
1
383
// // Observable+JustCompleted.swift // TwoBlobs // // Created by Lësha Turkowski on 13/01/2017. // Copyright © 2017 Amblyofetus. All rights reserved. // import RxSwift extension Observable { static func justCompleted<E>() -> Observable<E> { return Observable<E>.create { o in o.onCompleted...
mit
inket/MacSymbolicator
MacSymbolicatorTests/TestProject/iOSCrashingTest/AppDelegate.swift
1
525
// // AppDelegate.swift // iOSCrashingTest // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? } class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() CrashClass.pleaseCrash() } } class Cr...
gpl-2.0
iCrany/iOSExample
iOSExample/Module/HitTestExample/View/ContainView.swift
1
1008
// // ContainView.swift // iOSExample // // Created by iCrany on 2017/7/18. // Copyright (c) 2017 iCrany. All rights reserved. // import Foundation import UIKit class ContainView: UIView { required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } overrid...
mit
HabitRPG/habitrpg-ios
Habitica Models/Habitica Models/Tasks/WeekRepeatProtocol.swift
1
462
// // WeekRepeatProtocol.swift // Habitica Models // // Created by Phillip Thelen on 26.03.18. // Copyright © 2018 HabitRPG Inc. All rights reserved. // import Foundation @objc public protocol WeekRepeatProtocol { var monday: Bool { get set } var tuesday: Bool { get set } var wednesday: Bool { get set...
gpl-3.0
izrie/DKImagePickerController
DKImagePickerController/DKPopoverViewController.swift
1
6556
// // DKPopoverViewController.swift // DKImagePickerController // // Created by ZhangAo on 15/6/27. // Copyright (c) 2015年 ZhangAo. All rights reserved. // import UIKit class DKPopoverViewController: UIViewController { class func popoverViewController(viewController: UIViewController, fromView: UIView) {...
mit
blockchain/My-Wallet-V3-iOS
Modules/FeatureNFT/Sources/FeatureNFTUI/Localization+FeatureNFTUI.swift
1
1770
// Copyright © Blockchain Luxembourg S.A. All rights reserved. import Localization // swiftlint:disable all // MARK: Groups extension LocalizationConstants { public enum NFT { public enum Screen { public enum List {} public enum Empty {} public enum Detail {} ...
lgpl-3.0
WickedColdfront/Slide-iOS
Pods/ImagePickerSheetController/ImagePickerSheetController/ImagePickerSheetController/Sheet/SheetController.swift
1
8665
// // SheetController.swift // ImagePickerSheetController // // Created by Laurin Brandner on 27/08/15. // Copyright © 2015 Laurin Brandner. All rights reserved. // import UIKit let sheetInset: CGFloat = 10 class SheetController: NSObject { fileprivate(set) lazy var sheetCollectionView: UICollectionView...
apache-2.0
kstaring/swift
validation-test/compiler_crashers_fixed/28084-swift-modulefile-loadallmembers.swift
11
444
// 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
mnorth719/BoneKit
Example/Tests/ObservableTests.swift
1
6092
// // ObservableTests.swift // BoneKit_Tests // // Created by Matt North on 10/5/17. // Copyright © 2017 CocoaPods. All rights reserved. // import XCTest import BoneKit class ObservableTests: XCTestCase { override func setUp() { super.setUp() } func testObservableStruct() { ...
mit
uasys/swift
test/SourceKit/Refactoring/syntactic-rename.swift
2
5104
struct AStruct { /** A description - parameter a: The first param */ func foo(a: Int) -> Int { let z = a + 1 #if true return z #else return z + 1 #endif } } let aStruct = AStruct() let x = aStruct.foo(a: 2) let y = AStruct.foo(aStruct)(a: 3) print(x + 2) print(y + 1) let s = "a...
apache-2.0
BridgeTheGap/KRMathInputView
Example/Pods/KRMathInputView/KRMathInputView/Classes/MathInputView.swift
1
4789
// // MathInputView.swift // TestScript // // Created by Joshua Park on 31/01/2017. // Copyright © 2017 Knowre. All rights reserved. // import UIKit @objc public protocol MathInputViewDelegate: NSObjectProtocol { func mathInputView(_ MathInputView: MathInputView, didParse ink: [Any], latex: String) func m...
mit
FunctioningFunctionalist/ramda.swift
Example/Tests/appendTests.swift
1
550
import Foundation import XCTest import Ramda class AppendTests: XCTestCase { func testAppend() { XCTAssertEqual(R.append([3], [1, 2]), [1, 2, 3]) } func testAppendAsFunction() { let lastDigits = R.append([7, 8, 9]) let numberSequence = lastDigits([1, 2, 3]) XCTAssertEqual...
mit
TouchInstinct/LeadKit
TIUIKitCore/Sources/ConfigurableView/ConfigurableView.swift
1
1244
// // Copyright (c) 2020 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
voyages-sncf-technologies/Collor
Example/Tests/CollectionDelegateTest.swift
1
6911
// // CollectionDelegateTest.swift // Collor // // Created by Guihal Gwenn on 10/05/17. // Copyright (c) 2017-present, Voyages-sncf.com. All rights reserved.. All rights reserved. // import XCTest @testable import Collor import UIKit class CollectionDelegateTest: XCTestCase { var collectionView:UICollect...
bsd-3-clause
MarcoSantarossa/SwiftyToggler
Source/FeaturesList/ViewModel/FeaturesListViewModelProtocol.swift
1
1665
// // FeaturesListViewModelProtocol.swift // // Copyright (c) 2017 Marco Santarossa (https://marcosantadev.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...
mit
vector-im/vector-ios
Riot/Modules/CrossSigning/Banners/CrossSigningSetupBannerCell.swift
1
2793
/* Copyright 2020 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
apache-2.0
vector-im/vector-ios
Riot/Modules/ServiceTerms/Modal/Modal/ServiceTermsModalTableHeaderView.swift
1
1704
// // Copyright 2021 New Vector Ltd // // 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 ...
apache-2.0
vector-im/vector-ios
Riot/Managers/Serialization/SerializationServiceType.swift
2
818
/* Copyright 2019 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
apache-2.0
vector-im/vector-ios
Riot/Modules/Room/TimelineCells/Styles/Bubble/Cells/Poll/Incoming/PollIncomingWithoutSenderInfoBubbleCell.swift
1
825
// // Copyright 2021 New Vector Ltd // // 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 ...
apache-2.0
vector-im/vector-ios
Riot/Modules/SetPinCode/EnterPinCode/EnterPinCodeViewModel.swift
1
8979
// File created from ScreenTemplate // $ createScreen.sh SetPinCode/EnterPinCode EnterPinCode /* Copyright 2020 New Vector Ltd 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.apac...
apache-2.0
jjochen/photostickers
MessagesExtension/Extensions/String+Extensions.swift
1
378
// // String+Extensions.swift // PhotoStickers // // Created by Jochen Pfeiffer on 08.04.17. // Copyright © 2017 Jochen Pfeiffer. All rights reserved. // import Foundation extension String { var localized: String { return localized() } func localized(comment: String = "") -> String { ...
mit
algolia/algoliasearch-client-swift
Tests/AlgoliaSearchClientTests/Unit/Settings/SnippetTests.swift
1
364
// // SnippetTests.swift // // // Created by Vladislav Fitc on 12.03.2020. // import Foundation import XCTest @testable import AlgoliaSearchClient class SnippetTests: XCTestCase { func testCoding() throws { try AssertEncodeDecode(Snippet(attribute: "attr"), "attr") try AssertEncodeDecode(Snippet(attrib...
mit
tjw/swift
benchmark/single-source/SequenceAlgos.swift
3
4407
//===--- ArrayAppend.swift ------------------------------------------------===// // // 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
opensourcegit/CustomCollectionViews
Pod/Classes/BaseCollectionView.swift
1
4661
// // BaseCollectionView.swift // Pods // // Created by opensourcegit on 18/09/15. // // import Foundation import UIKit public class BaseCollectionView: UICollectionView { var data = [BaseCollectionSectionModel](); public func setCollectionViewData(data:[BaseCollectionSectionModel]){ self...
mit
vl4298/mah-income
Mah Income/Mah Income/ApplicationManager.swift
1
361
// // ApplicationManager.swift // Mah Income // // Created by Van Luu on 4/22/17. // Copyright © 2017 Van Luu. All rights reserved. // import Foundation class ApplicationManager { static let dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateFormat = "E, d MMM yyyy HH:mm:s...
mit
mxcl/swift-package-manager
Sources/PackageModel/Manifest.swift
2
2344
/* This source file is part of the Swift.org open source project Copyright 2015 - 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 Swift project author...
apache-2.0
shahmishal/swift
test/SourceKit/CursorInfo/cursor_swiftinterface.swift
3
3433
import SomeModule func test() { print(SomeFunc()) let wrapper = XWrapper(x: 43) print(wrapper.x) } // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/modulecache) // // Tests CursorInfo works with modules imported via their .swiftinterface file. // Setup builds a module interface (.swiftinterface) and doc...
apache-2.0
roambotics/swift
test/AutoDiff/SILOptimizer/property_wrappers.swift
2
3572
// RUN: %target-swift-frontend -emit-sil -verify %s %S/Inputs/nontrivial_loadable_type.swift // REQUIRES: asserts // Test property wrapper differentiation coverage for a variety of property // types: trivial, non-trivial loadable, and address-only. import DifferentiationUnittest // MARK: Property wrappers @property...
apache-2.0
cohena100/Shimi
Carthage/Checkouts/RxRealm/Example/RxRealm_Tests/RxRealmResultsTests.swift
1
7075
// // RxRealmCollectionsTests.swift // RxRealm // // Created by Marin Todorov on 4/30/16. // Copyright © 2016 CocoaPods. All rights reserved. // import XCTest import RxSwift import RealmSwift import RxRealm import RxTest class RxRealmResultsTests: XCTestCase { fileprivate func realmInMemory(_ name: Stri...
mit
crazypoo/PTools
Pods/Appz/Appz/Appz/Apps/Behance.swift
1
1394
// // Behance.swift // Appz // // Created by Mariam AlJamea on 6/17/17. // Copyright © 2017 kitz. All rights reserved. // public extension Applications { public struct Behance: ExternalApplication { public typealias ActionType = Applications.Behance.Action public let sche...
mit
swift-lang/swift-k
tests/language/working/003-string-array-assignment.swift
2
43
string greetings[] = ["how","are","you"];
apache-2.0
Bleichroder/MaxWall-Controller-on-IOS
MaxWall/MaxWall/Message.swift
1
429
// // Message.swift // MaxWall // // Created by HeHe on 16/6/17. // Copyright © 2016年 HeHe. All rights reserved. // import UIKit class Message { var name: String var content: String var id: String var status: String init?(name: String, content: String, id: String, status: String){ ...
apache-2.0
austinfitzpatrick/SwiftVG
SwiftVG/SwiftSVG/Views/SVGVectorImage Categories/SVGVectorImage+ColorReplacement.swift
1
1468
// // SVGVectorImage+ColorReplacement.swift // SwiftVG // // Created by Austin Fitzpatrick on 3/20/15. // Copyright (c) 2015 austinfitzpatrick. All rights reserved. // import UIKit protocol SVGColorReplaceable { func replaceColor(color: UIColor, withColor replacement:UIColor, includeGradients:Bool) } extens...
mit
manchan/JinsMeme-Swift-Sample
JinsMemeDemo/ViewController.swift
1
5984
// // ViewController.swift // JinsMemeDemo // // Created by matz on 2015/11/21. // Copyright © 2015年 matz. All rights reserved. // import UIKit final class ViewController: UITableViewController, MEMELibDelegate { var peripherals:NSMutableArray! var dataViewCtl:MMDataViewController! var detailViewCtl:...
mit
AllisonWangJiaoJiao/KnowledgeAccumulation
02-UIViewFormXIB(POP)/UIViewFormXIB(POP)/NibLoadable.swift
1
610
// // NibLoadable.swift // UIViewFormXIB(POP) // // Created by Allison on 2017/4/27. // Copyright © 2017年 Allison. All rights reserved. // import UIKit protocol NibLoadable { } extension NibLoadable where Self : UIView { //在协议里面不允许定义class 只能定义static static func loadFromNib(_ nibname: String? = nil) ...
mit
baberthal/SwiftCoreExt
CoreExtensions/DebugMacros.swift
1
1750
// // DebugMacros.swift // CoreExtensions // // Created by Morgan Lieberthal on 12/5/15. // Copyright © 2015 Morgan Lieberthal. All rights reserved. // import Foundation import Cocoa public func dLog(@autoclosure message: () -> String, filename: String = __FILE__, function: StaticString = __FUNCTION__, line: UInt...
mit
yhyuan/WeatherMap
WeatherAroundUs/WeatherAroundUs/UIViewExtension.swift
9
1542
// // UIViewExtension.swift // PaperPlane // // Created by Kedan Li on 15/2/27. // Copyright (c) 2015年 Yu Wang. All rights reserved. // import QuartzCore import UIKit extension UIView { func rotate360Degrees(duration: CFTimeInterval = 1.0, completionDelegate: AnyObject? = nil) { let rotateAnimation = C...
apache-2.0
archembald/avajo-ios
avajo-ios/ProfileViewController.swift
1
1636
// // ProfileViewController.swift // avajo-ios // // Created by Alejandro Alvarez Martinez on 05/10/2015. // Copyright (c) 2015 Archembald. All rights reserved. // import UIKit class ProfileViewController: UIViewController { @IBOutlet var imgProfilePicture: UIImageView! @IBOutlet var labelUsername: U...
agpl-3.0
dadederk/WeatherTV
Weather/Weather/Controllers/Weather/WeatherParserProtocol.swift
1
285
// // WeatherServiceParserProtocol.swift // Weather // // Created by Daniel Devesa Derksen-Staats on 20/02/2016. // Copyright © 2016 Desfici. All rights reserved. // import Foundation protocol WeatherParserProtocol { static func parseWeather(json: AnyObject) -> Weather? }
apache-2.0
wikimedia/wikipedia-ios
Wikipedia/Code/InsertMediaImageInfoView.swift
3
3115
import UIKit final class InsertMediaImageInfoView: UIView { @IBOutlet private weak var titleLabel: UILabel! @IBOutlet private weak var descriptionLabel: UILabel! @IBOutlet private weak var licenseLabel: UILabel! @IBOutlet private weak var licenseView: LicenseView! @IBOutlet private weak var moreInf...
mit
P0ed/FireTek
Source/Scenes/Space/HUD/HUDWeaponNode.swift
1
1407
import SpriteKit final class WeaponNode: SKNode { static let cooldownSize = CGSize(width: 32, height: 8) let cooldownNode: CooldownNode let roundsLabel: SKLabelNode override init() { cooldownNode = CooldownNode() roundsLabel = SKLabelNode() roundsLabel.horizontalAlignmentMode = .right roundsLabel.vertic...
mit
YevhenHerasymenko/SwiftGroup1
Operations/Operations/MyResultOperation.swift
1
307
// // MyResultOperation.swift // Operations // // Created by Yevhen Herasymenko on 19/07/2016. // Copyright © 2016 Yevhen Herasymenko. All rights reserved. // import UIKit class MyResultOperation: NSOperation { var result: Int? override func main() { print(result) } }
apache-2.0
IvanVorobei/Sparrow
sparrow/modules/request-permissions/managers/presenters/universal/controls/SPRequestPermissionTwiceControl.swift
1
8016
// The MIT License (MIT) // Copyright © 2017 Ivan Vorobei (hello@ivanvorobei.by) // // 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
peferron/algo
EPI/Hash Tables/Find the smallest subarray covering all values/swift/test.swift
1
1028
import Darwin let tests: [(article: [String], search: Set<String>, digest: Range<Int>?)] = [ ( article: [], search: ["abc"], digest: nil ), ( article: ["abc"], search: ["def"], digest: nil ), ( article: ["abc"], search: ["abc"], ...
mit
hyperoslo/CollectionAnimations
Demo/Demo/ViewController.swift
1
3933
import UIKit class ViewController: UIViewController { var data1 = ["First 1", "First 2"] var data2 = ["Second 1", "Second 2"] var items = [String]() lazy var collectionView: UICollectionView = { [unowned self] in var frame = self.view.bounds frame.origin.y += 20 var collectionView = UICollectio...
mit
daisysomus/SideMenuAnimation
SideMenuAnimation/ViewController.swift
1
641
// // ViewController.swift // SideMenuAnimation // // Created by liaojinhua on 2017/2/9. // Copyright © 2017年 Daisy. All rights reserved. // import UIKit class ViewController: UIViewController { weak var rootVC:RootViewController? override func viewDidLoad() { super.viewDidLoad() // ...
apache-2.0
machelix/MVCarouselCollectionView
MVCarouselCollectionView/MVCarouselCellScrollView.swift
1
4098
// MVCarouselCellScrollView.swift // // Copyright (c) 2015 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 limi...
mit
64characters/Telephone
TelephoneTests/CallHistoryViewSpy.swift
1
920
// // CallHistoryViewSpy.swift // Telephone // // Copyright © 2008-2016 Alexey Kuznetsov // Copyright © 2016-2022 64 Characters // // Telephone 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 v...
gpl-3.0
remlostime/OOD-Swift
factory/Factory.playground/Contents.swift
1
1497
//: Playground - noun: a place where people can play import Foundation protocol Currency { func symbol() -> String func code() -> String } class US: Currency { func symbol() -> String { return "$" } func code() -> String { return "USD" } } class Euro: Currency { func symbol() -> String { ...
gpl-3.0
Venkat1128/ObjCProblemSet
Examples/Lesson 6/House_Swift_main/House_Swift_main/House.swift
1
494
// // House.swift // House_main_Swift // // Created by Gabrielle Miller-Messner on 5/9/16. // Copyright © 2016 Gabrielle Miller-Messner. All rights reserved. // import Foundation class House { var address = "555 Park Ave" let numberOfBedrooms = 3 var hasHotTub = false var hotTub: HotTub? init...
mit
kay-kim/stitch-examples
todo/ios/Pods/FacebookLogin/Sources/Login/LoginButtonDelegate.swift
19
1647
// Copyright (c) 2016-present, Facebook, Inc. All rights reserved. // // You are hereby granted a non-exclusive, worldwide, royalty-free license to use, // copy, modify, and distribute this software in source code or binary form for use // in connection with the web services and APIs provided by Facebook. // // As with...
apache-2.0
kotdark/Summflower
Summflower/Summflower/SummflowerSegment.swift
2
3756
// // FloraSegment.swift // Flora // // Created by Sameh Mabrouk on 12/24/14. // Copyright (c) 2014 SMApps. All rights reserved. // /* //SummflowerSegment act as a UITableviewCell for this control. It follows the same configuration as a tableview delegate */ import UIKit class SummflowerSegment: UIButton { ...
mit
kay-kim/stitch-examples
todo/ios/Pods/ExtendedJson/ExtendedJson/ExtendedJson/Source/ExtendedJson/BsonArray+ExtendedJson.swift
1
1190
// // BsonArray+ExtendedJson.swift // ExtendedJson // // Created by Jason Flax on 10/4/17. // Copyright © 2017 MongoDB. All rights reserved. // import Foundation extension BSONArray: ExtendedJsonRepresentable { public static func fromExtendedJson(xjson: Any) throws -> ExtendedJsonRepresentable { guard...
apache-2.0
ivasic/Fargo
Fargo/Source/Types/Error.swift
1
2129
// // Error.swift // Fargo // // Created by Ivan Vasic on 01/11/15. // Copyright © 2015 Ivan Vasic. All rights reserved. // import Foundation extension JSON { public enum Error : ErrorType, CustomDebugStringConvertible { case MissingKey(key: JSON.KeyPath.Key, keyPath: JSON.KeyPath) case TypeMi...
mit
rodrigoruiz/SwiftUtilities
SwiftUtilities/Cocoa/UITableView+Extension.swift
1
471
// // UITableView+Extension.swift // SwiftUtilities // // Created by Rodrigo Ruiz on 4/25/17. // Copyright © 2017 Rodrigo Ruiz. All rights reserved. // extension UITableView { public func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath) -> T { guard let cell = dequeueReusableCell(...
mit
forLoveGitHub/Demo
Demo/Demo/SecondViewController.swift
1
863
// // SecondViewController.swift // Demo // // Created by Marlon on 2016/6/30. // Copyright © 2016年 test. All rights reserved. // import UIKit class SecondViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. ...
mit
xmartlabs/Opera
Example/Example/Controllers/RepositoryCommitsController.swift
1
3513
// RepositoryCommitsController.swift // Example-iOS ( https://github.com/xmartlabs/Example-iOS ) // // Copyright (c) 2016 Xmartlabs SRL ( 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"...
mit
phatblat/realm-cocoa
plugin/Templates/file_templates/Realm Model Object.xctemplate/Swift/___FILEBASENAME___.swift
11
355
// // ___FILENAME___ // ___PROJECTNAME___ // // Created by ___FULLUSERNAME___ on ___DATE___. //___COPYRIGHT___ // import Foundation import RealmSwift class ___FILEBASENAMEASIDENTIFIER___: Object { // Specify properties to ignore (Realm won't persist these) // override static func ignoredProperties() -> ...
apache-2.0
adamhartford/PopDatePicker
PopDatePickerTests/PopDatePickerTests.swift
1
922
// // PopDatePickerTests.swift // PopDatePickerTests // // Created by Adam Hartford on 4/22/15. // Copyright (c) 2015 Adam Hartford. All rights reserved. // import Cocoa import XCTest class PopDatePickerTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This...
mit
DouKing/WYListView
WYListViewController/ListViewController/WYListView.swift
1
10947
// // WYListViewController.swift // WYListViewController // // Created by iosci on 2016/10/20. // Copyright © 2016年 secoo. All rights reserved. // import UIKit @objc public protocol WYListViewDataSource { func numberOfSections(in listView: WYListView) -> Int func listView(_ listView: WYListView, numberOfR...
mit
RxSwiftCommunity/RxHttpClient
RxHttpClientTests/NSURLSessionTypeTests.swift
1
815
import XCTest @testable import RxHttpClient class NSURLSessionProtocolTests: XCTestCase { var session: URLSessionType = URLSession(configuration: URLSessionConfiguration.default, delegate: nil, delegateQueue: nil) var url: UR...
mit
wishzhouhe/weibo
SinaWeibo/SinaWeibo/Classes/View(视图和控制器)/Discover/WBDiscoverViewController.swift
1
881
// // WBDiscoverViewController.swift // SinaWeibo // // Created by myzj2004 on 2016/11/15. // Copyright © 2016年 myzj2004. All rights reserved. // import UIKit class WBDiscoverViewController: WBBaseViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup a...
mit
benjaminsnorris/SharedHelpers
Sources/SwipeTransitionInteractionController.swift
1
5745
/* | _ ____ ____ _ | | |‾| ⚈ |-| ⚈ |‾| | | | | ‾‾‾‾| |‾‾‾‾ | | | ‾ ‾ ‾ */ import UIKit class SwipeTransitionInteractionController: UIPercentDrivenInteractiveTransition { var edge: UIRectEdge var gestureRecognizer: UIPanGestureRecognizer weak var transitionContext: UIVie...
mit
ksco/swift-algorithm-club-cn
Bloom Filter/BloomFilter.playground/Contents.swift
1
2168
//: Playground - noun: a place where people can play public class BloomFilter<T> { private var array: [Bool] private var hashFunctions: [T -> Int] public init(size: Int = 1024, hashFunctions: [T -> Int]) { self.array = .init(count: size, repeatedValue: false) self.hashFunctions = hashFunctions } ...
mit
noehou/myDouYuZB
DYZB/DYZB/Classes/Home/View/RecommendCycleView.swift
1
4217
// // RecommendCycleView.swift // DYZB // // Created by Tommaso on 2016/12/12. // Copyright © 2016年 Tommaso. All rights reserved. // import UIKit private let kCycleCellID = "kCycleCellID" class RecommendCycleView: UIView { //MARK:定义属性 var cycleTimer : Timer? var cycleModels : [CycleModel]?{ didS...
mit
the-grid/Disc
Disc/Models/User.swift
1
1684
import Argo import Ogra import Runes /// A user. public struct User { public let app: UUID? public let avatarUrl: URL? public var emailAddress: String public let id: UUID public var name: String public let scopes: [Scope]? public init( app: UUID? = nil, avatarUrl: URL? ...
mit
bremy11/adar_ece477
MapView/MapViewTests/MapViewTests.swift
1
983
// // MapViewTests.swift // MapViewTests // // Created by Tessie McInerney on 2/7/16. // Copyright © 2016 Tessie McInerney. All rights reserved. // import XCTest @testable import MapView class MapViewTests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This me...
gpl-3.0
18775134221/SwiftBase
SwiftTest/SwiftTest/Classes/Main/VC/BaseTabBarVC.swift
2
2733
// // BaseTabBarVC.swift // SwiftTest // // Created by MAC on 2016/12/10. // Copyright © 2016年 MAC. All rights reserved. // import UIKit class BaseTabBarVC: UITabBarController { fileprivate var homeVC: HomeVC? = nil fileprivate var typesVC: TypesVC? = nil fileprivate var shoppingCartVC: ShoppingCartV...
apache-2.0
LoopKit/LoopKit
LoopKitUI/UIAlertController.swift
1
2772
// // UIAlertController.swift // LoopKitUI // // Created by Pete Schwamb on 1/22/19. // Copyright © 2019 LoopKit Authors. All rights reserved. // import Foundation extension UIAlertController { /// Convenience method to initialize an alert controller to display an error /// /// - Parameters: /// ...
mit
wangwugang1314/weiBoSwift
weiBoSwift/weiBoSwiftUITests/weiBoSwiftUITests.swift
1
1241
// // weiBoSwiftUITests.swift // weiBoSwiftUITests // // Created by MAC on 15/11/25. // Copyright © 2015年 MAC. All rights reserved. // import XCTest class weiBoSwiftUITests: XCTestCase { override func setUp() { super.setUp() // Put setup code here. This method is called befor...
apache-2.0
LauraSempere/meme-app
Meme/SentMemesCollectionViewController.swift
1
2644
// // SentMemesCollectionViewController.swift // Meme // // Created by Laura Scully on 1/7/2016. // Copyright © 2016 laura.com. All rights reserved. // import UIKit class SentMemesCollectionViewController: UICollectionViewController { @IBOutlet weak var flowLayout:UICollectionViewFlowLayout! var me...
epl-1.0
ntwf/TheTaleClient
TheTale/Stores/GameInformation/GameInformation.swift
1
1997
// // GameInformation.swift // the-tale // // Created by Mikhail Vospennikov on 14/05/2017. // Copyright © 2017 Mikhail Vospennikov. All rights reserved. // import Foundation struct GameInformation { var accountID: Int var accountName: String var gameVersion: String var staticContent: String var turnDel...
mit
rockgarden/swift_language
Playground/Design-Patterns.playground/Design-Patterns.playground/section-20.swift
1
680
var gameState = GameState() gameState.restoreFromMemento(CheckPoint.restorePreviousState()) gameState.chapter = "Black Mesa Inbound" gameState.weapon = "Crowbar" CheckPoint.saveState(gameState.toMemento()) gameState.chapter = "Anomalous Materials" gameState.weapon = "Glock 17" gameState.restoreFromMemento(CheckPoint....
mit
irealme/ExpandableTableViewController
DemoExpandableTableViewController/DemoCells/DescriptionTableViewCell.swift
1
667
// // DescriptionTableViewCell.swift // DemoExpandableTableViewController // // Created by Enric Macias Lopez on 8/25/15. // Copyright (c) 2015 Enric Macias Lopez. All rights reserved. // import UIKit class DescriptionTableViewCell: UITableViewCell { // MARK: Properties @IBOutlet weak var descriptio...
mit
GreatfeatServices/gf-mobile-app
olivin-esguerra/ios-exam/Pods/RxCocoa/RxCocoa/CocoaUnits/ControlProperty.swift
10
4956
// // ControlProperty.swift // RxCocoa // // Created by Krunoslav Zaher on 8/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import Foundation #if !RX_NO_MODULE import RxSwift #endif /// Protocol that enables extension of `ControlProperty`. public protocol ControlPropertyType : ObservableType,...
apache-2.0
Karumi/BothamUI
Sources/BothamViewDataSource.swift
1
441
// // BothamDataSource.swift // BothamUI // // Created by Davide Mendolia on 03/12/15. // Copyright © 2015 GoKarumi S.L. All rights reserved. // import Foundation public protocol BothamViewDataSource { associatedtype ItemType var items: [ItemType] { get set } } public extension BothamViewDataSource { ...
apache-2.0
ahoppen/swift
test/Parse/metatype_object_conversion.swift
9
985
// RUN: %target-typecheck-verify-swift // REQUIRES: objc_interop class C {} struct S {} protocol NonClassProto {} protocol ClassConstrainedProto : class {} func takesAnyObject(_ x: AnyObject) {} func concreteTypes() { takesAnyObject(C.self) takesAnyObject(S.self) // expected-error{{argument type 'S.Type' expe...
apache-2.0
ahoppen/swift
test/decl/protocol/special/coding/enum_codable_nonconforming_property.swift
13
19899
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown enum NonCodable : Hashable { func hash(into hasher: inout Hasher) {} static func ==(_ lhs: NonCodable, _ rhs: NonCodable) -> Bool { return true } } struct CodableGeneric<T> : Codable { } // Enums whose properties are not all Codable s...
apache-2.0
hirohisa/RxSwift
RxSwift/RxSwift/Observables/Implementations/Filter.swift
15
1793
// // Filter.swift // Rx // // Created by Krunoslav Zaher on 2/17/15. // Copyright (c) 2015 Krunoslav Zaher. All rights reserved. // import Foundation class Where_<O : ObserverType>: Sink<O>, ObserverType { typealias Element = O.Element typealias Parent = Where<Element> let parent: Parent ...
mit
RMizin/PigeonMessenger-project
FalconMessenger/ChatsControllers/IncomingVoiceMessageCell.swift
1
2615
// // IncomingVoiceMessageCell.swift // Pigeon-project // // Created by Roman Mizin on 11/26/17. // Copyright © 2017 Roman Mizin. All rights reserved. // import UIKit import AVFoundation class IncomingVoiceMessageCell: BaseVoiceMessageCell { override func setupViews() { super.setupViews() bubbleView.ad...
gpl-3.0
chrislzm/TimeAnalytics
Time Analytics/TANetClient.swift
1
5958
// // TANetClient.swift // Time Analytics // // Singleton network client interface for Time Analytics. Used by TANetClientConvenience methods to make requests of the Moves REST API. // // Created by Chris Leung on 5/14/17. // Copyright © 2017 Chris Leung. All rights reserved. // import Foundation class TANetClie...
mit
kolyasev/YaftDB
Example/Tests/Tests.swift
1
795
import UIKit import XCTest import YaftDB 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. let db = Cache(path: "") } override func tearDown() { // ...
mit
artsy/eigen
ios/Artsy/View_Controllers/Live_Auctions/LiveAuctionStateManagerSpec.swift
1
5321
import Quick import Nimble import Interstellar @testable import Artsy class LiveAuctionStateManagerSpec: QuickSpec { override func spec() { var subject: LiveAuctionStateManager! var sale: LiveSale! let stubbedJWT = StubbedCredentials.registered.jwt beforeEach { OHHTTPSt...
mit
1aurabrown/eidolon
Kiosk/Bid Fulfillment/PlacingBidViewController.swift
1
8060
import UIKit class PlacingBidViewController: UIViewController { @IBOutlet weak var titleLabel: ARSerifLabel! @IBOutlet var bidDetailsPreviewView: BidDetailsPreviewView! @IBOutlet weak var outbidNoticeLabel: ARSerifLabel! @IBOutlet weak var spinner: Spinner! @IBOutlet weak var bidConfirmationImage...
mit
alexfish/stylize
Stylize.playground/section-1.swift
1
395
// Playground - noun: a place where people can play import Stylize let foregroundStyle = Stylize.foreground(UIColor.red) let kernStyle = Stylize.kern(5) let style = Stylize.compose(foregroundStyle, kernStyle) let label = UILabel(frame: CGRect(x: 0, y: 0, width: 400, height: 50)) let string = NSAtt...
mit
jarocht/iOS-Bootcamp-Summer2015
HW9/GoogleMapsDemo/GoogleMapsDemo/Location.swift
1
481
// // Location.swift // GoogleMapsDemo // // Created by X Code User on 7/21/15. // Copyright (c) 2015 Jonathan Engelsma. All rights reserved. // import Foundation class Location { var company: String var phone: String var lat: Double var long: Double init (company: String, phone: String, ...
gpl-2.0
mitochrome/complex-gestures-demo
apps/GestureRecognizer/Carthage/Checkouts/RxSwift/Tests/RxCocoaTests/NSView+RxTests.swift
20
1100
// // NSView+RxTests.swift // Tests // // Created by Krunoslav Zaher on 12/6/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // import RxSwift import RxCocoa import Cocoa import XCTest final class NSViewTests : RxTest { } extension NSViewTests { func testHidden_True() { let subject = NS...
mit
dn-m/Collections
Collections/SortedDictionary.swift
1
4768
// // SortedDictionary.swift // Collections // // Created by James Bean on 12/23/16. // // /// Ordered dictionary which has sorted `keys`. public struct SortedDictionary<Key, Value>: DictionaryProtocol where Key: Hashable & Comparable { /// Backing dictionary. /// // FIXME: Make `private` in Swift 4 ...
mit
doertydoerk/SlideToUnlock
SlideToUnlock/AppDelegate.swift
1
2089
// // AppDelegate.swift // SlideToUnlock // // Created by Dirk Gerretz on 08/03/2017. // Copyright © 2017 [code2 app];. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinis...
mit
PJayRushton/iOS-CollectionView-Demo
InterestsCollectionViewDemo/JSON+Extras.swift
1
4629
import Foundation public struct JSONParser { public static func JSONObjectWithData(data:NSData) throws -> JSONObject { let obj:Any = try NSJSONSerialization.JSONObjectWithData(data, options: []) return try JSONObject.JSONValue(obj) } public static func JSONObjectArrayWithData(data:NS...
mit
gyro-n/PaymentsIos
GyronPayments/Classes/UI/CardViewController.swift
1
11336
// // CardViewController.swift // Pods // // Created by David Ye on 2017/07/21. // Copyright © 2016 gyron. All rights reserved. // // import UIKit import PromiseKit public protocol CardViewControllerDelegate: class { func created(card: SimpleTransactionToken) func createError(error: Error) } open class C...
mit
radex/swift-compiler-crashes
crashes-fuzzing/22977-swift-mangle-mangler-mangletype.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 class B<T where B:a{let c{""[1 func let d=a
mit
radex/swift-compiler-crashes
crashes-duplicates/15794-swift-parser-skipsingle.swift
11
292
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing enum b { var b { { case { protocol c { struct A { class case , let { { { { { { { [ [ [ [ { ( { { { { { { { { { { { { { d )
mit
radex/swift-compiler-crashes
crashes-fuzzing/08293-swift-typebase-isequal.swift
11
254
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing import CoreData func a { var d[] var d{ class B{ protocol b{ { } func a typealias e:a
mit
moldedbits/firebase-chat-example
Firebase-Chat-Research/Constants.swift
1
465
// // Constants.swift // Firebase-Chat-Research // // Created by Amit kumar Swami on 18/03/16. // Copyright © 2016 moldedbits. All rights reserved. // import Foundation struct Constants { static let FIREBASE_BASE_URL = "https://unlazechatresearch.firebaseio.com" static let BASE_URL = "https://floating-de...
mit
sabarishsekar/MyLogging
MyLogging/MainViewController.swift
1
2036
// // MainViewController.swift // MyLogging // // Created by Sabarish on 9/15/17. // Copyright © 2017 IBM. All rights reserved. // import UIKit @objc public protocol LoginDelegate: class { func submitBtnTapped() } public class MainViewController: UIViewController { @IBOutlet public weak var companyName:...
mit