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 |
|---|---|---|---|---|---|
rdgonzalez85/BTHorizontalPageableView | BTHorizontalPageableView/BTHorizontalPageableView/BTHorizontalPageableView.swift | 1 | 5738 | //
// BTHorizontalPageableView.swift
//
// Created by Rodrigo Gonzalez on 1/21/16.
// Copyright © 2016 Rodrigo Gonzalez. All rights reserved.
//
import UIKit
/**
The BTHorizontalPageableView class defines a rectangular area on the screen and the interfaces for managing the content in that area. It provides suppo... | mit |
blockchain/My-Wallet-V3-iOS | Modules/FeatureKYC/Sources/FeatureKYCUI/NavigationCTA.swift | 1 | 1162 | // Copyright © Blockchain Luxembourg S.A. All rights reserved.
import BlockchainComponentLibrary
import Localization
import PlatformUIKit
import UIKit
private typealias L10n = LocalizationConstants.NewKYC.Steps.AccountUsage
enum NavigationCTA {
case dismiss
case help
case skip
case none
}
extension ... | lgpl-3.0 |
LimCrazy/SwiftProject3.0-Master | SwiftPreject-Master/SwiftPreject-Master/Class/CustomTabBarVC.swift | 1 | 3414 | //
// CustomTabBarVC.swift
// SwiftPreject-Master
//
// Created by lim on 2016/12/11.
// Copyright © 2016年 Lim. All rights reserved.
//
import UIKit
class CustomTabBarVC: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
func setupUI() -> ... | apache-2.0 |
adamyanalunas/GrowlerFills-iOS | CaliforniaGrowlerFillTests/CaliforniaGrowlerFillTests.swift | 1 | 946 | //
// CaliforniaGrowlerFillTests.swift
// CaliforniaGrowlerFillTests
//
// Created by Adam Yanalunas on 7/13/14.
// Copyright (c) 2014 Subtracktion. All rights reserved.
//
import UIKit
import XCTest
class CaliforniaGrowlerFillTests: XCTestCase {
override func setUp() {
super.setUp()
// P... | mit |
fs/ios-base-swift | Swift-Base/Tools/Views/TextView.swift | 1 | 1651 | //
// TextView.swift
// Tools
//
// Created by Oleg Gorelov on 30/05/2018.
// Copyright © 2018 Flatstack. All rights reserved.
//
import UIKit
@IBDesignable public class TextView: UITextView {
// MARK: - Instance Properties
@IBInspectable public var bottomOutset: CGFloat {
get {
retu... | mit |
wrutkowski/Lucid-Weather-Clock | Pods/Charts/Charts/Classes/Renderers/ChartYAxisRendererHorizontalBarChart.swift | 6 | 11759 | //
// ChartYAxisRendererHorizontalBarChart.swift
// Charts
//
// Created by Daniel Cohen Gindi on 3/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/Charts
//
import Foundation
import Core... | mit |
mmllr/CleanTweeter | CleanTweeter/UseCases/NewPost/UI/Presenter/TagAndMentionHighlightingTransformer.swift | 1 | 1306 |
import Foundation
class TagAndMentionHighlightingTransformer : ValueTransformer {
let resourceFactory: ResourceFactory
init(factory: ResourceFactory) {
self.resourceFactory = factory
super.init()
}
override class func transformedValueClass() -> AnyClass {
return NSAttributedString.self
}
override class ... | mit |
hooman/swift | test/Distributed/Runtime/distributed_actor_local.swift | 1 | 2913 | // RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-distributed -parse-as-library) | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: distributed
// rdar://76038845
// UNSUPPORTED: use_os_stdlib
// UNSUPPORTED: back_deployment_runtime
// REQUIRES: rdar78290608
import _Di... | apache-2.0 |
lamb/trials | Weather/WeatherUITests/WeatherUITests.swift | 1 | 1234 | //
// WeatherUITests.swift
// WeatherUITests
//
// Created by Lamb on 15/10/21.
// Copyright © 2015年 Lamb. All rights reserved.
//
import XCTest
class WeatherUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the i... | apache-2.0 |
lorentey/swift | validation-test/stdlib/Slice/Slice_Of_DefaultedMutableRangeReplaceableCollection_FullWidth.swift | 16 | 3863 | // -*- swift -*-
//===----------------------------------------------------------------------===//
// Automatically Generated From validation-test/stdlib/Slice/Inputs/Template.swift.gyb
// Do Not Edit Directly!
//===----------------------------------------------------------------------===//
// RUN: %target-run-simple-... | apache-2.0 |
lorentey/swift | validation-test/compiler_crashers_fixed/00986-swift-unboundgenerictype-get.swift | 65 | 597 | // 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 |
NilStack/NilColorKit | NilColorKitTests/NilColorKitTests.swift | 1 | 898 | //
// NilColorKitTests.swift
// NilColorKitTests
//
// Created by Peng on 10/2/14.
// Copyright (c) 2014 peng. All rights reserved.
//
import UIKit
import XCTest
class NilColorKitTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before... | mit |
pixelmaid/piper | Palette-Knife/SocketManager.swift | 2 | 5085 | //
// SocketManager.swift
// PaletteKnife
//
// Created by JENNIFER MARY JACOBS on 6/27/16.
// Copyright © 2016 pixelmaid. All rights reserved.
//
import Foundation
import Starscream
//central manager for all requests to web socket
class SocketManager: WebSocketDelegate{
var socket = WebSocket(url: NSURL(str... | mit |
jjochen/photostickers | MessagesExtension/Scenes/Messages App/Application.swift | 1 | 1303 | //
// MessageApp.swift
// PhotoStickers
//
// Created by Jochen on 29.03.19.
// Copyright © 2019 Jochen Pfeiffer. All rights reserved.
//
import Foundation
final class Application {
private let stickerService: StickerService
private let imageStoreService: ImageStoreService
private let stickerRenderSer... | mit |
abertelrud/swift-package-manager | Sources/SPMTestSupport/SwiftPMProduct.swift | 2 | 1298 | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift open source project
//
// Copyright (c) 2019 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt f... | apache-2.0 |
LeeShiYoung/LSYWeibo | LSYWeiBoTests/LSYWeiBoTests.swift | 1 | 977 | //
// LSYWeiBoTests.swift
// LSYWeiBoTests
//
// Created by 李世洋 on 16/4/30.
// Copyright © 2016年 李世洋. All rights reserved.
//
import XCTest
@testable import LSYWeiBo
class LSYWeiBoTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called befor... | artistic-2.0 |
toineheuvelmans/Metron | Playground.playground/Pages/2. CoordinateSystem.xcplaygroundpage/Contents.swift | 1 | 899 | import CoreGraphics
import Metron
/*: CoordinateSystem, CornerPosition and Side
# CoordinateSystem
A `CoordinateSystem` is a simple description of a two-dimensional space defined by its origin (the visual corner in which the origin `{0, 0}` is found. On iOS this defaults to top / left, while on macOS this is bottom ... | mit |
SwiftStudies/OysterKit | Sources/STLR/Generated/Extensions/STLR+CustomStringConvertable.swift | 1 | 4474 | // Copyright (c) 2016, RED When Excited
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// ... | bsd-2-clause |
Takanu/Pelican | Sources/Pelican/API/Types/Inline/ChosenInlineResult.swift | 1 | 942 | //
// ChosenInlineResult.swift
// Pelican
//
// Created by Takanu Kyriako on 19/12/2017.
//
import Foundation
/**
Represents a result of an inline query that was chosen by the user and sent to the chat.
*/
public struct ChosenInlineResult: UpdateModel, Codable {
/// The unique identifier for the result that wa... | mit |
lanjing99/RxSwiftDemo | 13-intermediate-rxcocoa/starter/Wundercast/Controllers/Extensions/MKMapView+Rx.swift | 1 | 1185 | /*
* Copyright (c) 2014-2016 Razeware LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, p... | mit |
iosprogrammingwithswift/iosprogrammingwithswift | 15_SwiftNetworking/SwiftNetworkingTests/SwiftNetworkingTests.swift | 1 | 930 | //
// SwiftNetworkingTests.swift
// SwiftNetworkingTests
//
// Created by Andreas Wittmann on 11/01/15.
// Copyright (c) 2015 🐨 + 🙉. All rights reserved.
//
import UIKit
import XCTest
class SwiftNetworkingTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. ... | mit |
manticarodrigo/FieldTextView | FieldTextView.swift | 1 | 1576 | //
// FieldTextView.swift
// Edumate
//
// Created by Rodrigo Mantica on 12/9/16.
// Copyright © 2016 Rodrigo Mantica. All rights reserved.
//
import UIKit
class FieldTextView : UITextView, UITextViewDelegate {
override var contentSize: CGSize {
didSet {
var topCorrection = (self.boun... | apache-2.0 |
sf-arte/Spica | Spica/Flickr.swift | 1 | 8409 | //
// Flickr.swift
// Spica
//
// Created by Suita Fujino on 2016/09/28.
// Copyright © 2016年 ARTE Co., Ltd. All rights reserved.
//
import OAuthSwift
import SwiftyJSON
/**
FlickrのAPIを呼ぶクラス
*/
class Flickr {
// MARK: 定数
/// Flickr APIのURL
private let apiURL = "https://api.flickr.com/servic... | mit |
Legoless/iOS-Course | 2015-1/Lesson13/Gamebox/Gamebox/GameManager.swift | 3 | 1607 | //
// GameManager.swift
// Gamebox
//
// Created by Dal Rupnik on 21/10/15.
// Copyright © 2015 Unified Sense. All rights reserved.
//
import Foundation
class GameManager : NSObject
{
static let shared = GameManager()
var games : [Game]?
var allGames : [Game] {
if games == nil {
... | mit |
Dynamit/DTCalendarView-iOS | Example/DTCalendarView/ViewController.swift | 1 | 5543 | //
// ViewController.swift
// DTCalendarView
//
// Created by timle8n1-dynamit on 06/14/2017.
// Copyright (c) 2017 timle8n1-dynamit. All rights reserved.
//
import UIKit
import DTCalendarView
class ViewController: UIViewController {
fileprivate let now = Date()
fileprivate let calendar = Calend... | mit |
herveperoteau/TracktionProto2 | TracktionProto2/RealmStack/RealmLayer.swift | 1 | 4570 | //
// DataModel.swift
// TracktionProto2
//
// Created by Hervé PEROTEAU on 14/02/2016.
// Copyright © 2016 Hervé PEROTEAU. All rights reserved.
//
import Foundation
import RealmSwift
let SessionStateInit = 0
let SessionStateKeepData = 1
let SessionStateDataComplete = 2
class RMSession: Object {
dynamic var... | mit |
EnderTan/ETNavBarTransparent | ETNavBarTransparentDemo/ETNavBarTransparentDemo/MainViewController.swift | 1 | 601 | //
// MainViewController.swift
// ETNavBarTransparentDemo
//
// Created by Bing on 2017/3/1.
// Copyright © 2017年 tanyunbing. All rights reserved.
//
import UIKit
class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Testing for Color Navig... | mit |
codefellows/sea-c24-iOS-F2 | Day 5-8 AutoLayout:Camera:plist:Archiver/AutoLayout/Person.swift | 1 | 1086 | //
// Person.swift
// AutoLayout
//
// Created by Bradley Johnson on 11/10/14.
// Copyright (c) 2014 Code Fellows. All rights reserved.
//
import Foundation
import UIKit
class Person : NSObject, NSCoding {
var firstName : String
var lastName : String
var image : UIImage?
init (first : St... | mit |
crazypoo/PTools | PooToolsSource/SignView/PTEasySignatureView.swift | 1 | 9904 | //
// PTEasySignatureView.swift
// PooTools_Example
//
// Created by jax on 2022/10/5.
// Copyright © 2022 crazypoo. All rights reserved.
//
import UIKit
import SnapKit
import SwifterSwift
import SJAttributesStringMaker
public class PTSignatureConfig:NSObject
{
public var lineWidth:CGFloat = 1
public var ... | mit |
thehorbach/instagram-clone | Pods/SwiftKeychainWrapper/SwiftKeychainWrapper/KeychainItemAccessibility.swift | 1 | 6158 | //
// KeychainOptions.swift
// SwiftKeychainWrapper
//
// Created by James Blair on 4/24/16.
// Copyright © 2016 Jason Rendel. All rights reserved.
//
// The MIT License (MIT)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation... | mit |
soapyigu/LeetCode_Swift | DFS/CombinationSum.swift | 1 | 953 | /**
* Question Link: https://leetcode.com/problems/combination-sum/
* Primary idea: Classic Depth-first Search
*
* Time Complexity: O(n^n), Space Complexity: O(2^n - 1)
*
*/
class CombinationSum {
func combinationSum(candidates: [Int], _ target: Int) -> [[Int]] {
var res = [[Int]]()
var path... | mit |
coolmacmaniac/swift-ios | rw/BullsEye/BullsEye/ViewController.swift | 1 | 3219 | //
// ViewController.swift
// BullsEye
//
// Created by Sourabh on 11/03/18.
// Copyright © 2018 Home. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
var targetValue = 0
var currentValue = 0
var score = 0
var round = 0
@IBOutlet weak var slider: UISlider!
@IBOutlet weak va... | gpl-3.0 |
ostatnicky/kancional-ios | Cancional/UI/Song Detail/AppereanceThemeButton.swift | 1 | 1524 | //
// AppereanceColorButton.swift
// Cancional
//
// Created by Jiri Ostatnicky on 11/06/2017.
// Copyright © 2017 Jiri Ostatnicky. All rights reserved.
//
import UIKit
class AppearanceThemeButton: UIButton {
@objc var theme: AppearanceTheme?
override var isSelected: Bool {
didSet {
... | mit |
safx/MioDashboard-swift | MioDashboard-swift WatchKit Extension/InterfaceController.swift | 1 | 5741 | //
// InterfaceController.swift
// MioDashboard-swift WatchKit Extension
//
// Created by Safx Developer on 2015/05/17.
// Copyright (c) 2015年 Safx Developers. All rights reserved.
//
import WatchKit
import Foundation
import IIJMioKit
class TableRow : NSObject {
@IBOutlet weak var hddServiceCode: WKInterface... | mit |
ps2/rileylink_ios | MinimedKitTests/GlucoseEvents/GlucoseSensorDataGlucoseEventTests.swift | 1 | 529 | //
// GlucoseSensorDataGlucoseEventTests.swift
// RileyLink
//
// Created by Timothy Mecklem on 10/18/16.
// Copyright © 2016 Pete Schwamb. All rights reserved.
//
import XCTest
@testable import MinimedKit
class GlucoseSensorDataGlucoseEventTests: XCTestCase {
func testDecoding() {
let rawData = ... | mit |
seeRead/roundware-ios-framework-v2 | Pod/Classes/RWFrameworkHTTP.swift | 1 | 26066 | //
// RWFrameworkHTTP.swift
// RWFramework
//
// Created by Joe Zobkiw on 2/6/15.
// Copyright (c) 2015 Roundware. All rights reserved.
//
import Foundation
import MobileCoreServices
extension RWFramework: URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate /*, NSURLSessionDownloadDelegate */ {
... | mit |
JakeLin/IBAnimatable | Sources/Views/AnimatableView.swift | 2 | 6072 | //
// Created by Jake Lin on 11/18/15.
// Copyright © 2015 IBAnimatable. All rights reserved.
//
import UIKit
@IBDesignable
open class AnimatableView: UIView, CornerDesignable, FillDesignable, BorderDesignable,
RotationDesignable, ShadowDesignable, BlurDesignable,
... | mit |
AgaKhanFoundation/WCF-iOS | Steps4Impact/OnboardingV2/OnboardingPageViewController.swift | 1 | 3394 | /**
* Copyright © 2019 Aga Khan Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of c... | bsd-3-clause |
jtbandes/swift | validation-test/compiler_crashers/28738-impl-genericparams-empty-key-depth-impl-genericparams-back-getdepth-key-index-im.swift | 5 | 489 | // 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 |
aucl/YandexDiskKit | YandexDiskKit/YandexDiskKit/String+YDisk.swift | 1 | 2020 | //
// String+YDisk.swift
//
// Copyright (c) 2014-2015, Clemens Auer
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyrig... | bsd-2-clause |
asp2insp/CodePathFinalProject | Pretto/AddEventDateCell.swift | 1 | 1506 | //
// AddEventDateCell.swift
// Pretto
//
// Created by Francisco de la Pena on 6/14/15.
// Copyright (c) 2015 Pretto. All rights reserved.
//
import UIKit
class AddEventDateCell: UITableViewCell {
@IBOutlet var startOrEndLabel: UILabel!
@IBOutlet var dateLabel: UILabel!
var isStartDate: Bool! {... | mit |
MTR2D2/TIY-Assignments | Forecaster/Forecaster/APIController.swift | 1 | 2899 | //
// APIController.swift
// Forecaster
//
// Created by Michael Reynolds on 10/29/15.
// Copyright © 2015 The Iron Yard. All rights reserved.
//
import Foundation
class APIController
{
var delegate: APIControllerProtocol
init(delegate: APIControllerProtocol)
{
self.delegate = delega... | cc0-1.0 |
Donny8028/Swift-Animation | Emoji Slot Machine/Emoji Slot Machine/ViewController.swift | 1 | 3159 | //
// ViewController.swift
// Emoji Slot Machine
//
// Created by 賢瑭 何 on 2016/5/19.
// Copyright © 2016年 Donny. All rights reserved.
//
import UIKit
class ViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {
let emojis = ["😂","😎","😡","😱","💩","👽","👀","🐷","🐨","🐣","🙉"... | mit |
ntaku/SwiftEssential | SwiftEssential/ExtImage.swift | 1 | 4239 | import Foundation
import UIKit
public extension UIImage {
/**
中心を正方形にクロップする (Exifの画像の向きは考慮されない)
*/
@objc func crop() -> UIImage {
let w = self.size.width
let h = self.size.height
let size = (w < h) ? w : h
let sx = self.size.width/2 - size/2
let sy = self.si... | mit |
ethanneff/iOS-Swift-Modular-Design-With-Multiple-Storyboards | ModularDesignUITests/ModularDesignUITests.swift | 1 | 1260 | //
// ModularDesignUITests.swift
// ModularDesignUITests
//
// Created by Ethan Neff on 1/29/16.
// Copyright © 2016 Ethan Neff. All rights reserved.
//
import XCTest
class ModularDesignUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This m... | mit |
rad182/CellSignal | Watch Extension/InterfaceController.swift | 1 | 2088 | //
// InterfaceController.swift
// Watch Extension
//
// Created by Royce Albert Dy on 14/11/2015.
// Copyright © 2015 rad182. All rights reserved.
//
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet weak var radioTechnologyLabel: WKInterfaceLabel!
privat... | mit |
Turistforeningen/SjekkUT | ios/SjekkUt/views/style/DntTextView.swift | 1 | 677 | //
// DntTextView.swift
// SjekkUt
//
// Created by Henrik Hartz on 14.02.2017.
// Copyright © 2017 Den Norske Turistforening. All rights reserved.
//
import Foundation
@IBDesignable
class DntTextView: UITextView {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
... | mit |
ArtSabintsev/Apple-Watch-WatchKit-CocoaHeads-DC-Talk- | Cocoaheads Sample WatchKit App/Cocoaheads/ViewController.swift | 1 | 506 | //
// ViewController.swift
// Cocoaheads
//
// Created by Arthur Sabintsev on 4/2/15.
// Copyright (c) 2015 ID.me. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view,... | mit |
gregomni/swift | validation-test/compiler_crashers_fixed/00237-swift-declrefexpr-setspecialized.swift | 3 | 3053 | // 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 |
heitara/swift-3 | playgrounds/Lecture4.playground/Contents.swift | 1 | 8796 | //: Playground - noun: a place where people can play
import UIKit
/*
Какво е playground?
Това вид проект, който се изпозлва от xCode. Интерактивно показва какво е състоянието на паметта на компютъра във всеки един ред на изпълнение на код-а. Позволява лесно онагледяване на примерния код. Много по лесно може да се... | mit |
richardpiazza/MiseEnPlace | Sources/MiseEnPlace/Double+MiseEnPlace.swift | 1 | 1151 | import Foundation
public extension Double {
/// Rounds to the number of decimal-places specified
func rounded(to places: Int) -> Double {
let divisor = pow(10.0, Double(places))
return (self * divisor).rounded() / divisor
}
/// An interpreted representation of the value, composed o... | mit |
weby/Stencil | Sources/Filters.swift | 1 | 601 | func toString(value: Any?) -> String? {
if let value = value as? String {
return value
} else if let value = value as? CustomStringConvertible {
return value.description
}
return nil
}
func capitalise(value: Any?) -> Any? {
if let value = toString(value: value) {
return value.capitalized
}
... | bsd-2-clause |
ksco/swift-algorithm-club-cn | Segment Tree/SegmentTree.swift | 1 | 2429 | /*
Segment tree
Performance:
building the tree is O(n)
query is O(log n)
replace item is O(log n)
*/
public class SegmentTree<T> {
private var value: T
private var function: (T, T) -> T
private var leftBound: Int
private var rightBound: Int
private var leftChild: SegmentTree<T>?
priva... | mit |
aleph7/PlotKit | PlotKit/Model/PointSet.swift | 1 | 2141 | // Copyright © 2015 Venture Media Labs. All rights reserved.
//
// This file is part of PlotKit. The full PlotKit copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
import Foundation
public enum Po... | mit |
crescentflare/SmartMockServer | MockLibIOS/Example/SmartMockLib/AppDelegate.swift | 1 | 809 | //
// AppDelegate.swift
// SmartMockLib Example
//
// The application delegate, handling global events while the app is running
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchin... | mit |
OscarSwanros/swift | test/SourceKit/CodeComplete/complete_filter.swift | 31 | 3678 | struct Foo {
func aaa() {}
func aab() {}
func abc() {}
func b() {}
func c() {}
}
func foo() {
let x = Foo()
x.#^FOO,,a,aa,ab,abc,abcd^#
}
// XFAIL: broken_std_regex
// RUN: %sourcekitd-test -req=complete.open -pos=11:5 %s -- %s > %t.all
// RUN: %FileCheck -check-prefix=CHECK-ALL %s < %t.all
// CHECK-ALL... | apache-2.0 |
nguyenantinhbk77/practice-swift | Calendar/Accessing the contents of Calendars/Accessing the contents of Calendars/ViewController.swift | 2 | 187 | //
// ViewController.swift
// Accessing the contents of Calendars
//
// Created by Domenico on 25/05/15.
// License MIT
//
import UIKit
class ViewController: UIViewController {
}
| mit |
LoopKit/LoopKit | LoopKitUI/View Controllers/GlucoseEntryTableViewController.swift | 1 | 2171 | //
// GlucoseEntryTableViewController.swift
// LoopKitUI
//
// Created by Michael Pangburn on 11/24/18.
// Copyright © 2018 LoopKit Authors. All rights reserved.
//
import UIKit
import HealthKit
import LoopKit
public protocol GlucoseEntryTableViewControllerDelegate: AnyObject {
func glucoseEntryTableViewCont... | mit |
chenl326/stwitter | stwitter/stwitter/Classes/Tools/Extensions/Bundle+Extension.swift | 2 | 350 | //
// Bundle+Extension.swift
// WeiBo
//
// Created by yao wei on 16/9/9.
// Copyright © 2016年 yao wei. All rights reserved.
//
import Foundation
extension Bundle {
//计算性属性 类似于函数 没有参数 有返回值
var nameSpace : String {
return infoDictionary?["CFBundleName"] as? String ?? ""
}
}
| apache-2.0 |
zeroc-ice/ice | swift/test/Ice/timeout/AllTests.swift | 3 | 11514 | //
// Copyright (c) ZeroC, Inc. All rights reserved.
//
import Foundation
import Ice
import TestCommon
func connect(_ prx: Ice.ObjectPrx) throws -> Ice.Connection {
for _ in 0 ..< 10 {
do {
_ = try prx.ice_getConnection()
break
} catch is Ice.ConnectTimeoutException {
... | gpl-2.0 |
LoopKit/LoopKit | LoopKit/DailyValueSchedule.swift | 1 | 9251 | //
// QuantitySchedule.swift
// Naterade
//
// Created by Nathan Racklyeft on 1/18/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//
import Foundation
import HealthKit
public struct RepeatingScheduleValue<T> {
public var startTime: TimeInterval
public var value: T
public init(startTi... | mit |
grafele/Prototyper | Prototyper/Classes/APIHandler.swift | 2 | 8060 | //
// APIHandler.swift
// Prototype
//
// Created by Stefan Kofler on 17.06.15.
// Copyright (c) 2015 Stephan Rabanser. All rights reserved.
//
import Foundation
import UIKit
let sharedInstance = APIHandler()
private let defaultBoundary = "------VohpleBoundary4QuqLuM1cE5lMwCy"
class APIHandler {
let session... | mit |
ikesyo/Himotoki | Package.swift | 1 | 466 | // swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "Himotoki",
platforms: [
.macOS(.v10_10), .iOS(.v8), .tvOS(.v9), .watchOS(.v2)
],
products: [
.library(name: "Himotoki", targets: ["Himotoki"]),
],
targets: [
.target(name: "Himotoki", depe... | mit |
gottesmm/swift | test/expr/expressions.swift | 2 | 36345 | // RUN: %target-typecheck-verify-swift
//===----------------------------------------------------------------------===//
// Tests and samples.
//===----------------------------------------------------------------------===//
// Comment. With unicode characters: ¡ç®åz¥!
func markUsed<T>(_: T) {}
// Various function t... | apache-2.0 |
bman4789/bpm | BPM/BPM/MainViewController.swift | 1 | 3203 | //
// MainViewController.swift
// BPM
//
// Created by Brian Mitchell and Zach Litzinger on 4/8/16.
// Copyright © 2016 Brian Mitchell. All rights reserved.
//
import UIKit
import Foundation
import ChameleonFramework
import FontAwesome_swift
class MainViewController: UIViewController {
var loadTheme: Bool = {... | mit |
airspeedswift/swift-compiler-crashes | crashes-fuzzing/02189-swift-type-walk.swift | 12 | 221 | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
protocol A {
protocol A {
func a<j : a
}
func b (
A
| mit |
petroladkin/SwiftyBluetooth | SwiftyBluetooth/Source/CBExtensions.swift | 1 | 6437 | //
// CBExtensions.swift
//
// Copyright (c) 2016 Jordane Belanger
//
// 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 |
Fenrikur/ef-app_ios | Eurofurence/Modules/Event Feedback/Presenter/EventFeedbackPresenterFactoryImpl.swift | 1 | 2035 | import EurofurenceModel
struct EventFeedbackPresenterFactoryImpl: EventFeedbackPresenterFactory {
private let eventService: EventsService
private let dayOfWeekFormatter: DayOfWeekFormatter
private let startTimeFormatter: HoursDateFormatter
private let endTimeFormatter: HoursDateFormatter
priva... | mit |
mercadopago/px-ios | MercadoPagoSDK/MercadoPagoSDK/Core/PaymentMethodSelector/Extensions/PXPaymentMethodSelector+Tracking.swift | 1 | 4972 | import Foundation
// MARK: Tracking
extension PXPaymentMethodSelector {
func startTracking(then: @escaping (() -> Void)) {
viewModel?.trackingConfiguration?.updateTracker()
MPXTracker.sharedInstance.startNewSession()
// Track init event
var properties: [String: Any] = [:]
i... | mit |
leonchen/simpleApp | simpleApp/AppDelegate.swift | 1 | 2141 | //
// AppDelegate.swift
// simpleApp
//
// Created by leon chen on 12/19/15.
// Copyright © 2015 leon chen. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchi... | mit |
tokyovigilante/CesiumKit | CesiumKit/Scene/GridImageryProvider.swift | 1 | 13191 | //
// GridImageryProvider.swift
// CesiumKit
//
// Created by Ryan Walklin on 29/09/14.
// Copyright (c) 2014 Test Toast. All rights reserved.
//
/**
* An {@link ImageryProvider} that draws a wireframe grid on every tile with controllable background and glow.
* May be useful for custom rendering effects or debuggi... | apache-2.0 |
GreatfeatServices/gf-mobile-app | olivin-esguerra/ios-exam/Pods/RxCocoa/RxCocoa/Foundation/Logging.swift | 37 | 500 | //
// Logging.swift
// RxCocoa
//
// Created by Krunoslav Zaher on 4/3/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
//
import Foundation
/// Simple logging settings for RxCocoa library.
public struct Logging {
public typealias LogURLRequest = (URLRequest) -> Bool
/// Log URL requests... | apache-2.0 |
linusnyberg/RepoList | Pods/OAuthSwift/Sources/String+OAuthSwift.swift | 1 | 2643 | //
// String+OAuthSwift.swift
// OAuthSwift
//
// Created by Dongri Jin on 6/21/14.
// Copyright (c) 2014 Dongri Jin. All rights reserved.
//
import Foundation
extension String {
var urlEncodedString: String {
let customAllowedSet = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLM... | mit |
suifengqjn/CatLive | CatLive/CatLive/Classes/Home/CLPageView/CLPageView.swift | 1 | 2466 | //
// CLPageView.swift
// CatLive
//
// Created by qianjn on 2017/6/11.
// Copyright © 2017年 SF. All rights reserved.
//
import UIKit
class CLPageView: UIView {
// MARK: 定义属性
fileprivate var titles : [String]!
fileprivate var style : CLTitleStyle!
fileprivate var childVcs : [UIViewController]!
... | apache-2.0 |
rsaenzi/MyCurrencyConverterApp | MyCurrencyConverterApp/MyCurrencyConverterApp/App/DataModels/Util/StringExtension.swift | 1 | 680 | //
// StringExtension.swift
// MyCurrencyConverterApp
//
// Created by Rigoberto Sáenz Imbacuán on 8/7/16.
// Copyright © 2016 Rigoberto Sáenz Imbacuán [https://www.linkedin.com/in/rsaenzi]. All rights reserved.
//
import Foundation
extension String {
func replace(string:String, replacement:String) -> St... | mit |
mlilback/rc2SwiftClient | MacClient/session/output/OutputTabController.swift | 1 | 11634 | //
// OutputTabController.swift
//
// Copyright ©2016 Mark Lilback. This file is licensed under the ISC license.
//
import Cocoa
import Rc2Common
import MJLLogger
import Networking
import ClientCore
import ReactiveSwift
import SwiftyUserDefaults
enum OutputTab: Int {
case console = 0, preview, webKit, image, help... | isc |
Swiftline/Swiftline | Source/Env.swift | 3 | 2313 | //
// Env.swift
// Swiftline
//
// Created by Omar Abdelhafith on 24/11/2015.
// Copyright © 2015 Omar Abdelhafith. All rights reserved.
//
import Darwin
public class Env {
/// Return the list of all the enviromenment keys passed to the script
public static var keys: [String] {
let keyValues = run("en... | mit |
kylebshr/Linchi | Linchi/String-Manipulation/Character-Extension.swift | 4 | 244 | //
// Character-Extension
// Linchi
//
extension Character {
/** Returns the ASCII value of `self`
__precondition__: self is an ASCII character
*/
internal func toASCII() -> UInt8 { return String(self).utf8.first! }
}
| mit |
banxi1988/Staff | Pods/BXiOSUtils/Pod/Classes/CGRectExtentions.swift | 1 | 1611 | //
// CGRectExtentions.swift
// Pods
//
// Created by Haizhen Lee on 15/12/18.
//
//
import Foundation
import UIKit
public extension CGSize{
public func sizeByScaleToWidth(width:CGFloat) -> CGSize{
let factor = width / self.width
let h = self.height * factor
return CGSize(width: width, height: h)... | mit |
RocketChat/Rocket.Chat.iOS | Pods/MobilePlayer/MobilePlayer/MobilePlayerViewController.swift | 1 | 25438 | //
// MobilePlayerViewController.swift
// MobilePlayer
//
// Created by Baris Sencan on 12/02/15.
// Copyright (c) 2015 MovieLaLa. All rights reserved.
//
import UIKit
import MediaPlayer
/// A view controller for playing media content.
open class MobilePlayerViewController: MPMoviePlayerViewController {
// MARK... | mit |
xayolink/grwuye | grwuye/grwuye/AppDelegate.swift | 1 | 620 | //
// AppDelegate.swift
// grwuye
//
// Created by jiarenchao on 17/6/8.
// Copyright © 2017年 xayolink. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunching... | apache-2.0 |
ben-ng/swift | validation-test/compiler_crashers_fixed/00664-swift-pattern-operator.swift | 1 | 539 | // 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 | test/type/self.swift | 10 | 866 | // RUN: %target-typecheck-verify-swift
struct S0<T> {
func foo(_ other: Self) { } // expected-error{{'Self' is only available in a protocol or as the result of a method in a class; did you mean 'S0'?}}{{21-25=S0}}
}
class C0<T> {
func foo(_ other: Self) { } // expected-error{{'Self' is only available in a protoco... | apache-2.0 |
CaiJingLong/ios-toast | Toast/Toast/source/ToastView.swift | 1 | 488 | //
// ToastView.swift
// Toast
//
// Created by Caijinglong on 2017/7/7.
//
import UIKit
class ToastView:UIView{
@IBOutlet weak var content: UILabel!
override init(frame: CGRect) {
super.init(frame: frame)
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: ... | apache-2.0 |
adrfer/swift | stdlib/public/core/StringCharacterView.swift | 1 | 10908 | //===--- StringCharacterView.swift - String's Collection of Characters ----===//
//
// 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/LI... | apache-2.0 |
fschneider1509/RuleBasedXMLParserDelegate | RuleBasedXMLParserDelegateKit/XMLRuleBasedParserDelegate.swift | 1 | 3710 | //
// XMLRuleBasedParserDelegate.swift
// RuleBasedXMLParserDelegate
//
// Created by Fabian Schneider
// fabian(at)fabianschneider.org
// MIT License
//
import Foundation
class XMLRuleBasedParserDelegate<T: XMLParserNodeProtocol> : NSObject, XMLParserDelegate, XMLRuleBasedParserDelegateProtocol {
private le... | mit |
avito-tech/Paparazzo | Paparazzo/Core/VIPER/MaskCropper/Interactor/MaskCropperInteractor.swift | 1 | 363 | import ImageSource
protocol MaskCropperInteractor: class {
func canvasSize(completion: @escaping (CGSize) -> ())
func imageWithParameters(completion: @escaping (ImageCroppingData) -> ())
func croppedImage(previewImage: CGImage, completion: @escaping (CroppedImageSource) -> ())
func setCroppingParameter... | mit |
paymentez/paymentez-ios | Demo/SceneDelegate.swift | 1 | 2524 | //
// SceneDelegate.swift
// Demo
//
// Created by Ernesto Gonzalez Nochebuena on 17/12/20.
// Copyright © 2020 Paymentez. All rights reserved.
//
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
@available(iOS 13.0, *)
func scene(_ scene: UIScene, willCo... | mit |
mcomisso/hellokiwi | kiwi/BWWalkthroughViewController.swift | 1 | 10144 | //
// BWWalkthroughViewController.swift
//
// Created by Yari D'areglia on 15/09/14 (wait... why do I wrote code the Day of my Birthday?! C'Mon Yari... )
// Copyright (c) 2014 Yari D'areglia. All rights reserved.
//
import UIKit
// MARK: - Protocols -
/**
Walkthrough Delegate:
This delegate performs basic operati... | apache-2.0 |
actilot/ACMaterialDesignIcons | ACMaterialDesignIcons.swift | 1 | 45525 | //
// ACMaterialDesignIcons.swift
// ACMaterialDesignIcons
//
// Created by Axel Ros Campaña on 9/5/17.
// Copyright © 2017 Axel Ros Campaña. All rights reserved.
//
import Foundation
import UIKit
public class ACMaterialDesignIcons {
public var iconAttributedString: NSMutableAttributedString?
public var f... | mit |
naoto0822/try-reactive-swift | TryRxSwift/TryRxSwift/Item.swift | 1 | 775 | //
// Item.swift
// TryRxSwift
//
// Created by naoto yamaguchi on 2016/04/11.
// Copyright © 2016年 naoto yamaguchi. All rights reserved.
//
import UIKit
public struct Item {
// MARK: - Property
public let id: String
public let title: String
public let url: String
public let user: Us... | mit |
tobias/vertx-swift-eventbus | Package.swift | 1 | 900 | /**
* Copyright Red Hat, Inc 2016
*
* 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 |
Wakup/Wakup-iOS-SDK | Wakup/UIImageView+Fade.swift | 1 | 787 | //
// UIImageView+Fade.swift
// Wuakup
//
// Created by Guillermo Gutiérrez on 08/01/15.
// Copyright (c) 2015 Yellow Pineapple. All rights reserved.
//
import Foundation
import SDWebImage
extension UIImageView {
func setImageAnimated(url: URL!, completed: SDExternalCompletionBlock? = nil) {
sd_setIma... | mit |
qxuewei/XWSwiftWB | XWSwiftWB/XWSwiftWB/Classes/Message/MessageTableVC.swift | 1 | 443 | //
// MessageTableVC.swift
// XWSwiftWB
//
// Created by 邱学伟 on 16/10/25.
// Copyright © 2016年 邱学伟. All rights reserved.
//
import UIKit
class MessageTableVC: BaseTableVC {
override func viewDidLoad() {
super.viewDidLoad()
visitorView.setupVisitorViewInfo(iconName: "visitordiscover_image_mes... | apache-2.0 |
Octadero/TensorFlow | Sources/CAPI/Session.swift | 1 | 20856 | /* Copyright 2017 The Octadero Authors. All Rights Reserved.
Created by Volodymyr Pavliukevych on 2017.
Licensed under the GPL License, Version 3.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.gnu.org/licenses/gpl-3.0.txt
Unless ... | gpl-3.0 |
cuappdev/podcast-ios | Recast/Core Data/Episode+CoreDataProperties.swift | 1 | 1304 | //
// Episode+CoreDataProperties.swift
//
//
// Created by Mindy Lou on 11/3/18.
//
//
import Foundation
import CoreData
extension Episode {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Episode> {
return NSFetchRequest<Episode>(entityName: "Episode")
}
@NSManaged public var au... | mit |
xwu/swift | test/Generics/rdar83687967.swift | 1 | 2090 | // RUN: %target-typecheck-verify-swift
// RUN: %target-swift-frontend -typecheck -debug-generic-signatures %s 2>&1 | %FileCheck %s
// RUN: %target-swift-frontend -emit-ir %s
public protocol P1 {}
public protocol P2 {
associatedtype A: P1
}
public protocol P3 {
associatedtype B: P2
associatedtype A where B.A ==... | apache-2.0 |
suifengqjn/swiftDemo | 基本语法/1基础内容/11断言.playground/Contents.swift | 1 | 603 | //: Playground - noun: a place where people can play
import UIKit
//你可以使用全局函数 assert(_:_:) 函数来写断言。向 assert(_:_:) 函数传入一个结果为 true 或者 false 的表达式以及一条会在结果为 false 的时候显式的信息:
let age = -3
assert(age >= 0, "A person's age cannot be less than zero")
//在这个栗子当中,代码执行只要在 if age >= 0 评定为 true 时才会继续,就是说,如果 age 的值非负。如果 age 的值是负数... | apache-2.0 |
Tomikes/eidolon | KioskTests/App/RAC/RACFunctionsTests.swift | 7 | 4576 | import Quick
import Nimble
@testable
import Kiosk
import ReactiveCocoa
class RACFunctionsTests: QuickSpec {
override func spec() {
describe("email address check") {
it("requires @") {
let valid = stringIsEmailAddress("ashartsymail.com") as! Bool
expect(valid) == ... | mit |
Bouke/HAP | Sources/HAP/Base/Predefined/Characteristics/Characteristic.SupportedDiagnosticsModes.swift | 1 | 2101 | import Foundation
public extension AnyCharacteristic {
static func supportedDiagnosticsModes(
_ value: UInt32 = 0,
permissions: [CharacteristicPermission] = [.read],
description: String? = "Supported Diagnostics Modes",
format: CharacteristicFormat? = .uint32,
unit: Characte... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.