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 |
|---|---|---|---|---|---|
TonnyTao/HowSwift | Funny Swift.playground/Pages/associated_object.xcplaygroundpage/Contents.swift | 1 | 432 | import Foundation
class MyClass { }
extension MyClass {
private static var titleKey: UInt8 = 0
var title: String? {
get {
return objc_getAssociatedObject(self, &Self.titleKey) as? String
}
set {
objc_setAssociatedObject(self, &Self.titleKey, newValue, .OBJC... | mit |
Rep2/IRSocket | SimpleSocketExample/SimpleSocketExample/main.swift | 1 | 602 | //
// main.swift
// SimpleSocketExample
//
// Created by Rep on 12/14/15.
// Copyright © 2015 Rep. All rights reserved.
//
import Foundation
// Creates UDP socket
if let socket = IRSocket(domain: AF_INET, type: SOCK_DGRAM, proto: 0){
do{
// Binds socket to OS given address
let addr = IRSockadd... | mit |
TwoRingSoft/SemVer | Vrsnr/File Types/PlistFile.swift | 1 | 1930 | //
// PlistFile.swift
// Vrsnr
//
// Created by Andrew McKnight on 7/9/16.
// Copyright © 2016 Two Ring Software. All rights reserved.
//
import Foundation
public struct PlistFile {
public let path: String
}
extension PlistFile: File {
public func getPath() -> String {
return path
}
p... | apache-2.0 |
skylib/SnapImagePicker | SnapImagePicker/ImagePicker/Presenter/SnapImagePickerEventHandlerProtocol.swift | 1 | 489 | import UIKit
protocol SnapImagePickerEventHandlerProtocol: class {
var cameraRollAccess: Bool { get set }
func viewWillAppearWithCellSize(_ cellSize: CGSize)
func albumImageClicked(_ index: Int) -> Bool
func numberOfItemsInSection(_ section: Int) -> Int
func presentCell(_ cell: ImageCell, atIndex: ... | bsd-3-clause |
auiom/DYZB | 斗鱼/斗鱼/AppDelegate.swift | 1 | 2172 | //
// AppDelegate.swift
// 斗鱼
//
// Created by 王文发 on 2016/12/27.
// Copyright © 2016年 王文发. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions ... | mit |
VolodymyrShlikhta/InstaClone | InstaClone/SignInViewController.swift | 1 | 2700 | //
// SignInViewController.swift
// InstaClone
//
// Created by Relorie on 6/4/17.
// Copyright © 2017 Relorie. All rights reserved.
//
import UIKit
import FirebaseAuth
import SVProgressHUD
class SignInViewController: UIViewController {
@IBOutlet weak var passwordTextField: UITextField!
@IBOutlet weak var... | mit |
thankmelater23/MyFitZ | MyFitZ/DetailedViewController.swift | 1 | 26584 |
// DetailedViewController.swift
// myFitz
//
// Created by Andre Villanueva on 1/13/15.
// Copyright (c) 2015 BangBangStudios. All rights reserved.
//
import UIKit
import CRToast
//import DKChainableAnimationKit
//import Crashlytics
//MARK: - DetailedViewController Class
class DetailedViewController: UIViewCont... | mit |
Shvier/Dota2Helper | Dota2Helper/Dota2Helper/Global/Network/DHNetworkRequestManager.swift | 1 | 4017 | //
// DHNetworkRequestManager.swift
// Dota2Helper
//
// Created by Shvier on 9/19/16.
// Copyright © 2016 Shvier. All rights reserved.
//
import UIKit
enum RequestType {
case POST
case GET
case DEFAULT
}
class DHNetworkRequestManager: NSObject {
static let sharedInstance = DHNetworkRequestManag... | apache-2.0 |
marcusellison/lil-twitter | lil-twitter/ContainerViewController.swift | 1 | 7883 | //
// ContainerViewController.swift
// lil-twitter
//
// Created by Marcus J. Ellison on 5/31/15.
// Copyright (c) 2015 Marcus J. Ellison. All rights reserved.
//
import UIKit
enum SlideOutState {
case BothCollapsed
case LeftPanelExpanded
case RightPanelExpanded
}
class ContainerViewController: UIVi... | mit |
teamVCH/sway | sway/RecordingControlView.swift | 1 | 2974 | //
// RecordingControlView.swift
// AudioTest
//
// Created by Christopher McMahon on 10/16/15.
// Copyright © 2015 codepath. All rights reserved.
//
import UIKit
protocol RecordingControlViewDelegate {
func setBackingAudio(view: RecordingControlView, url: NSURL)
func startRecording(view: RecordingCo... | mit |
adamnemecek/AudioKit | Tests/AudioKitTests/ValidatedMD5s.swift | 1 | 4667 | import AVFoundation
import XCTest
extension XCTestCase {
func testMD5(_ buffer: AVAudioPCMBuffer) {
let localMD5 = buffer.md5
let name = self.description
XCTAssertFalse(buffer.isSilent)
XCTAssert(validatedMD5s[name] == buffer.md5, "\nFAILEDMD5 \"\(name)\": \"\(localMD5)\",")
}
}... | mit |
aryehToDog/DYZB | DYZB/DYZB/Class/Home/View/WKAmuseMenuViewCell.swift | 1 | 1898 | //
// WKAmuseMenuViewCell.swift
// DYZB
//
// Created by 阿拉斯加的狗 on 2017/9/3.
// Copyright © 2017年 阿拉斯加的🐶. All rights reserved.
//
import UIKit
fileprivate let kGameViewCellId = "kGameViewCellId"
class WKAmuseMenuViewCell: UICollectionViewCell {
var anchorGroupModel: [WKAnchorGroup]? {
d... | apache-2.0 |
marekhac/WczasyNadBialym-iOS | WczasyNadBialym/WczasyNadBialym/ViewControllers/Service/ServiceList/ServiceListViewController.swift | 1 | 2512 | //
// ServiceListViewController.swift
// WczasyNadBialym
//
// Created by Marek Hać on 26.04.2017.
// Copyright © 2017 Marek Hać. All rights reserved.
//
import UIKit
import SVProgressHUD
class ServiceListViewController: UITableViewController {
let backgroundImageName = "background_blue"
// these va... | gpl-3.0 |
AynurGaliev/Books-Shop | Sources/App/Models/Credential.swift | 1 | 2936 | import Vapor
import Fluent
import Foundation
final class Credential: Model {
private static let tokenTime: TimeInterval = 86400
//MARK: - Attributes
var id: Node?
var password: String
var login: String
var expiration_date: String?
var token: String?
//MARK: - Relationship... | mit |
blkbrds/intern09_final_project_tung_bien | MyApp/Model/Schema/CartItem.swift | 1 | 491 | //
// CartItem.swift
// MyApp
//
// Created by AST on 8/9/17.
// Copyright © 2017 Asian Tech Co., Ltd. All rights reserved.
//
import Foundation
import RealmS
import RealmSwift
final class CartItem: Object {
dynamic var id = 0
dynamic var name = ""
dynamic var thumbnailImage = ""
dynamic var deta... | mit |
teambition/SwipeableTableViewCell | SwipeableTableViewCellExample/BackgroundViewExampleViewController.swift | 1 | 5193 | //
// BackgroundViewExampleViewController.swift
// SwipeableTableViewCellExample
//
// Created by 洪鑫 on 16/6/5.
// Copyright © 2016年 Teambition. All rights reserved.
//
import UIKit
import SwipeableTableViewCell
class BackgroundViewExampleViewController: UITableViewController {
fileprivate(set) var pushEnable... | mit |
fe9lix/Muon | MuonTests/FeedParserSpec.swift | 2 | 2117 | import Quick
import Nimble
import Muon
let feed = "<rss><channel></channel></rss>"
class FeedParserSpec: QuickSpec {
override func spec() {
var subject : FeedParser! = nil
describe("Initializing a feedparser with empty string") {
beforeEach {
subject = FeedParser(strin... | mit |
pritidesai/incubator-openwhisk-wskdeploy | tests/src/integration/runtimetests/src/hello.swift | 4 | 1015 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | apache-2.0 |
shoheiyokoyama/Gemini | Example/Gemini/ViewControllers/RollRotationViewController.swift | 1 | 4464 | import UIKit
import Gemini
final class RollRotationViewController: UIViewController {
@IBOutlet private weak var collectionView: GeminiCollectionView! {
didSet {
let nib = UINib(nibName: cellIdentifier, bundle: nil)
collectionView.register(nib, forCellWithReuseIdentifier: cellIdenti... | mit |
crossroadlabs/Boilerplate | Tests/BoilerplateTests/CollectionsTests.swift | 1 | 2124 | //
// CollectionsTests.swift
// Boilerplate
//
// Created by Daniel Leping on 3/6/16.
// Copyright © 2016 Crossroad Labs, LTD. All rights reserved.
//
import XCTest
import Foundation
import Result
@testable import Boilerplate
/*
* Test coming from issue https://github.com/crossroadlabs/Boilerplate/issues/7
* I... | apache-2.0 |
digipost/ios | Digipost/InvoiceBankViewController.swift | 1 | 4218 | //
// Copyright (C) Posten Norge AS
//
// 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 agr... | apache-2.0 |
JohnSundell/SwiftKit | Tests/NumberTests.swift | 1 | 1279 | import XCTest
class NumberTests: XCTestCase {
func testFractionalValue() {
XCTAssertEqual(Double(7.5).fractionalValue, 0.5)
XCTAssertEqual(Double(7).fractionalValue, 0)
}
func testRoundedValueWithDecimalCount() {
XCTAssertEqual(1.12021.roundedValueWithDecimalCount(2), 1.12)
... | mit |
ZakariyyaSv/LYNetwork | LYNetwork/Source/LYBatchRequestAgent.swift | 1 | 2080 | //
// LYBatchRequestAgent.swift
//
// Copyright (c) 2017 LYNetwork https://github.com/ZakariyyaSv/LYNetwork
//
// 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, inc... | mit |
meninsilicium/apple-swifty | JSON.playground/contents.swift | 1 | 1873 | //: # Swifty.JSON
import Swift
import Swifty
import Foundation
import Darwin
//: # JSON examples
//: A json as a string
let json_string = "{ \"coordinate\" : { \"latitude\" : 46.2050295, \"longitude\" : 6.1440885, \"city\" : \"Geneva\" }, \"source\" : \"string\" }"
//: ## Initialization
//: with a raw string o... | mpl-2.0 |
zvonler/PasswordElephant | external/github.com/apple/swift-protobuf/Tests/SwiftProtobufTests/unittest_swift_reserved_ext.pb.swift | 2 | 14385 | // DO NOT EDIT.
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: unittest_swift_reserved_ext.proto
//
// For information on using the generated types, please see the documenation:
// https://github.com/apple/swift-protobuf/
// Protos/unittest_swift_reserved_ext.proto - test ... | gpl-3.0 |
bitboylabs/selluv-ios | selluv-ios/selluv-ios/Classes/Base/Service/Network/BBS3.swift | 1 | 3543 | //
// BBS3
//
// creds = AmazonCredentials(...)
// data = NSData()
// uploader = ElloS3(credentials: credentials, data: data)
// .onSuccess() { (response : NSData) in }
// .onFailure() { (error : NSError) in }
// // NOT yet supported:
// //.onProgress() { (progress : Float) in }
// .start()
import Foundatio... | mit |
stripe/stripe-ios | Tests/Tests/LinkStubs.swift | 1 | 3424 | //
// LinkStubs.swift
// StripeiOS Tests
//
// Created by Ramon Torres on 3/31/22.
// Copyright © 2022 Stripe, Inc. All rights reserved.
//
import Foundation
@testable@_spi(STP) import Stripe
@testable@_spi(STP) import StripeCore
@testable@_spi(STP) import StripePaymentSheet
@testable@_spi(STP) import StripePayme... | mit |
CodaFi/swift-compiler-crashes | fixed/24080-llvm-errs.swift | 9 | 200 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
struct B<T where T:b{class B<T
| mit |
imobilize/Molib | Molib/Classes/Networking/DownloadManager/DownloaderOperation.swift | 1 | 2884 | import Foundation
protocol DownloaderOperationDelegate {
func downloaderOperationDidUpdateProgress(progress: Float, forTask: DownloaderTask)
func downloaderOperationDidStartDownload(forTask: DownloaderTask)
func downloaderOperationDidFailDownload(withError: Error, forTask: DownloaderTask)
func download... | apache-2.0 |
austinzheng/swift-compiler-crashes | crashes-duplicates/08248-swift-sourcemanager-getmessage.swift | 11 | 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
for {
func d {
class c {
enum B {
class
case ,
| mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/06856-swift-archetypebuilder-resolvearchetype.swift | 11 | 214 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
struct c<T : B<T>
class B<T where T.e : B<T>
| mit |
tapwork/WikiLocation | WikiManager/WikiArticle.swift | 1 | 1496 | //
// WikiArticle.swift
// WikiLocation
//
// Created by Christian Menschel on 29.06.14.
// Copyright (c) 2014 enterprise. All rights reserved.
//
import Foundation
public class WikiArticle : NSObject {
//Mark: - Properties
public let distance:String!
public let identifier:Int!
public let lat... | mit |
tbaranes/SwiftyUtils | Tests/Extensions/Foundation/NSLayoutConstraint/NSLayoutConstraintExtensionTests.swift | 1 | 1755 | //
// Created by Tom Baranes on 25/04/16.
// Copyright © 2016 Tom Baranes. All rights reserved.
//
import XCTest
import SwiftyUtils
final class NSLayoutConstraintExtensionTests: XCTestCase {
private var view: SwiftyView!
private var superview: SwiftyView!
override func setUp() {
super.setUp()
... | mit |
LiskUser1234/SwiftyLisk | Lisk/Multisignature/MultisignatureAPI.swift | 1 | 6352 | /*
The MIT License
Copyright (C) 2017 LiskUser1234
- Github: https://github.com/liskuser1234
Please vote LiskUser1234 for delegate to support this project.
For donations:
- Lisk: 6137947831033853925L
- Bitcoin: 1NCTZwBJF7ZFpwPeQKiSgci9r2pQV3G7RG
Permission is hereby granted, free of charge, to any pers... | mit |
kdw9/TIY-Assignments | MuttCutts/MuttCutts/MapViewController.swift | 1 | 1669 | //
// ViewController.swift
// MuttCutts
//
// Created by Keron Williams on 10/28/15.
// Copyright © 2015 The Iron Yard. All rights reserved.
//
import UIKit
import MapKit
import CoreLocation
class MapViewController: UIViewController
{
@IBOutlet weak var mapView: MKMapView!
override func viewDidL... | cc0-1.0 |
hollance/swift-algorithm-club | Fixed Size Array/FixedSizeArray.playground/Contents.swift | 3 | 1151 | //: Playground - noun: a place where people can play
/*
An unordered array with a maximum size.
Performance is always O(1).
*/
struct FixedSizeArray<T> {
private var maxSize: Int
private var defaultValue: T
private var array: [T]
private (set) var count = 0
init(maxSize: Int, defaultValue: T) {
sel... | mit |
nkirby/Humber | _lib/HMGithub/_src/Realm/GithubOverviewItem.swift | 1 | 741 | // =======================================================
// HMGithub
// Nathaniel Kirby
// =======================================================
import Foundation
import RealmSwift
// =======================================================
public class GithubOverviewItem: Object {
public dynamic var itemID =... | mit |
hffmnn/Swiftz | SwiftzTests/ThoseSpec.swift | 2 | 575 | //
// ThoseSpec.swift
// swiftz
//
// Created by Robert Widmann on 1/19/15.
// Copyright (c) 2015 TypeLift. All rights reserved.
//
import XCTest
import Swiftz
class ThoseSpec : XCTestCase {
func testThose() {
let this = Those<String, Int>.this("String")
let that = Those<String, Int>.that(1)
let both = Tho... | bsd-3-clause |
apple/swift | validation-test/compiler_crashers_fixed/01192-swift-constraints-constraintsystem-gettypeofmemberreference.swift | 65 | 726 | // 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 |
iosexample/LearnSwift | YourFirstiOSApp/MyApp/MyAppTests/MyAppTests.swift | 1 | 906 | //
// MyAppTests.swift
// MyAppTests
//
// Created by Dong on 16/7/16.
//
//
import XCTest
@testable import MyApp
class MyAppTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}... | apache-2.0 |
KyoheiG3/RxSwift | Tests/RxCocoaTests/DelegateProxyTest+UIKit.swift | 1 | 19132 | //
// DelegateProxyTest+UIKit.swift
// Tests
//
// Created by Krunoslav Zaher on 12/5/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
import UIKit
@testable import RxCocoa
@testable import RxSwift
import XCTest
// MARK: Protocols
@objc protocol UITableViewDelegateSubclass
:... | mit |
imzyf/99-projects-of-swift | 031-stopwatch/031-stopwatch/ViewController.swift | 1 | 3284 | //
// ViewController.swift
// 031-stopwatch
//
// Created by moma on 2018/3/28.
// Copyright © 2018年 yifans. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
// MARK: - UI components
@IBOutlet weak var timerLabel: UILabel!
@IBOutlet weak var lapTimerLabel: UILabel!
... | mit |
SuPair/firefox-ios | Client/Application/LeanplumIntegration.swift | 1 | 15188 | /* 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 AdSupport
import Shared
import Leanplum
private let LPAppIdKey = "LeanplumAppId"
private... | mpl-2.0 |
orta/RxSwift | RxSwift/RxSwift/Observables/Implementations/Switch.swift | 1 | 4221 | //
// Switch.swift
// Rx
//
// Created by Krunoslav Zaher on 3/12/15.
// Copyright (c) 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
class Switch_<ElementType> : Sink<ElementType>, ObserverType {
typealias Element = Observable<ElementType>
typealias SwitchState = (
subscription: ... | mit |
airbnb/lottie-ios | Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift | 3 | 1504 | //
// PathNode.swift
// lottie-swift
//
// Created by Brandon Withrow on 1/16/19.
//
import CoreGraphics
import Foundation
// MARK: - ShapeNodeProperties
final class ShapeNodeProperties: NodePropertyMap, KeypathSearchable {
// MARK: Lifecycle
init(shape: Shape) {
keypathName = shape.name
path = Node... | apache-2.0 |
fengzhihao123/FZHProjectInitializer | FZHProjectInitializer/FZHTabBarController/FZHCommonDeclare.swift | 1 | 258 | //
// FZHCommonDeclare.swift
// Demo
//
// Created by 冯志浩 on 2017/3/9.
// Copyright © 2017年 FZH. All rights reserved.
//
import Foundation
let SCREEN_WIDTH = UIScreen.main.bounds.size.width
let SCREEN_HEIGHT = UIScreen.main.bounds.size.height
| mit |
codeOfRobin/ShadowKit | TestingModalPresentation/TestingModalPresentation/ViewController.swift | 1 | 5805 | //
// ViewController.swift
// TestingModalPresentation
//
// Created by Mayur on 05/04/17.
// Copyright © 2017 Mayur. All rights reserved.
//
import UIKit
import UIKit
class CardPresentationController: UIPresentationController {
let tappableDismissView: UIView
override init(presentedViewController: UIView... | mit |
longsirhero/DinDinShop | DinDinShopDemo/DinDinShopDemo/Utili/UIView+HUD.swift | 1 | 1731 | //
// UIView+HUD.swift
// DinDinShopDemo
//
// Created by longsirHERO on 2017/9/1.
// Copyright © 2017年 WingChingYip(https://longsirhero.github.io) All rights reserved.
//
import Foundation
import UIKit
import SVProgressHUD
extension UIView {
func showWarning(words:String) -> Void {
Disp... | mit |
CaueAlvesSilva/DropDownAlert | DropDownAlert/DropDownAlert/DropDownView/DropDownView.swift | 1 | 3005 | //
// DropDownView.swift
// DropDownAlert
//
// Created by Cauê Silva on 06/06/17.
// Copyright © 2017 Caue Alves. All rights reserved.
//
import Foundation
import UIKit
class DropDownView: UIView {
@IBOutlet weak var iconImageView: UIImageView!
@IBOutlet weak var messageLabel: UILabel!
priv... | mit |
scottrhoyt/Jolt | Jolt/Source/FloatingTypeExtensions/FloatingTypeFFTExtensions.swift | 1 | 2345 | //
// FloatingTypeFFTExtensions.swift
// Jolt
//
// Created by Scott Hoyt on 9/10/15.
// Copyright © 2015 Scott Hoyt. All rights reserved.
//
import Accelerate
// TODO: Write FFT Tests
extension Double : VectorFFT {
static public func fft(input: [Double]) -> [Double] {
var real = [Double](input... | mit |
chatspry/rubygens | RubyGensTests/ObjectSnapshotSpec.swift | 1 | 1033 | //
// ObjectSnapshotSpec.swift
// RubyGensTests
//
// Created by Tyrone Trevorrow on 13/07/2015.
// Copyright © 2015 Chatspry. All rights reserved.
//
import XCTest
import Quick
import Nimble
class ObjectSnapshotSpec: QuickSpec {
override func spec() {
describe("snapshottable objects") {
... | mit |
nchitale/em-power | Empower/Card.swift | 1 | 693 | //
// Card.swift
// Empower
//
// Created by Nandini on 7/20/16.
// Copyright © 2016 Empower. All rights reserved.
//
import UIKit
class Card {
// MARK: Properties
var name: String
var photo: UIImage?
var backgroundText: NSAttributedString
var subfield: String
// MARK: Initializ... | mit |
alafighting/NetworkForSwift | NetworkForSwift/Stream.swift | 1 | 5749 | /*
* Released under the MIT License (MIT), http://opensource.org/licenses/MIT
*
* Copyright (c) 2014 Kåre Morstøl, NotTooBad Software (nottoobadsoftware.com)
*
* Contributors:
* Kåre Morstøl, https://github.com/kareman - initial API and implementation.
*/
import Foundation
// TODO: get encoding from environmental var... | gpl-2.0 |
mshhmzh/firefox-ios | Client/Frontend/Browser/ContextMenuHelper.swift | 4 | 4576 | /* 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 WebKit
protocol ContextMenuHelperDelegate: class {
func contextMenuHelper(contextMenuHelper: ContextMe... | mpl-2.0 |
mozilla-mobile/firefox-ios | Shared/NSUserDefaultsPrefs.swift | 2 | 5096 | // 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
open class NSUserDefaultsPrefs: Prefs {
fileprivate let prefixWithDot: String
fileprivate l... | mpl-2.0 |
drawRect/Instagram_Stories | InstagramStories/Source/ImageStorer/IGImageRequestable.swift | 1 | 1776 | //
// IGSetImage.swift
// InstagramStories
//
// Created by Boominadha Prakash on 02/04/19.
// Copyright © 2019 DrawRect. All rights reserved.
//
import Foundation
import UIKit
public typealias ImageResponse = (IGResult<UIImage, Error>) -> Void
protocol IGImageRequestable {
func setImage(urlString: String, p... | mit |
amonshiz/CoorinatorKit | CoordinatorKit_iOSTests/CoordinatorKit_iOSTests.swift | 1 | 1033 | //
// CoordinatorKit_iOSTests.swift
// CoordinatorKit_iOSTests
//
// Created by Andrew Monshizadeh on 12/19/15.
// Copyright © 2015 Andrew Monshizadeh. All rights reserved.
//
import XCTest
@testable import CoordinatorKit_iOS
class CoordinatorKit_iOSTests: XCTestCase {
override func setUp() {
sup... | mit |
ioscreator/ioscreator | IOSStepperTutorial/IOSStepperTutorial/ViewController.swift | 1 | 622 | //
// ViewController.swift
// IOSStepperTutorial
//
// Created by Arthur Knopper on 04/02/2019.
// Copyright © 2019 Arthur Knopper. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var valueLabel: UILabel!
@IBOutlet weak var stepper: UIStepper!
@IBActio... | mit |
callam/Heimdall.swift | HeimdallTests/OAuthAccessTokenSpec.swift | 5 | 6737 | import Argo
import Heimdall
import Nimble
import Quick
import Result
class OAuthAccessTokenSpec: QuickSpec {
override func spec() {
describe("-copy") {
let accessToken = OAuthAccessToken(accessToken: "accessToken",
tokenType: "tokenType",
... | apache-2.0 |
CrazyZhangSanFeng/BanTang | BanTang/BanTang/Classes/Home/Model/搜索/BTSearchListModel.swift | 1 | 408 | //
// BTSearchListModel.swift
// BanTang
//
// Created by 张灿 on 16/6/20.
// Copyright © 2016年 张灿. All rights reserved.
// "搜索界面" 的 "清单" 列表 数据模型
import UIKit
import MJExtension
class BTSearchListModel: NSObject {
/** 标题 */
var name: String = ""
/** 英文标题 */
var en_name: String = ""
/*... | apache-2.0 |
alex-alex/Ingress-for-Watch | Ingress/ViewController.swift | 1 | 476 | //
// ViewController.swift
// Ingreess
//
// Created by Alex Studnicka on 10/06/15.
// Copyright © 2015 Alex Studnicka. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically... | mit |
nsagora/validation-toolkit | Examples.playground/Sources/FormError.swift | 1 | 1817 | import Foundation
// MARK: - Definition
public enum Form {
public enum Username: Error {
case missing
case invalid(String)
}
public enum Password: Error {
case missingLowercase
case missingUppercase
case missingDigits
case missingSpecialChars
... | mit |
1738004401/Swift3.0-- | SwiftCW/SwiftCW/Views/Home/SWHomeViewControllers.swift | 1 | 3494 | //
// SWHomeViewControllers.swift
// SwiftCW
//
// Created by YiXue on 17/3/16.
// Copyright © 2017年 赵刘磊. All rights reserved.
//
import UIKit
import SnapKit
import AFNetworking
class SWHomeViewControllers:BaseViewController {
let tableView:UITableView = {
let tableView = UITableView()
/... | mit |
andrebocchini/SwiftChattyOSX | SwiftChattyOSX/Protocols/Reusable.swift | 1 | 331 | //
// Reusable.swift
// SwiftChattyOSX
//
// Created by Andre Bocchini on 2/12/16.
// Copyright © 2016 Andre Bocchini. All rights reserved.
//
protocol Reusable {
static var identifier: String { get }
}
extension Reusable {
static var identifier: String {
return String(Self.self) + "Identifier"... | mit |
wj2061/ios7ptl-swift3.0 | ch22-KVC/KVO/KVO/KVCTableViewController.swift | 1 | 2931 | //
// KVCTableViewController.swift
// KVO
//
// Created by wj on 15/11/29.
// Copyright © 2015年 wj. All rights reserved.
//
import UIKit
class KVCTableViewController: UITableViewController {
dynamic var now:Date = Date()
var timer : Timer?
override func viewDidLoad() {
super.viewDidLoad()
... | mit |
mmrmmlrr/ModelsTreeKit | JetPack/Disposable.swift | 1 | 563 | //
// Disposable.swift
// ModelsTreeKit
//
// Created by aleksey on 05.06.16.
// Copyright © 2016 aleksey chernish. All rights reserved.
//
import Foundation
public protocol Disposable: class {
func dispose()
@discardableResult func deliverOnMainThread() -> Disposable
@discardableResult func autodispose(... | mit |
jay18001/brickkit-ios | Example/Source/Examples/Interactive/HideBrickViewController.swift | 1 | 3746 | //
// HideBrickViewController.swift
// BrickKit
//
// Created by Ruben Cagnie on 6/16/16.
// Copyright © 2016 Wayfair LLC. All rights reserved.
//
import BrickKit
class HideBrickViewController: BrickApp.BaseBrickController {
override class var brickTitle: String {
return "Hide Bricks"
}
overr... | apache-2.0 |
wokalski/Hourglass | Hourglass/State.swift | 1 | 2020 | import Foundation
import EventKit
typealias TaskIndex = [TaskID : Task]
struct EventLogTarget {
let calendar: EKCalendar
let eventStore: EKEventStore
}
struct State {
let currentSession: Session?
let tasks: TaskIndex
let selected: IndexPath?
let logTarget: EventLogTarget?
static let... | mit |
practicalswift/swift | stdlib/public/core/ContiguousArrayBuffer.swift | 3 | 23693 | //===----------------------------------------------------------------------===//
//
// 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 |
debugsquad/metalic | metalic/Model/Edit/MEditItemCrop.swift | 1 | 301 | import UIKit
class MEditItemCrop:MEditItem
{
init()
{
super.init(icon:#imageLiteral(resourceName: "assetEditCrop").withRenderingMode(UIImageRenderingMode.alwaysTemplate))
}
override func selected(controller:CHomeEdit)
{
controller.viewEdit.cropMode()
}
}
| mit |
steelwheels/KiwiScript | KiwiShell/Source/KHShellConverter.swift | 1 | 3030 | /**
* @file KHShellConverter.swift
* @brief Define KHShellConverter class
* @par Copyright
* Copyright (C) 2020 Steel Wheels Project
*/
import KiwiLibrary
import CoconutShell
import CoconutData
import Foundation
public func KHCompileShellStatement(statements stmts: Array<KHStatement>) -> Array<KHStatement>
{
... | lgpl-2.1 |
mightydeveloper/swift | test/1_stdlib/RangeTraps.swift | 9 | 2182 | //===--- RangeTraps.swift -------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... | apache-2.0 |
mightydeveloper/swift | validation-test/compiler_crashers/26720-void.swift | 9 | 293 | // 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
struct B<T where h.h.d:d{struct c{struct g<T{{{}}
protocol a
class b:a
| apache-2.0 |
huonw/swift | test/IDE/importProtocols.swift | 70 | 638 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -I %t -I %S/Inputs/custom-modules -print-module -module-to-print=ImportedProtocols.SubModule -source-filename %s > %t.printed.txt
// RUN: %FileCheck %s < %t.printed.txt
// REQUIRES: objc_interop
// CHECK: protocol ImportedProtocolBase : NSObjectProtocol {... | apache-2.0 |
noppoMan/aws-sdk-swift | Sources/Soto/Services/CognitoIdentityProvider/CognitoIdentityProvider_Error.swift | 1 | 11841 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2020 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for t... | apache-2.0 |
sumitokamoi/Runnable | Example/Runnable/AppDelegate.swift | 1 | 2170 | //
// AppDelegate.swift
// Runnable
//
// Created by sumisonic on 03/23/2017.
// Copyright (c) 2017 sumisonic. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLa... | mit |
typelift/Focus | Tests/FocusTests/SetterSpec.swift | 1 | 2288 | //
// SetterSpec.swift
// Focus
//
// Created by Ryan Peck on 3/18/16.
// Copyright © 2016-2016 TypeLift. All rights reserved.
//
import XCTest
import SwiftCheck
import Focus
#if SWIFT_PACKAGE
import Operadics
#endif
class SetterSpec : XCTestCase {
func testSetterLaws() {
property("preserves-identity... | mit |
austinzheng/swift | validation-test/compiler_crashers_fixed/25789-swift-lexer-leximpl.swift | 65 | 456 | // 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 |
7ulipa/ReactiveDataSource | ReactiveDataSource/ReactiveTableViewDataSource.swift | 1 | 202 | //
// ReactiveTableViewDataSource.swift
// Pods
//
// Created by Tulipa on 12/11/2016.
//
//
import Foundation
class ReactiveTableViewDataSource: ReactiveDataSource, UItableViewDataSource {
}
| mit |
jyxia/nostalgic-pluto-ios | nostalgic-pluto-ios/AppDelegate.swift | 1 | 6163 | //
// AppDelegate.swift
// nostalgic-pluto-ios
//
// Created by Jinyue Xia on 7/18/15.
// Copyright (c) 2015 Jinyue Xia. All rights reserved.
//
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UI... | mit |
FolioReader/FolioReaderKit | Source/FolioReaderAddHighlightNote.swift | 1 | 9481 | //
// FolioReaderAddHighlightNote.swift
// FolioReaderKit
//
// Created by ShuichiNagao on 2018/05/06.
//
import UIKit
import RealmSwift
class FolioReaderAddHighlightNote: UIViewController {
var textView: UITextView!
var highlightLabel: UILabel!
var scrollView: UIScrollView!
var containerView = UI... | bsd-3-clause |
PairOfNewbie/BeautifulDay | BeautifulDay/Controller/Album/AlbumDetailController.swift | 1 | 8869 | //
// AlbumDetailController.swift
// BeautifulDay
//
// Created by DaiFengyi on 16/5/4.
// Copyright © 2016年 PairOfNewbie. All rights reserved.
//
import UIKit
private let albumZanCellIdentifier = "AlbumZanCell"
private let albumCommentCellIdentifier = "AlbumCommentCell"
class AlbumDetailController: UITableViewC... | mit |
HabitRPG/habitrpg-ios | HabitRPG/Views/LoginEntryView.swift | 1 | 3878 | //
// LoginEntryView.swift
// Habitica
//
// Created by Phillip on 27.07.17.
// Copyright © 2017 HabitRPG Inc. All rights reserved.
//
import Foundation
@IBDesignable
class LoginEntryView: UIView, UITextFieldDelegate {
@IBInspectable var placeholderText: String? {
didSet {
if let text... | gpl-3.0 |
domenicosolazzo/practice-swift | HealthKit/Observing changes in HealthKit/Observing changes in HealthKitTests/Observing_changes_in_HealthKitTests.swift | 1 | 959 | //
// Observing_changes_in_HealthKitTests.swift
// Observing changes in HealthKitTests
//
// Created by Domenico on 08/05/15.
// Copyright (c) 2015 Domenico. All rights reserved.
//
import UIKit
import XCTest
class Observing_changes_in_HealthKitTests: XCTestCase {
override func setUp() {
super.se... | mit |
abarisain/skugga | Apple/iOS/Skugga/Configuration.swift | 1 | 1291 | //
// Configuration.swift
// skugga
//
// Created by Arnaud Barisain-Monrose on 08/02/2015.
//
//
import Foundation
import UpdAPI
private struct LocalConsts
{
static let EndpointKey = "user.endpoint"
static let SecretKey = "user.secret"
static let GroupId = "group.fr.nlss.skugga"
}
struct Configuratio... | apache-2.0 |
blockchain/My-Wallet-V3-iOS | Modules/Platform/Sources/PlatformKit/Coincore/CryptoCurrency+Account.swift | 1 | 742 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import Localization
import MoneyKit
extension CryptoCurrency {
private typealias LocalizedString = LocalizationConstants.Account
public var defaultInterestWalletName: String {
LocalizedString.myInterestWallet
}
public var default... | lgpl-3.0 |
blockchain/My-Wallet-V3-iOS | Modules/FeatureDashboard/Sources/FeatureDashboardUI/Components/WalletActionCell/WalletActionTableViewCell.swift | 1 | 1790 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import PlatformUIKit
import UIKit
final class WalletActionTableViewCell: UITableViewCell {
// MARK: - Properties
var presenter: WalletActionCellPresenter! {
didSet {
badgeImageView.viewModel = presenter.badgeImageViewModel
... | lgpl-3.0 |
aojet/Aojet | Sources/Aojet/threading/WeakReferenceCompat.swift | 1 | 449 | //
// WeakReferenceCompat.swift
// Aojet
//
// Created by Qihe Bian on 6/6/16.
// Copyright © 2016 Qihe Bian. All rights reserved.
//
protocol WeakReferenceCompat {
associatedtype T: AnyObject
func get() -> T?
}
class AnyWeakReferenceCompat<T: AnyObject>: WeakReferenceCompat {
private let _get: () -> (T?)
... | mit |
wilfreddekok/Antidote | Antidote/StaticBackgroundView.swift | 1 | 602 | // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
import UIKit
/**
View with static background color. Is used to prevent views inside UITableViewCell from blinkin... | mpl-2.0 |
sundeepgupta/foodup | FoodUp/AppDelegate.swift | 1 | 709 | import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
self.setupTrackVC()
return true
}
private fun... | unlicense |
pvbaleeiro/movie-aholic | movieaholic/movieaholic/recursos/view/ExploreHeaderView.swift | 1 | 14967 | //
// ExploreHeaderView.swift
// movieaholic
//
// Created by Victor Baleeiro on 24/09/17.
// Copyright © 2017 Victor Baleeiro. All rights reserved.
//
import UIKit
//-------------------------------------------------------------------------------------------------------------
// MARK: Delegate
//-----------------... | mit |
JarlRyan/IOSNote | Swift/City/City/ViewController.swift | 1 | 2863 | //
// ViewController.swift
// City
//
// Created by bingoogol on 14-6-15.
// Copyright (c) 2014年 bingoogol. All rights reserved.
//
import UIKit
class ViewController: UIViewController,UIPickerViewDelegate,UIPickerViewDataSource {
var _province:NSArray!
var _city:NSMutableDictionary!
... | apache-2.0 |
bravelocation/daysleft | DaysLeft WatchKit Widget/DaysLeftWatchWidget.swift | 1 | 1069 | //
// DaysLeft_WatchKit_Widget.swift
// DaysLeft WatchKit Widget
//
// Created by John Pollard on 22/09/2022.
// Copyright © 2022 Brave Location Software. All rights reserved.
//
import WidgetKit
import SwiftUI
/// Watch extension widget
@main struct DaysLeftWatchWidget: Widget {
/// Widget kind
let kind:... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.