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 |
|---|---|---|---|---|---|
cooliean/CLLKit | XLForm/Examples/Swift/SwiftExample/PredicateExamples/PredicateFormViewController.swift | 14 | 5028 | //
// PredicateFormViewController.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... | mit |
jmgc/swift | test/Driver/Dependencies/driver-show-incremental-mutual-fine.swift | 1 | 1665 | /// main <==> other
// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/mutual-with-swiftdeps-fine/* %t
// RUN: touch -t 201401240005 %t/*
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -increme... | apache-2.0 |
auth0-tutorials/mvvm_viper | VIPER Contacts Starter/VIPER Contacts Starter/AddContact/Presenter/AddContactPresenter.swift | 1 | 954 | //
// Created by AUTHOR
// Copyright (c) YEAR AUTHOR. All rights reserved.
//
class AddContactPresenter: AddContactPresenterProtocol, AddContactInteractorOutputProtocol {
weak var view: AddContactViewProtocol?
var interactor: AddContactInteractorInputProtocol?
var wireFrame: AddContactWireFrameProtocol?
... | mit |
boqian2000/swift-algorithm-club | Trie/Trie/Trie/AppDelegate.swift | 2 | 504 | //
// AppDelegate.swift
// Trie
//
// Created by Rick Zaccone on 2016-12-12.
// Copyright © 2016 Rick Zaccone. All rights reserved.
//
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert c... | mit |
quadro5/swift3_L | Swift_api.playground/Pages/Pass Reference Value.xcplaygroundpage/Contents.swift | 1 | 1261 | //: [Previous](@previous)
import Foundation
var str = "Hello, playground"
//: [Next](@next)
func test() {
var num = 1
func passRef(_ input: inout Int) {
print("input: \(input)")
print("num: \(num)")
input = 2
print("input: \(input)")
print("num: \(num)... | unlicense |
yangyueguang/MyCocoaPods | Extension/Collection+Extension.swift | 1 | 6247 | //
// Collection+Extension.swift
// MyCocoaPods
//
// Created by Chao Xue 薛超 on 2018/12/12.
// Copyright © 2018 Super. All rights reserved.
//
import Foundation
public extension Array{
/// 返回对象数组对应的json数组 前提element一定是AnyObject类型
func jsonArray() -> [[String: Any]] {
var jsonObjects: [[String: Any]... | mit |
SummerHF/SinaPractice | sina/Pods/LTMorphingLabel/LTMorphingLabel/LTMorphingLabel+Anvil.swift | 5 | 11271 | //
// LTMorphingLabel+Anvil.swift
// https://github.com/lexrus/LTMorphingLabel
//
// The MIT License (MIT)
// Copyright (c) 2016 Lex Tang, http://lexrus.com
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files
// (the “Software”... | mit |
nathawes/swift | test/stdlib/KeyPath.swift | 8 | 32224 | // RUN: %empty-directory(%t)
// RUN: %target-build-swift -import-objc-header %S/Inputs/tail_allocated_c_array.h -swift-version 5 -g %s -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out
// REQUIRES: executable_test
import StdlibUnittest
var keyPath = TestSuite("key paths")
final class C<T> {
... | apache-2.0 |
sschiau/swift | test/Sema/enum_raw_representable.swift | 2 | 6816 | // RUN: %target-typecheck-verify-swift
enum Foo : Int {
case a, b, c
}
var raw1: Int = Foo.a.rawValue
var raw2: Foo.RawValue = raw1
var cooked1: Foo? = Foo(rawValue: 0)
var cooked2: Foo? = Foo(rawValue: 22)
enum Bar : Double {
case a, b, c
}
func localEnum() -> Int {
enum LocalEnum : Int {
case a, b, c
... | apache-2.0 |
GrandCentralBoard/GrandCentralBoard | Pods/Operations/Sources/Features/Shared/Reachability.swift | 2 | 10679 | //
// Reachability.swift
// Operations
//
// Created by Daniel Thorpe on 24/07/2015.
// Copyright (c) 2015 Daniel Thorpe. All rights reserved.
//
import Foundation
import SystemConfiguration
// swiftlint:disable variable_name
public struct Reachability {
/// Errors which can be thrown or returned.
publi... | gpl-3.0 |
sggtgb/Sea-Cow | seaCow/ReadingList.swift | 1 | 1925 | //
// ReadingList.swift
// seaCow
//
// Created by Scott Gavin on 5/7/15.
// Copyright (c) 2015 Scott G Gavin. All rights reserved.
//
import UIKit
import Foundation
class ReadingList: NSObject , NSCoding {
var articles: [ArticleData]! = []
override init() {
println("Initalizing Reading List")
... | mpl-2.0 |
huonw/swift | validation-test/compiler_crashers_fixed/00875-getselftypeforcontainer.swift | 65 | 874 | // 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 |
EgzonArifi/Daliy-Gifs | Daily Gifs/Constants.swift | 1 | 310 | //
// Constants.swift
// Daily Gifs
//
// Created by EgzonArifi on 3/5/17.
// Copyright © 2017 Overjump. All rights reserved.
//
import Foundation
let HOME_URL = "https://api.giphy.com/v1/gifs/trending?api_key=dc6zaTOxFJmzC"
let SEARCH_URL = "https://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC"
| mit |
vector-im/riot-ios | Riot/Modules/KeyBackup/Recover/Passphrase/KeyBackupRecoverFromPassphraseViewController.swift | 2 | 9609 | /*
Copyright 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | apache-2.0 |
MaximeLM/superlachaise-ios | SuperLachaise/UI/Gallery/GalleryViewController.swift | 1 | 174 | //
// GalleryViewController.swift
// SuperLachaise
//
// Created by Maxime Le Moine on 10/06/2017.
//
//
import UIKit
class GalleryViewController: UIViewController {
}
| mit |
eofster/Telephone | ReceiptValidation/DeviceGUID.swift | 1 | 1901 | //
// DeviceGUID.swift
// Telephone
//
// Copyright © 2008-2016 Alexey Kuznetsov
// Copyright © 2016-2021 64 Characters
//
// Telephone is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3... | gpl-3.0 |
simonnarang/Fandom | Desktop/Fandom-IOS-master/Fandomm/ShareToFandomTableViewController.swift | 1 | 8471 | //
// ShareToFandomTableViewController.swift
// Fandomm
//
// Created by Simon Narang on 1/9/16.
// Copyright © 2016 Simon Narang. All rights reserved.
//
import UIKit
class ShareToFandomTableViewController: UITableViewController {
@IBOutlet weak var labell: UILabel!
var counter = Int()
let redisClien... | unlicense |
rayho/CodePathTwitter | CodePathTwitter/DetailController.swift | 1 | 7136 | //
// DetailController.swift
// CodePathTwitter
//
// Created by Ray Ho on 9/29/14.
// Copyright (c) 2014 Prime Rib Software. All rights reserved.
//
import UIKit
class DetailController: UIViewController, TweetActionButtonsDelegate {
var tweet: Tweet!
var avatarView: UIImageView!
var tweetTextView: UI... | mit |
mattiasjahnke/arduino-projects | matrix-painter/iOS/PixelDrawer/Carthage/Checkouts/flow/Flow/Delegate.swift | 1 | 1951 | //
// Delegate.swift
// Flow
//
// Created by Måns Bernhardt on 2017-01-16.
// Copyright © 2017 iZettle. All rights reserved.
//
import Foundation
/// Helper to manage the life time of a delegate `(Arg) -> Ret`.
public final class Delegate<Arg, Ret> {
private var callbackAndDisposable: (callback: (Arg) -> Re... | mit |
cactis/SwiftEasyKit | Source/Classes/Scrollable2ViewController.swift | 1 | 2443 | //
// Scrollable2ViewController.swift
import UIKit
open class Scrollable2ViewController: DefaultViewController {
public var contentView = UIScrollView()
override open func viewDidLoad() {
super.viewDidLoad()
}
override open func layoutUI() {
super.layoutUI()
contentView = view.addScrollView()
... | mit |
chatappcodepath/ChatAppSwift | LZChat/SignInViewController.swift | 1 | 3116 | //
//
// License
// Copyright (c) 2017 chatappcodepath
// Released under an MIT license: http://opensource.org/licenses/MIT
//
import UIKit
import Firebase
@objc(SignInViewController)
class SignInViewController: UIViewController, GIDSignInUIDelegate {
@IBOutlet weak var emailField: UITextField!
@IBOutlet wea... | mit |
blisslog/UI-Imitation-DailyBeast | NEWS/ArticleCell.swift | 1 | 926 | //
// NewsCell.swift
// NEWS
//
// Created by BlissLog on 2016. 1. 6..
// Copyright © 2016년 BlissLog. All rights reserved.
//
import UIKit
import MGSwipeTableCell
class ArticleCell: MGSwipeTableCell, BGImageFlowProtocol {
@IBOutlet weak var title: UILabel!
@IBOutlet weak var desc: UILabel!
@IBOutlet ... | mit |
KarlWarfel/nutshell-ios | Nutshell/Resources/NutshellUIView.swift | 1 | 1276 | /*
* Copyright (c) 2015, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program is distributed in the hope th... | bsd-2-clause |
Suzhccc/DrawEffectWithSwift | 抽屉效果WithSwitf/抽屉效果WithSwitf/SSExtension.swift | 1 | 306 | //
// SSExtension.swift
// 抽屉效果WithSwitf
//
// Created by Suzh on 16/1/27.
// Copyright © 2016年 Suzh. All rights reserved.
//
import Foundation
import UIKit
class SSExtension {
//获取bounds
func getMainScreenBouns() -> CGRect {
return UIScreen.mainScreen().bounds
}
} | apache-2.0 |
kraffslol/react-native-braintree-xplat | ios/RCTBraintree/Braintree/UnitTests/BTDropInUtil_Tests.swift | 2 | 770 | import XCTest
class BTDropInUtil_Tests: XCTestCase {
func testBTDropInUtil_topViewControllerReturnsViewController() {
let topInitialTopController = BTDropInUtil.topViewController()
XCTAssertNotNil(topInitialTopController, "Top UIViewController should not be nil")
let windowRootController =... | mit |
Keenan144/SpaceKase | SpaceKase/GameScene.swift | 1 | 9887 | //
// GameScene.swift
// SpaceKase
//
// Created by Keenan Sturtevant on 5/29/16.
// Copyright (c) 2016 Keenan Sturtevant. All rights reserved.
//
import SpriteKit
class GameScene: SKScene, SKPhysicsContactDelegate {
let shipCategory: UInt32 = 0x1 << 1
let rockCategory: UInt32 = 0x1 << 2
let boun... | mit |
TangGuowei/SwiftDemo | Chapter1/Chapter1/AppDelegate.swift | 1 | 2130 | //
// AppDelegate.swift
// Chapter1
//
// Created by Tom on 15/4/9.
// Copyright (c) 2015年 Tom. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOption... | mit |
rharri/EventsAndFestivals | Package.swift | 1 | 427 | import PackageDescription
let package = Package(
name: "EventsAndFestivals",
dependencies: [
.Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 3),
.Package(url: "https://github.com/OpenKitten/MongoKitten.git", majorVersion: 3)
],
exclude: [
"Config",
... | mit |
eurofurence/ef-app_ios | Packages/EurofurenceComponents/Tests/ScheduleComponentTests/Presenter Tests/Share Command/SchedulePresenterShareCommandTests.swift | 1 | 1207 | import EurofurenceModel
import ScheduleComponent
import XCTest
import XCTScheduleComponent
class SchedulePresenterShareCommandTests: XCTestCase {
func testShareCommand() throws {
let eventViewModel = StubScheduleEventViewModel.random
let eventGroupViewModel = ScheduleEventGroupViewModel(title: .ra... | mit |
Yalantis/EatFit | EatFit/Vendors/YALPageController/YALPageController.swift | 1 | 5547 | //
// YALPageController.swift
// EatFit
//
// Created by Dmitriy Demchenko on 7/12/16.
// Copyright © 2016 aleksey chernish. All rights reserved.
//
import UIKit
fileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case let (l?, r?):
return l < r
case (nil, _?):
return ... | mit |
ted005/Qiu_Suo | Qiu Suo/Qiu Suo/TWNodeSearchTableViewController.swift | 2 | 5132 | //
// TWNodeSearchTableViewController.swift
// V2EX Explorer
//
// Created by Robbie on 15/8/23.
// Copyright (c) 2015年 Ted Wei. All rights reserved.
//
import UIKit
import Alamofire
import SwiftyJSON
class TWNodeSearchTableViewController: UITableViewController, UISearchResultsUpdating, UISearchBarDelegate{
... | gpl-2.0 |
RocketChat/Rocket.Chat.iOS | Rocket.ChatTests/Models/SubscriptionQueriesSpec.swift | 1 | 2506 | //
// SubscriptionQueriesSpec.swift
// Rocket.ChatTests
//
// Created by Rafael Kellermann Streit on 23/04/18.
// Copyright © 2018 Rocket.Chat. All rights reserved.
//
import XCTest
import RealmSwift
@testable import Rocket_Chat
class SubscriptionManagerQueriesSpec: XCTestCase {
override func tearDown() {
... | mit |
pffan91/FUSION | FUSION/Templates/FUSION/Scene.xctemplate/ConfiguratorUIViewController/___FILEBASENAME___ViewModel.swift | 2 | 417 | //___FILEHEADER___
// Powered by FUSION Architecture
import UIKit
class ___VARIABLE_sceneName___ViewModel: NSObject {
// MARK: - Variables
var cellItems: [AnyObject] = []
var inputData: ___VARIABLE_sceneName___SceneInputData = ___VARIABLE_sceneName___SceneInputData()
// MARK: - Generators
f... | mit |
MaartenBrijker/project | project/External/AudioKit-master/AudioKit/iOS/AudioKit/AudioKit.playground/Pages/Moog Ladder Filter.xcplaygroundpage/Contents.swift | 2 | 2635 | //: [TOC](Table%20Of%20Contents) | [Previous](@previous) | [Next](@next)
//:
//: ---
//:
//: ## Moog Ladder Filter
//: ### One of the coolest filters available in AudioKit is the Moog Ladder. It's based off of Robert Moog's iconic ladder filter, which was the first implementation of a voltage - controlled filter used i... | apache-2.0 |
EstefaniaGilVaquero/ciceIOS | APP_CompartirContacto/SYBTableViewCell.swift | 1 | 889 | //
// SYBTableViewCell.swift
// APP_CompartirContacto
//
// Created by cice on 9/9/16.
// Copyright © 2016 cice. All rights reserved.
//
import UIKit
class SYBTableViewCell: UITableViewCell {
//parsear datos del json
//http://91.126.140.33:5554/pagina2/home/index
@IBOutlet weak var myNombre... | apache-2.0 |
hevertonrodrigues/HRSideBar | HRSideBar/HRSideBarView.swift | 1 | 1079 | //
// HRSideBarView.swift
// HRSideBar
//
// Created by Heverton Rodrigues on 23/09/14.
// Copyright (c) 2014 Heverton Rodrigues. All rights reserved.
//
import Foundation
import UIKit
class HRSideBarView :UIView
{
private var width :Double = Double()
private var height :Double = Double()
overrid... | mit |
apple/swift | test/refactoring/ConvertAsync/convert_params_single.swift | 7 | 17585 | // RUN: %empty-directory(%t)
// REQUIRES: concurrency
func withError() async throws -> String { "" }
func withError(_ completion: @escaping (String?, Error?) -> Void) { }
func notOptional() async throws -> String { "" }
func notOptional(_ completion: @escaping (String, Error?) -> Void) { }
func errorOnly() async th... | apache-2.0 |
cburrows/swift-protobuf | Sources/SwiftProtobuf/timestamp.pb.swift | 1 | 9191 | // DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: google/protobuf/timestamp.proto
//
// For information on using the generated types, please see the documentation:
// https://github.com/apple/swift-protobuf/
// Protocol Buffers - Go... | apache-2.0 |
apple/swift | test/Parse/operator_decl.swift | 4 | 5205 | // RUN: %target-typecheck-verify-swift
prefix operator +++ {} // expected-error {{operator should no longer be declared with body}} {{20-23=}}
postfix operator +++ {} // expected-error {{operator should no longer be declared with body}} {{21-24=}}
infix operator +++ {} // expected-error {{operator should no longer be ... | apache-2.0 |
anasmeister/nRF-Coventry-University | nRF Toolbox/MainViewController/NORMainViewController.swift | 1 | 3369 | //
// NORMainViewController.swift
// nRF Toolbox
//
// Created by Mostafa Berg on 27/04/16.
// Copyright © 2016 Nordic Semiconductor. All rights reserved.
// Edited by Anastasios Panagoulias on 11/01/07
import UIKit
class NORMainViewController: UIViewController, UICollectionViewDataSource, UIAlertViewDelegate {
... | bsd-3-clause |
ben-ng/swift | validation-test/compiler_crashers_fixed/00947-void.swift | 1 | 716 | // 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 https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the li... | apache-2.0 |
ben-ng/swift | validation-test/compiler_crashers_fixed/26238-swift-archetypebuilder-potentialarchetype-isbetterarchetypeanchor.swift | 1 | 451 | // 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 https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the li... | apache-2.0 |
ben-ng/swift | validation-test/compiler_crashers_fixed/27067-swift-valuedecl-settype.swift | 1 | 458 | // 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 https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the li... | apache-2.0 |
cloudinary/cloudinary_ios | Cloudinary/Classes/Core/Features/CacheSystem/StorehouseLibrary/Enum/StorehouseError.swift | 1 | 1754 | //
// StorehouseError.swift
//
// Copyright (c) 2020 Cloudinary (http://cloudinary.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limit... | mit |
cnoon/swift-compiler-crashes | crashes-duplicates/15065-swift-sourcemanager-getmessage.swift | 11 | 248 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
{
case
var
[ {
class
String {
{
}
let a {
for {
deinit {
func a {
class
case ,
| mit |
tlax/looper | looper/Model/Camera/Record/MCameraRecord.swift | 1 | 575 | import Foundation
class MCameraRecord
{
var items:[MCameraRecordItem]
init()
{
items = []
}
//MARK: public
func activeVersion() -> MCameraRecord?
{
var active:MCameraRecord?
for item:MCameraRecordItem in items
{
if item.act... | mit |
brentdax/swift | test/Driver/multi-threaded.swift | 1 | 4722 | // RUN: %empty-directory(%t)
// RUN: %target-swiftc_driver -driver-print-jobs -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -emit-module -o test.swiftmodule | %FileCheck -check-prefix=MODULE %s
// RUN: echo "{\"%s\": {\"assembly\": \"/build/multi-threaded.s\"}, \"%S/Inputs/main.swift\": {\"assembl... | apache-2.0 |
DaiYue/HAMLeetcodeSwiftSolutions | solutions/31_Next_Permutation.playground/Contents.swift | 1 | 1792 | // #31 Next Permutation https://leetcode.com/problems/next-permutation/
// 代码写起来很简单,数学推导稍微多一些。方法如下:
// 从右往左找第一个比右边小的数字(如果找不到,逆转整个数组即可),其 index 为 leftNumIndex。再找它右边比它大的数字(一定存在)里最小的,由于右边是降序,从右往左找的第一个即是,index 为 rightNumIndex。swap 两个 index 的 num。
// leftNumIndex 左边是不变的,下面看右边。右边本来是降序,能保证 swap 过后也是(不严格的)降序。换成升序,只需逆转这部分。
// 时... | mit |
alexsteinerde/KHAForm | KHAForm/KHAPickerFormCell.swift | 1 | 1674 | //
// KHAPickerFormCell.swift
// Pods
//
// Created by Alex on 06.09.17.
//
//
import UIKit
class KHAPickerFormCell: KHAFormCell {
class var cellID: String {
return "KHAPickerCell"
}
fileprivate let kCellHeight: CGFloat = 216
override init(style: UITableViewCell.CellStyle, re... | mit |
tkremenek/swift | validation-test/compiler_crashers_fixed/28707-false-encountered-error-in-diagnostic-text.swift | 40 | 440 | // 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 |
Vespen/SimpleJson | Tests/Features/Json+Number.swift | 1 | 4867 | //
// Json+Number.swift
//
// Copyright (c) 2017 Anton Lagutin
//
// 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... | mit |
APUtils/APExtensions | APExtensions/Classes/Core/_Extensions/_Foundation/UInt+Utils.swift | 1 | 856 | //
// UInt+Utils.swift
// APExtensions-example
//
// Created by Anton Plebanovich on 4/3/21.
// Copyright © 2021 Anton Plebanovich. All rights reserved.
//
import Foundation
public extension UInt {
/// Returns `self` as `Int` if possible
var asInt: Int? { Int(exactly: self) }
/// Returns `se... | mit |
aptyr/-github-iOS | #github-ios/presenter/LoginPresentable.swift | 1 | 298 | //
// LoginPresenter.swift
// #github-ios
//
// Created by Artur on 05/04/2017.
// Copyright © 2017 Artur Matusiak. All rights reserved.
//
import Foundation
protocol LoginPresentable : class, BasePresenter {
init(view: LoginView)
func obtain(accessToken: AccessToken)
}
| apache-2.0 |
midoks/Swift-Learning | GitHubStar/GitHubStar/GitHubStar/Vendor/MDDropDownList/MDDropDownList.swift | 1 | 7663 | //
//
// Created by midoks on 15/12/30.
// Copyright © 2015年 midoks. All rights reserved.
//
import UIKit
class MDDropDownBackView:UIView {
var _backView:UIView?
override init(frame: CGRect) {
super.init(frame: frame)
self.backgroundColor = UIColor.clear
/... | apache-2.0 |
cdmx/MiniMancera | miniMancera/View/Option/TamalesOaxaquenos/Physic/VOptionTamalesOaxaquenosPhysicFinish.swift | 1 | 1597 | import SpriteKit
class VOptionTamalesOaxaquenosPhysicFinish:ViewGameNode<MOptionTamalesOaxaquenos>
{
private let positionX:CGFloat
private let height:CGFloat
private let width_2:CGFloat
private let height_2:CGFloat
private let kWidth:CGFloat = 250
override init(controller:ControllerGame<MO... | mit |
mrdepth/EVEUniverse | Legacy/Neocom/Neocom/MapLocationPickerPresenter.swift | 2 | 524 | //
// MapLocationPickerPresenter.swift
// Neocom
//
// Created by Artem Shimanski on 9/27/18.
// Copyright © 2018 Artem Shimanski. All rights reserved.
//
import Foundation
class MapLocationPickerPresenter: Presenter {
typealias View = MapLocationPickerViewController
typealias Interactor = MapLocationPickerInte... | lgpl-2.1 |
lieonCX/Live | Live/View/Home/Room/CollectionLiveTagView.swift | 1 | 2317 | //
// CollectionLiveTagView.swift
// Live
//
// Created by fanfans on 2017/7/4.
// Copyright © 2017年 ChengDuHuanLeHui. All rights reserved.
//
import UIKit
class CollectionLiveTagView: UIView {
fileprivate lazy var bgView: UIView = {
let bgView = UIView()
self.backgroundColor = UIColor.black .... | mit |
ddddxxx/LyricsX | LyricsX/Controller/MenuBarLyricsController.swift | 2 | 5172 | //
// MenuBarLyrics.swift
// LyricsX - https://github.com/ddddxxx/LyricsX
//
// 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 https://mozilla.org/MPL/2.0/.
//
import Cocoa
import CXExtension... | mpl-2.0 |
emadhegab/GenericDataSource | Example/Example/TitleCollectionViewCell.swift | 2 | 447 | //
// TitleCollectionViewCell.swift
// Example
//
// Created by Mohamed Afifi on 4/3/16.
// Copyright © 2016 Mohamed Afifi. All rights reserved.
//
import UIKit
class TitleCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var textLabel: UILabel?
override func awakeFromNib() {
super.awake... | mit |
luckymore0520/GreenTea | Loyalty/Cards/Model/Card.swift | 1 | 3017 | //
// Card.swift
// Loyalty
//
// Created by WangKun on 16/4/29.
// Copyright © 2016年 WangKun. All rights reserved.
//
import UIKit
import AVOSCloud
class Card: AVObject,AVSubclassing {
@NSManaged var activity:Activity
@NSManaged var ownerId:String
@NSManaged var currentCount:Int
func getFull... | mit |
lorentey/swift | test/decl/protocol/req/where_clause.swift | 36 | 907 | // RUN: %target-typecheck-verify-swift
// rdar://problem/31401161
class C1 {}
protocol P1 {
associatedtype Element
}
protocol P2 : P1 {
associatedtype SubSequence : P1 // expected-note{{'SubSequence' declared here}}
}
protocol P3 : P2 {
associatedtype SubSequence : P2 // expected-warning{{redeclaration of ass... | apache-2.0 |
Rapid-SDK/ios | Examples/RapiDO - ToDo list/RapiDO iOS/ListViewController.swift | 1 | 9786 | //
// ListViewController.swift
// ExampleApp
//
// Created by Jan on 05/05/2017.
// Copyright © 2017 Rapid. All rights reserved.
//
import UIKit
import Rapid
class ListViewController: UIViewController {
var searchedTerm = ""
var searchTimer: Timer?
@IBOutlet weak var tableView: UITableView!
... | mit |
alblue/swift | test/SILGen/global_resilience.swift | 1 | 4303 | // RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -enable-sil-ownership -enable-resilience -emit-module-path=%t/resilient_global.swiftmodule -module-name=resilient_global %S/../Inputs/resilient_global.swift
// RUN: %target-swift-emit-silgen -I %t -enable-resilience -enable-sil-ownership -parse-as... | apache-2.0 |
mozilla-mobile/firefox-ios | Client/Frontend/Browser/Tab Management/TabFileManager.swift | 2 | 637 | // 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 Shared
protocol TabFileManager {
func removeItem(at URL: URL) throws
func fileExists... | mpl-2.0 |
mozilla-mobile/firefox-ios | Client/Frontend/Login Management/LoginListSelectionHelper.swift | 2 | 1472 | // 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
/// Helper that keeps track of selected indexes for LoginListViewController
public class LoginListSe... | mpl-2.0 |
mozilla-mobile/firefox-ios | Client/Frontend/TabContentsScripts/NightModeHelper.swift | 2 | 2141 | // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0
import Foundation
import WebKit
import Shared
struct NightModePrefsKey {
static let NightModeButtonIsInMenu = Pref... | mpl-2.0 |
paymentez/paymentez-ios | PaymentSDK/SkyFloatingLabelTextField.swift | 1 | 19615 | // Copyright 2016-2017 Skyscanner Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... | mit |
biohazardlover/NintendoEverything | Pods/SwiftSoup/Sources/Attribute.swift | 1 | 4267 | //
// Attribute.swift
// SwifSoup
//
// Created by Nabil Chatbi on 29/09/16.
// Copyright © 2016 Nabil Chatbi.. All rights reserved.
//
import Foundation
open class Attribute {
/// The element type of a dictionary: a tuple containing an individual
/// key-value pair.
static let booleanAttributes: [St... | mit |
borglab/SwiftFusion | Sources/SwiftFusion/Inference/PCAEncoder.swift | 1 | 2929 | // Copyright 2020 The SwiftFusion 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 ... | apache-2.0 |
lizhaoLoveIT/sinaWeiBo | sinaWeiBo/sinaWeiBo/main.swift | 1 | 234 | //
// main.swift
// sinaWeiBo
//
// Created by 李朝 on 16/6/3.
// Copyright © 2016年 IFengXY. All rights reserved.
//
import UIKit
UIApplicationMain(Process.argc, Process.unsafeArgv, nil, NSStringFromClass(AppDelegate.self)) | mit |
AlexLittlejohn/OMDBMovies | OMDBMovies/Models/MovieResult.swift | 1 | 615 | //
// MovieResult.swift
// OMDBMovies
//
// Created by Alex Littlejohn on 2016/04/04.
// Copyright © 2016 Alex Littlejohn. All rights reserved.
//
import UIKit
struct MovieResult {
let title: String
let year: String
let poster: String
let imdbID: String
let type: String
}
extension MovieResul... | mit |
wuleijun/SwiftPractice | SwiftPractice/SwiftPractice/RJUpDownPresentedVC.swift | 1 | 1158 | //
// RJUpDownPresentedVC.swift
// SwiftPractice
//
// Created by 吴蕾君 on 16/3/14.
// Copyright © 2016年 rayjuneWu. All rights reserved.
//
import UIKit
class RJUpDownPresentedVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the v... | mit |
wj2061/ios7ptl-swift3.0 | ch24-DeepObjc/MethodSwizzle/MethodSwizzle/RNSwizzle.swift | 1 | 562 | //
// RNSwizzle.swift
// MethodSwizzle
//
// Created by WJ on 15/12/3.
// Copyright © 2015年 wj. All rights reserved.
//
import Foundation
extension NSObject{
class func swizzleSelector(_ origSelector:Selector,newIMP:IMP)->IMP{
let origMethod = class_getInstanceMethod(self, origSelector)
let ori... | mit |
kstaring/swift | test/IRGen/closure.swift | 4 | 3284 | // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=x86_64
// -- partial_apply context metadata
// CHECK: [[METADATA:@.*]] = private constant %swift.full_boxmetadata { void (%swift.refcounted*)* @objectdestroy, i8** null, %swift.type { i... | apache-2.0 |
diegosanchezr/Chatto | ChattoAdditions/Source/Input/ChatInputBarAppearance.swift | 1 | 1481 | /*
The MIT License (MIT)
Copyright (c) 2015-present Badoo Trading Limited.
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 us... | mit |
natecook1000/swift | validation-test/Sema/type_checker_perf/slow/rdar22770433.swift | 2 | 333 | // RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
// REQUIRES: tools-release,no_asserts
func test(n: Int) -> Int {
return n == 0 ? 0 : (0..<n).reduce(0) {
// expected-error@-1 {{reasonable time}}
($0 > 0 && $1 % 2 == 0) ? ((($0 + $1) - ($0 + $1)) / ($1 - $0)) + (($0 + $1) / ($1 - $0)... | apache-2.0 |
deltaDNA/ios-sdk | Tests/DDNAEventActionTests.swift | 1 | 7576 | import XCTest
@testable import DeltaDNA
class DDNAEventActionTests: XCTestCase {
var event: DDNAEvent!
var actionStore: DDNAActionStore!
var uut: DDNAEventAction!
override func setUpWithError() throws {
event = DDNAEvent(name: "test")
actionStore = DDNAActionStoreMock(path: "test")... | apache-2.0 |
practicalswift/swift | test/Interpreter/class_resilience.swift | 1 | 10484 | // RUN: %empty-directory(%t)
// RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_struct)) -Xfrontend -enable-resilience %S/../Inputs/resilient_struct.swift -emit-module -emit-module-path %t/resilient_struct.swiftmodule -module-name resilient_struct
// RUN: %target-codesign %t/%target-library-name(resil... | apache-2.0 |
sjpsega/JustDoIt | JustDoIt/view/base/JDIBaseVC.swift | 1 | 845 | //
// JDIBaseVCViewController.swift
// JustDoIt
//
// Created by sjpsega on 15/10/9.
// Copyright © 2015年 sjpsega. All rights reserved.
//
import UIKit
class JDIBaseVC: UIViewController {
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
super.init(nibName:nibNameOrNil,... | mit |
zalando/ModularDemo | ZContainer/ZContainerTests/DefaultContainerTests.swift | 1 | 716 | //
// DefaultContainerTests.swift
// ZContainerTests
//
// Created by Oliver Eikemeier on 25.09.15.
// Copyright © 2015 Zalando SE. All rights reserved.
//
import XCTest
@testable import ZContainer
class DefaultContainerTests: XCTestCase {
override func setUp() {
super.setUp()
le... | bsd-2-clause |
huangboju/Moots | Examples/SwiftUI/Mac/swiftui-mac-master/SwiftUI-Mac/Prefs/Prefs.swift | 1 | 417 | //
// Prefs.swift
// SwiftUI-Mac
//
// Created by Sarah Reichelt on 7/11/19.
// Copyright © 2019 Sarah Reichelt. All rights reserved.
//
import Foundation
class Prefs: ObservableObject {
@Published var showCopyright: Bool = UserDefaults.standard.bool(forKey: "showCopyright") {
didSet {
... | mit |
ResearchSuite/ResearchSuiteAppFramework-iOS | Source/Core/Classes/RSAFCoreState.swift | 1 | 2949 | //
// RSAFReduxState.swift
// Pods
//
// Created by James Kizer on 3/22/17.
//
//
import UIKit
import ReSwift
import ResearchKit
import ResearchSuiteTaskBuilder
import ResearchSuiteResultsProcessor
public final class RSAFCoreState: RSAFBaseState {
let loggedIn: Bool
public typealias ActivityQueueElem... | apache-2.0 |
DragonCherry/AssetsPickerViewController | AssetsPickerViewController/Classes/Photo/Controller/AssetsPhotoViewController+Selection.swift | 1 | 4248 | //
// AssetsPhotoViewController+Selection.swift
// AssetsPickerViewController
//
// Created by DragonCherry on 2020/07/03.
//
import UIKit
import Photos
// MARK: - UICollectionViewDelegate
extension AssetsPhotoViewController: UICollectionViewDelegate {
@available(iOS 13.0, *)
public func collectionView(_ ... | mit |
dasdom/Storybard2CodeApp | Example/LoginDemo/LoginDemo/FooViewController.swift | 2 | 864 | //
// FooViewController.swift
// LoginDemo
//
// Created by dasdom on 13.05.16.
// Copyright © 2016 dasdom. All rights reserved.
//
import UIKit
class FooViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
... | mit |
alldne/PolarKit | PolarKit/Classes/PolarCoordinatedView.swift | 1 | 1131 | //
// PolarCoordinatedView.swift
// PolarKit
//
// Created by Yonguk Jeong on 2016. 4. 18..
// Copyright © 2016년 Yonguk Jeong. All rights reserved.
//
import UIKit
open class PolarCoordinatedView: UIView {
override open class var layerClass : AnyClass {
return PolarCoordinatedLayer.self
}
ove... | mit |
wangjianquan/wjKeyBoard | wjKeyBoard/PhotoBrowersViewController.swift | 1 | 2003 | //
// PhotoBrowersViewController.swift
// CustomKeyboard
//
// Created by landixing on 2017/6/16.
// Copyright © 2017年 WJQ. All rights reserved.
//
import UIKit
class PhotoBrowersViewController: UIViewController {
var imageView : UIImageView = {
let imageview : UIImageView = UIImageView()
imag... | apache-2.0 |
artkirillov/DesignPatterns | Iterator.playground/Pages/2.xcplaygroundpage/Contents.swift | 1 | 1500 | final class Destination {
let name: String
init(name: String) {
self.name = name
}
}
final class DestinationList: Sequence {
var destinations: [Destination]
init(destinations: [Destination]) {
self.destinations = destinations
}
func makeIterator() -> Destinati... | mit |
blockchain/My-Wallet-V3-iOS | Modules/Platform/Sources/PlatformUIKit/NewActivity/ActivityItemViewModel.swift | 1 | 16355 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import BlockchainComponentLibrary
import Localization
import PlatformKit
import RxDataSources
import ToolKit
public final class ActivityItemViewModel: IdentifiableType, Hashable {
typealias AccessibilityId = Accessibility.Identifier.Activity
type... | lgpl-3.0 |
blockchain/My-Wallet-V3-iOS | Modules/FeatureNFT/Sources/FeatureNFTData/Core/Repository/ViewWaitlistRegistrationRepository.swift | 1 | 1122 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import Combine
import Errors
import FeatureNFTDomain
import NetworkKit
import ToolKit
public final class ViewWaitlistRegistrationRepository: ViewWaitlistRegistrationRepositoryAPI {
private let client: FeatureNFTClientAPI
private let emailAddressP... | lgpl-3.0 |
andreamazz/Tropos | Sources/TroposIntents/IntentHandler.swift | 3 | 312 | import Intents
import TroposCore
final class IntentHandler: INExtension {
override func handler(for intent: INIntent) -> Any {
guard intent is CheckWeatherIntent else {
preconditionFailure("Unexpected intent type: \(intent)")
}
return CheckWeatherIntentHandler()
}
}
| mit |
slavapestov/swift | validation-test/compiler_crashers_fixed/26948-swift-nominaltypedecl-getmembers.swift | 4 | 373 | // 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
struct c<T where h:A{
struct b{
var b
let a=b{
if{
{
protocol A{
{{
}
}
struct b
{
class A{
let a{class
e... | apache-2.0 |
Reality-Virtually-Hackathon/Team-2 | WorkspaceAR/User Flow VCs/ViewController+Prompts.swift | 1 | 2972 | //
// ViewController+Prompts.swift
// WorkspaceAR
//
// Created by Avery Lamp on 10/7/17.
// Copyright © 2017 Apple. All rights reserved.
//
import UIKit
let hidePromptNotificationName = Notification.Name("HidePromptNotification")
extension ViewController{
func checkPrompts(){
if DataManager.share... | mit |
otto-schnurr/MetalMatrixMultiply-swift | Test/MultiplicationData_tests.swift | 1 | 1897 | //
// MultiplicationData_tests.swift
//
// Created by Otto Schnurr on 12/29/2015.
// Copyright © 2015 Otto Schnurr. All rights reserved.
//
// MIT License
// file: ../LICENSE.txt
// http://opensource.org/licenses/MIT
//
import XCTest
class MultiplicationData_tests: XCTestCase {
func test_validDim... | mit |
KennethTsang/NumberField | Example/Tests/Tests.swift | 1 | 761 | import UIKit
import XCTest
import NumberField
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 ... | mit |
ioswpf/CalendarKit | demo/AppDelegate.swift | 1 | 2157 | //
// AppDelegate.swift
// demo
//
// Created by wpf on 2017/3/20.
// Copyright © 2017年 wpf. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions... | mit |
CodeEagle/XcodeScriptsKit | build_number.swift | 1 | 1147 | #!/usr/bin/env xcrun -sdk macosx swift
import Foundation
func addBuildNumber() {
let buildKey = "CFBundleVersion"
let totalKey = "total"
var arguments: [String] = CommandLine.arguments
let dir = arguments.removeFirst() as NSString
let buildInfo = arguments.removeFirst()
let infoPlistpath = arg... | mit |
nakiostudio/EasyPeasy | Example/Tests/NodeTests.swift | 1 | 26391 | // The MIT License (MIT) - Copyright (c) 2016 Carlos Vidal
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT H... | mit |
Kinglioney/DouYuTV | DouYuTV/DouYuTV/Classes/Main/View/CollectionNormalCell.swift | 1 | 676 | //
// CollectionNormalCell.swift
// DouYuTV
//
// Created by apple on 2017/7/18.
// Copyright © 2017年 apple. All rights reserved.
//
import UIKit
class CollectionNormalCell: CollectionBaseCell {
//MARK:- 控件属性
@IBOutlet weak var roomNameLabel: UILabel!
//MARK:- 定义模型属性
override var anchor : AnchoMode... | mit |
shaps80/Peek | Pod/Classes/GraphicsRenderer/PDFRenderer.swift | 1 | 8935 | /*
Copyright © 03/10/2016 Snippex Ltd
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, d... | mit |
yujinjcho/movie_recommendations | ios_ui/MovieRecTests/Common/MockNetworkManager.swift | 1 | 618 | //
// MockNetworkManager.swift
// MovieRecTests
//
// Created by Yujin Cho on 11/14/17.
// Copyright © 2017 Yujin Cho. All rights reserved.
//
import Foundation
@testable import MovieRec
class MockNetworkManager : NetworkManager {
var getRequestCalled : Bool = false
var postRequestCalled : Bool = false
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.