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 |
|---|---|---|---|---|---|
rondinellimorais/RMExtensionKit | Example/RMExtensionKit/AppDelegate.swift | 1 | 2131 | //
// AppDelegate.swift
// RMExtensionKit
//
// Created by Rondinelli Morais on 10/31/2016.
// Copyright (c) 2016 Rondinelli Morais. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIAp... | mit |
apple/swift-nio | IntegrationTests/tests_04_performance/test_01_resources/test_1000000_asyncwriter.swift | 1 | 1228 | //===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2022 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS... | apache-2.0 |
evgenyneu/walk-to-circle-ios | walk to circleTests/iiDateTests.swift | 1 | 476 | import UIKit
import WalkToCircle
import XCTest
class iiDateTests: XCTestCase {
func testGetDateAsString() {
let date = iiDate.fromYearMonthDay(2072, month: 4, day: 7)!
let result = iiDate.toStringAsYearMonthDay(date)
XCTAssertEqual("2072.4.7", result)
}
func testGetDateFromYearMonthDay() {
let d... | mit |
kevintulod/CascadeKit-iOS | CascadeKit/CascadeKit/Helpers/Extensions/UIScreen+Extras.swift | 1 | 336 | //
// UIScreen+Extras.swift
// CascadeKit
//
// Created by Kevin Tulod on 1/7/17.
// Copyright © 2017 Kevin Tulod. All rights reserved.
//
import UIKit
extension UIScreen {
/// Returns the exact value of one pixel in the current screen's scale
var onePx: CGFloat {
return CGFloat(1)/nativeScal... | mit |
firebase/firebase-ios-sdk | FirebaseMessaging/Apps/AdvancedSample/SampleWatchWatchKitExtension/ExtensionDelegate.swift | 2 | 1718 | // Copyright 2020 Google LLC
//
// 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 ... | apache-2.0 |
fizx/jane | ruby/lib/vendor/grpc-swift/Sources/protoc-gen-swiftgrpc/io.swift | 1 | 1684 | /*
* Copyright 2017, gRPC Authors All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | mit |
indexsky/ShiftPoint | ShiftPoint/ShiftPoint/Bouncer.swift | 2 | 2479 | //
// Bouncer.swift
// ShiftPoint
//
// Created by Ashton Wai on 3/4/16.
// Copyright © 2016 Ashton Wai & Zachary Bebel. All rights reserved.
//
import SpriteKit
class Bouncer : Enemy {
let score: Int = Config.Enemy.Bouncer.BOUNCER_SCORE
let hp: Int = Config.Enemy.Bouncer.BOUNCER_HEALTH
let color: SKC... | mit |
tryswift/trySwiftData | TrySwiftData/ViewModels/SessionViewModel/SessionTypeViewModels/SessionDisplayableTypes/OfficeHoursSessionViewModel.swift | 1 | 1728 | //
// OfficeHoursSessionViewModel.swift
// Pods
//
// Created by Natasha Murashev on 3/23/17.
//
//
struct OfficeHoursSessionViewModel: SessionDisplayable {
private let session: Session
private let dataDefaults: SessionDataDefaults
init?(_ session: Session) {
if session.type == .office... | mit |
adrfer/swift | validation-test/compiler_crashers_fixed/27827-swift-constraints-simplifylocator.swift | 4 | 257 | // RUN: not %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
var:{{let
v{class B<f:d
struct d<f:f.c}}{
| apache-2.0 |
adrfer/swift | validation-test/compiler_crashers_fixed/26451-swift-parser-parsedecl.swift | 13 | 257 | // RUN: not %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
var:{
for h:{
func a{struct Q{
class
case,
| apache-2.0 |
khizkhiz/swift | validation-test/compiler_crashers_fixed/26190-swift-iterabledeclcontext-getmembers.swift | 13 | 299 | // RUN: not %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
{({{{{{{}{{{{{{{}{{{{{{{{{{{}}{{{{{{{{}{{{(({{{}{{{{{[{{}{{{{{func u(){var:{struct a
| apache-2.0 |
ioscreator/ioscreator | IOSPageControlTutorial/IOSPageControlTutorial/AppDelegate.swift | 1 | 1438 | //
// AppDelegate.swift
// IOSPageControlTutorial
//
// Created by Arthur Knopper on 21/01/2020.
// Copyright © 2020 Arthur Knopper. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunch... | mit |
SafeCar/iOS | Pods/CameraEngine/CameraEngine/CameraEngineDeviceInput.swift | 1 | 1590 | //
// CameraEngineDeviceInput.swift
// CameraEngine2
//
// Created by Remi Robert on 01/02/16.
// Copyright © 2016 Remi Robert. All rights reserved.
//
import UIKit
import AVFoundation
public enum CameraEngineDeviceInputErrorType: ErrorType {
case UnableToAddCamera
case UnableToAddMic
}
class CameraEngin... | mit |
nanthi1990/SideMenuController | Project/SideMenuController/SideMenuControllerTests/SideMenuControllerTests.swift | 2 | 938 | //
// SideMenuControllerTests.swift
// SideMenuControllerTests
//
// Created by Teodor Patras on 07.03.15.
// Copyright (c) 2015 Teodor Patras. All rights reserved.
//
import UIKit
import XCTest
class SideMenuControllerTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup... | mit |
LYM-mg/DemoTest | 其他功能/MGImagePickerControllerDemo/Pods/SnapKit/Source/ConstraintMaker.swift | 31 | 7210 | //
// SnapKit
//
// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit
//
// 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 |
aiaio/DesignStudioExpress | DesignStudioExpress/Extensions/RealmSwiftExtension.swift | 1 | 392 | //
// RealmSwiftExtension.swift
// DesignStudioExpress
//
// Created by Kristijan Perusko on 11/16/15.
// Copyright © 2015 Alexander Interactive. All rights reserved.
//
import Foundation
import RealmSwift
extension Results {
// converts the Results object to an array
func toArray<T>(ofType: T.Type) -> [... | mit |
tomterror666/MyLotto | MyLotto/MyLotto/Model/Win.swift | 1 | 2703 | //
// Win.swift
// MyLotto
//
// Created by Andre Heß on 17/04/16.
// Copyright © 2016 Andre Heß. All rights reserved.
//
import UIKit
class Win: NSObject {
var winningDrawingRate:DrawingRate?
var winningNumbers:NSArray?
var winningZusatzZahl:NSInteger
var winningSuperZahl:NSInteger
var guess:Guess
var draw... | mit |
xwu/swift | test/Generics/sr14580.swift | 1 | 1474 | // RUN: %target-typecheck-verify-swift -requirement-machine-protocol-signatures=on
// RUN: %target-swift-frontend -typecheck -debug-generic-signatures -requirement-machine-protocol-signatures=on %s 2>&1 | %FileCheck %s
public protocol ScalarProtocol: ScalarMultiplicative where Self == Scalar {
}
public protocol Scala... | apache-2.0 |
yunuserenguzel/SlidingTabbarController | Example/SlidingTabbarController/ViewController.swift | 1 | 755 | //
// ViewController.swift
// SlidingTabbarExample
//
// Created by Yunus Eren Guzel on 18/02/16.
// Copyright © 2016 yeg. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
let imageView = UIImageView()
convenience init(imageName: String) {
self.init()
imageView.image =... | mit |
ahoppen/swift | test/stdlib/IntervalTraps.swift | 10 | 1853 | //===--- IntervalTraps.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 |
jwieringa/AllIncomeFoods | iOS/SnapFresh/Extensions/CLLocationCoordinate2D+isValid.swift | 3 | 1145 | /*
* Copyright 2015 Marco Abundo, Ysiad Ferreiras, Aaron Bannert, Jeremy Canfield and Michelle Koeth
*
* 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/licens... | apache-2.0 |
Davidde94/StemCode_iOS | StemCode/StemProjectKit/StemGroup.swift | 1 | 3065 | //
// StemGroup.swift
// StemCode
//
// Created by David Evans on 20/04/2018.
// Copyright © 2018 BlackPoint LTD. All rights reserved.
//
import Foundation
import Signals
struct StemGroupCodable: Decodable, Hashable {
let identifier: String
let name: String
let isFolder: Bool
let childGroups: Set<StemGroupCod... | mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/03972-swift-sourcemanager-getmessage.swift | 11 | 246 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
return m(([Void{
[[[[Void{
let end = [Void{
let end = [Void{
{
class
case c,
| mit |
ishepherdMiner/Daily_ui_set | Daily_ui_set/Daily_ui_set/Kit/JABeatView.swift | 1 | 184 | //
// JABeatView.swift
// Daily_ui_set
//
// Created by Jason on 13/12/2016.
// Copyright © 2016 Jason. All rights reserved.
//
import UIKit
class JABeatView: UIView {
}
| mit |
PandaraWen/DJIDemoKit | DJIDemoKit/DDKTableSectionHeader.swift | 1 | 1557 | //
// DDKStartTableSectionHeader.swift
// DJIDemoKitDemo
//
// Created by Pandara on 2017/9/1.
// Copyright © 2017年 Pandara. All rights reserved.
//
import UIKit
import SnapKit
class DDKTableSectionHeader: UITableViewHeaderFooterView {
var titleLabel: UILabel!
override init(reuseIdentifier: String?) ... | mit |
zachmokahn/SUV | Sources/SUV/libUV/Operation/UVTCPConnect.swift | 1 | 55 | import libUV
public let UVTCPConnect = uv_tcp_connect
| mit |
kazuhiro49/StringStylizer | StringStylizer/StringStylizer.swift | 1 | 18974 | //
// StringSerializer.swift
//
// Copyright (c) 2016 Kazuhiro Hayashi
//
// 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 |
tbaranes/IncrementableLabel | IncrementableLabel Example/Example/tvOS Example/ViewController.swift | 2 | 1772 | //
// ViewController.swift
// IncrementableLabel
//
// Created by Tom Baranes on 20/01/16.
// Copyright © 2016 Recisio. All rights reserved.
//
import UIKit
import IncrementableLabel
class ViewController: UIViewController {
// MARK: Properties
@IBOutlet weak var label1: IncrementableLabel!
@IBOu... | mit |
mightydeveloper/swift | validation-test/compiler_crashers/27646-swift-markasobjc.swift | 9 | 294 | // RUN: not --crash %target-swift-frontend %s -parse
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
class d<T where g:C{
struct D{struct d<a
class B{
let _=[a:d<f
let a{b
| apache-2.0 |
Aishwarya-Ramakrishnan/sparkios | Source/Phone/ObjectMap/AlertType.swift | 1 | 1319 | // Copyright 2016 Cisco Systems Inc
//
// 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,... | mit |
Oscareli98/Moya | Demo/DemoTests/MoyaProviderSpec.swift | 2 | 20953 | import Quick
import Moya
import Nimble
import ReactiveCocoa
import RxSwift
class MoyaProviderSpec: QuickSpec {
override func spec() {
describe("valid endpoints") {
describe("with stubbed responses") {
describe("a provider", {
var provider: MoyaProvider<GitHub... | mit |
ashleymills/Keychain.swift | Example/Simple-KeychainSwift/Keychain.swift | 1 | 5545 | //
// KeychainWrapper.swift
// Keychain sample app
//
// Created by Ashley Mills on 17/04/2015.
// Copyright (c) 2015 Joylord Systems Ltd. All rights reserved.
//
import Foundation
// MARK: - *** Public methods ***
public class Keychain {
public class func set(_ value:String, forKey key:String) -> Bool {... | mit |
elegion/ios-Flamingo | Framework/FlamingoTests/NetworkClientReporterCallTests.swift | 1 | 3389 | //
// NetworkClientReporterCallTests.swift
// FlamingoTests
//
// Created by Nikolay Ischuk on 23.01.2018.
// Copyright © 2018 ELN. All rights reserved.
//
import Foundation
import XCTest
import Flamingo
private class MockLogger: Logger {
private(set) var logSended: Bool = false
public func log(_ message... | mit |
Boss-XP/ChatToolBar | BXPChatToolBar/BXPChatToolBar/Classes/BXPChat/BXPChatViewController/view/BXPChatMessageCell.swift | 1 | 9833 | //
// BXPChatMessageCell.swift
// BXPChatToolBar
//
// Created by 向攀 on 17/1/5.
// Copyright © 2017年 Yunyun Network Technology Co,Ltd. All rights reserved.
//
import UIKit
class BXPChatMessageCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
... | apache-2.0 |
AaoIi/AAAlertController | FMAlertController/FMAlertController/FMAlertController.swift | 1 | 14659 | //
// FMAlertController.swift
// FMAlertController
//
// Created by AaoIi on 4/13/16.
// Copyright © 2016 Saad Albasha. All rights reserved.
//
import UIKit
public class FMAlertController: UIViewController {
public enum animationType{
case `default`
case shake
case slideDown
... | mit |
HotCocoaTouch/DeclarativeLayout | Example/DeclarativeLayout/READMEExample/READMEExample.swift | 1 | 2896 | import UIKit
import DeclarativeLayout
class READMEExample: UIViewController {
private lazy var viewLayout = ViewLayout(view: view)
private lazy var stackView = UIStackView()
private lazy var redView = UIView()
private lazy var orangeView = UIView()
private lazy var yellowView = UIView()
privat... | mit |
CPRTeam/CCIP-iOS | Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift | 3 | 2628 | //
// UInt128.swift
//
// Copyright (C) 2014-2017 Marcin Krzyżanowski <marcin@krzyzanowskim.com>
// This software is provided 'as-is', without any express or implied warranty.
//
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to any... | gpl-3.0 |
fsproru/ScoutReport | ScoutReportTests/FakeFuncCall.swift | 1 | 54 | struct FakeFuncCall {
var arguments: [AnyObject]
} | mit |
pyromobile/nubomedia-ouatclient-src | ios/LiveTales/uoat/ViewController.swift | 1 | 20081 | //
// ViewController.swift
// uoat
//
// Created by Pyro User on 4/5/16.
// Copyright © 2016 Zed. All rights reserved.
//
import UIKit
class ViewController: UIViewController, LoginSignupDelegate, ProfileDelegate
{
var user:User!
required init?(coder aDecoder: NSCoder)
{
//Detectar idioma.... | apache-2.0 |
mcdappdev/Vapor-Template | Sources/App/Controllers/API/LoginController.swift | 1 | 1580 | import Vapor
import Foundation
import BCrypt
import AuthProvider
import MySQL
final class LoginController: RouteCollection {
func build(_ builder: RouteBuilder) throws {
builder.version() { build in
build.post("login", handler: login)
}
}
//MARK: - POST /api/v1/login
fu... | mit |
sclark01/Swift_VIPER_Demo | vaporServer/Sources/App/main.swift | 1 | 598 | import Vapor
import Foundation
let drop = Droplet()
let service = PeopleService()
drop.get { req in
let lang = req.headers["Accept-Language"]?.string ?? "en"
return try drop.view.make("welcome", [
"message": Node.string(drop.localization[lang, "welcome", "title"])
])
}
drop.get("list") { req in
... | mit |
PJayRushton/stats | Stats/AddGamesToCalendar.swift | 1 | 1689 | //
// AddGamesToCalendar.swift
// Stats
//
// Created by Parker Rushton on 8/15/17.
// Copyright © 2017 AppsByPJ. All rights reserved.
//
import Foundation
import EventKit
struct AddGamesToCalendar: Command {
var games: [Game]
init(_ games: [Game]) {
self.games = games
}
fun... | mit |
blockchain/My-Wallet-V3-iOS | Blockchain/DIKit/DIKit+Activity.swift | 1 | 1043 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import Combine
import DIKit
import FeatureActivityDomain
import FeatureCardPaymentDomain
// MARK: - Blockchain Module
extension DependencyContainer {
static var blockchainActivity = module {
factory { () -> ActivityCardDataServiceAPI in
... | lgpl-3.0 |
nathan3o4/Top-Movies | Top Movies/Top MoviesUITests/Top_MoviesUITests.swift | 2 | 1254 | //
// Top_MoviesUITests.swift
// Top MoviesUITests
//
// Created by Nathan Ansel on 1/7/16.
// Copyright © 2016 Nathan Ansel. All rights reserved.
//
import XCTest
class Top_MoviesUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method ... | apache-2.0 |
jaylyerly/XLForm | Examples/Swift/Examples/CustomRows/Rating/XLFormRatingCell.swift | 2 | 2165 | // XLFormRatingCell.swift
// XLForm ( https://github.com/xmartlabs/XLForm )
//
// Copyright (c) 2014-2015 Xmartlabs ( http://xmartlabs.com )
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the... | mit |
jjacobson93/RethinkDBSwift | Sources/RethinkDB/Error.swift | 1 | 3832 | public enum ReqlError: Error {
case authError(String)
case compileError(String, [Any], [Any])
case cursorEmpty
case driverError(String)
case typeError(Any, String)
public var localizedDescription: String {
switch self {
case .authError(let e): return e
case .driverError(... | mit |
CD1212/Doughnut | Pods/FeedKit/Sources/FeedKit/Models/Atom/AtomFeed.swift | 2 | 8632 | //
// AtomFeed.swift
//
// Copyright (c) 2017 Nuno Manuel Dias
//
// 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 u... | gpl-3.0 |
wilfreddekok/Antidote | Antidote/ChatGenericFileCellModel.swift | 1 | 744 | // 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
class ChatGenericFileCellModel: ChatMovableDateCellModel {
enum State {
case WaitingCo... | mpl-2.0 |
lorentey/swift | test/SILOptimizer/access_marker_verify_objc.swift | 8 | 4482 | // RUN: %target-swift-frontend -enforce-exclusivity=checked -import-objc-header %S/Inputs/access_marker_verify_objc.h -Onone -emit-silgen -swift-version 4 -parse-as-library %s | %FileCheck %s
// RUN: %target-swift-frontend -enable-verify-exclusivity -enforce-exclusivity=checked -import-objc-header %S/Inputs/access_mark... | apache-2.0 |
zane001/ZMTuan | ZMTuan/Controller/Home/RushViewController.swift | 1 | 4923 | //
// RushViewController.swift
// ZMTuan
//
// Created by zm on 4/17/16.
// Copyright © 2016 zm. All rights reserved.
// 名店抢购的ViewController
import UIKit
class RushViewController: UIViewController, UIWebViewDelegate {
var webView: UIWebView!
var activityView: UIActivityIndicatorView!
var titleLabel:... | mit |
sindanar/PDStrategy | Example/PDStrategy/PDStrategy/ScrollViewController.swift | 1 | 1327 | //
// ScrollViewController.swift
// PDStrategy
//
// Created by Pavel Deminov on 07/01/2018.
// Copyright © 2018 Pavel Deminov. All rights reserved.
//
import UIKit
class ScrollViewController: PDScrollViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional set... | mit |
dnevera/IMProcessing | IMProcessing/Classes/Utils/IMPImage+CGImage.swift | 1 | 499 | //
// IMPImage+CGImage.swift
// IMProcessing
//
// Created by denis svinarchuk on 16.12.15.
// Copyright © 2015 IMetalling. All rights reserved.
//
#if os(iOS)
import UIKit
#else
import Cocoa
extension IMPImage {
var CGImage:CGImageRef?{
get {
var imageRect:CGRect = ... | mit |
zvonicek/ImageSlideshow | Example/Tests/Tests.swift | 3 | 720 | import UIKit
import XCTest
class Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the ... | mit |
ECLabs/CareerUp | CareerUp/SettingSelectTableViewController.swift | 1 | 3117 | import UIKit
class SettingSelectTableViewController: UITableViewController {
var selectedIndex = 0
var loadDelay:NSTimer?
var loadedContent = -1;
var eventArray:[Event] = []
override func viewDidLoad() {
super.viewDidLoad()
EventHandler.sharedInstance().get()
}
fun... | mit |
abertelrud/swift-package-manager | Tests/CommandsTests/PackageToolTests.swift | 2 | 138187 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift open source project
//
// Copyright (c) 2014-2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.... | apache-2.0 |
somedev/DribbbleAPI | Sources/DribbbleAPI/Models/DBTeam.swift | 1 | 2963 | //
// DBTeam.swift
// DribbbleAPI
//
// Created by Eduard Panasiuk on 11/6/16.
// Copyright © 2016 somedev. All rights reserved.
//
import Foundation
public struct DBTeam {
public let id: String
public let name: String
public let username: String
public let htmlURL: URL?
public let avatarUrl: ... | mit |
Pluto-Y/SwiftyEcharts | SwiftyEchartsTest_iOS/ToolboxSpec.swift | 1 | 36917 | //
// ToolboxSpec.swift
// SwiftyEcharts
//
// Created by Pluto Y on 13/08/2017.
// Copyright © 2017 com.pluto-y. All rights reserved.
//
import Quick
import Nimble
@testable import SwiftyEcharts
class ToolboxSpec: QuickSpec {
override func spec() {
describe("For Toolbox.Feature.SaveAsImage.Type") {
... | mit |
KazmaStudio/Feeding | CODE/iOS/Feeding/Feeding/ArticleListModel.swift | 1 | 668 | //
// ArticleListModel.swift
// Feeding
//
// Created by zhaochenjun on 2017/5/8.
// Copyright © 2017年 com.kazmastudio. All rights reserved.
//
import Foundation
class ArticleListModel: NSObject {
var articleType: String = CELL_ARTICLE_LIST_TYPE_A
var imageList: Array<String> = []
var title: String = ... | mit |
attackFromCat/LivingTVDemo | LivingTVDemo/LivingTVDemo/Classes/Home/Controller/GameViewController.swift | 1 | 4966 | //
// GameViewController.swift
// LivingTVDemo
//
// Created by 李翔 on 2017/1/9.
// Copyright © 2017年 Lee Xiang. All rights reserved.
//
import UIKit
private let kEdgeMargin : CGFloat = 10
private let kItemW : CGFloat = (kScreenW - 2 * kEdgeMargin) / 3
private let kItemH : CGFloat = kItemW * 6 / 5
private let kHea... | mit |
remobjects/ElementsSamples | Silver/All/SharedUI/SharedUI.Shared/AppDelegate.swift | 1 | 276 | class AppDelegate {
public private(set) var mainWindowController: MainWindowController!
public func start() {
//
// this is the cross-platform entry point for the app
//
mainWindowController = MainWindowController()
mainWindowController.showWindow(nil)
}
} | mit |
apple/swift-corelibs-foundation | Darwin/Foundation-swiftoverlay/NSPredicate.swift | 1 | 856 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 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 |
h-n-y/BigNerdRanch-SwiftProgramming | chapter-26/silver-challenge/VocalTextEdit/VocalTextEdit/Document.swift | 1 | 1840 | //
// Document.swift
// VocalTextEdit
//
// Created by Hans Yelek on 1/28/16.
// Copyright © 2016 Hans Yelek. All rights reserved.
//
import Cocoa
class Document: NSDocument {
var contents: String = ""
override class func autosavesInPlace() -> Bool {
return true
}
override func make... | mit |
anzfactory/TwitterClientCLI | Sources/TwitterClientCore/APIType/SearchTweetType.swift | 1 | 1031 | //
// SearchTweetType.swift
// Spectre
//
// Created by shingo asato on 2017/09/21.
//
import Foundation
import APIKit
struct SearchTweetType: TwitterAPIType {
typealias Response = SearchTweets
var oauth: TwitterOAuth
var q: String
var count: Int = 30
var sinceId: Int?
var maxId: Int?
... | mit |
bitserf/OAuth2 | OAuth2/Array+Extensions.swift | 1 | 1211 | //
// OAuth2
// Copyright (C) 2015 Leon Breedt
//
// 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 ... | apache-2.0 |
hughbe/ui-components | src/Bordered/SideBorderedView.swift | 1 | 1231 | //
// SideBorderedView.swift
// UIComponents
//
// Created by Hugh Bellamy on 14/06/2015.
// Copyright (c) 2015 Hugh Bellamy. All rights reserved.
//
@IBDesignable
public class SideBorderedView: UIView {
@IBInspectable public var borderWidth: CGFloat = 0
@IBInspectable public var borderColor: UIColor = UIC... | mit |
ArtSabintsev/Siren | Sources/Extensions/UserDefaultsExtension.swift | 1 | 1482 | //
// UserDefaultsExtension.swift
// Siren
//
// Created by Arthur Sabintsev on 9/25/18.
// Copyright © 2018 Sabintsev iOS Projects. All rights reserved.
//
import Foundation
// `UserDefaults` Extension for Siren.
extension UserDefaults {
/// Siren-specific `UserDefaults` Keys
private enum SirenKeys: Stri... | mit |
CMP-Studio/TheWarholOutLoud | ios/CMSBeaconManager.swift | 2 | 5951 | //
// CMSBeaconManager.swift
// AndyWarholAccessibilityProject
//
// Created by Ruben Niculcea on 5/24/16.
// Copyright © 2016 Carnegie Museums of Pittsburgh Innovation Studio.
// All rights reserved.
//
import Foundation
enum CMSBeaconManagerEvents:String {
case BeaconManagerBeaconPing
case BluetoothStatusC... | mit |
jerrypupu111/LearnDrawingToolSet | SwiftGL-Demo/Source/Common/PaintArtwork.swift | 1 | 3853 | //
// PaintArtwork.swift
// SwiftGL
//
// Created by jerry on 2015/5/21.
// Copyright (c) 2015年 Jerry Chan. All rights reserved.
//
enum ArtworkType:String{
case Artwork = "Artwork"
case Tutorial = "Tutorial"
case Trace = "Trace"
}
import Foundation
import GLFramework
class PaintArtwork
{
var artwor... | mit |
Alan881/AAPlayer | Sources/AAPlayProgressView.swift | 2 | 620 | //
// AAPlayProgressView.swift
// AAPlayer
//
// Created by Alan on 2017/7/1.
// Copyright © 2017年 Alan. All rights reserved.
//
import UIKit
class AAPlayProgressView: UIProgressView {
override func sizeThatFits(_ size: CGSize) -> CGSize {
super.sizeThatFits(size)
let size = CGSize.... | mit |
lanserxt/teamwork-ios-sdk | TeamWorkClient/TeamWorkClient/Requests/TWApiClient+Permissions.swift | 1 | 8669 | //
// TWApiClient+Invoices.swift
// TeamWorkClient
//
// Created by Anton Gubarenko on 02.02.17.
// Copyright © 2017 Anton Gubarenko. All rights reserved.
//
import Foundation
import Alamofire
extension TWApiClient{
func addNewUserToProject(projectId: String, peopleId: String, _ responseBlock: @escaping ... | mit |
DataBreweryIncubator/StructuredQuery | Sources/Types/Signature.swift | 1 | 1267 | public class FunctionSignature: CustomStringConvertible {
public let arguments: [DataType]
public let returnType: DataType
public init(arguments: [DataType], returnType: DataType) {
self.arguments = arguments
self.returnType = returnType
}
// TODO: Variadic matching is not supporte... | mit |
JBerendes/react-native-video-processing | ios/RNVideoProcessing/RNTrimmerView/RNTrimmerView.swift | 1 | 6948 | //
// RNTrimmerView.swift
// RNVideoProcessing
//
import UIKit
import AVKit
@objc(RNTrimmerView)
class RNTrimmerView: RCTView, ICGVideoTrimmerDelegate {
var trimmerView: ICGVideoTrimmerView?
var asset: AVAsset!
var rect: CGRect = CGRect.zero
var mThemeColor = UIColor.clear
var bridge: RCTBr... | mit |
mikekavouras/Glowb-iOS | Glowb/Utility/Router.swift | 1 | 8261 | //
// Router.swift
// Glowb
// // Created by Michael Kavouras on 12/6/16.
// Copyright © 2016 Michael Kavouras. All rights reserved.
//
import Foundation
import Alamofire
typealias JSON = [String: Any]
enum APIError: Error {
case keyNotFound
}
enum Router: URLRequestConvertible {
// auth
case c... | mit |
zekunyan/TTGSnackbar | Package.swift | 2 | 298 | // swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "TTGSnackbar",
platforms: [.iOS(.v9)],
products: [
.library(name: "TTGSnackbar", targets: ["TTGSnackbar"])
],
targets: [
.target(name: "TTGSnackbar", path: "TTGSnackbar")
]
)
| mit |
Laurensesss/Learning-iOS-Programming-with-Swift | Calculator/Calculator/AppDelegate.swift | 1 | 2137 | //
// AppDelegate.swift
// Calculator
//
// Created by 石韬 on 16/5/6.
// Copyright © 2016年 石韬. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions ... | apache-2.0 |
alisidd/iOS-WeJ | WeJ/Add Tracks/MusicLibrarySelectionViewController.swift | 1 | 5896 | //
// MusicLibrarySelectionViewController.swift
// WeJ
//
// Created by Mohammad Ali Siddiqui on 8/9/17.
// Copyright © 2017 Mohammad Ali Siddiqui. All rights reserved.
//
import UIKit
import RKNotificationHub
import NVActivityIndicatorView
class MusicLibrarySelectionViewController: UIViewController, ViewControll... | gpl-3.0 |
linkedin/LayoutTest-iOS | SampleApp/SampleApp/SampleFailingView.swift | 1 | 1040 | // © 2016 LinkedIn Corp. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... | apache-2.0 |
Mikhepls/ios-notes | accountnotes/accountnotes/copyableLabel.swift | 1 | 1393 | //
// copyableLabel.swift
// accountnotes
//
// Created by Tom Lagerbom on 04/02/16.
// Copyright © 2016 Mikael's apps. All rights reserved.
//
import UIKit
class copyableLabel: UILabel {
override init(frame: CGRect) {
super.init(frame: frame)
sharedInit()
}
required init(cod... | mit |
hayashi311/iosdcjp2016app | iOSApp/Pods/AcknowList/Source/AcknowParser.swift | 1 | 4352 | //
// AcknowParser.swift
//
// Copyright (c) 2015-2016 Vincent Tourraine (http://www.vtourraine.net)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including witho... | mit |
sascha/DrawerController | KitchenSink/ExampleFiles/TableViewHelpers/CenterTableViewCell.swift | 1 | 1761 | // Copyright (c) 2017 evolved.io (http://evolved.io)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... | mit |
iawtav/Simple-Weather | Weather/SearchCell.swift | 1 | 1077 | //
// SearchCell.swift
// Weather
//
// Created by TUANANH VUONG on 2016/10/10.
// Copyright © 2016 TUANANH VUONG. All rights reserved.
//
import UIKit
class SearchCell: UITableViewCell {
@IBOutlet weak var weatherTypeIcon: UIImageView!
@IBOutlet weak var weatherType: UILabel!
@IBOutlet weak var curre... | apache-2.0 |
eduarenas/GithubClient | Sources/GitHubClient/Models/Response/User.swift | 1 | 1680 | //
// RepositoriesClient.swift
// GithubClient
//
// Created by Eduardo Arenas on 8/5/17.
// Copyright © 2017 GameChanger. All rights reserved.
//
import Foundation
public struct User: Decodable {
public let login: String
public let id: Int
public let avatarUrl: String?
public let url: String?
public l... | mit |
MrAlek/JSQDataSourcesKit | Source/DataSourceProvider.swift | 1 | 4769 | //
// Created by Jesse Squires
// http://www.jessesquires.com
//
//
// Documentation
// http://jessesquires.com/JSQDataSourcesKit
//
//
// GitHub
// https://github.com/jessesquires/JSQDataSourcesKit
//
//
// License
// Copyright © 2015 Jesse Squires
// Released under an MIT license: http://opensource.org/licen... | mit |
PJayRushton/TeacherTools | TeacherTools/ProViewController.swift | 1 | 1718 | //
// ProViewController.swift
// TeacherTools
//
// Created by Parker Rushton on 12/2/16.
// Copyright © 2016 AppsByPJ. All rights reserved.
//
import UIKit
class ProViewController: UIViewController, AutoStoryboardInitializable {
@IBOutlet weak var upgradeBorderView: UIView!
fileprivate var sharedSt... | mit |
kdawgwilk/Autobahn | Sources/AutobahnDescription/AutobahnDescription.swift | 1 | 4840 | #if os(Linux)
import Glibc
#else
import Darwin.C
#endif
import Foundation
@_exported import Actions
private extension Array {
var second: Element? {
guard count > 1 else {
return nil
}
return self[1]
}
}
/// Highway is the protocol which every highway should follow... | mit |
AashiniSharma/Home-Living | Home&Living/SectionsforHome_Living.swift | 1 | 666 | //
// SectionsforHome_Living.swift
// Home&Living
//
// Created by Appinventiv on 18/02/17.
// Copyright © 2017 Appinventiv. All rights reserved.
//
import UIKit
class SectionsforHome_Living: UITableViewCell {
var tableIndexpath = IndexPath()
//MARK : IB Outlets
@IBOutlet weak var home_L... | mit |
toddkramer/EmojiTools | EmojiTools/EmojiTools.swift | 1 | 4394 | //
// EmojiTools.swift
// EmojiTools
//
// Copyright © 2016 Todd Kramer.
//
// 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 |
gregomni/swift | test/Generics/redundant_protocol_inheritance_via_concrete.swift | 3 | 318 | // RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures -requirement-machine-protocol-signatures=on 2>&1 | %FileCheck %s
protocol P {}
class C : P {}
// CHECK-LABEL: redundant_protocol_inheritance_via_concrete.(file).Q@
// CHECK-NEXT: Requirement signature: <Self where Self : C>
protocol Q : P, C {}
| apache-2.0 |
luanlzsn/EasyPass | EasyPass/Classes/Mine/Controller/MyAccountController.swift | 1 | 11137 | //
// MyAccountController.swift
// EasyPass
//
// Created by luan on 2017/7/5.
// Copyright © 2017年 luan. All rights reserved.
//
import UIKit
class MyAccountController: AntController,UITableViewDelegate,UITableViewDataSource,UIImagePickerControllerDelegate,UINavigationControllerDelegate,MyAccountTextField_Delega... | mit |
DevZheng/LeetCode | Array/FirstMissingPositive.swift | 1 | 1052 | //
// FirstMissingPositive.swift
// A
//
// Created by zyx on 2017/6/29.
// Copyright © 2017年 bluelive. All rights reserved.
//
import Foundation
/**
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm sh... | mit |
EasySwift/EasySwift | Carthage/Checkouts/YXJPageControl/YXJPageController/AppDelegate.swift | 4 | 2184 | //
// AppDelegate.swift
// YXJPageController
//
// Created by yuanxiaojun on 2016/11/1.
// Copyright © 2016年 袁晓钧. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinis... | apache-2.0 |
thomasvl/swift-protobuf | Sources/SwiftProtobufCore/BinaryDecodingError.swift | 3 | 1738 | // Sources/SwiftProtobuf/BinaryDecodingError.swift - Protobuf binary decoding errors
//
// Copyright (c) 2014 - 2017 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/main... | apache-2.0 |
mkoehnke/WKZombie | Example/Example iOS/ProfileViewController.swift | 1 | 2180 | //
// ViewController.swift
//
// Copyright (c) 2015 Mathias Koehnke (http://www.mathiaskoehnke.de)
//
// 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 |
kickstarter/Kickstarter-Prelude | Prelude-UIKit/lenses/NSTextContainerLenses.swift | 1 | 443 | import Prelude
import UIKit
public protocol NSTextContainerProtocol: KSObjectProtocol {
var lineFragmentPadding: CGFloat { get set }
}
extension NSTextContainer: NSTextContainerProtocol {}
public extension LensHolder where Object: NSTextContainerProtocol {
public var lineFragmentPadding: Lens<Object, CGFloat> {
... | apache-2.0 |
wayfinders/WRCalendarView | WRCalendarView/Helpers/UIColorExtention.swift | 1 | 785 | //
// UIColorExtention.swift
// Pods
//
// Created by wayfinder on 2017. 4. 18..
//
//
import Foundation
extension UIColor {
convenience init(hex: Int) {
self.init(hex: hex, a: 1.0)
}
convenience init(hex: Int, a: CGFloat) {
self.init(r: (hex >> 16) & 0xff, g: (hex >> 8) & 0xff, b:... | mit |
ShaneQi/zeg_bot | Sources/FaceDetection.swift | 1 | 1094 | //
// FaceDetection.swift
// ZEGBot
//
// Created by Shane Qi on 7/5/18.
//
import Foundation
func faceDetectionRequestBody(withImage data: Data) -> Data {
return """
{
"requests": [
{
"image": {
"content": "\(String(data: data.base64EncodedData(), encoding: .utf8) ?? "")"
},
"features": [
... | apache-2.0 |
magicien/GLTFSceneKit | Sources/GLTFSceneKit/schema/GLTFAnimationSampler.swift | 1 | 1396 | //
// GLTFAnimationSampler.swift
//
// Animation Sampler
// Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
//
import Foundation
struct GLTFAnimationSampler: GLTFPropertyProtocol {
/** The index of an accessor containing keyframe input values, e.... | mit |
fulldecent/FDChessboardView | Tests/FDChessboardViewTests/XCTestManifests.swift | 1 | 166 | import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(FDChessboardViewTests.allTests),
]
}
#endif
| mit |
FirasAKAK/FInAppNotifications | FNotificationManager.swift | 1 | 12574 | //
// FNotificationManager.swift
// FInAppNotification
//
// Created by Firas Al Khatib Al Khalidi on 7/4/17.
// Copyright © 2017 Firas Al Khatib Al Khalidi. All rights reserved.
//
import UIKit
class FNotificationManager: NSObject {
static let shared = FNotificationManager()
fil... | mit |
vigneshuvi/SwiftLoggly | Package.swift | 1 | 211 | //
// Package.swift
// SwiftLoggly
//
// Created by Vignesh on 30/01/17.
// Copyright © 2017 vigneshuvi. All rights reserved.
//
import PackageDescription
let package = Package(
name: "SwiftLoggly"
)
| mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.