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 |
|---|---|---|---|---|---|
atl009/WordPress-iOS | WordPress/Classes/ViewRelated/Post/PostEditorSaveAction.swift | 1 | 2159 | import Foundation
import WordPressShared
/// Encapsulates the current save action of the editor, based on its
/// post status, whether it's already been saved, is scheduled, etc.
@objc enum PostEditorSaveAction: Int {
case schedule
case post
case save
case update
}
/// Some utility methods to help kee... | gpl-2.0 |
ImperialDevelopment/IDPopup | Example/IDPopup/AppDelegate.swift | 1 | 2181 | //
// AppDelegate.swift
// IDPopup
//
// Created by Michael Schoder on 08/10/2017.
// Copyright (c) 2017 Michael Schoder. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, ... | mit |
akabekobeko/examples-ios-fmdb | UsingFMDB-Swift/UsingFMDB-Swift/DAOFactory.swift | 1 | 1576 | //
// DAOFactory.swift
// UsingFMDB-Swift
//
// Created by akabeko on 2016/12/22.
// Copyright © 2016年 akabeko. All rights reserved.
//
import UIKit
import FMDB
/// Factory of a data access objects.
class DAOFactory: NSObject {
/// Path of the database file.
private let filePath: String
/// Initializ... | mit |
bmichotte/HSTracker | HSTracker/Logging/CardIds/Shaman.swift | 1 | 7726 | /*
This file is generated by https://github.com/HearthSim/HearthDb
The MIT License (MIT)
Copyright (c) 2016 HearthSim
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, i... | mit |
pecuniabanking/pecunia-client | Source/ChipcardManager.swift | 1 | 11957 | //
// ChipcardManager.swift
// Pecunia
//
// Created by Frank Emminghaus on 24.06.15.
// Copyright (c) 2015 Frank Emminghaus. All rights reserved.
//
import Foundation
import HBCI4Swift
var _manager:ChipcardManager!
@objcMembers open class CardBankData : NSObject {
var name:String;
var bankCode:String;
... | gpl-2.0 |
haitran2011/Rocket.Chat.iOS | Rocket.Chat/Models/Mapping/AttachmentModelMapping.swift | 2 | 2246 | //
// AttachmentModelMapping.swift
// Rocket.Chat
//
// Created by Rafael Kellermann Streit on 16/01/17.
// Copyright © 2017 Rocket.Chat. All rights reserved.
//
import Foundation
import SwiftyJSON
import RealmSwift
extension Attachment: ModelMappeable {
func map(_ values: JSON, realm: Realm?) {
if se... | mit |
lifcio/todo-app-syncano | todo-app-syncano/String+localization.swift | 1 | 366 | //
// String+localization.swift
// todo-app-syncano
//
// Created by Mariusz Wisniewski on 8/14/15.
// Copyright (c) 2015 Mariusz Wisniewski. All rights reserved.
//
extension String {
func localized(comment: String = "") -> String {
return NSLocalizedString(self, tableName: nil, bundle: NSBundle.mainB... | mit |
jacobwhite/firefox-ios | Extensions/NotificationService/ExtensionProfile.swift | 7 | 1673 | /* 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 Deferred
import Shared
import Sync
// This is a cut down version of the Profile.
// This will only ever be... | mpl-2.0 |
HQL-yunyunyun/SinaWeiBo | SinaWeiBo/SinaWeiBo/Class/Module/Main/Controller/BaseTableViewController.swift | 1 | 2678 | //
// BaseTableViewController.swift
// SinaWeiBo
//
// Created by 何启亮 on 16/5/12.
// Copyright © 2016年 HQL. All rights reserved.
//
import UIKit
class BaseTableViewController: UITableViewController {
// MARK: - 属性
var isLogin: Bool = HQLUserAccountViewModel.shareInstance.isUserLogin
overrid... | apache-2.0 |
benlangmuir/swift | validation-test/compiler_crashers_fixed/25947-llvm-tinyptrvector-swift-valuedecl-push-back.swift | 65 | 452 | // 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 |
xixi197/XXColorTheme | Classes/UIKit/UIProgressView+XXColorStyle.swift | 1 | 1372 | //
// UIProgressView+XXColorStyle.swift
// XXColorTheme
//
// Created by xixi197 on 16/1/21.
// Copyright © 2016年 xixi197. All rights reserved.
//
import UIKit
import RxSwift
import NSObject_Rx
extension UIProgressView {
private struct AssociatedKeys {
static var ProgressTintColorStyle = "xx_progressT... | mit |
wireapp/wire-ios-sync-engine | Source/UserSession/Search/SearchResult.swift | 1 | 6239 | //
// Wire
// Copyright (C) 2017 Wire Swiss GmbH
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This progr... | gpl-3.0 |
imex94/KCLTech-iOS-Sessions-2014-2015 | session208/session208/UIPathFollower.swift | 1 | 1224 | //
// UIPathFollower.swift
// session208
//
// Created by Clarence Ji on 1/26/15.
// Copyright (c) 2015 Clarence Ji. All rights reserved.
//
import UIKit
class UIPathFollower: UIImageView {
func startAnimate(parent: UIViewController) {
image = UIImage(named: "satellite")
hidden = false
... | mit |
noppoMan/Suv | Tests/SuvTests/TcpTests.swift | 1 | 2112 | //
// TcpTests.swift
// Suv
//
// Created by Yuki Takei on 2/15/16.
// Copyright © 2016 MikeTOKYO. All rights reserved.
//
import XCTest
import CLibUv
@testable import Suv
// Simple Echo Server
private func launchServer() throws -> TCP {
let server = TCP()
let addr = Address(host: "0.0.0.0", port: 9999)
... | mit |
objecthub/swift-lispkit | Sources/LispKit/Data/Cell.swift | 1 | 1210 | //
// Cell.swift
// LispKit
//
// Created by Matthias Zenger on 07/02/2016.
// Copyright © 2016 ObjectHub. 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
//
/... | apache-2.0 |
jtbandes/swift-compiler-crashes | fixed/27255-llvm-ondiskchainedhashtable-swift-modulefile-decltableinfo-find.swift | 4 | 294 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
let a{
{{}
class C
func b{class b{
class B{
struct S{var b{struct S{
class A{
func b{[b{class b{{
}
let a{
let a{
func b{a=a
| mit |
kareman/SwiftShell | Sources/SwiftShell/Files.swift | 1 | 2965 | /*
* Released under the MIT License (MIT), http://opensource.org/licenses/MIT
*
* Copyright (c) 2015 Kåre Morstøl, NotTooBad Software (nottoobadsoftware.com)
*
*/
import Foundation
/** The default FileManager */
public let Files = FileManager.default
/** Appends file or directory url to directory url */
public ... | mit |
vitormesquita/Malert | Malert/Classes/Base/BaseMalertViewController.swift | 1 | 1195 | //
// BaseMalertViewController.swift
// Pods
//
// Created by Vitor Mesquita on 01/11/16.
//
//
import UIKit
public class BaseMalertViewController: UIViewController {
private(set) var keyboardRect = CGRect.zero
func listenKeyboard(){
NotificationCenter.default.addObserver(
sel... | mit |
CosmicMind/Motion | Sources/Extensions/Motion+CALayer.swift | 3 | 9680 | /*
* The MIT License (MIT)
*
* Copyright (C) 2019, CosmicMind, Inc. <http://cosmicmind.com>.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restricti... | mit |
elpassion/el-space-ios | ELSpace/Models/DTO/NewActivityDTO.swift | 1 | 150 | struct NewActivityDTO {
let projectId: Int?
let value: Double?
let performedAt: String
let comment: String?
let reportType: Int
}
| gpl-3.0 |
anirudh24seven/wikipedia-ios | WikipediaUnitTests/Code/NumberFormatterExtrasTests.swift | 1 | 1085 | import XCTest
class NumberFormatterExtrasTests: XCTestCase {
func testThousands() {
var number: UInt64 = 215
var format: String = NSNumberFormatter.localizedThousandsStringFromNumber(NSNumber(unsignedLongLong: number))
XCTAssertTrue(format.containsString("215"))
number... | mit |
Zewo/Epoch | Sources/HTTP/Request/Request.swift | 2 | 5907 | import Core
import IO
import Media
import Venice
public final class Request : Message {
public typealias UpgradeConnection = (Response, DuplexStream) throws -> Void
public var method: Method
public var uri: URI
public var version: Version
public var headers: Headers
public var body: Body
... | mit |
kstaring/swift | validation-test/compiler_crashers/28386-swift-typebase-getdesugaredtype.swift | 5 | 450 | // This source file is part of the Swift.org open source project
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list... | apache-2.0 |
natecook1000/swift | stdlib/public/core/NewtypeWrapper.swift | 2 | 5299 | //===----------------------------------------------------------------------===//
//
// 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 |
practicalswift/swift | benchmark/single-source/ByteSwap.swift | 10 | 1932 | //===--- ByteSwap.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 |
austinzheng/swift-compiler-crashes | crashes-duplicates/17327-swift-sourcemanager-getmessage.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
deinit {
let a [ {
func g {
case
{
class A {
let a {
if true {
enum A {
class
case ,
| mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/21224-swift-declcontext-lookupqualified.swift | 11 | 252 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
let a {
struct B {
struct B<d where I : d {
typealias e = B
var a {
{
}
{
protocol
| mit |
austinzheng/swift-compiler-crashes | crashes-duplicates/20646-no-stacktrace.swift | 11 | 282 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
extension NSData {
struct A {
{
}
{
}
{
}
let a {
enum b {
deinit {
( [ {
func a
{
protocol P {
{
}
class
case ,
| mit |
mac-cain13/CoreDataKit | CoreDataKitTests/NSManagedObjectContextTests.swift | 2 | 7898 | //
// NSManagedObjectTests.swift
// CoreDataKit
//
// Created by Mathijs Kadijk on 15-10-14.
// Copyright (c) 2014 Mathijs Kadijk. All rights reserved.
//
import XCTest
import CoreData
import CoreDataKit
class NSManagedObjectContextTests: TestCase {
func testInitWithPersistentStore() {
let context = NSManag... | mit |
billhsu0913/VideBounceButtonView | VideBounceButtonViewExample/ViewController.swift | 1 | 1757 | //
// ViewController.swift
// VideBounceButtonViewExample
//
// Created by Oreki Houtarou on 11/29/14.
// Copyright (c) 2014 Videgame. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet var buttons: [UIButton]!
override func viewDidLoad() {
super.viewDidLoad()... | mit |
darkerk/v2ex | V2EX/Cells/FavoriteNodeViewCell.swift | 1 | 1724 | //
// FavoriteNodeViewCell.swift
// V2EX
//
// Created by darker on 2017/3/20.
// Copyright © 2017年 darker. All rights reserved.
//
import UIKit
import Kingfisher
class FavoriteNodeViewCell: UITableViewCell {
@IBOutlet weak var iconView: UIImageView!
@IBOutlet weak var nameLabel: UILabel!
@IBOutl... | mit |
mightydeveloper/swift | validation-test/compiler_crashers_fixed/0357-swift-type-transform.swift | 13 | 249 | // 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 g<T>: T.e {
let i: T.c = nil
| apache-2.0 |
Arty-Maly/Volna | Volna/Thumbnail+CoreDataProperties.swift | 1 | 547 | //
// Thumbnail+CoreDataProperties.swift
// Volna
//
// Created by Artem Malyshev on 2/25/17.
// Copyright © 2017 Artem Malyshev. All rights reserved.
//
import Foundation
import CoreData
extension Thumbnail {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Thumbnail> {
return NSFetchReq... | gpl-3.0 |
Eccelor/material-components-ios | components/AppBar/examples/AppBarDelegateForwardingExample.swift | 1 | 5318 | /*
Copyright 2016-present the Material Components for iOS authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required b... | apache-2.0 |
turingcorp/gattaca | gattaca/Model/Home/Action/MHomeActionMeh.swift | 1 | 252 | import UIKit
struct MHomeActionMeh:MHomeActionProtocol
{
let icon:UIImage = #imageLiteral(resourceName: "assetGenericActionMeh")
let display:UIImage = #imageLiteral(resourceName: "assetGenericMarkMeh")
let mark:DGif.Mark = DGif.Mark.meh
}
| mit |
hoffmanjon/SwiftyBones | examples/BlinkingLed/main.swift | 1 | 467 | import Glibc
if let led = SBDigitalGPIO(id: "gpio30", direction: .OUT){
while(true) {
if let oldValue = led.getValue() {
print("Changing")
var newValue = (oldValue == DigitalGPIOValue.HIGH) ? DigitalGPIOValue.LOW : DigitalGPIOValue.HIGH
... | mit |
grpc/grpc-swift | Sources/GRPC/ConnectionPool/GRPCChannelPool.swift | 1 | 14751 | /*
* Copyright 2021, 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... | apache-2.0 |
daniele-elia/metronome | metronomo/ViewController.swift | 1 | 8603 | //
// ViewController.swift
// metronomo
//
// Created by Daniele Elia on 25/02/15.
// Copyright (c) 2015 Daniele Elia. All rights reserved.
//
import UIKit
import AVFoundation
class ViewController: UIViewController, AVAudioPlayerDelegate {
@IBOutlet var labelBpm: UILabel!
@IBOutlet var btnStart: UIB... | gpl-2.0 |
sameertotey/LimoService | LimoService/RequestInfoViewController.swift | 1 | 17153 | //
// RequestInfoViewController.swift
// LimoService
//
// Created by Sameer Totey on 4/22/15.
// Copyright (c) 2015 Sameer Totey. All rights reserved.
//
import UIKit
class RequestInfoViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var dateButton: UIButton!
@IBOutlet weak var date... | mit |
KosyanMedia/Aviasales-iOS-SDK | AviasalesSDKTemplate/Source/AviasalesSource/PassengersPicker/ASTPassengersInfo.swift | 1 | 599 | //
// ASTPassengersInfo.swift
// AviasalesSDKTemplate
//
// Copyright 2016 Go Travel Un Limited
// This code is distributed under the terms and conditions of the MIT license.
//
import Foundation
@objcMembers
class ASTPassengersInfo: NSObject {
let adults: Int
let children: Int
let infants: Int
l... | mit |
KosyanMedia/Aviasales-iOS-SDK | AviasalesSDKTemplate/Source/HotelsSource/Map/ImportantPointsMapVC.swift | 1 | 318 | class ImportantPointsMapVC: SingleHotelMapVC {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if let mapView = mapView, let variant = variant {
HLMapViewConfigurator.configure(mapView, toShowSelectedPoints: variant, filter: filter)
}
}
}
| mit |
HabitRPG/habitrpg-ios | Habitica API Client/Habitica API Client/User/DeleteInboxMessageCall.swift | 1 | 590 | //
// DeleteInboxMessageCall.swift
// Habitica API Client
//
// Created by Phillip Thelen on 25.04.18.
// Copyright © 2018 HabitRPG Inc. All rights reserved.
//
import Foundation
import Habitica_Models
import ReactiveSwift
public class DeleteInboxMessageCall: ResponseObjectCall<EmptyResponseProtocol, APIEmptyResp... | gpl-3.0 |
MatrixHero/FlowSlideMenu | FlowSlideMenuCore/LLFlowSlideMenuEnum.swift | 1 | 178 | //
// LLFlowSlideMenuEnum.swift
// FlowSlideMenu
//
// Created by LL on 15/11/5.
// Copyright © 2015 LL. All rights reserved.
//
public enum Orientation {
case Left
}
| mit |
domenicosolazzo/practice-swift | Views/NavigationBar/Styled Button in the NavigationBar/Styled Button in the NavigationBarTests/Styled_Button_in_the_NavigationBarTests.swift | 1 | 971 | //
// Styled_Button_in_the_NavigationBarTests.swift
// Styled Button in the NavigationBarTests
//
// Created by Domenico on 06/05/15.
// Copyright (c) 2015 Domenico. All rights reserved.
//
import UIKit
import XCTest
class Styled_Button_in_the_NavigationBarTests: XCTestCase {
override func setUp() {
... | mit |
dalu93/SwiftHelpSet | Sources/Utilities/Resource.swift | 1 | 3424 | //
// Resource.swift
// SwiftHelpSet
//
// Created by Luca D'Alberti on 7/15/16.
// Copyright © 2016 dalu93. All rights reserved.
//
import Foundation
/**
Enum containing all the supported HTTP methods
*/
public enum HTTPMethod : String {
case GET
case POST
case PUT
case DELETE
case OPT... | mit |
MurphyL/StepInX | DevOps/OS/iOS/helloworld_01/helloworld_01Tests/helloworld_01Tests.swift | 1 | 995 | //
// helloworld_01Tests.swift
// helloworld_01Tests
//
// Created by MurphyLuo on 5/3/16.
// Copyright © 2016 TeamImagine. All rights reserved.
//
import XCTest
@testable import helloworld_01
class helloworld_01Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code h... | mit |
WickedColdfront/Slide-iOS | Slide for Reddit/CommentDepthCell.swift | 1 | 44817 | //
// UZTextViewCell.swift
// Slide for Reddit
//
// Created by Carlos Crane on 12/31/16.
// Copyright © 2016 Haptic Apps. All rights reserved.
//
import UIKit
import reddift
import UZTextView
import ImageViewer
import TTTAttributedLabel
import RealmSwift
import AudioToolbox
protocol UZTextViewCellDelegate: class... | apache-2.0 |
kstaring/swift | validation-test/compiler_crashers_fixed/01318-swift-constraints-constraintgraph-addconstraint.swift | 11 | 550 | // 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 |
abertelrud/swift-package-manager | Fixtures/DependencyResolution/External/PackageLookupCaseInsensitive/dep/Sources/Dep/dep.swift | 2 | 100 | public struct dep {
public private(set) var text = "Hello, World!"
public init() {
}
}
| apache-2.0 |
nalexn/ViewInspector | Tests/ViewInspectorTests/ViewSearchTests.swift | 1 | 12708 | import XCTest
import Combine
import SwiftUI
@testable import ViewInspector
@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
private struct Test {
struct InnerView: View, Inspectable {
var body: some View {
Button(action: { }, label: {
HStack { Text("Btn") }
}).mask(G... | mit |
austinzheng/swift | benchmark/single-source/Exclusivity.swift | 28 | 3495 | //===--- Exclusivity.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/... | apache-2.0 |
codestergit/swift | test/Serialization/class.swift | 2 | 2164 | // RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %target-swift-frontend -emit-object -emit-module -o %t %S/Inputs/def_class.swift -disable-objc-attr-requires-foundation-module
// RUN: llvm-bcanalyzer %t/def_class.swiftmodule | %FileCheck %s
// RUN: %target-swift-frontend -emit-sil -Xllvm -sil-disable-pass="External Defs T... | apache-2.0 |
jairoeli/Habit | Zero/Sources/Utils/Snap.swift | 1 | 597 | //
// Snap.swift
// Zero
//
// Created by Jairo Eli de Leon on 5/8/17.
// Copyright © 2017 Jairo Eli de León. All rights reserved.
//
import UIKit
/// Ceil to snap pixel
func snap(_ x: CGFloat) -> CGFloat {
let scale = UIScreen.main.scale
return ceil(x * scale) / scale
}
func snap(_ point: CGPoint) -> CGPoin... | mit |
rsmoz/swift-corelibs-foundation | TestFoundation/TestNSLocale.swift | 1 | 4410 | // 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/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the l... | apache-2.0 |
belatrix/iOSAllStarsRemake | AllStars/AllStars/iPhone/Classes/Profile/EditProfileViewController.swift | 1 | 11504 | //
// EditProfileViewController.swift
// AllStars
//
// Created by Flavio Franco Tunqui on 6/2/16.
// Copyright © 2016 Belatrix SF. All rights reserved.
//
import UIKit
class EditProfileViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UIActionSheetDelegate, UIImagePickerControllerDele... | mit |
vector-im/vector-ios | RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/Coordinator/SpaceCreationEmailInvitesCoordinator.swift | 1 | 5458 | // File created from SimpleUserProfileExample
// $ createScreen.sh Spaces/SpaceCreation/SpaceCreationEmailInvites SpaceCreationEmailInvites
/*
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 obta... | apache-2.0 |
macacajs/XCTestWD | XCTestWD/XCTestWD/Server/Modules/Extensions/XCTestWDFindElementUtils.swift | 1 | 1806 | //
// XCTestWDFindElementUtils.swift
// XCTestWD
//
// Created by zhaoy on 7/5/17.
// Copyright © 2017 XCTestWD. All rights reserved.
//
import Foundation
class XCTestWDFindElementUtils {
static func filterElement(usingText:String, withvalue:String, underElement:XCUIElement) throws -> XCUIElement? {
... | mit |
urbanthings/urbanthings-sdk-apple | UrbanThingsAPI/Internal/JSON/UInt+JSON.swift | 1 | 1021 | //
// UInt+JSON.swift
// UrbanThingsAPI
//
// Created by Mark Woollard on 29/04/2016.
// Copyright © 2016 UrbanThings. All rights reserved.
//
import Foundation
/// Extend `UInt` to support JSONInitialization protocol for JSON parsing.
extension UInt : JSONInitialization {
/// Initializer to parse JSON o... | apache-2.0 |
hackcity2017/iOS-client-application | hackcity/Alert.swift | 1 | 368 | //
// Alert.swift
// hackcity
//
// Created by Remi Robert on 26/03/2017.
// Copyright © 2017 Remi Robert. All rights reserved.
//
import UIKit
import RealmSwift
class Alert: Object {
dynamic var id: String = NSUUID().uuidString
dynamic var date = Date()
dynamic var value: Int = 0
override class ... | mit |
muyang00/YEDouYuTV | YEDouYuZB/YEDouYuZB/Home/Views/CollectionAmuseHeadCell.swift | 1 | 1849 | //
// CollectionAmuseHeadCell.swift
// YEDouYuZB
//
// Created by yongen on 17/4/1.
// Copyright © 2017年 yongen. All rights reserved.
//
import UIKit
let kAmuseCellID = "kAmuseCellID"
class CollectionAmuseHeadCell: UICollectionViewCell {
@IBOutlet weak var collectionView: UICollectionView!
var gr... | apache-2.0 |
slightair/syu | Syu/Model/APIDocumentation.swift | 1 | 3115 | import Foundation
import SQLite
import RxSwift
class APIDocumentation {
let resourcesPath: URL
var mapDBPath: URL {
return resourcesPath.appendingPathComponent("external/map.db", isDirectory: false)
}
var cacheDBPath: URL {
return resourcesPath.appendingPathComponent("external/cache.d... | mit |
square/sqldelight | sample/iosApp/iosApp/PlayerRow.swift | 2 | 547 | //
// PlayerCell.swift
// iosApp
//
// Copyright © 2019 Square, Inc.. All rights reserved.
//
import Foundation
import UIKit
import common
class PlayerRow: UITableViewCell {
@IBOutlet weak var nameText: UILabel!
@IBOutlet weak var teamText: UILabel!
@IBOutlet weak var numberText: UILabel!
func fill... | apache-2.0 |
ruddfawcett/Notepad | Notepad/Style.swift | 1 | 674 | //
// Style.swift
// Notepad
//
// Created by Rudd Fawcett on 10/14/16.
// Copyright © 2016 Rudd Fawcett. All rights reserved.
//
import Foundation
public struct Style {
var regex: NSRegularExpression!
public var attributes: [NSAttributedString.Key: Any] = [:]
public init(element: Element, attributes... | mit |
onevcat/CotEditor | CotEditor/Sources/ProgressViewController.swift | 1 | 4913 | //
// ProgressViewController.swift
//
// CotEditor
// https://coteditor.com
//
// Created by 1024jp on 2014-06-07.
//
// ---------------------------------------------------------------------------
//
// © 2014-2022 1024jp
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use t... | apache-2.0 |
wangshuaidavid/WSDynamicAlbumMaker | WSDynamicAlbumMakerDemo/WSDynamicAlbumMaker/WSDynamicAlbumMaker.swift | 1 | 9964 | //
// WSDynamicAlbumMaker.swift
// WSDynamicAlbumMakerDemo
//
// Created by ennrd on 4/25/15.
// Copyright (c) 2015 ws. All rights reserved.
//
import Foundation
import AVFoundation
import CoreMedia
import AssetsLibrary
public typealias WSDynamicAlbumMakerExportCompletionBlock = (NSURL!, NSError!) -> Void
public... | apache-2.0 |
Idomeneus/duo-iOS | Duo/Duo/UIImageViewHelpers.swift | 1 | 259 | //
// UIImageViewHelpers.swift
// Duo
//
// Created by Bobo on 10/24/15.
// Copyright © 2015 Boris Emorine. All rights reserved.
//
import Foundation
import UIKit
extension UIImageView {
func setImageWithURL(URL: NSURL) {
}
} | mit |
net-a-porter-mobile/XCTest-Gherkin | Pod/Core/XCTestCase+Gherkin.swift | 1 | 14375 | //
// File.swift
// whats-new
//
// Created by Sam Dean on 26/10/2015.
// Copyright © 2015 net-a-porter. All rights reserved.
//
import Foundation
import XCTest
import WebKit
#if canImport(XCTest_Gherkin_ObjC)
import XCTest_Gherkin_ObjC
#endif
/**
I wanted this to work with both KIFTestCase and UITestCase which ... | apache-2.0 |
phimage/Prephirences | Sources/Prephirences.swift | 1 | 6367 | //
// Prephirences.swift
// Prephirences
/*
The MIT License (MIT)
Copyright (c) 2017 Eric Marchand (phimage)
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 |
justindarc/focus | XCUITest/CopyTest.swift | 4 | 1522 | /* 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 XCTest
// Note: this test is tested as part of the base test case, and thus is disabled here.
class CopyT... | mpl-2.0 |
AbelSu131/ios-charts | Charts/Classes/Renderers/HorizontalBarChartRenderer.swift | 1 | 19136 | //
// HorizontalBarChartRenderer.swift
// Charts
//
// Created by Daniel Cohen Gindi on 4/3/15.
//
// Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda
// A port of MPAndroidChart for iOS
// Licensed under Apache License 2.0
//
// https://github.com/danielgindi/ios-charts
//
import Foundation
import CoreGraphi... | apache-2.0 |
pedromsantos/Ellis | Ellis/Keys/Key.swift | 1 | 6010 | public enum Key: Int
{
case AMajor
case AFlatMajor
case BMajor
case BFlatMajor
case CMajor
case CSharpMajor
case DMajor
case DFlatMajor
case EMajor
case EFlatMajor
case FMajor
case FSharpMajor
case GMajor
case GFlatMajor
case AMinor
case AFlatMinor
cas... | mit |
YouareMylovelyGirl/Sina-Weibo | 新浪微博/新浪微博/Classes/View(视图和控制器)/Profile/ProfileController.swift | 1 | 858 | //
// ProfileController.swift
// 新浪微博
//
// Created by 阳光 on 2017/6/5.
// Copyright © 2017年 YG. All rights reserved.
//
import UIKit
class ProfileController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
o... | apache-2.0 |
wuzhenli/MyDailyTestDemo | swiftTest/swifter-tips+swift+3.0/Swifter.playground/Pages/property-observer.xcplaygroundpage/Contents.swift | 2 | 1492 |
import Foundation
class MyClass {
let oneYearInSecond: TimeInterval = 365 * 24 * 60 * 60
var date: NSDate {
willSet {
let d = date
print("即将将日期从 \(d) 设定至 \(newValue)")
}
didSet {
if (date.timeIntervalSinceNow > oneYearInSecond) {
... | apache-2.0 |
tlax/GaussSquad | GaussSquad/Controller/Home/CHome.swift | 1 | 769 | import UIKit
class CHome:CController
{
let model:MHome
private weak var viewHome:VHome!
override init()
{
model = MHome()
super.init()
}
required init?(coder:NSCoder)
{
return nil
}
override func loadView()
{
let viewHome:V... | mit |
achimk/Cars | CarsApp/Components/ErrorHandling/ErrorPresenterType.swift | 1 | 512 | //
// ErrorPresenterType.swift
// CarsApp
//
// Created by Joachim Kret on 30/07/2017.
// Copyright © 2017 Joachim Kret. All rights reserved.
//
import Foundation
protocol ErrorPresentable {
func present(with error: Error)
}
protocol ErrorDismissible {
func dismiss()
}
protocol ErrorPresenterType: Error... | mit |
jerrypupu111/LearnDrawingToolSet | SwiftGL-Demo/Source/iOS/PaintViewControllerInitStyle.swift | 1 | 2015 | //
// PaintViewControllerInitStyle.swift
// SwiftGL
//
// Created by jerry on 2015/12/5.
// Copyright © 2015年 Jerry Chan. All rights reserved.
//
extension PaintViewController
{
func initAnimateState()
{
toolViewState = SubViewPanelAnimateState(view: toolView, constraint: toolViewLeadingConstraint,... | mit |
iosyoujian/iOS8-day-by-day | 24-presentation-controllers/BouncyPresent/BouncyPresent/BouncyViewControllerAnimator.swift | 22 | 1541 | //
// Copyright 2014 Scott Logic
//
// 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 w... | apache-2.0 |
weekenlee/Dodo | Dodo/Utils/UnderKeyboardDistrib.swift | 5 | 6026 | //
// An iOS libary for moving content from under the keyboard.
//
// https://github.com/exchangegroup/UnderKeyboard
//
// This file was automatically generated by combining multiple Swift source files.
//
// ----------------------------
//
// UnderKeyboardLayoutConstraint.swift
//
// ----------------------------
im... | mit |
dejavu1988/google-services | ios/gcm/GcmExampleSwift/ViewController.swift | 21 | 3259 | //
// Copyright (c) 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | apache-2.0 |
kstaring/swift | validation-test/compiler_crashers_fixed/01059-swift-constraints-constraintsystem-opengeneric.swift | 11 | 453 | // 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 |
kstaring/swift | validation-test/compiler_crashers_fixed/27650-swift-metatypetype-get.swift | 11 | 474 | // 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 |
mirkofetter/TUIOSwift | TUIOSwift/TuioTime.swift | 1 | 9021 | //
// TuioTime.swift
// TUIOSwift
//
// Created by Mirko Fetter on 21.02.17.
// Copyright © 2017 grugru. All rights reserved.
//
import Foundation
/**
* The TuioTime class is a simple structure that is used to reprent the time that has elapsed since the session start.
* The time is internally represented as se... | mit |
liveminds/AERecord | AERecordExample/Event.swift | 5 | 274 | //
// Event.swift
// AERecordExample
//
// Created by Marko Tadic on 11/4/14.
// Copyright (c) 2014 ae. All rights reserved.
//
import Foundation
import CoreData
class Event: NSManagedObject {
@NSManaged var timeStamp: NSDate
@NSManaged var selected: Bool
}
| mit |
safetycase/Dl_student | Dl_student/DL_student/DL_student/AppDelegate.swift | 1 | 2132 | //
// AppDelegate.swift
// DL_student
//
// Created by Gao on 16/11/8.
// Copyright © 2016年 Gao. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptio... | mit |
ZevEisenberg/Padiddle | Padiddle/Padiddle/Utilities/HelpImageHandler.swift | 1 | 1530 | //
// HelpImageProtocol.swift
// Padiddle
//
// Created by Zev Eisenberg on 1/22/16.
// Copyright © 2016 Zev Eisenberg. All rights reserved.
//
import Foundation
import UIKit.UIImage
import WebKit
/// Handle asset://assetName requests from WKWebView and return the appropriate
/// image asset. Built with the help ... | mit |
madbat/Set | Package.swift | 1 | 989 | // swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Set",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other p... | mit |
khillman84/music-social | music-social/music-social/FancyView.swift | 1 | 580 | //
// FancyView.swift
// music-social
//
// Created by Kyle Hillman on 4/22/17.
// Copyright © 2017 Kyle Hillman. All rights reserved.
//
import UIKit
class FancyView: UIView {
override func awakeFromNib() {
super.awakeFromNib()
//Set the shadow size and look
layer.shadowColo... | mit |
AcaiBowl/Closurable | Closurable/Releasable.swift | 1 | 780 | //
// Releasable.swift
// Closurable
//
// Created by Toru Asai on 2017/09/07.
// Copyright © 2017年 AcaiBowl. All rights reserved.
//
import Foundation
public protocol Releasable {
func release()
}
public final class ActionReleasable: Releasable {
private var _observer: Any?
private var _action: (() ... | mit |
ViacomInc/Router | Source/Router.swift | 1 | 3871 | ////////////////////////////////////////////////////////////////////////////
// Copyright 2015 Viacom Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/l... | apache-2.0 |
sublimter/Meijiabang | KickYourAss/KickYourAss/LCYMyCommentTableViewCell.swift | 3 | 1647 | //
// LCYMyCommentTableViewCell.swift
// KickYourAss
//
// Created by eagle on 15/2/11.
// Copyright (c) 2015年 多思科技. All rights reserved.
//
import UIKit
class LCYMyCommentTableViewCell: UITableViewCell {
@IBOutlet private weak var avatarImageView: UIImageView!
var imagePath: String? {
didSet... | mit |
peferron/algo | EPI/Heaps/Compute the k closest stars/swift/test.swift | 1 | 1505 | import Darwin
func == (lhs: [Coordinates], rhs: [Coordinates]) -> Bool {
guard lhs.count == rhs.count else {
return false
}
for (index, element) in lhs.enumerated() {
guard rhs[index] == element else {
return false
}
}
return true
}
let tests: [(stars: [Coordina... | mit |
mobgeek/swift | Crie Seu Primeiro App/FiltroApp(v2) - Beta/FiltroApp(v2)Tests/FiltroApp_v2_Tests.swift | 2 | 936 | //
// FiltroApp_v2_Tests.swift
// FiltroApp(v2)Tests
//
// Created by Renan Siqueira de Souza Mesquita on 26/08/15.
// Copyright (c) 2015 Mobgeek. All rights reserved.
//
import UIKit
import XCTest
class FiltroApp_v2_Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup c... | mit |
whitehawks/CommoniOSViews | CommoniOSViews/Classes/UIViews/GradientView.swift | 1 | 1712 | //
// GradientView.swift
// Pods
//
// Created by Sharif Khaleel on 6/12/17.
//
//
import Foundation
import UIKit
@IBDesignable
public class GradientView: UIView {
@IBInspectable var startColor: UIColor = .black { didSet { updateColors() }}
@IBInspectable var endColor: UIColor = .white { didSet ... | mit |
ayunav/AudioKit | Tests/Tests/AKSimpleWaveGuideModel.swift | 3 | 1753 | //
// main.swift
// AudioKit
//
// Created by Nick Arner and Aurelius Prochazka on 11/30/14.
// Copyright (c) 2014 Aurelius Prochazka. All rights reserved.
//
import Foundation
let testDuration: NSTimeInterval = 11.0
class Instrument : AKInstrument {
override init() {
super.init()
let filen... | mit |
apascual/braintree_ios | UnitTests/BTAPIClient_SwiftTests.swift | 1 | 11418 | import XCTest
class BTAPIClient_SwiftTests: XCTestCase {
// MARK: - Initialization
func testAPIClientInitialization_withValidTokenizationKey_returnsClientWithTokenizationKey() {
let apiClient = BTAPIClient(authorization: "development_testing_integration_merchant_id")!
XCTAssertEqual(a... | mit |
cantinac/JSONCodable | JSONCodable/JSONCodable.swift | 1 | 620 | //
// JSONCodable.swift
// JSONCodable
//
// Created by Matthew Cheok on 17/7/15.
// Copyright © 2015 matthewcheok. All rights reserved.
//
// convenience protocol
public protocol JSONTranscodable: JSONEncodable, JSONDecodable {}
// JSONCompatible - valid types in JSON
public protocol JSONCompatible: JSONEncoda... | mit |
hardikdevios/HKKit | Pod/Classes/HKExtensions/UIKit+Extensions/UIButton+Extension.swift | 1 | 1487 | //
// UIButton+Extension.swift
// HKCustomization
//
// Created by Hardik on 10/18/15.
// Copyright © 2015 . All rights reserved.
//
import UIKit
extension UIButton{
public func hk_toggleOnOff()->Void{
self.isSelected = !self.isSelected;
}
public func hk_setDisableWithAlpha(_ isDi... | mit |
running-LM/SwiftDictModel | iOS Example/iOS Example/ViewController.swift | 1 | 1945 | //
// ViewController.swift
// iOS Example
//
// Created by 刘敏 on 15/2/18.
// Copyright (c) 2015年 joyios. All rights reserved.
//
import UIKit
import SwiftDictModel
class ViewController: UIViewController {
let manager = DictModelManager.sharedManager
override func viewDidLoad() {
super.viewDi... | mit |
erkie/ApiModel | Tests/ApiManagerResponseTests.swift | 1 | 4726 | //
// ApiResponseTests.swift
// ApiModel
//
// Created by Craig Heneveld on 1/14/16.
//
//
import XCTest
import ApiModel
import Alamofire
import OHHTTPStubs
import RealmSwift
class ApiManagerResponseTests: XCTestCase {
var timeout: TimeInterval = 10
var testRealm: Realm!
var host = "http://you-dont-par... | mit |
PaulWoodIII/tipski | TipskyiOS/Tipski/AddEmojiViewController.swift | 1 | 4020 | //
// AddEmojiViewController.swift
// Tipski
//
// Created by Paul Wood on 9/15/16.
// Copyright © 2016 Paul Wood. All rights reserved.
//
import Foundation
import UIKit
protocol AddEmojiDelegate : class {
func didAddEmoji(tipEmoji: TipEmoji)
}
class AddEmojiViewController : UIViewController, UICollectionVie... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.