text
stringlengths
8
1.32M
// // ProgramLibraryViewController.swift // UPK-GE01 // // Created by zhongzhong.cao on 2019/7/15. // Copyright © 2019 umehealltd. All rights reserved. // import UIKit class ProgramLibraryViewController: UIViewController, UITableViewDelegate,UITableViewDataSource { var therapy = [["Relieve"], ["Strengthe...
import UIKit @testable import CountriesQL final class AppRouterMock: AppRouterProtocol { var viewController: UIViewController? var isAnimated: Bool? var onNavigateBack: NavigationBackClosure? func push(_ viewController: UIViewController, isAnimated: Bool, onNavigateBack: NavigationBackClosur...
// // PushModel.swift // OmnipotentSkip // // Created by sks on 17/3/31. // Copyright © 2017年 besttone. All rights reserved. // import UIKit class PushModel: NSObject { var warmOneModel : WarmOneDataModel = WarmOneDataModel() var warmTwoModel : WarmTwoDataModel = WarmTwoDataModel() var deadOneModel : ...
import Foundation import UIKit extension UIViewController { func presentAlertWith(title: String, message: String) { let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert) let okAction = UIAlertAction(title: "OK", style: .default) alertC...
// // CollectionNormalCell.swift // MyDYZB // // Created by 王武 on 2020/11/10. // import UIKit class CollectionNormalCell: CollectionBaseCell { // MARK:- 设置属性 @IBOutlet weak var roomnameLabel: UILabel! // MARK:- 定义模型属性 override var anchor: AnchorModel? { didSet { // 1. 将属性传递...
// // TitleView.swift // DesignCode // // Created by Alex Ochigov on 8/12/20. // Copyright © 2020 Alex Ochigov. All rights reserved. // import SwiftUI struct TitleView: View { var body: some View { VStack { HStack { Text("Certificates") .font(.largeTitle...
// // CollectionViewController.swift // GenericCollectionViewCell // // Created by Diogo Tridapalli on 1/31/16. // Copyright © 2016 Diogo Tridapalli. All rights reserved. // import UIKit private let reuseIdentifier = "Cell" class CollectionViewController: UICollectionViewController { override func viewDidLo...
// // Room+CoreDataProperties.swift // bib Stundenplan // // Created by Erik Schaumlöffel / PBS2H17A on 5/17/19. // Copyright © 2019 Erik Schaumlöffel / PBS2H17A. All rights reserved. // // import Foundation import CoreData extension Room { @nonobjc public class func fetchRequest() -> NSFetchRequest<Room> {...
// // AnimationBuilder.swift // Slaminate // // Created by Kristian Trenskow on 08/02/16. // Copyright © 2016 Trenskow.io. All rights reserved. // import Foundation @objcMembers class AnimationBuilder: AnimationGroup { static var allAnimations = [AnimationGroup]() static var builders = [AnimationBuil...
// // RepScheme.swift // five3one // // Created by Cody Dillon on 10/18/18. // Copyright © 2018 Be More Innovations. All rights reserved. // import Foundation class RepScheme { var sets: Int = 0 var reps: Int = 0 init(sets: Int, reps: Int) { self.sets = sets self.reps = reps }...
// // ContentView.swift // HelloCast // // Created by Johnson Osei Yeboah on 28/01/2021. // import SwiftUI import CoreData struct ContentView: View { var body: some View { TabView{ ExploreView().tabItem { Image("compass") Text("Explore") } ...
import SwiftUI class MemoryGameViewModel: ObservableObject { private let game: MemoryGame<String> @Published var cardViewModels: [CardViewModel] init(game: MemoryGame<String>) { self.game = game self.cardViewModels = game.cards.map { CardViewModel(card: $0) } } f...
// // collectionViewProtocol.swift // Hepsiburada_iOS_Code_Case // // Created by Ege Seçkin on 31.10.2021. // import UIKit extension ResultViewController: UICollectionViewDelegate,UICollectionViewDataSource{ //if input inside searchbar changes (dynamically) it comes here func searchBar(_ searchBar: U...
// // SecondCollectionViewController.swift // GiphySearchApp // // Created by Dmitry Kyrskiy on 21.12.16. // Copyright © 2016 Dmitry Kyrskiy. All rights reserved. // import UIKit import FLAnimatedImage import SDWebImage class SecondCollectionViewController: UICollectionViewController, UICollectionViewDelegateFlow...
// // AddGroupMemberViewController.swift // strolling-of-time-ios // // Created by 강수진 on 2019/08/20. // Copyright © 2019 wiw. All rights reserved. // import UIKit class AddGroupMemberViewController: UIViewController, NibLoadable { typealias SelectedMember = (member: String, image: String, index: Int) ...
// // UIColor+AppColors.swift // MyShopping // // Created by Sami Rämö on 11/05/2017. // Copyright © 2017 Sami Ramo. All rights reserved. // import UIKit struct AppColors { struct Theme1 { let cellColor = UIColor(red: 255/255, green: 211/255, blue: 144/255, alpha: 1.0) let cellSelectColor...
// // DetailsCellDataSource.swift // NTGTags // // Created by Mena Gamal on 2/16/20. // Copyright © 2020 Mena Gamal. All rights reserved. // import Foundation import UIKit class DetailsCellDataSource: NSObject, UICollectionViewDataSource, UICollectionViewDelegate ,UICollectionViewDelegateFlowLayout { var...
// // FlickrCollectionViewController.swift // RandomFlickrImagesAppleTV // // Created by Rahath cherukuri on 3/6/16. // Copyright © 2016 Rahath cherukuri. All rights reserved. // import UIKit class FlickrCollectionViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource { @I...
import Foundation import Capacitor import ADAL @available(iOS 13.0, *) public class ADAuthentication { var kClientID: String; var kGraphURI: String; var kAuthority: String; var kRedirectUri = URL(string: "") var applicationContext : ADAuthenticationContext? let call: CAPPluginCall var...
// // APIIProBonus.swift // // Created by Александра on 28.04.2021. // import Foundation public class APIIProBonus: ObservableObject { @Published var token: String? @Published var clientBonusInfo: ClientBonusInfo? public var clientTotalBonus: Double? public var clientBonusBirned: Double? public ...
// // FriendsPhotoViewController.swift // VkGb // // Created by VitaliyFilippov on 05.04.2018. // Copyright © 2018 VitaliyFilippov. All rights reserved. import UIKit import RealmSwift private let reuseIdentifier = "Cell" class FriendsPhotoViewController: UICollectionViewController { var notificationToken: N...
// // PlayVideoVC.swift // VideoRecorder // // Created by YourtionGuo on 17/11/2016. // Copyright © 2016 Yourtion. All rights reserved. // import UIKit import AVFoundation class PlayVideoVC: UIViewController { open var videoUrl:URL! var player: AVPlayer? = nil var playerLayer: AVPlayerLayer?...
// // PostListResponse.swift // Assignment // // Created by Rajmani Kushwaha on 21/02/20. // Copyright © 2020 Rajmani Kushwaha. All rights reserved. // import Foundation struct PostListResponse: Decodable { internal let postList: [Post]? internal let page: Int internal enum CodingKeys: String, Co...
// // Lemonade.swift // LemonadeStand // // Created by Christian Romeyke on 22/11/14. // Copyright (c) 2014 Christian Romeyke. All rights reserved. // import Foundation class Lemonade { let price = 1 var numLemons, numIceCubes: Int var flavor: Flavor init(numLemons:Int, numIceCubes:Int) { ...
// // CameraViewController.swift // Experiences // // Created by Benjamin Hakes on 2/22/19. // Copyright © 2019 Benjamin Hakes. All rights reserved. // import UIKit import AVFoundation import Photos class CameraViewController: UIViewController, AVCaptureFileOutputRecordingDelegate { override func viewDid...
// // AppVariables.swift // AR_Camera // // Created by Justin Lee on 3/26/20. // Copyright © 2020 com.lee. All rights reserved. // import Foundation import UIKit var screenWidth:CGFloat = CGFloat(); var screenHeight:CGFloat = CGFloat(); var cameraButtonDimension:CGFloat = CGFloat(); var cameraButtonMinY: CGFloat...
import RxSwift import RxCocoa /** The QuizListViewModel is a canonical representation of the QuizListView. That is, the QuizListViewModel provides a set of interfaces, each of which represents a UI component in the QuizListView. */ public class QuizListViewModel { /// :nodoc: private let disposeBag = D...
// // ZXAddRemindViewController.swift // YDHYK // // Created by 120v on 2017/11/22. // Copyright © 2017年 screson. All rights reserved. // import UIKit class ZXAddRemindViewController: ZXUIViewController { struct TextTag { static let drugName = 5311 static let dosage = 5312 static let...
// // data.swift // 00557117 // // Created by User19 on 2019/10/9. // Copyright © 2019 557021. All rights reserved. // import SwiftUI struct data: View { var body: some View { Text(/*@START_MENU_TOKEN@*/"Hello World!"/*@END_MENU_TOKEN@*/) } } struct data_Previews: PreviewProvider { static var...
// // AboutUs.swift // Tonsorial LIC // // Created by Jose Delaguarda on 6/18/19. // Copyright © 2019 DLGTECH. All rights reserved. // import UIKit class AboutUs : UIViewController { override func viewDidLoad(){ super.viewDidLoad() } override func didReceiveMemoryWarning()...
// // AllJobsModelController.swift // NYC_JOBS_DATA_FINAL // // Created by Jonathan Cravotta on 5/28/18. // Copyright © 2018 Jonathan Cravotta. All rights reserved. // import Foundation import ReactiveSwift class AllJobsModelController { var data: [Job] = [] var state: MutableProperty<State<[Job]>> ...
// // TestAppDelegate.swift // TodoListTests // // Created by Christian Oberdörfer on 18.03.19. // Copyright © 2019 Christian Oberdörfer. All rights reserved. // import UIKit /// Minimum app delegate for faster testing class TestAppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? = UIWind...
// // GeofenceTracker.swift // GeofenceCaseStudy // // Created by Atul Gawali on 20/07/21. // import Foundation /// The Geofence Tracker Delegate is used to pass the event to controller. /// protocol GeofenceTrackerDelegate: AnyObject { /// The updated region called when region update /// /// - Paramet...
// // AccessTokenParser.swift // Slidecoin // // Created by Oleg Samoylov on 19.12.2019. // Copyright © 2019 Oleg Samoylov. All rights reserved. // import Foundation import Toolkit final class AccessTokenParser: ParserProtocol { func parse(data: Data) -> String? { do { let jsonDecorde...
// // AssetModuleBuild.swift // WavesWallet-iOS // // Created by mefilt on 06.08.2018. // Copyright © 2018 Waves Platform. All rights reserved. // import UIKit import Extensions struct AssetDetailModuleBuilder: ModuleBuilderOutput { struct Input: AssetDetailModuleInput { var assets: [AssetDetailTypes...
// // BinaryNode.swift // BinaryNode // // Created by Valeriano Della Longa on 2021/01/27. // Copyright © 2021 Valeriano Della Longa // // 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 Softwa...
import Foundation #if canImport(FoundationNetworking) import FoundationNetworking #endif final class URLSessionHTTPClientAdapter: HTTPClient { private let urlSession: URLSession init(urlSession: URLSession) { self.urlSession = urlSession } func get(url: URL, headers: [String: String]) async ...
// // DatabaseBusyError.swift // RepoDB // // Created by Groot on 13.09.2020. // Copyright © 2020 K. All rights reserved. // import Foundation struct DatabaseBusyError: RepoDatabaseError { var code: Int { return 5 } var message: String { return ErrorLocalizer.error_code_5.localize() } }
import Foundation import Alamofire import RxSwift typealias Parameters = [String: Any]? typealias DeezerObject = [String: Any] typealias DeezerResponse = (response: Any, serverError: String?) /** The API protocol contains all the properties and methods to implement a network client */ protocol API { var baseUrl: ...
///Users/berylxzhang/Documents/Dooro Learinng/Dooro Learinng/ViewController.swift // ViewController.swift // Dooro Learinng // // Created by Beryl Zhang on 6/18/21. // import UIKit import MBProgressHUD import Loaf import Combine import Firebase import FirebaseAuth import FBSDKLoginKit import FBSDKCoreKit import FBS...
// // ViewController.swift // TmpTestCGAffine // // Created by 김종권 on 2020/05/01. // Copyright © 2020 mustang. All rights reserved. // import UIKit class ViewController: UIViewController { var btn: UIButton! var vc: ViewController2! var width: CGFloat! var isOpen: Bool! override func...
// // CourseTableViewController.swift // Binder // // Created by Christina Depena on 4/15/18. // Copyright © 2018 The University of Texas at Austin. All rights reserved. // import UIKit class CourseTableViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() ...
// // TrackViewModel.swift // Saturdays // // Created by Said Ozcan on 13/06/2017. // Copyright © 2017 Said Ozcan. All rights reserved. // import UIKit class TrackViewModel : NSObject, ViewModelProtocol { // MARK : Properties let trackName : String let artistName : String let albumArtUrl : UR...
// // Venue.swift // FourCubed // // Created by Pritesh Nadiadhara on 2/8/19. // Copyright © 2019 Pritesh Nadiadhara. All rights reserved. // import Foundation import CoreLocation struct VenueData: Codable { let response: Venues } struct Venues: Codable { let venues: [Venue] } struct Venue: Codable { ...
// // ContactViewController.swift // LyonsDen // // The ContactViewContrller will be used for controlling the contact screen. // // Created by Inal Gotov on 2016-06-30. // Copyright © 2016 William Lyon Mackenize CI. All rights reserved. // import UIKit import FirebaseDatabase import MessageUI import Contacts cla...
// // AddLabelsViewController.swift // Fugu // // Created by Divyansh Bhardwaj on 16/03/18. // Copyright © 2018 Socomo Technologies Private Limited. All rights reserved. // import UIKit protocol AddLabelProtocol: class { func addLabelAction(tagsArray: [TagDetail]) func cancelAction() } class AddLabelsVi...
// // CalculatorTests.swift // CalculatorTests // // Created by Mikhail Ladutska import XCTest @testable import Calculator class CalculatorTests: XCTestCase { func testFactorial() { let sut = ViewController() let value = 5 let factorialValue = sut.factorial(value) X...
// // recipe.swift // restaurantlist // // Created by Grazietta Hof on 2017-04-02. // Copyright © 2017 Grazietta Hof. All rights reserved. // import UIKit class recipe: NSObject { var Name: String = "" var ID: Double = 0 var Count: Double = 0 var accuracy: Double = 0 init(N...
// // AlamofireRouterProtocol.swift // ios_mvvm // // Created by prongbang on 28/7/2561 BE. // Copyright © 2561 prongbang. All rights reserved. // import Alamofire public protocol AlamofireRouterProtocol: URLRequestConvertible { var baseURLString: String { get } var path: String { get } var metho...
// // LeagueVC.swift // Swoosh // // Created by Zubieta on 10/3/20. // Copyright © 2020 zubie7a. All rights reserved. // import UIKit class LeagueVC: UIViewController { @IBOutlet weak var nextButton: BorderButton! @IBOutlet weak var mensButton: BorderButton! @IBOutlet weak var womensButton: BorderBu...
// // UCollectionViewSectionBackgroundLayout.swift // Cartoon // // Created by apple on 2018/11/2. // Copyright © 2018年 hzbojin. All rights reserved. // /*给UICollectionView里的Section分别设置不同的背景颜色: (1)继承UICollectionReusableView来自定义一个装饰视图(Decoration视图),用来作为各个分组的背景视图 (2)继承UICollectionViewLayoutAttributes来自定义一个新的布局属性,...
// // LessonsRouter.swift // HseTimetable // // Created by Pavel on 21.04.2020. // Copyright © 2020 Hse. All rights reserved. // import RxSwift import RxCocoa import Foundation final class LessonsRouter: LessonsRouterProtocol, LessonsRouterInputsProtocol, Routerable { private(set) weak var view: Viewable...
// // NHImageView.swift // Registradores-Arisp // // Created by Nathan Hegedus on 24/06/15. // Copyright (c) 2015 Nathan Hegedus. All rights reserved. // import UIKit class NHButton: UIButton { @IBInspectable var streachSize: Int = 0 { didSet { let backgroundImage = self.currentBackground...
// // HasName.swift // bm-persona // // Created by Shawn Huang on 9/5/20. // Copyright © 2020 RJ Pimentel. All rights reserved. // import Foundation protocol HasName { var name: String { get } }
import SpriteKit class GameObjectNode: SKNode{ func collisionWithPlayer(player:SKNode) -> Bool { return false } func checkNodeRemoval(playerY: CGFloat) { if playerY > self.position.y + 300 { self.removeFromParent() } } }
// // DataStore.swift // ViewController. Single Responsibility Principle. // // Created by Алексей Пархоменко on 22/05/2019. // Copyright © 2019 Алексей Пархоменко. All rights reserved. // import UIKit class DataStore { func saveNameInCache(name: String) { print("Ваше имя сохранено: \(name)") ...
// // UIImageExtension.swift // Add Contact // // Created by Hoang Tung Lam on 3/8/21. // import Foundation import UIKit extension UIImage { func crop(withPath: UIBezierPath) -> UIImage { let r: CGRect = withPath.cgPath.boundingBox UIGraphicsBeginImageContextWithOptions(r.size, false, self.scal...
// // CRMPropertyTableViewController.swift // SweepBright // // Created by Kaio Henrique on 4/14/16. // Copyright © 2016 madewithlove. All rights reserved. // import UIKit import RealmSwift class CRMPropertyTableViewController: UITableViewController { var queue: NSOperationQueue! let CRMContactCellReuseIde...
// // ProfileViewController.swift // BradleyUTour // // Created by Jacob Wilson on 4/27/17. // Copyright © 2017 Bradley University. All rights reserved. // import UIKit import RealmSwift class ProfileViewController: UIViewController { @IBOutlet var editButton:UIButton! @IBOutlet var firstNameField: U...
// // GeneralTool.swift // AppDemoBySwift // // Created by admin on 16/3/31. // Copyright © 2016年 admin. All rights reserved. // import UIKit class GeneralTool: NSObject { class func setLaunchViewController() ->(Bool){ //获取当前版本 let APPBundleVersion : AnyObject? = NSBundle.mainBundle().infoDic...
// // ApplicationError.swift // Schuylkill-App // // Created by Sam Hicks on 2/28/21. // import Amplify import Foundation import SwiftyBeaver typealias ApplicationError = AmplifyError extension ApplicationError { }
import Foundation struct Beat : Equatable { let time : Double let key : Character //func within(k: Character, t: Double, d: Double) ?? func within(t: Double, d: Double) -> Bool{ return(((t-d)..<(t+d)).contains(time)) } } struct Level{ private let l : [Beat] init(filename f: String) throws{ let p = Bundle.m...
//: [Previous](@previous) import Foundation import Combine enum APIError: Error { case negativeValue } let array = [1,2,4,5,7,3,2,5,-1,9,23,12,75,23,34,65,76] array.publisher // .setFailureType(to: APIError.self) // .tryFilter { // guard $0 >= 0 else { throw APIError.negativeValue } // re...
//: Playground - noun: a place where people can play import UIKit // Logical NOT operator - unary prefix operator let allowedEntry = false // Same as saying: if allowedEntry != true (more characters) if !allowedEntry { print("You can't get in!") } let enteredDoorCode = true let passedRetinaScan = false let iAm...
// // Data.swift // BasicTableView // // Created by Ryo Makabe on 2016-08-04. // Copyright © 2016 ryomakabe. All rights reserved. // import UIKit class Data { var name: String! init(name: String) { self.name = name } }
// // RealmCity.swift // WeatherApp // // Created by Nikita Egoshin on 20.10.2020. // import Foundation import RealmSwift final class RealmCity: Object { @objc dynamic var id: String = "" @objc dynamic var cityName: String = "" override class func primaryKey() -> String? { return "cityName" ...
// // PunchPopUpViewController.swift // Contech // // Created by Lauren Shultz on 7/16/18. // Copyright © 2018 Lauren Shultz. All rights reserved. // import UIKit class PunchPopUpViewController: UIViewController { var project: Project! var punch: Punch! var onViewerClosed: (() -> ())? @...
// // String.swift // swift.sintax // // Created by 鳥嶋晃次 on 2019/09/24. // Copyright © 2019 鳥嶋晃次. All rights reserved. // import UIKit /***********String (文字列)********** ストリングのつくりかた ストリングの連結 ストリング変換   */ // ストリングリテラル  "" 囲む let message = "ハロー" var bird:String bird = "アイウエオ" // 複数のストリングリテラル """ ~ """ l...
/* See LICENSE folder for this sample’s licensing information. Abstract: Platform representable accessibility examples */ import Foundation import SwiftUI public struct RepresentableExample: View { public var body: some View { VStack(alignment: .leading) { Text("Element with representable vie...
import AEXML import Foundation import PathKit extension XCScheme { public final class ProfileAction: SerialAction { // MARK: - Static private static let defaultBuildConfiguration = "Release" // MARK: - Attributes public var runnable: Runnable? public var buildableProductR...
// // MapView.swift // IsisCalendar // // Created by Jorge Sanmartin on 10/09/15. // Copyright (c) 2015 isis. All rights reserved. // import MapKit class MapView: BaseView { var mapView: MKMapView! override func setupConstraints(){ self.mapView.autoPinEdgesToSuperviewEdgesWithInsets(UIEdg...
// // BaseValues.swift // Currency Converter // // Created by Pedro Fonseca on 30/08/20. // Copyright © 2020 Pedro Bernils. All rights reserved. // import UIKit class BaseValues: NSObject { static func getBaseURL() -> String { return Bundle.main.object(forInfoDictionaryKey: "baseURL") as! String ...
// // STBindPhoneViewController.swift // SpecialTraining // // Created by 尹涛 on 2018/12/13. // Copyright © 2018 youpeixun. All rights reserved. // import UIKit class STBindPhoneViewController: BaseViewController { @IBOutlet weak var phoneOutlet: UITextField! @IBOutlet weak var codeOutlet: UITextField! ...
// // RecordCell.swift // SPHTechApp // // Created by Hoang Nguyen on 6/5/20. // Copyright © 2020 Hoang Nguyen. All rights reserved. // import UIKit import RxSwift import RxCocoa class RecordCell: UITableViewCell { @IBOutlet weak var yearLabel: UILabel! @IBOutlet weak var volumeLabel: UILabel! @IBOutl...
import UIKit import UIExtension import Trade import OtherTabs class RootPresenter: TabPresenter { let tab1: HomePresenter let tab2: MarketsPresenter let tab3: TradeNavigationPresener let tab4: FuturesPresenter let tab5: WalletsPresenter init() { tab1 = .instantiate() tab2 ...
// // AppDelegate.swift // TipCalculator // // Created by Abhay on 9/13/15. // Copyright © 2015 Abhay. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWit...
// // RainRange.swift // RedCatWeather // // Created by Markus Pfeifer on 14.05.21. // enum RainRange : Character { case sunny = "☀️" case clouds = "⛅️" case maybeRain = "🌦" case rain = "🌧" case stayAtHome = "⛈" init(rainProbability: Double) { switch Int(100 * rainProbability) { ...
import UIKit class ItemTableViewCell: UITableViewCell { @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var descriptionLabel: UILabel! @IBOutlet weak var favoriteButtonContainer: UIView! @IBOutlet weak var favoriteButton: UIButton! var item: Item? { didSet { guard let item = item else {...
// // ChartsTableViewCell.swift // KPCharts // // Created by Michael Merani on 6/26/17. // // import UIKit class ChartsTableViewCell: UITableViewCell { @IBOutlet weak var txtFieldYards: UITextField! @IBOutlet weak var txtFieldHangtime: UITextField! @IBOutlet weak var txtFieldKickYards: UITextFiel...
// // ContentView.swift // SwiftUI-PopToRootExample // // Created by Chuck Hartman on 5/20/20. // Copyright © 2020 ForeTheGreen. All rights reserved. // import SwiftUI struct ContentView: View { @State private var isActive : Bool = false var body: some View { NavigationView { VStack { ...
import UIKit import ContactsUI class FriendsViewController: UITableViewController { var friendsList = Friend.defaultContacts() override func viewDidLoad() { super.viewDidLoad() navigationItem.titleView = UIImageView(image: UIImage(named: "RWConnectTitle")!) } override func viewWillAppear(_ animat...
import Foundation @testable import SmartyStreets class MockLogger: SmartyLogger { var log = NSMutableArray() override func log(message: String) { self.log.add(message) } }
// Mission day 16 - Part 1 with the for loop - Longest String func longestString(_ arr: [String]) -> String { let strLength = arr[0].count var longestStr = arr[0] for str in arr { if str.count > strLength { longestStr = str } } return longestStr } let arr1 = ["...
// // ActivityManager.swift // Calm Cloud // // Created by Kate Duncan-Welke on 4/9/20. // Copyright © 2020 Kate Duncan-Welke. All rights reserved. // import Foundation struct ActivityManager { static var loaded: [ActivityId] = [] static var completion: [Int : Bool] = [:] static var searchResults: [A...
// // UIBezierPath+Extensions.swift // Inkable // // Created by Adam Wulf on 5/1/21. // #if canImport(UIKit) import UIKit extension UIBezierPath { /// Returns a new path that is the same as the current path, but stroked with the current line width, line cap style, line join style, and miter limit /// - Ret...
// // ViewController.swift // Metabolism // // Created by Bilgihan Köse on 22.08.2020. // Copyright © 2020 Bilgihan Kose. All rights reserved. // import UIKit class CalculateViewController: UIViewController { var calculatorBrain = CalculatorBrain() @IBOutlet weak var heightLabel: UILabel! ...
// // WeatherViewController.swift // weather // // Created by Lauriane Haydari on 12/02/2020. // Copyright © 2020 Lauriane Haydari. All rights reserved. // import UIKit class WeekViewController: UIViewController { // MARK: - Outlet @IBOutlet private weak var activityIndicator: UIActivityIndicatorView! ...
import Foundation /** View model for **edit-activity-datetime.stencil**. */ struct EditActivityDateTimeViewModel: Codable { let base: BaseViewModel let id: Int struct DateViewModel: Codable { let day: Int let month: Int let year: Int let hour: Int ...
// // AppDelegate.swift // Apple-Camera-App // // Created by Chrishon Wyllie on 3/27/17. // Copyright © 2017 Chrishon Wyllie. All rights reserved. // import UIKit import Photos public var phassetImageArray = [PHAsset]() public var lastImageFromPhotoLibrary: UIImage? @UIApplicationMain class AppDelegate: UIRespon...
// // ViewController.swift // X-O // // Created by Sarah Almarii on 9/27/20. // Copyright © 2020 fajer. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var b1: UIButton! @IBOutlet weak var b2: UIButton! @IBOutlet weak var b3: UIButton! @IBOutlet weak va...
// // iOS_Aura // // Copyright © 2016 Ayla Networks. All rights reserved. // import Foundation import iOS_AylaSDK class DeviceDetailProvider: NSObject, AylaDeviceDetailProvider { let deviceType_gateway = "Gateway" let oemModel_ledevb = "ledevb" let oemModel_generic = "generic" let led...
// // ViewController.swift // VenueSearch // // Created by Conny Yang on 7/01/2017. // Copyright © 2017 Conny Yang. All rights reserved. // import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let baseURL = "https://api.four...
import UIKit /******* You don't need to do anything in this class. You can use this class for verify ServiceStatusDelegate handling *******/ class ViewController: UIViewController { fileprivate let handler = ServiceStatusHandler() override func viewWillAppear(_ animated: Bool) { super.viewWillAp...
// // ProductTests.swift // GBShop // // Created by Константин Кузнецов on 01.07.2021. // import XCTest @testable import GBShop class ProductTests: XCTestCase { var requestFactory: RequestFactory? var productsFactory: ProductRequestFactory? override func setUpWithError() throws { requestF...
// // LoginMainVC.swift // MyTestApp // // Created by Joe Kletz on 11/11/2020. // import UIKit class LoginMainVC: UIViewController { let mainImageView : MainImagesView = { let v = MainImagesView(frame: CGRect.zero) v.translatesAutoresizingMaskIntoConstraints = false return v }(...
// ___FILEHEADER___ import UIKit protocol ___VARIABLE_sceneName___DisplayLogic: AnyObject { // func displaySomething(viewModel: ___VARIABLE_sceneName___.Something.ViewModel) } class ___FILEBASENAMEASIDENTIFIER___: UICollectionViewController { var interactor: ___VARIABLE_sceneName___BusinessLogic? var ro...
// // InfoViewController.swift // PageChange // // Created by Yung on 2018/10/8. // import UIKit class InfoViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction fu...
// // InterfaceController.swift // breadwallet WatchKit Extension // // Created by ajv on 10/5/16. // Copyright © 2016 breadwallet LLC. All rights reserved. // import WatchKit import Foundation class BalanceInterfaceController: WKInterfaceController { @IBOutlet var bitsBalance: WKInterfaceLabel! @IBOutl...
// // CompletedTasksCoordinator.swift // WorkAndAnalyse // // Created by Ruslan Khanov on 25.05.2021. // import UIKit class CompletedTasksCoordinator: BaseCoordinator { // MARK: - Vars & Lets private let router: RouterProtocol private let coordinatorFactory: CoordinatorFactoryProtocol private ...
import Foundation class WatchService { private let accountFactory: AccountFactory private(set) var name: String? init(accountFactory: AccountFactory) { self.accountFactory = accountFactory } } extension WatchService { var defaultAccountName: String { accountFactory.nextWatchAcc...