blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
625
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
47
| license_type
stringclasses 2
values | repo_name
stringlengths 5
116
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 643
values | visit_date
timestamp[ns] | revision_date
timestamp[ns] | committer_date
timestamp[ns] | github_id
int64 80.4k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 16
values | gha_event_created_at
timestamp[ns] | gha_created_at
timestamp[ns] | gha_language
stringclasses 85
values | src_encoding
stringclasses 7
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 1
class | length_bytes
int64 4
6.44M
| extension
stringclasses 17
values | content
stringlengths 4
6.44M
| duplicates
listlengths 1
9.02k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54e01446158e6d0ed17a6e9d8af92c86ffc1cbaf
|
9748c261ac6133fd2c16d523506c5db126b2bb7b
|
/Sources/Networking/ResponseParser.swift
|
483d2e28c78371844dbd90be10464fc39c59cac7
|
[] |
no_license
|
NSExceptional/DiscourseKit
|
37b8e21b8b95b823f0772b49857ae9b19155d258
|
baac1ae428aaa4caeb73c0607afd8dc9eb267075
|
refs/heads/master
| 2021-08-18T15:41:18.123661 | 2021-06-10T18:17:53 | 2021-06-10T18:17:53 | 183,824,937 | 8 | 2 | null | 2021-05-19T04:26:33 | 2019-04-27T21:52:53 |
Swift
|
UTF-8
|
Swift
| false | false | 10,808 |
swift
|
//
// ResponseParser.swift
// DiscourseKit
//
// Created by Tanner on 3/31/19.
// Copyright © 2019 Tanner Bennett. All rights reserved.
//
import Foundation
import Extensions
public typealias ResponseParserBlock = (ResponseParser) -> Void
/// A convenient wrapper around handling `URLSessionTask`
/// responses that consolidate errors and gives you convenient
/// accessors for various content types.
public class ResponseParser {
// MARK: Response information
public func result<T: Decodable>() -> Result<T, Error> {
if let error = self.error {
return .failure(error)
}
do {
let decoder = JSONDecoder()
decoder.keyDecodingStrategy = .convertFromSnakeCase
return .success(try decoder.decode(T.self, from: self.data))
} catch {
return .failure(error)
}
}
public private(set) var response: HTTPURLResponse?
public private(set) var data: Data
public var error: Error?
public lazy var contentType: String? = (self.response?.allHeaderFields[HTTPHeader.contentType] as! String?)?.lowercased()
// MARK: Response data helper accessors
public private(set) lazy var JSONDictionary: [String : JSONValue]? = try? self.forceDecodeJSON().object
public private(set) lazy var JSONArray: [Any]? = try? self.forceDecodeJSON().array
public private(set) lazy var text: String? = self.hasText ? String(data: self.data, encoding: .utf8) : nil
public var HTML: String? {
return self.hasHTML ? self.text : nil
}
public var XML: String? {
return self.hasXML ? self.text : nil
}
public var javascript: String? {
return self.hasJavascript ? self.text : nil
}
public private(set) var hasJSON = false
public var hasText: Bool {
return (self.contentType?.hasPrefix("text") ?? false) || self.hasJSON || self.hasJavascript
}
// MARK: Initializers, misc
public convenience init(error: Error) {
self.init(data:nil, response: nil, error: error)
}
/// Use to conveniently call a callback closure on the main thread with a `ResponseParser`
public class func parse(_ response: HTTPURLResponse?, _ data: Data?, _ error: Error?, callback: @escaping ResponseParserBlock) {
DispatchQueue.global().async {
let parser = ResponseParser(data: data, response: response, error: error)
DispatchQueue.main.async {
callback(parser)
}
}
}
public init(data: Data?, response: HTTPURLResponse?, error: Error?) {
self.data = data ?? Data()
self.response = response
self.error = error
if let contentType = self.contentType, !contentType.isEmpty, !self.data.isEmpty {
self.hasJSON = contentType.hasPrefix(ContentType.JSON)
self.hasHTML = contentType.hasPrefix(ContentType.HTML)
self.hasXML = contentType.hasPrefix(ContentType.XML)
self.hasJavascript = contentType.hasPrefix(ContentType.javascript)
// You could add more types here as needed and the properties at the bottom
}
if error == nil, let code = self.response?.statusCode, code >= 400 {
self.error = ResponseParser.error(HTTPStatusCodeDescription(code), code: code)
}
}
/// Attempt to decode the response to JSON, regardless of the Content-Type
///
/// Useful if an API isn't using the right Content-Type
public func forceDecodeJSON() throws -> (object: [String : JSONValue]?, array: [Any]?) {
let json = try JSONSerialization.jsonObject(with: self.data, options: [])
if json is NSDictionary {
return ((json as! [String : JSONValue]), nil)
} else {
return (nil, json as? [Any])
}
}
/// Convenience method to create an NSError
public class func error(_ message: String, domain: String = "ResponseParser", code: Int) -> NSError {
return NSError(domain: domain, code: code,
userInfo: [
NSLocalizedDescriptionKey: message,
NSLocalizedFailureReasonErrorKey: message
]
)
}
private var hasHTML = false
private var hasXML = false
private var hasJavascript = false
}
// MARK: Headers and content types
public struct ContentType {
public static let CSS = "text/css"
public static let formURLEncoded = "application/x-www-form-urlencoded"
public static let GZIP = "application/gzip"
public static let HTML = "text/html"
public static let javascript = "application/javascript"
public static let JSON = "application/json"
public static let JWT = "application/jwt"
public static let markdown = "text/markdown"
public static let multipartFormData = "multipart/form-data"
public static let multipartEncrypted = "multipart/encrypted"
public static let plainText = "text/plain"
public static let rtf = "text/rtf"
public static let textXML = "text/xml"
public static let XML = "application/xml"
public static let ZIP = "application/zip"
public static let ZLIB = "application/zlib"
}
public struct HTTPHeader {
public static let accept = "Accept"
public static let acceptEncoding = "Accept-Encoding"
public static let acceptLanguage = "Accept-Language"
public static let acceptLocale = "Accept-Locale"
public static let authorization = "Authorization"
public static let cacheControl = "Cache-Control"
public static let contentLength = "Content-Length"
public static let contentType = "Content-Type"
public static let date = "Date"
public static let expires = "Expires"
public static let cookie = "Cookie"
public static let setCookie = "Set-Cookie"
public static let status = "Status"
public static let userAgent = "User-Agent"
}
// MARK: Status codes
enum HTTPStatusCode: Int {
/// Force unwraps code, you have been warned
init(_ code: Int) {
self.init(rawValue: code)!
}
case Continue = 100
case SwitchProtocol
case OK = 200
case Created
case Accepted
case NonAuthorativeInfo
case NoContent
case ResetContent
case PartialContent
case MultipleChoice = 300
case MovedPermanently
case Found
case SeeOther
case NotModified
case UseProxy
case Unused
case TemporaryRedirect
case PermanentRedirect
case BadRequest = 400
case Unauthorized
case PaymentRequired
case Forbidden
case NotFound
case MethodNotAllowed
case NotAcceptable
case ProxyAuthRequired
case RequestTimeout
case Conflict
case Gone
case LengthRequired
case PreconditionFailed
case PayloadTooLarge
case URITooLong
case UnsupportedMediaType
case RequestedRangeUnsatisfiable
case ExpectationFailed
case ImATeapot
case MisdirectedRequest = 421
case UpgradeRequired = 426
case PreconditionRequired = 428
case TooManyRequests
case RequestHeaderFieldsTooLarge = 431
case InternalServerError = 500
case NotImplemented
case BadGateway
case ServiceUnavailable
case GatewayTimeout
case HTTPVersionUnsupported
case VariantAlsoNegotiates
case AuthenticationRequired = 511
}
func HTTPStatusCodeDescription(_ code: Int) -> String {
guard let status = HTTPStatusCode(rawValue: code) else {
return "Unknown Error (code \(code)"
}
switch status {
case .Continue:
return "Continue"
case .SwitchProtocol:
return "Switch Protocol"
case .OK:
return "OK"
case .Created:
return "Created"
case .Accepted:
return "Accepted"
case .NonAuthorativeInfo:
return "Non Authorative Info"
case .NoContent:
return "No content"
case .ResetContent:
return "Reset Content"
case .PartialContent:
return "Partial Content"
case .MultipleChoice:
return "Multiple Choice"
case .MovedPermanently:
return "Moved Permanently"
case .Found:
return "Found"
case .SeeOther:
return "See Other"
case .NotModified:
return "Not Modified"
case .UseProxy:
return "Use Proxy"
case .Unused:
return "Unused"
case .TemporaryRedirect:
return "Temporary Redirect"
case .PermanentRedirect:
return "Permanent Redirect"
case .BadRequest:
return "Bad Request"
case .Unauthorized:
return "Unauthorized"
case .PaymentRequired:
return ""
case .Forbidden:
return "Forbidden"
case .NotFound:
return "Not Found"
case .MethodNotAllowed:
return "Method Not Allowed"
case .NotAcceptable:
return "Not Acceptable"
case .ProxyAuthRequired:
return "Proxy Authentication Required"
case .RequestTimeout:
return "Request Timeout"
case .Conflict:
return "Conflict"
case .Gone:
return "Gone"
case .LengthRequired:
return "Length Required"
case .PreconditionFailed:
return "Precondition Failed"
case .PayloadTooLarge:
return "Payload Too Large"
case .URITooLong:
return "URI Too Long"
case .UnsupportedMediaType:
return "Unsupported Media Type"
case .RequestedRangeUnsatisfiable:
return "Requested Range Unsatisfiable"
case .ExpectationFailed:
return "Expectation Failed"
case .ImATeapot:
return "???"
case .MisdirectedRequest:
return "Misdirected Request"
case .UpgradeRequired:
return "Upgrade Required"
case .PreconditionRequired:
return "Precondition Required"
case .TooManyRequests:
return "Too many requests"
case .RequestHeaderFieldsTooLarge:
return "Request Header Fields Too Large"
case .InternalServerError:
return "Internal Server Error"
case .NotImplemented:
return "Not Implemented"
case .BadGateway:
return "Bad gateway"
case .ServiceUnavailable:
return "Service Unavailable"
case .GatewayTimeout:
return "Gateway timeout"
case .HTTPVersionUnsupported:
return "HTTP Version Unsupported"
case .VariantAlsoNegotiates:
return "Variant Also Negotiates"
case .AuthenticationRequired:
return "Authentication Required"
}
}
|
[
-1
] |
1759bd875edb7d823a75f2cf604d567c3fdcaa76
|
3ae574590af00a7bc2214a7e7d8c4c5add5f169c
|
/cp6-5/cp6-5/TopMainView.swift
|
de79f535301ab86b648ae240dd2891d812d29f4c
|
[] |
no_license
|
Sakai-NR/CP6collectionView
|
0348fadd9da8d5c741310650331a69702d13df48
|
72d259c94d001cf6ffa835b20b498f20355003da
|
refs/heads/master
| 2020-07-21T19:43:36.365845 | 2019-09-24T13:29:05 | 2019-09-24T13:29:05 | 206,957,995 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,260 |
swift
|
//
// TopMainView.swift
// cp6-5
//
// Created by 酒井典昭 on 2019/09/16.
// Copyright © 2019 典昭酒井. All rights reserved.
//
import UIKit
import PGFramework
protocol TopMainViewDelegate: NSObjectProtocol{
}
extension TopMainViewDelegate {
}
// MARK: - Property
class TopMainView: BaseView {
weak var delegate: TopMainViewDelegate? = nil
@IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var collectionViewFlowLayout: UICollectionViewFlowLayout!
var labels: [String] = ["あああああああああああああああああああああああ","いいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいい","うううううううううううううううううううううううううううううううううううううううううううう","うううううううううううううううううううううううううううううううううううううううううううう","えええええええええええええええええええええええええええええええ","おおおおおおおおおおおおおおおおおおおおおおおおおおおおおお","えええええええええええええええええええええええええええええええええええええええ","あああああああああああああああああああああああ","いいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいいい","うううううううううううううううううううううううううううううううううううううううううううう","うううううううううううううううううううううううううううううううううううううううううううう","えええええええええええええええええええええええええええええええ","おおおおおおおおおおおおおおおおおおおおおおおおおおおおおお","えええええええええええええええええええええええええええええええええええええええ"]
}
// MARK: - Life cycle
extension TopMainView {
override func awakeFromNib() {
super.awakeFromNib()
collectionView.dataSource = self
loadCollectionViewCellFromXib(collectionView: collectionView, cellName: "TopMainCollectionViewCell")
}
override func draw(_ rect: CGRect) {
super .draw(rect)
collectionViewFlowLayout.estimatedItemSize = CGSize(width: collectionView.contentSize.width, height: 10)
}
}
// MARK: - Protocol
extension TopMainView: UICollectionViewDataSource{
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return labels .count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
guard let cell: TopMainCollectionViewCell = collectionView.dequeueReusableCell(withReuseIdentifier: "TopMainCollectionViewCell", for: indexPath)as? TopMainCollectionViewCell else {return UICollectionViewCell() }
cell.label.text = labels[indexPath.row]
return cell
}
}
// MARK: - method
extension TopMainView {
}
|
[
-1
] |
1c6aa83e3dc8b960fa09e0c4b7cec173629048b4
|
16277caf0953b4baa79e3d84905317fd76d0dd93
|
/example/ios/EmptySwift.swift
|
04d6a0be193adfd550850afe895164f3410653f4
|
[
"MIT"
] |
permissive
|
mtroskot/rn-music-player
|
2036a7d6c5676516ec5cefb96f90e751ac4f37de
|
e8a3634940438d54df6ec2e5357af25967c5af97
|
refs/heads/master
| 2023-03-06T03:02:09.813316 | 2021-02-15T09:43:33 | 2021-02-15T09:43:33 | 336,807,922 | 9 | 1 |
MIT
| 2021-02-14T19:53:01 | 2021-02-07T14:33:52 |
TypeScript
|
UTF-8
|
Swift
| false | false | 110 |
swift
|
//
// EmptySwift.swift
// RnMusicPlayerExample
//
// Created by Marko on 07/02/2021.
//
import Foundation
|
[
-1
] |
aa7c5748c1ce67ed20f32c00b0b395b803281143
|
426fd60c1a8ddccef5466039903403457a2d697c
|
/LifeGauge/LifeGauge/Modules/home/Router/HomeRouter.swift
|
af2ab5c88ee95e2683068338ad519420bea84b57
|
[] |
no_license
|
ht-swear/LifeGauge-ios
|
a7853d050e1cd653c0cc30a72f16c5903c8d00c8
|
53f5173657379d866f6eaf1473874d9c4e8c32b7
|
refs/heads/develop
| 2023-01-22T00:18:42.743982 | 2021-07-23T13:21:39 | 2021-07-23T13:21:39 | 192,204,007 | 0 | 0 | null | 2023-01-09T22:30:33 | 2019-06-16T14:59:46 |
Swift
|
UTF-8
|
Swift
| false | false | 942 |
swift
|
//
// homeRouter.swift
// LifeGauge-ios
//
// Created by on 18/06/2019.
// Copyright © 2019 ht-swear. All rights reserved.
//
import UIKit
class HomeRouter: HomeRouterInput
{
weak var viewController: UIViewController!
static func assembleModule() -> UIViewController?
{
guard let navigation = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController() as? UINavigationController else { return nil }
guard let view = navigation.topViewController as? HomeViewController else { return navigation }
let presenter = HomePresenter()
let interactor = HomeInteractor()
let router = HomeRouter()
view.output = presenter
presenter.view = view
presenter.interactor = interactor
presenter.router = router
interactor.output = presenter
router.viewController = view
return navigation
}
}
|
[
-1
] |
d7216b399331a5f02160a59ca707b6df8017d94a
|
6c3adb1bb36641564c76d4e3121f5dd65549fecb
|
/Tests/FileProviderKitTests/FileProviderKitTests.swift
|
3c013c7e7a8a576de444c866677647faf3b1dd28
|
[] |
no_license
|
diegostamigni/FileProviderKit
|
a86005160db639ee3da7f9ae1356240608e2b9bf
|
6a043d29bdd7111d248e6fa5b525ae1a84ae7bd0
|
refs/heads/main
| 2023-01-29T18:38:03.161539 | 2020-12-15T16:15:52 | 2020-12-15T16:15:52 | 318,486,449 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 857 |
swift
|
import XCTest
@testable import FileProviderKit
final class FileProviderKitTests: XCTestCase {
func testDocumentManagetShouldWriteInDocumentDirectory() {
guard let documentDirectory = DocumentManager.shared.cacheDirectory else {
XCTFail("Documents directory not found")
return
}
XCTAssertTrue(FileManager.default.fileExists(atPath: documentDirectory.path))
let dstFile = documentDirectory.appendingPathComponent("test.txt")
do {
try "Hello world\n".data(using: .utf8)!.write(to: dstFile)
} catch let error {
XCTFail(error.localizedDescription)
}
XCTAssertTrue(FileManager.default.fileExists(atPath: dstFile.path))
try? FileManager.default.removeItem(at: dstFile)
}
static var allTests = [
("testDocumentManagetShouldWriteInDocumentDirectory", testDocumentManagetShouldWriteInDocumentDirectory),
]
}
|
[
-1
] |
52506ec80282d8abeb0e1a90bce913f8be271ade
|
2839d1fca142a37bc5857d85fd0c5510f826673b
|
/swift_base/swift_baseTests/swift_baseTests.swift
|
192f0a348ce5746d138ca3fe0ff2b7661c58f5d5
|
[] |
no_license
|
pxhmeiyangyang/iOS_swift_base
|
46cc7879b257ef7aca518d5aabe6b1970c190db1
|
afbb0c2e9903134d6ca8a8776c97832533b1902f
|
refs/heads/master
| 2021-01-12T02:15:22.761168 | 2017-01-10T09:43:54 | 2017-01-10T09:43:54 | 78,494,104 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 970 |
swift
|
//
// swift_baseTests.swift
// swift_baseTests
//
// Created by pxh on 2017/1/10.
// Copyright © 2017年 pxh. All rights reserved.
//
import XCTest
@testable import swift_base
class swift_baseTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
|
[
360462,
98333,
16419,
229413,
204840,
278570,
344107,
155694,
253999,
229430,
319542,
180280,
163896,
376894,
286788,
352326,
311372,
196691,
278615,
385116,
237663,
254048,
319591,
221290,
278634,
278638,
319598,
352368,
204916,
131191,
237689,
131198,
278655,
278677,
196760,
426138,
278685,
311458,
278691,
49316,
32941,
278704,
377009,
278708,
131256,
295098,
139479,
254170,
229597,
311519,
205035,
286958,
327929,
344313,
147717,
368905,
180493,
254226,
368916,
262421,
377114,
237856,
237857,
278816,
311597,
98610,
180535,
336183,
278842,
287041,
164162,
287043,
139589,
319821,
254286,
344401,
377169,
368981,
155990,
368984,
106847,
98657,
270701,
246127,
270706,
139640,
246136,
246137,
311685,
106888,
385417,
385422,
213403,
385454,
377264,
278970,
311738,
33211,
319930,
336317,
336320,
311745,
278978,
254406,
188871,
278985,
278989,
278993,
278999,
328152,
369116,
287198,
279008,
279013,
279018,
319981,
279029,
254456,
279032,
377338,
377343,
279039,
254465,
287241,
279050,
139792,
303636,
393751,
279065,
377376,
180771,
377386,
197167,
385588,
352829,
115270,
377418,
385615,
426576,
369235,
139872,
66150,
344680,
295536,
287346,
139892,
287352,
344696,
279164,
189057,
311941,
336518,
311945,
369289,
344715,
279177,
311949,
287374,
377489,
311954,
352917,
230040,
271000,
377497,
303771,
221852,
377500,
205471,
344738,
139939,
279206,
295590,
287404,
295599,
205487,
303793,
336564,
164533,
287417,
303803,
287422,
66242,
377539,
287433,
164560,
385747,
279252,
361176,
418520,
287452,
295652,
369385,
230125,
312052,
172792,
344827,
221948,
205568,
295682,
197386,
434957,
426774,
197399,
426775,
336671,
344865,
197411,
262951,
279336,
312108,
295724,
197422,
353070,
164656,
295729,
262962,
353069,
328499,
353078,
230199,
197431,
353079,
336702,
295744,
295746,
353094,
353095,
353109,
377686,
230234,
189275,
435039,
279392,
295776,
303972,
385893,
246641,
246643,
295798,
246648,
361337,
279417,
254850,
369538,
287622,
295824,
189348,
353195,
140204,
377772,
353197,
304051,
230332,
377790,
353215,
353216,
213957,
213960,
345033,
279498,
386006,
418776,
50143,
123881,
304110,
320494,
271350,
295927,
312314,
304122,
328700,
320507,
328706,
410627,
320516,
295942,
386056,
230410,
353290,
377869,
320527,
238610,
418837,
140310,
197657,
336929,
369701,
345132,
238639,
312373,
238651,
377926,
238664,
353367,
156764,
156765,
304222,
230499,
173166,
312434,
377972,
353397,
377983,
279685,
402565,
222343,
386189,
296086,
238743,
296092,
238765,
279728,
238769,
402613,
279747,
353479,
353481,
402634,
353482,
189652,
189653,
419029,
148696,
296153,
279774,
304351,
304356,
222440,
328940,
279792,
353523,
386294,
386301,
320770,
386306,
279814,
369930,
328971,
312587,
353551,
320796,
222494,
353584,
345396,
386359,
116026,
378172,
222524,
279875,
312648,
230729,
337225,
304456,
222541,
296270,
238927,
353616,
296273,
222559,
378209,
230756,
386412,
230765,
296303,
279920,
312689,
296307,
116084,
337281,
148867,
378244,
296329,
296335,
9619,
370071,
279974,
173491,
304564,
353719,
361927,
296392,
370123,
148940,
280013,
312782,
222675,
353750,
280032,
271843,
280041,
361963,
296433,
321009,
280055,
288249,
296448,
230913,
329225,
230921,
296461,
304656,
329232,
370197,
402985,
394794,
230959,
288309,
312889,
288318,
280130,
124485,
288326,
288327,
239198,
99938,
312940,
222832,
247416,
337534,
337535,
263809,
288392,
239250,
419478,
345752,
255649,
337591,
321207,
296632,
280251,
321219,
280267,
403148,
9936,
9937,
370388,
272085,
345814,
280278,
280280,
18138,
67292,
345821,
321247,
321249,
345833,
345834,
288491,
280300,
239341,
67315,
173814,
313081,
124669,
288512,
288516,
280327,
280329,
321295,
321302,
345879,
116505,
321310,
255776,
247590,
362283,
378668,
296755,
321337,
345919,
436031,
403267,
345929,
18262,
362327,
280410,
370522,
345951,
362337,
345955,
296806,
288619,
288620,
280430,
214895,
313199,
362352,
173936,
313203,
124798,
182144,
305026,
67463,
329622,
337815,
124824,
214937,
436131,
354212,
436137,
362417,
124852,
288697,
362431,
214977,
280514,
214984,
362443,
247757,
280541,
329695,
436191,
313319,
337895,
247785,
296941,
436205,
362480,
313339,
43014,
354316,
313357,
182296,
354345,
223274,
124975,
346162,
124984,
288828,
436285,
288833,
288834,
436292,
403525,
436301,
338001,
354385,
338003,
223316,
280661,
329814,
338007,
354393,
280675,
280677,
43110,
321637,
313447,
436329,
288879,
223350,
280694,
215164,
313469,
215166,
280712,
215178,
346271,
436383,
362659,
239793,
125109,
182456,
379071,
149703,
338119,
346314,
321745,
387296,
280802,
379106,
338150,
346346,
321772,
125169,
338164,
436470,
125183,
149760,
411906,
125188,
313608,
125193,
125198,
272658,
125203,
125208,
305440,
125217,
338218,
321840,
379186,
125235,
280887,
125240,
321860,
182598,
289110,
215385,
272729,
379225,
321894,
280939,
354676,
199029,
436608,
362881,
240002,
436611,
248194,
395659,
395661,
240016,
108944,
190871,
149916,
420253,
141728,
289189,
108972,
272813,
338356,
436661,
281037,
289232,
281040,
256477,
281072,
174593,
420369,
289304,
207393,
182817,
289332,
174648,
338489,
338490,
322120,
281166,
297560,
354911,
436832,
436834,
191082,
313966,
420463,
281199,
346737,
313971,
346740,
420471,
330379,
330387,
117396,
117397,
346772,
330388,
264856,
289434,
346779,
338613,
166582,
289462,
314040,
158394,
363211,
289502,
363230,
264928,
338662,
330474,
346858,
289518,
199414,
35583,
363263,
322313,
117517,
322319,
166676,
207640,
281377,
289576,
191283,
273207,
289598,
420677,
281427,
281433,
330609,
207732,
158593,
240518,
224145,
355217,
256922,
289690,
420773,
289703,
363438,
347055,
289727,
273344,
330689,
363458,
379844,
19399,
338899,
248796,
248797,
207838,
347103,
314342,
289774,
183279,
347123,
240630,
314362,
257024,
330754,
330763,
281626,
248872,
322612,
314448,
339030,
314467,
281700,
257125,
322663,
207979,
273515,
404593,
363641,
363644,
150657,
248961,
330888,
363669,
339100,
380061,
429214,
199839,
339102,
330913,
265379,
249002,
306346,
3246,
421048,
339130,
208058,
265412,
290000,
298208,
298212,
298213,
290022,
330984,
298221,
298228,
216315,
208124,
363771,
388349,
437505,
322824,
257305,
126237,
339234,
372009,
412971,
298291,
306494,
216386,
224586,
372043,
331090,
314709,
314710,
372054,
159066,
314720,
281957,
306542,
380271,
314739,
208244,
249204,
290173,
306559,
314751,
298374,
314758,
314760,
142729,
388487,
314766,
306579,
282007,
290207,
314783,
314789,
282022,
314791,
396711,
396712,
282024,
241066,
380337,
380338,
150965,
380357,
339398,
306631,
306639,
413137,
429542,
191981,
306673,
290300,
290301,
282114,
372227,
306692,
323080,
323087,
175639,
388632,
396827,
282141,
134686,
282146,
306723,
347694,
290358,
265798,
282183,
265804,
396882,
290390,
306776,
44635,
396895,
323172,
282213,
323178,
224883,
314998,
323196,
175741,
339584,
224901,
282245,
282246,
290443,
323217,
282259,
282271,
282276,
298661,
323236,
282280,
224946,
306874,
110268,
224958,
282303,
274115,
306890,
241361,
282327,
298712,
298720,
12010,
282348,
323316,
282358,
175873,
339715,
323331,
323332,
216839,
339720,
282378,
372496,
323346,
249626,
282400,
339745,
241441,
257830,
421672,
282417,
200498,
282427,
315202,
307011,
282438,
216918,
241495,
282474,
241528,
339841,
315273,
315274,
110480,
372626,
380821,
282518,
282519,
298909,
118685,
298920,
323507,
290745,
274371,
151497,
372701,
298980,
380908,
282633,
241692,
102437,
315432,
102445,
233517,
176175,
282672,
241716,
225351,
315465,
315476,
307289,
200794,
315487,
356447,
438377,
315498,
299121,
233589,
266357,
422019,
241808,
381073,
323729,
233636,
299174,
405687,
184505,
299198,
258239,
389313,
299203,
299209,
372941,
282831,
266449,
356576,
176362,
307435,
438511,
381172,
184570,
184575,
381208,
282909,
299293,
151839,
282913,
233762,
217380,
151847,
282919,
332083,
332085,
332089,
315706,
282939,
241986,
438596,
332101,
323913,
348492,
323916,
323920,
250192,
348500,
168281,
332123,
332127,
323935,
242023,
242029,
160110,
242033,
291192,
340357,
225670,
242058,
373134,
291224,
242078,
283038,
61857,
315810,
61859,
315811,
381347,
340398,
61873,
61880,
283064,
291267,
127427,
127428,
283075,
324039,
373197,
176601,
242139,
160225,
242148,
291311,
233978,
291333,
340490,
283153,
258581,
291358,
283184,
234036,
315960,
348732,
242237,
70209,
348742,
70215,
348749,
381517,
332378,
201308,
111208,
184940,
373358,
389745,
209530,
373375,
152195,
348806,
152203,
184973,
316049,
111253,
316053,
111258,
111259,
225956,
176808,
299699,
299700,
422596,
422599,
291530,
225995,
242386,
422617,
422626,
201442,
234217,
299759,
209660,
299776,
242433,
291585,
430849,
291592,
62220,
422673,
430865,
291604,
422680,
152365,
422703,
422709,
152374,
242485,
160571,
430910,
160575,
160580,
299849,
283467,
381773,
201551,
242529,
349026,
357218,
275303,
308076,
242541,
209785,
177019,
185211,
308092,
398206,
291712,
381829,
316298,
308107,
308112,
349072,
209817,
324506,
324507,
390045,
185250,
324517,
283558,
185254,
373687,
349121,
373706,
316364,
340955,
340961,
324586,
340974,
349171,
316405,
349175,
201720,
127992,
357379,
275469,
324625,
308243,
316437,
201755,
300068,
357414,
300084,
324666,
308287,
21569,
218186,
300111,
341073,
439384,
250981,
300135,
300136,
316520,
357486,
316526,
144496,
300150,
291959,
300151,
160891,
341115,
300158,
349316,
349318,
373903,
169104,
177296,
308372,
119962,
300187,
300188,
300201,
300202,
373945,
259268,
283847,
62665,
283852,
283853,
259280,
316627,
333011,
357595,
234733,
234742,
128251,
316669,
439562,
292107,
242954,
414990,
251153,
177428,
349462,
382258,
300343,
382269,
193859,
177484,
406861,
259406,
234831,
251213,
120148,
357719,
283991,
374109,
292195,
333160,
243056,
316787,
382330,
357762,
112017,
234898,
259475,
275859,
112018,
357786,
251298,
333220,
316842,
374191,
210358,
284089,
292283,
415171,
292292,
300487,
300489,
366037,
210390,
210391,
210393,
144867,
54765,
251378,
308723,
300536,
210433,
366083,
259599,
316946,
308756,
398869,
374296,
374299,
308764,
349726,
431649,
349741,
169518,
431663,
194110,
235070,
349763,
218696,
292425,
243274,
128587,
333388,
333393,
300630,
128599,
235095,
333408,
300644,
374372,
415338,
243307,
54893,
325231,
366203,
325245,
194180,
415375,
153251,
300714,
210603,
415420,
333503,
218819,
259781,
333517,
333520,
333521,
333523,
325346,
153319,
325352,
284401,
325371,
194303,
284429,
243472,
366360,
284442,
325404,
325410,
341796,
399147,
431916,
300848,
317232,
259899,
325439,
153415,
341836,
415567,
325457,
317269,
341847,
350044,
300894,
128862,
284514,
276325,
292712,
325484,
423789,
292720,
325492,
276341,
300918,
341879,
317304,
333688,
194429,
112509,
55167,
325503,
333701,
243591,
243597,
325518,
333722,
350109,
292771,
415655,
333735,
284587,
292782,
276400,
243637,
284619,
301008,
153554,
276443,
219101,
292836,
292837,
317415,
325619,
432116,
333817,
292858,
415741,
333828,
358410,
399373,
317467,
145435,
292902,
325674,
129076,
243767,
358456,
309345,
227428,
194666,
260207,
432240,
284788,
333940,
276606,
292992,
333955,
415881,
104587,
235662,
325776,
317587,
284826,
333991,
333992,
284842,
153776,
227513,
301251,
309444,
194782,
301279,
317664,
276709,
227578,
243962,
375039,
309503,
375051,
325905,
276753,
325912,
211235,
432421,
211238,
358703,
358709,
260418,
227654,
6481,
366930,
366929,
276822,
6489,
391520,
383332,
416104,
383336,
211326,
317831,
227725,
252308,
317852,
121245,
285090,
375207,
342450,
293303,
293306,
293310,
416197,
129483,
342476,
317901,
326100,
285150,
342498,
358882,
276962,
334309,
276963,
391655,
195045,
432618,
375276,
309744,
342536,
342553,
416286,
375333,
293419,
244269,
375343,
23092,
375351,
244281,
301638,
309830,
293448,
55881,
416341,
244310,
416351,
268899,
39530,
244347,
326287,
375440,
334481,
227990,
318106,
318107,
342682,
318130,
383667,
293556,
342713,
285371,
285372,
285373,
285374,
39614,
203478,
318173,
375526,
285415,
342762,
342763,
293612,
154359,
228088,
432893,
162561,
285444,
383754,
310036,
326429,
293664,
326433,
228129,
342820,
400166,
293672,
318250,
318252,
285487,
375609,
293693,
252741,
293711,
244568,
244570,
293730,
351077,
342887,
400239,
269178,
400252,
359298,
359299,
260996,
113542,
228233,
392074,
228234,
56208,
318364,
310176,
310178,
310182,
293800,
236461,
326581,
326587,
326601,
359381,
433115,
343005,
130016,
64485,
326635,
203757,
187374,
383983,
318461,
293886,
277509,
293893,
277513,
433165,
384016,
146448,
277524,
293910,
433174,
252958,
252980,
203830,
359478,
302139,
277574,
359495,
277597,
392290,
253029,
228458,
351344,
187506,
285814,
285820,
392318,
187521,
384131,
285828,
302213,
285830,
302216,
228491,
228493,
285838,
162961,
326804,
187544,
351390,
302240,
343203,
253099,
253100,
318639,
367799,
294074,
113850,
64700,
228542,
302274,
367810,
343234,
244940,
228563,
195808,
310497,
228588,
253167,
302325,
228600,
261377,
228609,
245019,
253216,
130338,
130343,
261425,
351537,
286013,
277824,
286018,
113987,
146762,
294218,
294219,
318805,
425304,
294243,
163175,
327024,
327025,
327031,
318848,
294275,
277891,
253317,
384393,
368011,
318864,
318868,
318875,
212382,
310692,
245161,
310701,
286129,
277939,
286132,
228795,
425405,
277952,
302529,
302531,
163268,
425418,
310732,
277965,
64975,
327121,
228827,
286172,
310757,
187878,
343542,
343543,
286202,
359930,
286205,
302590,
228867,
253451,
253452,
359950,
146964,
253463,
286244,
245287,
245292,
286254,
196164,
56902,
179801,
196187,
343647,
310889,
204397,
138863,
188016,
294529,
229001,
310923,
188048,
278160,
278162,
425626,
229020,
302754,
245412,
229029,
40614,
40613,
40615,
286391,
384695,
319162,
327358,
286399,
212685,
384720,
212688,
302802,
245457,
286423,
278233,
278234,
294622,
278240,
212716,
212717,
360177,
229113,
286458,
286459,
278272,
319233,
360195,
278291,
294678,
286494,
278307,
409394,
319292,
360252,
360264,
188251,
376669,
245599,
425825,
425833,
417654,
188292,
253829,
40850,
294807,
376732,
311199,
319392,
294823,
327596,
294843,
188348,
237504,
294850,
384964,
163781,
344013,
212942,
212946,
24532,
294886,
253929,
327661,
311281,
311282
] |
2b06cd85817e78b4d525ac56be7aca6653fdc20e
|
090f21ff800a88a5e7ead47bc5a1a288a2e62906
|
/Jukugo Master 2/Classes/Controllers/GameController.swift
|
96a23961d837041d5ba8dee2d32eaeaadcf311e6
|
[] |
no_license
|
gshields5541/Jukugo-Master-2
|
710d4cda8a0ed360334c728661f95105a4ee548d
|
7767921e3fed7920352b899957bec9869270c630
|
refs/heads/master
| 2020-05-23T11:24:12.598444 | 2020-03-03T21:43:49 | 2020-03-03T21:43:49 | 186,735,867 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 10,995 |
swift
|
//
// GameController.swift
// Jukugo Master
//
// Created by Gerald F. Shields Jr. on 4/12/19.
// Copyright © 2019 Gerald Shields. All rights reserved.
//
import Foundation
import UIKit
class GameController {
var gameView: UIView!
var level: Level!
var onCompoundsSolved: ( () -> ())!
private var tiles = [TileView]()
private var targets = [TargetView]()
private var data = GameData()
var hud:HUDView! {
didSet {
//connect the Hint button
hud.hintButton.addTarget(self, action: #selector(actionHint), for:.touchUpInside)
hud.hintButton.isEnabled = false
}
}
//the user pressed the hint button
@objc func actionHint() {
//1
hud.hintButton.isEnabled = true
//2
data.points -= level.pointsPerTile / 2
hud.gamePoints.setValue(newValue: data.points, duration: 1.5)
//3
var foundTarget:TargetView? = nil
for target in targets {
if !target.isMatched {
foundTarget = target
break
}
}
//4 find the first tile matching the target
var foundTile:TileView? = nil
for tile in tiles {
if !tile.isMatched && tile.letter == foundTarget?.letter {
foundTile = tile
break
}
}
//ensure there is a matching tile and target
if let target = foundTarget, let tile = foundTile {
//5 don't want the tile sliding under other tiles
gameView.bringSubviewToFront(tile)
//6 show the animation to the user
UIView.animate(withDuration: 1.5,
delay:0.0,
options:UIView.AnimationOptions.curveEaseOut,
animations:{
tile.center = target.center
}, completion: {
(value:Bool) in
//7 adjust view on spot
self.placeTile(tileView: tile, targetView: target)
//8 re-enable the button
self.hud.hintButton.isEnabled = true
//9 check for finished game
self.checkForSuccess()
})
}
}
//clear the tiles and targets
func clearBoard() {
tiles.removeAll(keepingCapacity: false)
targets.removeAll(keepingCapacity: false)
for view in gameView.subviews {
view.removeFromSuperview()
}
}
//stopwatch variables
private var secondsLeft: Int = 0
private var timer: Timer?
private var audioController: AudioController
init() {
self.audioController = AudioController()
self.audioController.preloadAudioEffects(effectFileNames: AudioEffectFiles)
}
func dealRandomCompounds () {
//1
assert(level.compounds.count > 0, "no level loaded")
//2
let randomIndex = randomNumber(min:0, max:UInt32(level.compounds.count-1))
let compoundPair = level.compounds[randomIndex]
//3
let compound1 = compoundPair[0] as! String
let compound2 = compoundPair[1] as! String
let compound3 = compoundPair[2] as! String
//4
let compound1length = compound1.count
let compound2length = compound2.count
let compound3length = compound3.count
//5
print("phrase1[\(compound1length)]: \(compound1)")
print("phrase2[\(compound2length)]: \(compound2)")
print("phrase3[\(compound2length)]: \(compound3)")
//calculate the tile size
let tileSide = ceil(ScreenWidth * 0.9 / CGFloat(max(compound1length, compound2length, compound3length))) - TileMargin
//get the left margin for first tile
var xOffset = (ScreenWidth - CGFloat(max(compound1length, compound2length, compound3length)) * (tileSide + TileMargin)) / 2.0
//adjust for tile center (instead of the tile's origin)
xOffset += tileSide / 2.0
//initialize target list
targets = []
//create targets
for(index, letter) in compound2.enumerated(){
//3
if letter != " "{
let target = TargetView(letter: letter, sideLength: tileSide)
target.center = CGPoint(x: xOffset + CGFloat(index)*(tileSide + TileMargin),y: ScreenHeight/4)
//4
gameView.addSubview(target)
targets.append(target)
}
}
//1 initialize tile list
tiles = []
//2 create tiles
for (index, letter) in compound1.enumerated() {
//3
if letter != " " {
let tile = TileView(letter: letter, sideLength: tileSide)
tile.center = CGPoint(x: xOffset + CGFloat(index)*(tileSide + TileMargin), y: ScreenHeight/4*3)
tile.randomize()
tile.dragDelegate = self
//4
gameView.addSubview(tile)
tiles.append(tile)
}
}
//create a list for the meanings of the jukugo
for (index, letter) in compound3.enumerated() {
//3
if letter != " " {
let tile = TileView(letter: letter, sideLength: tileSide)
tile.center = CGPoint(x: xOffset + CGFloat(index)*(tileSide + TileMargin), y: ScreenHeight/6*3)
tile.randomize()
tile.dragDelegate = self
//4
gameView.addSubview(tile)
tiles.append(tile)
}
}
//start the timer
self.startStopwatch()
hud.hintButton.isEnabled = true
}
func placeTile(tileView: TileView, targetView: TargetView) {
//1
targetView.isMatched = true
tileView.isMatched = true
//2
tileView.isUserInteractionEnabled = false
//3
UIView.animate(withDuration: 0.35,
delay:0.00,
options:UIView.AnimationOptions.curveEaseOut,
//4
animations: {
tileView.center = targetView.center
tileView.transform = .identity
},
//5
completion: {
(value:Bool) in
targetView.isHidden = true
})
}
func checkForSuccess(){
for targetView in targets{
//no success, bail but
if !targetView.isMatched{
return
}
}
print("Game Over")
hud.hintButton.isEnabled = false
//stop the stopwatch
self.stopStopwatch()
//the compound is completed!
audioController.playEffect(name: SoundWin)
//win animation
let firstTarget = targets[0]
let startX:CGFloat = 0
let endX:CGFloat = ScreenWidth + 300
let startY = firstTarget.center.y
let stars = StardustView(frame: CGRect(x: startX, y: startY, width: 10, height: 20))
gameView.addSubview(stars)
gameView.sendSubviewToBack(stars)
UIView.animate(withDuration: 3.0,
delay:0.0,
options:UIView.AnimationOptions.curveEaseOut,
animations:{
stars.center = CGPoint(x: endX, y: startY)
}, completion: {(value:Bool) in
//game finished
stars.removeFromSuperview()
// when animation is finished , show menu
self.clearBoard()
self.onCompoundsSolved()
})
}
func startStopwatch() {
secondsLeft = level.timeToSolve
hud.stopwatch.setSeconds(seconds: secondsLeft)
//schedule a new timer
timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(tick), userInfo: nil, repeats: true)
}
func stopStopwatch() {
timer?.invalidate()
timer = nil
}
@objc func tick(timer: Timer) {
secondsLeft-=1
hud.stopwatch.setSeconds(seconds: secondsLeft)
if secondsLeft == 0 {
self.stopStopwatch()
}
}
}
extension GameController:TileDragDelegateProtocol {
//a tile was dragged, check if matches a target
func tileView(tileView: TileView, didDragToPoint point: CGPoint) {
var targetView: TargetView?
for tv in targets {
if tv.frame.contains(point) && !tv.isMatched {
targetView = tv
break
}
}
//1 check if target was found
if let targetView = targetView {
//2 check if letter matches
if targetView.letter == tileView.letter {
//3
self.placeTile(tileView: tileView, targetView: targetView)
//more stuff to do on success here
audioController.playEffect(name: SoundDing)
//give points
data.points += level.pointsPerTile
hud.gamePoints.setValue(newValue: data.points, duration: 0.5)
//check for finished game
self.checkForSuccess()
} else {
//4
//1
tileView.randomize()
//2
UIView.animate(withDuration: 0.35, delay: 0.0, options: UIView.AnimationOptions.curveEaseOut, animations: {
tileView.center = CGPoint(x: tileView.center.x + CGFloat(randomNumber(min:0, max:40)-20),
y: tileView.center.y + CGFloat(randomNumber(min:20, max:30)))
}, completion: nil)
//more stuff to do on failure here
audioController.playEffect(name: SoundWrong)
//take out points
data.points -= level.pointsPerTile/2
hud.gamePoints.setValue(newValue: data.points, duration: 0.25)
let explode = ExplodeView(frame: CGRect(x: tileView.center.x, y: tileView.center.y, width: 10, height: 10))
tileView.superview?.addSubview(explode)
tileView.superview?.sendSubviewToBack(explode)
}
}
}
}
|
[
-1
] |
887428f7d2b12e0facfcbc561de62b11fc6e5986
|
6acbf4d480b7100ad01c6e44c048787edfe7dd8b
|
/Sources/URL.swift
|
6c74e50814767b8ab66aec84a0da97be52ba9362
|
[
"MIT"
] |
permissive
|
atljeremy/Extensions
|
4dfd8548d3d3bab64d0592ce67f6b8c3dd247fa7
|
be35b398c5ce516d1e816f2477bf83e5e0bb2a1a
|
refs/heads/master
| 2021-07-07T19:20:24.449344 | 2020-08-28T21:14:49 | 2020-08-28T21:14:49 | 50,291,548 | 1 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,741 |
swift
|
/*
* URL
*
* Created by Jeremy Fox on 3/1/16.
* Copyright (c) 2016 Jeremy Fox. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* 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 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import Foundation
public extension URL {
typealias Params = [String: AnyObject]
func paramsDictonary() -> Params {
return query?.split(separator: "&")
.map({ String($0) }) // ["key=value", "another_key=another_value", etc...]
.reduce(Params(), { (result, part) -> Params in
var result = result
let part = part.split(separator: "=").map({ String($0) }) // ["key", "value"]
result[part[0]] = part[1] as AnyObject
return result
}) ?? Params()
}
}
|
[
-1
] |
a8ae5baf836a92ceb86ee5d0907abcefa2ec1512
|
35c704866ddfd50c4a5b173ad32953643b3a29df
|
/SecondKadaiApp/ViewController.swift
|
1b196e3d5442eb0c03cf808e05b95b8b66697b57
|
[] |
no_license
|
youheikonishi/SecondKadaiApp
|
3055b178eb2fe7cada7efc1b3f1213d22252043a
|
b7cc49bf34847b516a546da6744177824cbdbb25
|
refs/heads/master
| 2020-05-30T19:39:09.315992 | 2017-03-03T00:19:40 | 2017-03-03T00:19:40 | 83,652,848 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 931 |
swift
|
//
// ViewController.swift
// SecondKadaiApp
//
// Created by 小西洋平 on 2017/03/01.
// Copyright © 2017年 youhei.konishi. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var tableView: UITextField!
@IBAction func unwind(segue: UIStoryboardSegue){
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func prepare(for segue: UIStoryboardSegue,sender: Any?){
//segueから繊維先のResultViewControllerを取得する
let resultViewController: ResultViewController = segue.destination as! ResultViewController
resultViewController.xy = tableView.text!
}
}
|
[
-1
] |
e764699dd6cc52c50e03a43269f29d9f4ac1793f
|
3b7e3f7ab678287c4b0d115228391a0727833cf4
|
/TDDSample/TDDSample/MainCoordinator.swift
|
5b04531aca5e3f8c660ebbc1236dbd1b9d525566
|
[] |
no_license
|
tantan39/TDD
|
5c39540874b198f442a1fa3b4a3aaae21b9a59ce
|
8303b1be35f56533daf60883e0e4d31ca6653f97
|
refs/heads/master
| 2023-04-22T08:53:27.929297 | 2021-05-05T18:42:38 | 2021-05-05T18:42:38 | 364,674,129 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 902 |
swift
|
//
// MainCoordinator.swift
// TDDSample
//
// Created by Tan Tan on 5/4/21.
//
import UIKit
class MainCoordinator {
var navigationController = UINavigationController()
func start() {
let storyboard = UIStoryboard.init(name: "Main", bundle: .main)
guard let viewController = storyboard.instantiateInitialViewController() as? ViewController else { fatalError("Not found ViewController in Main storyboard")
}
viewController.pictureSelection = { [weak self] value in
self?.showDetail(for: value)
}
navigationController.pushViewController(viewController, animated: true)
}
func showDetail(for fileName: String) {
let detailVC = DetailViewController()
detailVC.selectedImage = fileName
navigationController.pushViewController(detailVC, animated: true)
}
}
|
[
286849
] |
dd19222e296f48bdc8c26484c3c71192173e82a1
|
ca61084f979eebc3bda2ab739dbf903b9ab669ae
|
/MoyaPlay/AddressAPI.swift
|
dee26ccad53c91706f7b8e706693d2e3df65147a
|
[] |
no_license
|
renueji/MoyaPlay
|
5acee4dff78a1c560ffbac7207951a1fb77afd8c
|
e879cf82a495d817c2ee307d342f5cf747b3ef95
|
refs/heads/master
| 2022-07-25T00:32:14.291186 | 2020-05-22T03:10:21 | 2020-05-22T03:10:21 | 266,006,256 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,153 |
swift
|
//
// AddressAPI.swift
// MoyaPlay
//
// Created by Rentaro on 2020/03/22.
// Copyright © 2020 Rentaro. All rights reserved.
//
import Moya
enum AddressApi {
case search(request: Dictionary<String, Any>)
}
extension AddressApi: TargetType {
//呼び出すAPIのURLを書く
var baseURL: URL {
return URL(string: "http://zipcloud.ibsnet.co.jp/api")!
}
//APIのpathを書く
var path: String {
switch self {
case .search:
return "/search"
}
}
//apiのメソッドを書く
var method: Moya.Method {
return .get
}
//ここはsampledateだからいじらなくてもよい
var sampleData: Data {
return Data()
}
//apiで何を送りたいのかを書く(ここではパラメータ)
var task: Task {
switch self {
case .search(let request):
return .requestParameters(parameters: request, encoding: URLEncoding.default)
}
}
//リクエストヘッダの設定
var headers: [String : String]? {
return ["components-type": "application/json"]
}
}
|
[
-1
] |
d8556b56287168888eb5c2032bf5d91f80125a14
|
5104617d4e46d40a6e3d747e5eb0637292e629eb
|
/Package.swift
|
3c48655b4958b351bf63955b12f40bcd4f1e396d
|
[] |
no_license
|
topkekmann/testiossdk
|
a4e59a8927a8dd138c8316a600e80fcc4112dd6e
|
4619b7c8a91a94a2a8e998629cde26924b0acc73
|
refs/heads/main
| 2023-08-21T08:03:44.658704 | 2021-10-15T07:54:00 | 2021-10-15T07:54:00 | 417,370,360 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 451 |
swift
|
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "testsdk",
products: [
.library(
name: "testsdk",
targets: ["testsdk"]
),
],
dependencies: [],
targets: [
.binaryTarget(
name: "testsdk",
url: "https://github.com/topkekmann/testiossdk/releases/download/1.4.7/testsdk.xcframework.zip",
checksum: "4d0beee2973877f04b122c9529881da69b6f8d37d8ef6ba9edd1284461354093")
]
)
|
[
-1
] |
8004e9c885130164ef96f366a0aa10d963e1a294
|
d1f3f5c06de8157d055d76e1376d6c6ccf479abd
|
/Magic 8 Ball/ViewController.swift
|
6c03de4bf7cd10031dfe87931bec2f95e10e2867
|
[] |
no_license
|
qNecro/magic-8-ball
|
2691a5651259c6464a22c3c259b3254f621e321d
|
2c68b4cc4b565f2213762be0404c513185743442
|
refs/heads/main
| 2023-07-10T08:39:40.476976 | 2021-08-15T18:22:44 | 2021-08-15T18:22:44 | 396,427,830 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 621 |
swift
|
//
// ViewController.swift
// Magic 8 Ball
//
// Created by Angela Yu on 14/06/2019.
// Copyright © 2019 The App Brewery. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
let ballArray = [#imageLiteral(resourceName: "ball1.png"),#imageLiteral(resourceName: "ball2.png"),#imageLiteral(resourceName: "ball3.png"),#imageLiteral(resourceName: "ball4.png"),#imageLiteral(resourceName: "ball5.png")]
@IBOutlet weak var imageView: UIImageView!
@IBAction func askButtonPressed(_ sender: UIButton) {
imageView.image = ballArray.randomElement()
}
}
|
[
265801,
332505,
352897,
249236
] |
7e7fa7dbaa1343d8fc2770ddabd0e40fc8cbc1ce
|
ddab1c39782749db02cb027538112ba599dc5282
|
/Pager/Pager/ExploreTableViewHeader.swift
|
d66cdf7b35beb4a4f52993d9dce67c0532f921a3
|
[] |
no_license
|
viramesh/Pager
|
01dd999bd161dccae32b1a495c74737558f58e1e
|
306145c448992b037e94af38c9e645ceaa2a8bd9
|
refs/heads/master
| 2016-09-01T19:48:18.629022 | 2015-08-11T04:02:33 | 2015-08-11T04:02:33 | 38,267,962 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 492 |
swift
|
//
// ExploreTableViewHeader.swift
// Pager
//
// Created by Vignesh Ramesh on 7/9/15.
// Copyright (c) 2015 SOMA. All rights reserved.
//
import UIKit
class ExploreTableViewHeader: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
|
[
283040,
180676,
379078,
283048,
240008,
287242,
217069,
228144,
327344,
276752,
312531,
303540,
312535,
279323,
283900,
196093,
155614
] |
12187e46e9f4497bb395c44d1af5bea4fff3c809
|
e4c1b3f83c584c2e9bbf7197ce95d0231cc94b51
|
/GeoSearch/Services/NetworkService/NetworkService.swift
|
5ebce02f1119e512a1b027dc3e99af9a0a6dcdd3
|
[
"MIT"
] |
permissive
|
PavelKatunin/GeoSearch
|
e441a7f07902954677b1634c5d589b5390e106ed
|
5e3df5af5fc4c2a4ed54d49d19e932fbd9a79b0f
|
refs/heads/master
| 2020-03-14T08:40:56.109529 | 2018-04-30T19:57:00 | 2018-04-30T19:57:00 | 131,530,348 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 62 |
swift
|
import Foundation
protocol NetworkService {
}
|
[
-1
] |
cdc6ab7b0e315a8ace56ef4b51f09af99d786b84
|
301d35dca626858267908b8bd3a203b82d849d1f
|
/SwiftPokeAPI/PokemonResult.swift
|
28fd862d0b4883fc3b27c16754165513d3dcc7c0
|
[] |
no_license
|
Joferava2210/SwiftPokeAPICenfotec
|
32185f7edcec94c7577a191b54f7659dbe6f455d
|
e167eb2385bdb13834cddc6fbdaa807cfaff38eb
|
refs/heads/main
| 2023-03-18T01:42:39.458029 | 2021-03-07T03:45:55 | 2021-03-07T03:45:55 | 344,691,997 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 356 |
swift
|
//
// PokemonResult.swift
// SwiftPokeAPI
//
// Created by Felipe Ramirez Vargas on 4/3/21.
//
import Foundation
struct Root : Codable {
let next : String
let results : [Pokemon]
}
struct Pokemon: Codable {
let name: String;
let url: String;
}
struct PokemonInfo: Codable{
let id: Int
let height: Int
let weight: Int
}
|
[
-1
] |
c74e82db86697a2e6eb6b014778f84f9c39d5cff
|
890fc08af2ab7375c78e029344daad8698474864
|
/Swift/Swift 4 Essential Training/Ch4_WorkingWithCollections.playground/Pages/Swift Dictionaries.xcplaygroundpage/Contents.swift
|
0ff2280c6615a1611a9b03e8c35ead74e3b88d23
|
[] |
no_license
|
davideimola/labs
|
aebc1e4b749352d6b8f5c0568376f5207a86ec7a
|
b17bf0bdad37208236793269e3a5d0d1963efd0e
|
refs/heads/master
| 2023-03-10T23:30:16.031320 | 2021-03-02T22:07:36 | 2021-03-02T22:07:36 | 257,718,572 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,411 |
swift
|
/*:
# Swift Dictionaries
---
## Topic Essentials
Like arrays, dictionaries are collection types, but instead of holding single values accessed by indexes, they hold **key-value** pairs. All keys need to be of the same type, and the same goes for values. It's important to know that dictionary items are **unordered**, and their values are accessed with their associated keys.
### Objectives
+ Create a few empty dictionaries with different syntax
+ Create a dictionary called **blacksmithShopItems** and fill it with a few items
+ Use the `count` and `isEmpty` methods
+ Access all the keys and values of **blacksmithShopItems**
+ Iterate over **blacksmithShopItems** and print out its values and keys
*/
// Creating dictionaries
var emptyDictionary: Dictionary<Int, Int> = [:]
var emptyDictionary2 = Dictionary<Int, String>()
var emptyDictionary3 = [String: String]()
var emptyDictionary4: [String : String] = [:]
var blacksmithShop = ["Bottle": 10, "Shield": 15, "Ocarina": 1000]
// Count and isEmpty
blacksmithShop.count
blacksmithShop.isEmpty
// All keys and values
let allKeys = [String](blacksmithShop.keys)
let allValues = [Int](blacksmithShop.values)
// Accessing dict values
let shieldPriece = blacksmithShop["Shield"]
blacksmithShop["Sword"]
for (itemName, itemValue) in blacksmithShop {
print(itemName, itemValue)
}
/*:
[Previous Topic](@previous)
[Next Topic](@next)
*/
|
[
-1
] |
3817c69bfd397fa44c630b3e15b163293b1eaefb
|
b8c0654288a9385b1882349eb40e6c0b7915e3e7
|
/FloatyPanel/Classes/RoundedView.swift
|
67ec12b27780332b0ff21d0979ae3b574f5c802e
|
[
"MIT"
] |
permissive
|
Shayimpagne/FloatyPanel
|
6f7af70a0acdac85009b331cd579733dee2ee93e
|
cd425d16ec7a25f6e4da22ca8646ea4bcfba7f60
|
refs/heads/master
| 2022-04-26T11:37:42.176475 | 2020-04-29T17:50:45 | 2020-04-29T17:50:45 | 256,540,137 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 280 |
swift
|
//
// RoundedView.swift
// FloatyPanel
//
// Created by Emir Shayymov on 4/27/20.
//
import Foundation
open class RoundedView: UIView {
override open func layoutSubviews() {
super.layoutSubviews()
layer.cornerRadius = bounds.height / 2
}
}
|
[
-1
] |
77859d132432935255093075b7f94ad44bbd1040
|
228f3a2d52c59309621a5c652c98a9d4092a4933
|
/SwipeView/SwipeViewTests/SwipeViewTests.swift
|
bc1ba94c9b966749e6721afc6cfb104695b0f81b
|
[
"MIT"
] |
permissive
|
coyingcat/SwiftSwitch
|
54dcfa9c3e2b4d326828cb78cf52b255db8e3e28
|
7d80b976348e902534ea738de6131ae0e22db341
|
refs/heads/master
| 2021-01-06T23:21:25.000393 | 2020-05-27T08:36:17 | 2020-05-27T08:36:17 | 241,511,216 | 2 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 944 |
swift
|
//
// SwipeViewTests.swift
// SwipeViewTests
//
// Created by Jz D on 2020/4/25.
// Copyright © 2020 Jz D. All rights reserved.
//
import XCTest
@testable import SwipeView
class SwipeViewTests: XCTestCase {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() throws {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
|
[
333828,
43014,
358410,
354316,
313357,
360462,
399373,
317467,
145435,
229413,
204840,
315432,
325674,
344107,
102445,
155694,
176175,
233517,
346162,
129076,
241716,
229430,
243767,
163896,
180280,
358456,
288828,
436285,
376894,
288833,
288834,
436292,
403525,
352326,
225351,
315465,
436301,
338001,
196691,
338003,
280661,
329814,
307289,
385116,
237663,
254048,
315487,
356447,
280675,
280677,
43110,
319591,
321637,
436329,
194666,
221290,
438377,
260207,
432240,
204916,
233589,
266357,
131191,
215164,
215166,
422019,
280712,
415881,
104587,
235662,
241808,
381073,
196760,
284826,
426138,
346271,
436383,
362659,
299174,
333991,
239793,
377009,
405687,
182456,
295098,
258239,
379071,
389313,
299203,
149703,
299209,
346314,
372941,
266449,
321745,
139479,
229597,
194782,
301279,
311519,
317664,
280802,
379106,
387296,
346346,
205035,
307435,
321772,
438511,
381172,
436470,
327929,
243962,
344313,
184575,
149760,
375039,
411906,
147717,
368905,
325905,
254226,
272658,
368916,
262421,
325912,
381208,
377114,
151839,
237856,
237857,
233762,
211235,
217380,
432421,
211238,
338218,
311597,
358703,
321840,
98610,
332083,
379186,
332085,
358709,
180535,
336183,
332089,
321860,
332101,
438596,
323913,
348492,
323920,
344401,
366930,
377169,
348500,
368981,
155990,
289110,
368984,
168281,
215385,
332123,
332127,
98657,
383332,
242023,
383336,
270701,
160110,
242033,
270706,
354676,
139640,
291192,
211326,
436608,
362881,
240002,
436611,
311685,
225670,
317831,
106888,
340357,
242058,
385417,
373134,
385422,
108944,
252308,
190871,
213403,
149916,
121245,
242078,
420253,
141728,
315810,
315811,
381347,
289189,
108972,
272813,
340398,
385454,
377264,
342450,
338356,
436661,
293303,
311738,
33211,
293310,
336320,
311745,
127427,
416197,
254406,
188871,
324039,
129483,
342476,
373197,
289232,
328152,
256477,
287198,
160225,
342498,
358882,
334309,
391655,
432618,
375276,
319981,
291311,
254456,
377338,
377343,
174593,
254465,
291333,
340490,
139792,
420369,
342548,
303636,
258581,
393751,
416286,
377376,
207393,
375333,
377386,
244269,
197167,
375343,
385588,
289332,
234036,
375351,
174648,
338489,
338490,
244281,
315960,
242237,
348732,
70209,
115270,
70215,
293448,
55881,
301638,
309830,
348742,
348749,
381517,
385615,
426576,
369235,
416341,
297560,
332378,
201308,
416351,
139872,
436832,
436834,
268899,
111208,
39530,
184940,
373358,
420463,
346737,
389745,
313971,
139892,
346740,
420471,
287352,
344696,
209530,
244347,
373375,
152195,
311941,
336518,
348806,
311945,
369289,
330379,
344715,
311949,
287374,
326287,
375440,
316049,
311954,
334481,
117396,
111253,
316053,
346772,
230040,
264856,
111258,
111259,
271000,
289434,
303771,
205471,
318106,
318107,
344738,
139939,
377500,
176808,
205487,
303793,
318130,
299699,
293556,
336564,
383667,
314040,
287417,
39614,
287422,
377539,
422596,
422599,
291530,
225995,
363211,
164560,
242386,
385747,
361176,
418520,
422617,
287452,
363230,
264928,
422626,
375526,
234217,
330474,
342762,
293612,
342763,
289518,
299759,
369385,
377489,
312052,
154359,
172792,
344827,
221948,
432893,
205568,
162561,
291585,
295682,
430849,
291592,
197386,
383754,
62220,
117517,
434957,
322319,
422673,
377497,
430865,
166676,
291604,
310036,
197399,
207640,
422680,
426774,
426775,
326429,
336671,
293664,
326433,
197411,
400166,
289576,
293672,
295724,
152365,
197422,
353070,
164656,
295729,
422703,
191283,
422709,
152374,
197431,
273207,
375609,
160571,
289598,
160575,
336702,
430910,
160580,
252741,
381773,
201551,
293711,
353109,
377686,
244568,
230234,
189275,
244570,
435039,
295776,
242529,
349026,
357218,
303972,
385893,
342887,
308076,
242541,
330609,
246643,
207732,
295798,
361337,
177019,
185211,
308092,
398206,
400252,
291712,
158593,
254850,
359298,
260996,
359299,
240518,
113542,
369538,
381829,
316298,
392074,
349072,
295824,
224145,
355217,
256922,
289690,
318364,
390045,
310176,
185250,
310178,
420773,
185254,
289703,
293800,
140204,
236461,
363438,
347055,
377772,
304051,
326581,
373687,
326587,
230332,
377790,
289727,
273344,
330689,
353215,
363458,
379844,
213957,
19399,
326601,
345033,
373706,
316364,
330708,
359381,
386006,
418776,
433115,
248796,
343005,
50143,
347103,
123881,
326635,
187374,
383983,
347123,
240630,
271350,
201720,
127992,
295927,
349175,
328700,
318461,
293886,
257024,
328706,
330754,
320516,
293893,
295942,
357379,
386056,
410627,
353290,
330763,
377869,
433165,
384016,
238610,
308243,
418837,
140310,
433174,
252958,
369701,
357414,
248872,
238639,
300084,
312373,
203830,
359478,
238651,
308287,
336960,
377926,
218186,
314448,
341073,
339030,
439384,
304222,
392290,
253029,
257125,
300135,
316520,
273515,
173166,
357486,
144496,
351344,
404593,
377972,
285814,
291959,
300150,
300151,
363641,
160891,
363644,
300158,
377983,
392318,
150657,
248961,
384131,
349316,
402565,
349318,
302216,
330888,
386189,
373903,
169104,
177296,
326804,
363669,
238743,
119962,
300187,
300188,
339100,
351390,
199839,
380061,
429214,
265379,
300201,
249002,
253099,
253100,
238765,
3246,
300202,
306346,
238769,
318639,
402613,
367799,
421048,
373945,
113850,
294074,
343234,
302274,
367810,
259268,
265412,
353479,
402634,
283852,
259280,
290000,
316627,
333011,
189653,
419029,
148696,
296153,
304351,
195808,
298208,
310497,
298212,
298213,
222440,
330984,
328940,
298221,
298228,
302325,
234742,
386294,
128251,
386301,
261377,
320770,
386306,
437505,
322824,
439562,
292107,
328971,
414990,
353551,
251153,
177428,
349462,
257305,
320796,
222494,
253216,
339234,
372009,
412971,
353584,
261425,
351537,
382258,
345396,
300343,
386359,
378172,
286013,
306494,
382269,
216386,
312648,
337225,
304456,
230729,
146762,
224586,
177484,
294218,
259406,
234831,
238927,
294219,
331090,
353616,
406861,
318805,
314710,
372054,
425304,
159066,
374109,
314720,
378209,
163175,
333160,
386412,
380271,
327024,
296307,
116084,
208244,
249204,
316787,
382330,
290173,
306559,
314751,
318848,
337281,
148867,
357762,
253317,
298374,
314758,
314760,
142729,
296329,
368011,
384393,
388487,
314766,
296335,
318864,
112017,
234898,
9619,
259475,
275859,
318868,
370071,
357786,
290207,
314783,
251298,
310692,
314789,
333220,
314791,
396711,
245161,
396712,
374191,
286129,
380337,
173491,
286132,
150965,
304564,
353719,
380338,
228795,
425405,
302531,
380357,
339398,
361927,
300489,
425418,
306639,
413137,
23092,
210390,
210391,
210393,
286172,
144867,
271843,
429542,
296433,
251378,
308723,
300536,
286202,
359930,
302590,
372227,
323080,
329225,
253451,
296461,
359950,
259599,
304656,
329232,
146964,
308756,
370197,
253463,
175639,
374296,
388632,
374299,
308764,
396827,
134686,
431649,
286244,
245287,
402985,
394794,
245292,
169518,
347694,
431663,
288309,
312889,
194110,
349763,
196164,
265798,
288327,
218696,
292425,
128587,
265804,
333388,
396882,
128599,
179801,
44635,
239198,
343647,
333408,
396895,
99938,
300644,
323172,
310889,
415338,
120427,
243307,
312940,
54893,
138863,
204397,
188016,
222832,
325231,
224883,
314998,
323196,
325245,
337534,
337535,
339584,
263809,
294529,
194180,
288392,
229001,
415375,
188048,
239250,
419478,
425626,
302754,
153251,
298661,
40614,
300714,
210603,
224946,
337591,
384695,
110268,
415420,
224958,
327358,
333503,
274115,
259781,
306890,
403148,
212685,
333517,
9936,
9937,
241361,
302802,
333520,
272085,
345814,
342682,
370388,
384720,
345821,
321247,
298720,
321249,
325346,
153319,
325352,
345833,
345834,
212716,
212717,
360177,
67315,
173814,
325371,
288512,
319233,
339715,
288516,
360195,
339720,
243472,
372496,
323346,
321302,
345879,
366360,
398869,
325404,
286494,
321310,
255776,
339745,
257830,
421672,
362283,
378668,
366381,
399147,
431916,
300848,
339762,
409394,
296755,
259899,
319292,
360252,
325439,
345919,
436031,
403267,
339783,
153415,
360264,
345929,
341836,
415567,
325457,
317269,
18262,
216918,
241495,
341847,
362327,
346779,
350044,
128862,
245599,
345951,
362337,
376669,
345955,
425825,
296806,
292712,
425833,
423789,
214895,
313199,
362352,
325492,
276341,
417654,
341879,
241528,
317304,
333688,
112509,
55167,
182144,
325503,
305026,
339841,
188292,
333701,
243591,
315273,
315274,
325518,
372626,
380821,
329622,
294807,
337815,
333722,
376732,
118685,
298909,
311199,
319392,
350109,
292771,
436131,
294823,
415655,
436137,
327596,
362417,
323507,
243637,
290745,
294843,
188348,
362431,
237504,
294850,
274371,
384964,
214984,
151497,
362443,
344013,
212942,
301008,
153554,
24532,
372701,
329695,
436191,
292836,
292837,
298980,
313319,
317415,
174057,
380908,
436205,
247791,
311281,
311282,
325619,
432116,
292858,
415741,
352917
] |
eb2f9820751e5d7604a059097736514f27d9c1e0
|
f2554c53252b9fe321f96813448ac2e7a6695af2
|
/ios/doordeck-sdk/doordeck-sdk-swift/Styles/UIColor.swift
|
dba551bffc90787e1b070bcbe54485fee6076b1e
|
[
"Apache-2.0"
] |
permissive
|
doordeck/doordeck-sdk-react-native
|
c733aa73bf91872dd35f46ad1550cb8d93f09375
|
45907ce7e747c9693189361e815f49b7afc72cf2
|
refs/heads/master
| 2023-07-06T12:52:54.957409 | 2023-06-28T08:36:57 | 2023-06-28T17:40:28 | 185,798,929 | 1 | 11 |
Apache-2.0
| 2023-08-31T15:40:38 | 2019-05-09T12:56:02 |
Swift
|
UTF-8
|
Swift
| false | false | 12,000 |
swift
|
//
// UIColour.swift
// doordeck-sdk-swift
//
// Copyright © 2019 Doordeck. All rights reserved.
//
import UIKit
extension UIColor {
convenience init(r: CGFloat, g: CGFloat, b: CGFloat) {
self.init(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: 1)
}
/// Backgrounds colour for Light (Light Grey) and Dark (primary dark blue)
///
/// - Parameters:
/// - Used for all backgrounds
/// - Dark: primary dark blue
/// - Light: Light Grey
/// - Returns: UIColor
class func doordeckPrimaryColour () -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckDarkPrimary()
} else {
return doordeckLightGrey()
}
}
/// fields, pop up menus & inactive tabs for Light (White) and Dark (secondary dark blue)
///
/// - Parameters:
/// - used for all form fields, pop up menus & inactive tabs
/// - Dark: secondary dark blue
/// - Light: white
/// - Returns: UIColor
class func doordeckSecondaryColour () -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckDarkSecondary()
} else {
return .white
}
}
/// Light (Dark Blue) and Dark (Dark Grey)
///
/// - Parameters:
/// - Dark: Dark Grey
/// - Light: dark Blue
/// - Returns: UIColor
class func doordeckTertiaryColour () -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckDarkGrey()
} else {
return doordeckDarkPrimary()
}
}
/// Light (Very Dark Blue) and Dark (Light Grey)
///
/// - Parameters:
/// - used for all form fields, pop up menus & inactive tabs
/// - Dark: Light Grey
/// - Light: Very Dark Blue
/// - Returns: UIColor
class func doordeckQuaternaryColour () -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckLightGrey()
} else {
return doordeckDarkSecondary()
}
}
/// Light (Dark Turquoise) and Dark (Dark Turquoise)
///
/// - Parameters:
/// - used for all form fields, pop up menus & inactive tabs
/// - Dark: Dark Turquoise
/// - Light: Dark Turquoise
/// - Returns: UIColor
class func doordeckQuinaryColour () -> UIColor {
return doordeckDarkTurquoise()
}
/// Light (Light Turquoise) and Dark (Light Turquoise)
///
/// - Parameters:
/// - used for all form fields, pop up menus & inactive tabs
/// - Dark: Light Turquoise
/// - Light: Light Turquoise
/// - Returns: UIColor
class func doordeckSenaryColour () -> UIColor {
return doordeckLightTurquoise()
}
/// Light (White) and Dark (Secondary dark blue)
///
/// - Parameters:
/// - used for all form fields, pop up menus & inactive tabs
/// - Dark: secondary dark blue
/// - Light: white
/// - Returns: UIColor
class func doordeckSeptenaryColour () -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckDarkSecondary()
} else {
return .white
}
}
/// used for all buttons Light (Light Turquoise) and Dark (Dark Turquoise)
///
/// - Parameters:
/// - used for all buttons
/// - Dark: Dark Turquoise
/// - Light: Light Turquoise
/// - Returns: UIColor
class func doordeckButtons () -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckDarkTurquoise()
} else {
return doordeckLightTurquoise()
}
}
/// used for all button hover states Light (Dark Turquoise) and Dark (Light Turquoise)
///
/// - Parameters:
/// - used for all button hover states
/// - Dark: Light Turquoise
/// - Light: Dark Turquoise
/// - Returns: UIColor
class func doordeckButtonsPress () -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckDarkTurquoise()
} else {
return doordeckLightTurquoise()
}
}
/// used for all successful in app notifications Light (Green) and Dark (Green)
///
/// - Parameters:
/// - used for all successful in app notifications
/// - Doordeck Green
/// - Returns: UIColor
class func doordeckSuccefullNotification () -> UIColor {
return doordeckGreen()
}
/// Text colour Light (black) and Dark (white)
///
/// - Parameters:
/// - text Colour
/// - Returns: UIColor
class func doordeckTextColour (_ opacity: CGFloat) -> UIColor {
if UserDefaults().getDarkUI() {
return doordeckWhite(opacity)
} else {
return doordeckBlack(opacity)
}
}
/// Green Sucess Colour
///
/// - Parameters:
/// - Doordeck Green
/// - Returns: UIColor
class func doordeckSuccessGreen () -> UIColor {
return UIColor (red: 51.0/255.0, green: 206.0/255.0, blue: 76.0/255.0, alpha: 1.0)
}
/// Red Fail Colour
///
/// - Parameters:
/// - Doordeck Red
/// - Returns: UIColor
class func doordeckFailRed () -> UIColor {
return UIColor (red: 249.0/255.0, green: 50.0/255.0, blue: 81.0/255.0, alpha: 1.0)
}
/////////////////////////////////////////////////////////////////////
//NewColour Pallet
/////////////////////////////////////////////////////////////////////
private class func doordeckDarkPrimary () -> UIColor {
return UIColor (red: 0.0/255.0, green: 40.0/255.0, blue: 60.0/255.0, alpha: 1.0)
}
private class func doordeckDarkSecondary () -> UIColor {
return UIColor (red: 4.0/255.0, green: 28.0/255.0, blue: 42.0/255.0, alpha: 1.0)
}
private class func doordeckDarkGrey () -> UIColor {
return UIColor (red: 72.0/255.0, green: 73.0/255.0, blue: 74.0/255.0, alpha: 1.0)
}
private class func doordeckLightGrey () -> UIColor {
return UIColor (red: 245.0/255.0, green: 245.0/255.0, blue: 245.0/255.0, alpha: 1.0)
}
private class func doordeckDarkTurquoise () -> UIColor {
return UIColor (red: 17.0/255.0, green: 134.0/255.0, blue: 153.0/255.0, alpha: 1.0)
}
private class func doordeckLightTurquoise () -> UIColor {
return UIColor (red: 0.0/255.0, green: 191.0/255.0, blue: 212.0/255.0, alpha: 1.0)
}
private class func doordeckRed () -> UIColor {
return UIColor (red: 224.0/255.0, green: 79.0/255.0, blue: 72.0/255.0, alpha: 1.0)
}
private class func doordeckBlue () -> UIColor {
return UIColor (red: 64.0/255.0, green: 108.0/255.0, blue: 232.0/255.0, alpha: 1.0)
}
private class func doordeckGreen () -> UIColor {
return UIColor (red: 22.0/255.0, green: 180.0/255.0, blue: 74.0/255.0, alpha: 1.0)
}
private class func doordeckPink () -> UIColor {
return UIColor (red: 218.0/255.0, green: 102.0/255.0, blue: 219.0/255.0, alpha: 1.0)
}
private class func doordeckOrange () -> UIColor {
return UIColor (red: 239.0/255.0, green: 114.0/255.0, blue: 0.0/255.0, alpha: 1.0)
}
private class func doordeckFuschia () -> UIColor {
return UIColor (red: 224.0/255.0, green: 72.0/255.0, blue: 137.0/255.0, alpha: 1.0)
}
private class func doordeckNavy () -> UIColor {
return UIColor (red: 63.0/255.0, green: 63.0/255.0, blue: 172.0/255.0, alpha: 1.0)
}
private class func doordeckCharcoal () -> UIColor {
return UIColor (red: 78.0/255.0, green: 78.0/255.0, blue: 78.0/255.0, alpha: 1.0)
}
private class func doordeckForestGreen () -> UIColor {
return UIColor (red: 0.0/255.0, green: 147.0/255.0, blue: 114.0/255.0, alpha: 1.0)
}
private class func doordeckCopper () -> UIColor {
return UIColor (red: 142.0/255.0, green: 102.0/255.0, blue: 67.0/255.0, alpha: 1.0)
}
private class func doordeckWhite (_ opacity: CGFloat) -> UIColor {
return UIColor (red: 255.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: opacity)
}
private class func doordeckBlack (_ opacity: CGFloat) -> UIColor {
return UIColor (red: 0.0/255.0, green: 0.0/255.0, blue: 0.0/255.0, alpha: opacity)
}
////////////////////////////////////////////////////////////////
class func doorDarkBlue () -> UIColor {
return UIColor (red: 11.0/255.0, green: 40.0/255.0, blue: 58.0/255.0, alpha: 1.0)
}
class func doorBlue () -> UIColor {
return UIColor (red: 4.0/255.0, green: 28.0/255.0, blue: 42.0/255.0, alpha: 1.0)
}
class func doorLightBlue () -> UIColor {
return UIColor (red: 69.0/255.0, green: 189.0/255.0, blue: 209.0/255.0, alpha: 1.0)
}
class func doorDarkGrey () -> UIColor {
return UIColor (red: 43.0/255.0, green: 43.0/255.0, blue: 43.0/255.0, alpha: 1.0)
}
class func doorGrey () -> UIColor {
return UIColor (red: 142.0/255.0, green: 142.0/255.0, blue: 147.0/255.0, alpha: 1.0)
}
class func doorLightGrey () -> UIColor {
return UIColor (red: 231.0/255.0, green: 231.0/255.0, blue: 231.0/255.0, alpha: 1.0)
}
class func doorSoftWhite () -> UIColor {
return UIColor (red: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1.0)
}
class func doorRed() -> UIColor {
return UIColor (red: 255.0/255.0, green: 45.0/255.0, blue: 78.0/255.0, alpha: 1.0)
}
class func doorGreen() -> UIColor {
return UIColor (red: 152.0/255.0, green: 251.0/255.0, blue: 152.0/255.0, alpha: 1.0)
}
class func doorOnBoardPruple() -> UIColor {
return UIColor(red:0.419, green: 0.279, blue:0.442, alpha:1)
}
class func doorOnBoardTeil() -> UIColor {
return UIColor(red:0.156, green: 0.403, blue:0.483, alpha:1)
}
class func doorOnBoardGreen() -> UIColor {
return UIColor(red:0.472, green: 0.845, blue:0.773, alpha:1)
}
class func doorOnBoardOrange() -> UIColor {
return UIColor (red: 255.0/255.0, green: 148.0/255.0, blue: 66.0/255.0, alpha: 1.0)
}
class func returnColourForIndex(index: Int) -> String {
let colourArray = getLockColours()
if index < colourArray.count {
return colourArray[index]
} else {
var tempIndex = index
while tempIndex >= colourArray.count {
tempIndex -= colourArray.count
}
return colourArray[tempIndex]
}
}
class func getLockColours () -> [String] {
return ["#57355D","#1F5468","#314772","#24BD9A","#55678C","#FF483F","#38A3E0","#FF9442","#4FB961","#C74BD1","#E85479","#6641FF"]
}
class func hexStringToUIColor (_ hex:String) -> UIColor {
var cString:String = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
if (cString.hasPrefix("#")) {
cString.remove(at: cString.startIndex)
}
if ((cString.count) != 6) {
return UIColor.gray
}
var rgbValue:UInt32 = 0
Scanner(string: cString).scanHexInt32(&rgbValue)
return UIColor(
red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
alpha: CGFloat(1.0)
)
}
func toHexString() -> String {
var r:CGFloat = 0
var g:CGFloat = 0
var b:CGFloat = 0
var a:CGFloat = 0
getRed(&r, green: &g, blue: &b, alpha: &a)
let rgb:Int = (Int)(r*255)<<16 | (Int)(g*255)<<8 | (Int)(b*255)<<0
return String(format:"#%06x", rgb)
}
}
|
[
-1
] |
f29b275739762d2896cad2c10cd92b12ee0603c9
|
163a1b04d572f6e685e653a810d176d544a9d14b
|
/Events/Events/View Controllers/LoginViewController.swift
|
19741a141c69458b26a1f52c3a8b8dec9ac8c62b
|
[] |
no_license
|
BuildWeek-Block-Club-Calendar/iOS
|
47a90a9c01f654100c170015c7730ec587faab55
|
437492516d0f4f397818f6e1fef51857061220af
|
refs/heads/master
| 2021-02-06T04:36:13.425891 | 2020-03-07T00:48:11 | 2020-03-07T00:48:11 | 243,876,818 | 0 | 1 | null | 2020-03-05T23:42:16 | 2020-02-29T00:10:36 |
Swift
|
UTF-8
|
Swift
| false | false | 2,282 |
swift
|
//
// LoginViewController.swift
// Events
//
// Created by Alexander Supe on 01.03.20.
//
import UIKit
class LoginViewController: UIViewController, UITextFieldDelegate {
// MARK: - IBOutlets
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var email: StylizedTextField!
@IBOutlet weak var usernameField: StylizedTextField!
@IBOutlet weak var password: StylizedTextField!
@IBOutlet weak var segment: UISegmentedControl!
@IBOutlet weak var continueButton: CustomButton!
@IBOutlet weak var skipButton: UIButton!
// MARK: - Lifecycle
override func viewDidLoad() {
super.viewDidLoad()
email.delegate = self
password.delegate = self
usernameField.delegate = self
continueButton.titleLabel?.leadingAnchor.constraint(equalTo: continueButton.leadingAnchor, constant: 20).isActive = true
continueButton.titleLabel?.trailingAnchor.constraint(equalTo: continueButton.trailingAnchor, constant: -20).isActive = true
continueButton.titleLabel?.textAlignment = .center
}
// MARK: - IBActions
@IBAction func login(_ sender: Any) {
guard let email = email.text, let password = password.text else { return }
if segment.selectedSegmentIndex == 0 {
Helper.login(email: email, password: password, vc: self)
} else {
guard let username = usernameField.text else { return }
Helper.register(email: email, username: username, password: password, vc: self)
}
}
@IBAction func withoutLogin(_ sender: Any) {
Helper.logout()
self.performSegue(withIdentifier: "FinishSegue", sender: nil)
}
@IBAction func segmentChanged(_ sender: Any) {
if segment.selectedSegmentIndex == 0 {
titleLabel.text = "Login"
continueButton.titleLabel?.text = "Login"
usernameField.isHidden = true
} else {
titleLabel.text = "Sign Up"
continueButton.titleLabel?.text = "Sign Up"
usernameField.isHidden = false
}
}
// MARK: - TextFieldDelegate
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.resignFirstResponder()
return true
}
}
|
[
-1
] |
55c5c0c3ac362d031500d8100221b522bd580f73
|
ddcb0ba808d88303a78b8a49f2e8fc6b2fe61f9a
|
/TrainingExe1/Exam10/ViewController/Tab4.swift
|
d0808f5854bb482d3858f30926240347151ad35c
|
[] |
no_license
|
tuanlaRikkeisoft/SwiftTraining
|
90bc26860bb3e906d9c8b6c81c244837924be30b
|
3a7e334f67567a3ba39eeff4b8118ebcad475b6f
|
refs/heads/master
| 2021-01-22T22:20:15.608917 | 2017-03-28T04:38:02 | 2017-03-28T04:38:02 | 85,530,609 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 617 |
swift
|
//
// Tab4.swift
// TrainingExe1
//
// Created by Nguyen Minh Tien on 3/24/17.
// Copyright © 2017 Nguyen Minh Tien. All rights reserved.
//
import UIKit
class Tab4: BaseTab {
override func viewDidLoad() {
super.viewDidLoad()
}
// MARK: Call Service, get Data and binding to View (Audio Book)
override func loadData() {
self.loadingIndicator(true)
service.getListDataWithClosure(key: self.key, type: "audiobook") { (message, data) in
self.medias = data
self.tableView.reloadData()
self.loadingIndicator(false)
}
}
}
|
[
-1
] |
a1f2a1cb8f11a40a680a5c1e33a451afc21bf203
|
dd35baaeaa3a7b343fc049b3eb10736ec16e1dda
|
/Example/Pods/DPActivityIndicatorView/DPActivityIndicatorView/Protocols/DPNibLoading.swift
|
cbc2b98965177c2dffd4c195ca38ec2aad1fd5b1
|
[
"MIT"
] |
permissive
|
bigsnickers/DPActivityIndicatorView
|
441c3dc501ff5dc87e0ddce32374b79403c8eee4
|
87bba54dfd5f100df7e8c4cfb258dc0a6815940a
|
refs/heads/master
| 2016-09-13T02:41:22.444670 | 2016-04-18T11:44:18 | 2016-04-18T11:44:18 | 56,248,643 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 289 |
swift
|
//
// DPNibLoading.swift
// DPActivityIndicatorExample
//
// Created by Dennis Pashkov on 4/15/16.
// Copyright © 2016 Dennis Pashkov. All rights reserved.
//
internal protocol DPNibLoading {
static func createFromNib() -> Self?
static var nibName: String { get }
}
|
[
-1
] |
407aa970cc5f1c527db9217e023a7137d7a5d68b
|
d27f25efe4da3b1b46cffe0f4eb5f05ac8f9d940
|
/Sources/Scyther/Extensions/UIImageView+Extensions.swift
|
19ca214ae023f7ed7041a43bdb393ee557e02084
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
stfnhdr/Scyther
|
6940c9fd282fac053b0eb9dc2fee449dbbe06223
|
0d50f42d376bbde6b5bd2c2e4420f6451bcd46c5
|
refs/heads/main
| 2023-08-01T13:18:37.041236 | 2021-09-27T10:54:01 | 2021-09-27T10:54:01 | 372,923,863 | 0 | 0 |
MIT
| 2021-06-01T18:18:06 | 2021-06-01T18:18:05 | null |
UTF-8
|
Swift
| false | false | 860 |
swift
|
//
// UIImageView+Extensions.swift
//
//
// Created by Stefan Haider on 01.06.21.
//
#if !os(macOS)
import UIKit
extension UIImageView {
/**
Tries to load an Image from an URL and sets it as image
- Parameters:
- url: The URL of the image to fetch
- completion: called with true if ether the loaded or the defaultImage is set, false if no image is set.
*/
func loadImage(fromURL url: URL, completion: ((Bool) -> Void)? = nil) {
DispatchQueue.global().async { [weak self] in
if let data = try? Data(contentsOf: url), let image = UIImage(data: data) {
DispatchQueue.main.async {
self?.image = image
completion?(true)
}
} else {
completion?(false)
}
}
}
}
#endif
|
[
-1
] |
cecb17126ea2f4bb87dfd73bc2cdc2d9be608ca9
|
ba0626bd58198220b3682c271a9c16f1e99dc8e2
|
/Twitter/Twitter/ImageResizer.swift
|
2d1d14813a511c629032b26f91974a8998206b4c
|
[] |
no_license
|
SiberianHamster/iOSDA-Week1
|
621092426e6b2e3422a71d4c988e144a909ba30d
|
a72993a38c46b932854099685a183ced74f823b3
|
refs/heads/master
| 2021-01-22T02:34:21.256987 | 2015-08-10T17:22:09 | 2015-08-10T17:22:09 | 40,136,847 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 491 |
swift
|
//
// ImageResizer.swift
// Twitter
//
// Created by Mark Lin on 8/8/15.
// Copyright (c) 2015 Mark Lin. All rights reserved.
//
import UIKit
class ImageResizer {
class func resizeImage(image : UIImage, size : CGSize) -> UIImage {
UIGraphicsBeginImageContext(size)
image.drawInRect(CGRect(x: 0, y: 0, width: size.width, height: size.height))
let resizedImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return resizedImage
}
}
|
[
-1
] |
5a56d7d1958f8803e404ea4ba8b058fd9b65eb34
|
214b4be3e0765f7ba979e4d26834f5a1ea280bd4
|
/tContainerView/ViewController.swift
|
638ee84f890975ad32115906c296573a7148a401
|
[] |
no_license
|
tyobigoro/tContainerView
|
932eee51283df4c8af8fa9e78e2147f9664a2790
|
56ebde2437898b1115770d7f736d1a47190ea147
|
refs/heads/master
| 2022-11-10T04:57:36.584669 | 2020-06-30T21:29:19 | 2020-06-30T21:29:19 | 276,185,530 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 449 |
swift
|
//
// ViewController.swift
// tContainerView
//
// Created by tyobigoro on 2020/07/01.
// Copyright © 2020 tyobigoro. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@objc func longPress(_ sender: UILongPressGestureRecognizer){
if sender.state == .began {
print("LongPress began")
} else if sender.state == .ended {
print("LongPress ended")
}
}
}
|
[
-1
] |
40c5a3244c9c4394f6770ac1cc2ad62b142b3aff
|
f64bb1fba3459960af85fc04caf590ac14fafe6f
|
/MenuController/Controller/GUMenuController.swift
|
eca3fa340ad97e8491a40324af84127b36b4d7f1
|
[] |
no_license
|
guttentag/MenuController-ios
|
d2a08da95a01733db063ef44c08200f6856da417
|
27602f6c5d13f617b59e3e9d7bf23e56d76a9302
|
refs/heads/master
| 2020-03-25T00:01:00.409533 | 2018-08-01T14:16:55 | 2018-08-01T14:16:55 | 143,165,409 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 7,691 |
swift
|
//
// GUMenuController.swift
// MenuController
//
// Created by Eran Guttentag on 03/07/2018.
// Copyright © 2018 Gutte. All rights reserved.
//
import UIKit
protocol GUMenuControllerDelegate: class {
func selected(_ item: MenuItem)
}
enum ViewContext {
case list
case description
}
class GUMenuController: UIView {
@IBOutlet private weak var contentView: UIView!
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var subtitleLabel: UILabel!
@IBOutlet private weak var contextButton: UIButton!
@IBOutlet private weak var contextScrollView: UIScrollView!
@IBOutlet private weak var itemsTableView: UITableView!
@IBOutlet private weak var descriptionTextView: UITextView!
private var widthConstraint: NSLayoutConstraint!
private var dataSource = [MenuItem]()
var delegate: GUMenuControllerDelegate?
private var context: ViewContext = .list
var width: CGFloat {
get {
return self.widthConstraint.constant
}
set {
self.widthConstraint.constant = newValue
}
}
var attributedTitle: NSAttributedString? {
get {
return self.titleLabel.attributedText
}
set {
self.titleLabel.attributedText = newValue
}
}
var title: String? {
get {
return self.titleLabel.text
}
set {
self.titleLabel.text = newValue
}
}
var subtitle: String? {
get {
return self.subtitleLabel.text
}
set {
self.subtitleLabel.text = newValue
}
}
var attributedSubtitle: NSAttributedString? {
get {
return self.subtitleLabel.attributedText
}
set {
self.subtitleLabel.attributedText = newValue
}
}
var roomDescriprion: String! {
get {
return self.descriptionTextView.text
}
set {
self.descriptionTextView.text = newValue
}
}
var roomAttributedDescription: NSAttributedString! {
get {
return self.descriptionTextView.attributedText
}
set {
self.descriptionTextView.attributedText = newValue
}
}
var items: [MenuItem] {
get {
return self.dataSource
}
set {
self.dataSource = newValue
if Thread.isMainThread {
self.itemsTableView.reloadData()
} else {
DispatchQueue.main.async {
self.itemsTableView.reloadData()
}
}
}
}
override init(frame: CGRect) {
super.init(frame: CGRect.zero)
self.commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.commonInit()
}
override func awakeFromNib() {
super.awakeFromNib()
self.backgroundColor = UIColor.clear
self.contentView.backgroundColor = UIColor.clear
let gradientLayer = CAGradientLayer()
gradientLayer.startPoint = CGPoint(x: 0, y: 0.5)
gradientLayer.endPoint = CGPoint(x: 1, y: 0.5)
gradientLayer.colors = [UIColor.black.withAlphaComponent(0.4).cgColor, UIColor.black.withAlphaComponent(0.4).cgColor, UIColor.black.withAlphaComponent(0.15).cgColor, UIColor.black.withAlphaComponent(0).cgColor]
gradientLayer.frame = self.contentView.bounds
self.contentView.layer.insertSublayer(gradientLayer, at: 0)
self.itemsTableView.backgroundColor = UIColor.clear
self.itemsTableView.register(MenuItemTableViewCell.self, forCellReuseIdentifier: MenuItemTableViewCell.identifier)
self.itemsTableView.allowsMultipleSelection = false
self.itemsTableView.allowsSelection = true
self.itemsTableView.dataSource = self
self.itemsTableView.delegate = self
self.itemsTableView.separatorStyle = .none
self.itemsTableView.showsVerticalScrollIndicator = false
self.titleLabel.textColor = UIColor.white
self.subtitleLabel.textColor = UIColor.white
self.descriptionTextView.textColor = UIColor.white
self.contextButton.setTitleColor(UIColor.red, for: .normal)
self.contextButton.setTitleColor(UIColor.red.withAlphaComponent(0.7), for: .highlighted)
self.contextButton.addTarget(self, action: #selector(GUMenuController.changeContext), for: .touchUpInside)
self.setContext(.list)
NotificationCenter.default.addObserver(self, selector: #selector(GUMenuController.orientationChanged), name: Notification.Name.UIDeviceOrientationDidChange, object: nil)
}
}
private extension GUMenuController {
func commonInit() {
Bundle.main.loadNibNamed("GUMenuController", owner: self, options: nil)
self.addSubview(self.contentView)
self.contentView.translatesAutoresizingMaskIntoConstraints = false
self.contentView.topAnchor.constraint(equalTo: self.topAnchor).isActive = true
self.contentView.leadingAnchor.constraint(equalTo: self.leadingAnchor).isActive = true
self.trailingAnchor.constraint(equalTo: self.contentView.trailingAnchor).isActive = true
self.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor).isActive = true
self.widthConstraint = self.widthAnchor.constraint(equalToConstant: 300)
self.widthConstraint.isActive = true
}
@objc func changeContext() {
switch self.context {
case .list:
self.setContext(.description)
case .description:
self.setContext(.list)
}
}
func setContext(_ toContext: ViewContext) {
switch toContext {
case .description:
self.contextButton.setTitle("Show Available Items", for: .normal)
self.contextButton.setTitle("Show Available Items", for: .highlighted)
self.contextScrollView.setContentOffset(CGPoint(x: 0, y: self.contextScrollView.contentSize.height - self.contextScrollView.frame.height), animated: true)
self.descriptionTextView.setContentOffset(CGPoint.zero, animated: false)
self.context = .description
case .list:
self.contextButton.setTitle("Show More Info", for: .normal)
self.contextButton.setTitle("Show More Info", for: .highlighted)
self.contextScrollView.setContentOffset(CGPoint.zero, animated: true)
self.context = .list
}
}
@objc func orientationChanged() {
self.setContext(self.context)
}
}
extension GUMenuController: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.dataSource.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: MenuItemTableViewCell.identifier, for: indexPath) as! MenuItemTableViewCell
let item = self.dataSource[indexPath.row]
cell.set(item)
return cell
}
}
extension GUMenuController: UITableViewDelegate {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.scrollToRow(at: indexPath, at: .middle, animated: true)
self.delegate?.selected(self.dataSource[indexPath.row])
}
}
|
[
-1
] |
20368d4140511fe463808260976ca0ae53f066a0
|
8ebbf7f55ad44bd3bc70c44e4aa4dbd86d3b555b
|
/Classes/Issues/IssueViewModels.swift
|
631d845ff3b3f669e139dbf4b394632e87e5ef96
|
[
"MIT"
] |
permissive
|
jimmyaat10/GitHawk
|
7d8f15c80b7ba7a67d21683a6149cd17580b3c2e
|
33514c6d07a61dcd334ea49b604c285c3459b886
|
refs/heads/master
| 2020-03-08T02:49:46.482247 | 2018-03-31T14:17:26 | 2018-03-31T14:17:26 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,957 |
swift
|
//
// IssueViewModels.swift
// Freetime
//
// Created by Ryan Nystrom on 5/19/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//
import UIKit
import IGListKit
import StyledText
func titleStringSizing(
title: String,
contentSizeCategory: UIContentSizeCategory,
width: CGFloat
) -> StyledTextRenderer {
let builder = StyledTextBuilder(styledText: StyledText(
text: title, style: Styles.Text.headline.with(foreground: Styles.Colors.Gray.dark.color)
))
return StyledTextRenderer(
string: builder.build(),
contentSizeCategory: contentSizeCategory,
inset: IssueTitleCell.inset,
backgroundColor: Styles.Colors.background
)
}
func createIssueReactions(reactions: ReactionFields) -> IssueCommentReactionViewModel {
var models = [ReactionViewModel]()
for group in reactions.reactionGroups ?? [] {
// do not display reactions for 0 count
let count = group.users.totalCount
guard count > 0 else { continue }
let nodes: [String] = {
guard let filtered = group.users.nodes?.filter({ $0?.login != nil }) as? [ReactionFields.ReactionGroup.User.Node] else {
return []
}
return filtered.map({ $0.login })
}()
models.append(ReactionViewModel(content: group.content, count: count, viewerDidReact: group.viewerHasReacted, users: nodes))
}
return IssueCommentReactionViewModel(models: models)
}
func commentModelOptions(
owner: String,
repo: String,
contentSizeCategory: UIContentSizeCategory,
width: CGFloat
) -> GitHubMarkdownOptions {
return GitHubMarkdownOptions(
owner: owner,
repo: repo,
flavors: [.issueShorthand, .usernames],
width: width,
contentSizeCategory: contentSizeCategory
)
}
func createCommentModel(
id: String,
commentFields: CommentFields,
reactionFields: ReactionFields,
contentSizeCategory: UIContentSizeCategory,
width: CGFloat,
owner: String,
repo: String,
threadState: IssueCommentModel.ThreadState,
viewerCanUpdate: Bool,
viewerCanDelete: Bool,
isRoot: Bool
) -> IssueCommentModel? {
guard let author = commentFields.author,
let date = commentFields.createdAt.githubDate,
let avatarURL = URL(string: author.avatarUrl)
else { return nil }
let details = IssueCommentDetailsViewModel(
date: date,
login: author.login,
avatarURL: avatarURL,
didAuthor: commentFields.viewerDidAuthor,
editedBy: commentFields.editor?.login,
editedAt: commentFields.lastEditedAt?.githubDate
)
let options = commentModelOptions(owner: owner, repo: repo, contentSizeCategory: contentSizeCategory, width: width)
let bodies = CreateCommentModels(
markdown: commentFields.body,
options: options,
viewerCanUpdate: viewerCanUpdate
)
let reactions = createIssueReactions(reactions: reactionFields)
let collapse = IssueCollapsedBodies(bodies: bodies, width: width)
return IssueCommentModel(
id: id,
details: details,
bodyModels: bodies,
reactions: reactions,
collapse: collapse,
threadState: threadState,
rawMarkdown: commentFields.body,
viewerCanUpdate: viewerCanUpdate,
viewerCanDelete: viewerCanDelete,
isRoot: isRoot,
number: GraphQLIDDecode(id: id, separator: "IssueComment")
)
}
func createAssigneeModel(assigneeFields: AssigneeFields) -> IssueAssigneesModel {
var models = [IssueAssigneeViewModel]()
for node in assigneeFields.assignees.nodes ?? [] {
guard let node = node,
let url = URL(string: node.avatarUrl)
else { continue }
models.append(IssueAssigneeViewModel(login: node.login, avatarURL: url))
}
return IssueAssigneesModel(users: models, type: .assigned)
}
|
[
-1
] |
9ae24b6afbabc18e5def8f19804710a74aacf24c
|
7cee4e268cf4f195dc37b210f0ab095a23d9bb51
|
/EducationalGame/SuperMenuScene.swift
|
c0c85e440c2b101b706a8011cf727b55b800e82c
|
[] |
no_license
|
Cadpig/Educational-Game-Coursework
|
91fff000a4d6c296076b289f3c67acab58693cd2
|
095b143f803ffd1c10d5d473c7e6b3fbe2b8ccc2
|
refs/heads/master
| 2023-06-18T05:04:10.250792 | 2021-07-22T13:51:11 | 2021-07-22T13:51:11 | 388,474,102 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,660 |
swift
|
//
// SuperMenuScene.swift
// EducationalGame
//
// Created by Владислав Тихонов on 07.05.2021.
// Copyright © 2021 Владислав Тихонов. All rights reserved.
//
import SpriteKit
class SuperMenuScene: SKScene {
override func didMove(to view: SKView) {
configureBackground()
spawnButtons()
spawnRuleLabel()
}
fileprivate func spawnRuleLabel(){
let ruleLabel = SKLabelNode(fontNamed: "ChalkboardSE-Bold")
ruleLabel.text = "Обучающие миниигры"
ruleLabel.fontSize = 40
ruleLabel.horizontalAlignmentMode = .right
ruleLabel.position = CGPoint(x: self.size.width - 250, y: self.size.height * 4 / 5)
ruleLabel.fontColor = .black
ruleLabel.zPosition = 5
addChild(ruleLabel)
}
fileprivate func configureBackground(){//конфигурация фона
let screenCenterPoint = CGPoint(x: self.size.width/2, y: self.size.height/2)
let background = Background.populateBackground(at: screenCenterPoint, imageName: "redlandscapeBg")
background.size = self.size
self.addChild(background)
}
fileprivate func spawnButtons(){//создание кнопок
let buttonPlay = Button.populate(name: "PlayButton", zPos: 1, textureName: "btnbegin", at: CGPoint(x: self.frame.midX, y: self.frame.midY), scale: 0.8)
/*SKSpriteNode(imageNamed: "colorsmode")
buttonColors.position = CGPoint(x: self.frame.midX, y: self.frame.midY)
buttonColors.zPosition = 1
buttonColors.name = "runButton"*/
self.addChild(buttonPlay)
let buttonAuthor = Button.populate(name: "AuthorButton", zPos: 1, textureName: "authorbtn", at: CGPoint(x: self.size.width - 50, y: 50), scale: 0.3)
self.addChild(buttonAuthor)
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
let location = touches.first!.location(in: self)
let node = self.atPoint(location)
if node.name == "PlayButton"{
let transition = SKTransition.crossFade(withDuration: 1)
let gameScene = MainMenuScene(size: self.size)
gameScene.scaleMode = .aspectFill
self.scene?.view?.presentScene(gameScene, transition: transition)
}
if node.name == "AuthorButton"{
let transition = SKTransition.crossFade(withDuration: 1)
let gameScene = AuthorScene(size: self.size)
gameScene.scaleMode = .aspectFill
self.scene?.view?.presentScene(gameScene, transition: transition)
}
}
}
|
[
-1
] |
18805d15307627310c182216ec65bddbe680ed97
|
185a00ea71afb15ac586355c548aa141744ffb0d
|
/BanannyDemo/SearchResultClass.swift
|
d86af76bfb1eb779f17c45e86e2adabb576a3d66
|
[] |
no_license
|
vincentcch79/BanannyDemo
|
20f439ae942e83bb94e73f46b4711815a172e018
|
8cd76c09f4b2f03b659aa536d9c9a4d729a58f67
|
refs/heads/master
| 2021-01-20T20:57:10.145087 | 2016-07-25T10:10:07 | 2016-07-25T10:10:07 | 63,315,293 | 0 | 1 | null | 2016-07-20T07:10:54 | 2016-07-14T07:59:51 |
Swift
|
UTF-8
|
Swift
| false | false | 1,628 |
swift
|
//
// SearchResultClass.swift
// BanannyDemo
//
// Created by 張智涵 on 2016/7/14.
// Copyright © 2016年 張智涵 Vincent Chang. All rights reserved.
//
import Foundation
class searchResult {
var nameResult = ""
var imageResult = ""
var starResult = 0.0
var numResult = ""
var hourRseult = ""
var finishResult = ""
var startDay = ""
var nannyId = ""
var vacationRate = ""
var specialRate = ""
var specialText = ""
var minimalHour = ""
var specialExp = ""
var nannyIntro = ""
var startYear = ""
// var introClasses:[introClass] = []
init(nameResult:String, imageResult:String, starResult: Double, numResult: String, hourResult: String, finishResult: String, startDay: String, nannyId: String, vacationRate: String, specialRate: String, specialText: String, minimalHour: String, specialExp: String, nannyIntro: String, startYear: String){
self.nameResult = nameResult
self.imageResult = imageResult
self.starResult = starResult
self.numResult = numResult
self.hourRseult = hourResult
self.finishResult = finishResult
self.startDay = startDay
self.nannyId = nannyId
self.vacationRate = vacationRate
self.specialRate = specialRate
self.specialText = specialText
self.minimalHour = minimalHour
self.specialExp = specialExp
self.nannyIntro = nannyIntro
self.startYear = startYear
}
}
//struct introClass {
//
// var introClassTitle = ""
// var introClassContent = ""
//
//}
|
[
-1
] |
4c4197d4ec771f92db931b26ab5f8c890baea1b0
|
e3904c52b1b00f6f4f6ea99d8a9c9db172a9ab3e
|
/Project/Project/Handler/Handler.swift
|
87d76a48faebb95b5c422f3a411ca4d2f1ebaecf
|
[
"Apache-2.0"
] |
permissive
|
ivanmatveyev/Randomuser.me
|
18e0c3665101f7ec4a3cd42491bad5dc2391db17
|
4a7c2878b15fff92fb99bb2263489bd7efcbbe4d
|
refs/heads/main
| 2023-03-23T06:34:21.194253 | 2021-03-23T09:40:25 | 2021-03-23T09:40:25 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 976 |
swift
|
import Foundation
import Dispatch
final class Handler {
public static let shared = Handler()
public var storage: StorageManager = StorageManager.shared
public final func jsonData(_ data: Data, _ completion: ((Any)->())? = nil) {
guard let db = try? JSONDecoder().decode(Database.self, from: data) else { return }
let semaphore = DispatchSemaphore(value: 0)
for i in db.results.indices {
let urlStr: String = db.results[i].picture.largeUrl
API.shared.loadImage(urlStr, { (image) -> Void in
db.results[i].picture.image = image
if i == db.results.endIndex - 1 { semaphore.signal() }
})
}
semaphore.wait()
self.storage.setdb(db)
}
public final func setdata(_ data: Data?) {
guard let data = data else { getBackup(); return }
jsonData(data)
}
fileprivate init() { }
}
|
[
-1
] |
28575a1c4d9d167b239c3aa16a0cd8b9285afdf1
|
fdcc066b25f9a7df54df54a24019d15dad9603e5
|
/CartographyTests/TestView.swift
|
e10b0d8b7ed9608340aa6db56ce69f4e8e89b9d5
|
[
"MIT"
] |
permissive
|
rzubascu/Cartography
|
6dd8c90258cc185371973b5e89299f1a3b6bf2ba
|
26ed89632b9f6d358f8d0547351e95c3a93b36c0
|
refs/heads/master
| 2021-01-18T04:21:12.631426 | 2015-08-03T18:06:13 | 2015-08-03T18:06:13 | 40,075,560 | 0 | 0 | null | 2015-08-02T10:03:43 | 2015-08-02T10:03:42 | null |
UTF-8
|
Swift
| false | false | 607 |
swift
|
//
// TestView.swift
// Cartography
//
// Created by Robert Böhnke on 21/03/15.
// Copyright (c) 2015 Robert Böhnke. All rights reserved.
//
import Cartography
class TestView: View {
override init(frame: CGRect) {
super.init(frame: frame)
translatesAutoresizingMaskIntoConstraints = false
}
required init(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
#if os(OSX)
override var flipped: Bool {
return true
}
#endif
}
#if os(iOS)
class TestWindow: UIWindow {
}
#else
class TestWindow: TestView {
}
#endif
|
[
-1
] |
1982ae93250b9ca61ccb48d2db48e2dc7441116a
|
c9899eed4bef7ff4f3d6d21550f121c34a1c2b60
|
/iCook/Services/Implementations/App/Data Models/APIResponses/APIResponse.swift
|
f1f2542e2f9de4437915233168eaacdfce6a413a
|
[] |
no_license
|
yalishanda42/iCook
|
014a5bff786fe97354fa7a9cd58355cd732c35ca
|
7fd9522eaec8ddfa4787540ab96596d384a420cb
|
refs/heads/master
| 2023-07-17T21:43:22.114553 | 2021-08-24T18:49:55 | 2021-08-24T18:49:55 | 245,258,032 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 215 |
swift
|
//
// APIResponse.swift
// iCook
//
// Created by Alexander Ignatov on 4.04.20.
// Copyright © 2020 Alexander Ignatov. All rights reserved.
//
protocol APIResponse: Codable {
var message: String { get }
}
|
[
-1
] |
3c2fd8b39e9cd058a680caa971c4b03240ac4542
|
055e3b08ac1ec43694d2919739b78a8dddf8adf6
|
/AddCalculationTableViewCell.swift
|
b49fea034ecaaa8c16d73e8c294f07709c9e206d
|
[] |
no_license
|
Smnelson13/High-Voltage
|
104b676688d73e2f4cdfc44b155491673ce6b551
|
f5dd248be372eddba651f745f8255f47132b0007
|
refs/heads/master
| 2021-01-20T04:50:35.089221 | 2017-04-30T19:49:31 | 2017-04-30T19:49:31 | 89,740,494 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 517 |
swift
|
//
// AddCalculationTableViewCell.swift
// High Voltage
//
// Created by Shane Nelson on 4/28/17.
// Copyright © 2017 Shane Nelson. All rights reserved.
//
import UIKit
class AddCalculationTableViewCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
|
[
211843,
225159,
240008,
418826,
302475,
227219,
283040,
276390,
283048,
199212,
228144,
327344,
303540,
276406,
299965,
299968,
180676,
379078,
273105,
312531,
312535,
228188,
155614,
375532,
217069,
113524,
230522,
283900,
196093
] |
7ac8e2a77c837e638c3b1b966f4eb3fc1dc7ccbe
|
80c3da9757c6c8db558d626de290b328da05249c
|
/trunk/src/TokyoMetro/TokyoMetro/Common/CommonData/InfT02TipsTableData.swift
|
79d92387c227e0305c2377b83cd2d28fc4f8a68b
|
[] |
no_license
|
TokyoMeiTo/OsakaBus
|
2a010414e166155710e043629f86565cf81168c9
|
aacc5493103dfdd2687981e7573269766dba58dd
|
refs/heads/master
| 2016-09-10T21:21:51.532485 | 2014-12-15T01:20:46 | 2014-12-15T01:20:46 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,064 |
swift
|
//
// InfT01StrategyTableData.swift
// TokyoMetro
//
// Created by limc on 2014/10/21.
// Copyright (c) 2014îN Okasan-Huada. All rights reserved.
//
import Foundation
class InfT02TipsTableData : CommonData {
var tipsId:String = ""
var tipsType :String = ""
var tipsSubType :String = ""
var tipsTitle :String = ""
var tipsContent :String = ""
var readFlag :Bool = false
var readTime :String = ""
var favoFlag :Bool = false
var favoTime :String = ""
var readFlagStr:String = ""
var favoFlagStr:String = ""
override func fromDAO(dao:ODBDataTable) -> CommonData
{
tipsId = dbNull(dao.item(INFT02_TIPS_ID) as? String)
tipsType = dbNull(dao.item(INFT02_TIPS_TYPE) as? String)
tipsSubType = dbNull(dao.item(INFT02_TIPS_SUB_TYPE) as? String)
tipsTitle = dbNull(dao.item(INFT02_TIPS_TITLE) as? String)
tipsContent = dbNull(dao.item(INFT02_TIPS_CONTENT) as? String)
readFlag = textToBool(dao.item(INFT02_READ_FLAG) as? String)
readTime = dbNull(dao.item(INFT02_REAG_TIME) as? String)
favoFlag = textToBool(dao.item(INFT02_FAVO_FLAG) as? String)
favoTime = dbNull(dao.item(INFT02_FAVO_TIME) as? String)
readFlagStr = dbNull(dao.item(INFT02_READ_FLAG) as? String)
favoFlagStr = dbNull(dao.item(INFT02_FAVO_FLAG) as? String)
return super.fromDAO(dao);
}
override func toDAO() -> ODBDataTable
{
var dao:InfT02TipsTable = InfT02TipsTable()
dao.item(INFT02_TIPS_ID,value:tipsId)
dao.item(INFT02_TIPS_TYPE,value:tipsType)
dao.item(INFT02_TIPS_SUB_TYPE,value:tipsSubType)
dao.item(INFT02_TIPS_TITLE,value:tipsTitle)
dao.item(INFT02_TIPS_CONTENT,value:tipsContent)
dao.item(INFT02_READ_FLAG,value:readFlagStr)
dao.item(INFT02_REAG_TIME,value:readTime)
dao.item(INFT02_FAVO_FLAG,value:favoFlagStr)
dao.item(INFT02_FAVO_TIME,value:favoTime)
return dao
}
}
|
[
-1
] |
25d5e94c11e2c77b59827fcfb215f60abeefd403
|
c79ad602591d8f3875d8fd621d1f4f3390832cb4
|
/Tests/LinuxMain.swift
|
c05df4a5fcbc9398682ea24d6b5c47be301377f6
|
[
"MIT"
] |
permissive
|
yeyuxx/SyncServerII
|
bf20a18772c7605548ebe48fcdcfc2067e362bfd
|
5c3a15815f88f0bfaa6f842874451aaaae889ea4
|
refs/heads/master
| 2020-06-03T08:02:29.638794 | 2019-04-16T01:43:45 | 2019-04-16T01:43:45 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,831 |
swift
|
import XCTest
@testable import ServerTests
XCTMain([
testCase(HealthCheckTests.allTests),
testCase(AccountAuthenticationTests_Dropbox.allTests),
testCase(AccountAuthenticationTests_Facebook.allTests),
testCase(AccountAuthenticationTests_Google.allTests),
testCase(DatabaseModelTests.allTests),
testCase(FailureTests.allTests),
testCase(FileController_DoneUploadsTests.allTests),
testCase(FileController_UploadTests.allTests),
testCase(FileControllerTests.allTests),
testCase(FileControllerTests_GetUploads.allTests),
testCase(FileControllerTests_UploadDeletion.allTests),
testCase(FileController_MultiVersionFiles.allTests),
testCase(GeneralAuthTests.allTests),
testCase(GeneralDatabaseTests.allTests),
testCase(GoogleDriveTests.allTests),
testCase(DropboxTests.allTests),
testCase(MessageTests.allTests),
testCase(Sharing_FileManipulationTests.allTests),
testCase(SharingAccountsController_CreateSharingInvitation.allTests),
testCase(SharingAccountsController_RedeemSharingInvitation.allTests),
testCase(SpecificDatabaseTests.allTests),
testCase(SpecificDatabaseTests_SharingInvitationRepository.allTests),
testCase(SpecificDatabaseTests_Uploads.allTests),
testCase(SpecificDatabaseTests_UserRepository.allTests),
testCase(UserControllerTests.allTests),
testCase(VersionTests.allTests),
testCase(FileController_DownloadAppMetaDataTests.allTests),
testCase(FileController_UploadAppMetaDataTests.allTests),
testCase(FileController_FileGroupUUIDTests.allTests),
testCase(SpecificDatabaseTests_SharingGroups.allTests),
testCase(SpecificDatabaseTests_SharingGroupUsers.allTests),
testCase(SharingGroupsControllerTests.allTests),
testCase(SharingAccountsController_GetSharingInvitationInfo.allTests)
])
|
[
-1
] |
f4ae3f0d68ea1a68df9d96c602e29e56a56b646b
|
daf98a5b2cb3bc7de798b62ae7012daba04c3ea3
|
/NoStoryboards/NoStoryboards/ViewController.swift
|
460b2f1895b3f4d97d06302eaed339c3aa1efe33
|
[] |
no_license
|
ico3939/iOS-Dev
|
5b134f05a73d92ad48116a8f0090f49d928e0d5b
|
43aa353db37dbba2023af90d089a8025edb6bcd3
|
refs/heads/master
| 2021-04-29T18:42:14.724285 | 2018-04-17T22:53:23 | 2018-04-17T22:53:23 | 121,698,234 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 454 |
swift
|
//
// ViewController.swift
// NoStoryboards
//
// Created by Student on 2/27/18.
// Copyright © 2018 Student. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
var model: SimpleModel!
override func viewDidLoad() {
super.viewDidLoad()
assert(model != nil, "Use dependency injection to seet up model")
print(#function)
view.backgroundColor = .red
}
}
|
[
-1
] |
91f4eebe77bc352596f4359eb34455bd8609108c
|
880be3c803a77cfb6d17c60a2cc2b4192ed5f683
|
/Keep/AddItemsManuallyVC.swift
|
357c75715df33cdbae9edb5e56366068e24b2d54
|
[] |
no_license
|
mimicatcodes/Keep
|
70ea583cc11655807e650e9bf6a2a75c11546649
|
6388f406648797db6f2fea0cbb6877e3923eb45d
|
refs/heads/master
| 2021-01-13T02:41:58.821993 | 2017-03-21T19:13:47 | 2017-03-21T19:13:47 | 77,184,537 | 11 | 2 | null | null | null | null |
UTF-8
|
Swift
| false | false | 21,070 |
swift
|
//
// AddItemsManuallyVC.swift
// Keep
//
// Created by Luna An on 3/3/17.
// Copyright © 2017 Mimicatcodes. All rights reserved.
//
import UIKit
import RealmSwift
class AddItemsManuallyVC: UIViewController, UINavigationControllerDelegate, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var favoriteButton: UIButton!
@IBOutlet weak var nameTextField: UITextField!
@IBOutlet weak var quantityLabel: CustomLabel!
@IBOutlet weak var quantityMinusButton: UIButton!
@IBOutlet weak var quantityPlusButton: UIButton!
@IBOutlet weak var expDateField: UITextField!
@IBOutlet weak var notApplicableButton: UIButton!
@IBOutlet weak var fridgeButton: UIButton!
@IBOutlet weak var freezerButton: UIButton!
@IBOutlet weak var pantryButton: UIButton!
@IBOutlet weak var otherButton: UIButton!
@IBOutlet weak var categoryField: CategoryField!
@IBOutlet weak var saveButton: UIButton!
@IBOutlet weak var topMarginConstraint: NSLayoutConstraint!
@IBOutlet weak var locationView: UIView!
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var heightConstraint: NSLayoutConstraint!
var labelView: UILabel!
var locationButtons:[UIButton] = []
var originTopMargin: CGFloat!
let realm = try! Realm()
let store = DataStore.sharedInstance
var nameTitle = EmptyString.none
var location:Location = .Fridge
var quantity: Int = 1
var expDate = Date()
var addedDate = Date()
var isFavorited = false
var category: String = FoodCategories.other.rawValue
let today = Date()
let picker = UIPickerView()
let datePicker = UIDatePicker()
let formatter = DateFormatter()
var activeTextField:UITextField?
var selectedIndex = 0
var itemToEdit: Item?
let categories = FoodGroups.groceryCategories
var filteredItemsNames = [String]()
override func viewDidLoad() {
super.viewDidLoad()
locationButtons = [fridgeButton, freezerButton, pantryButton, otherButton]
formatInitialData()
checkTextfields()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
formatInitialData()
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
originTopMargin = topMarginConstraint.constant
}
@IBAction func cancelTapped(_ sender: UIButton) {
view.endEditing(true)
dismiss(animated: true, completion: nil)
}
@IBAction func saveTapped(_ sender: UIButton) {
guard let name = nameTextField.text, name != "" else { return }
if let item = itemToEdit {
try! realm.write {
item.name = name
item.quantity = String(quantity)
item.exp = expDate
item.addedDate = addedDate
item.location = location.rawValue
item.category = category
configureExpires(item: item)
configureFavorites(item: item)
deleteFavorites(item: item)
}
activeTextField?.endEditing(true)
dismiss(animated: true, completion: nil)
} else {
let item = Item(name: name.capitalized, uniqueID: UUID().uuidString, quantity: String(self.quantity), exp: expDate, addedDate: addedDate, location: location.rawValue, category: category)
try! realm.write {
configureExpires(item: item)
configureFavorites(item: item)
realm.add(item)
}
view.endEditing(true)
activeTextField?.endEditing(true)
resetView()
showAlert()
}
NotificationCenter.default.post(name: NotificationName.refreshCharts, object: nil)
}
@IBAction func favoriteBtnTapped(_ sender: UIButton) {
tableView.isHidden = true
activeTextField?.endEditing(true)
favoriteButton.isSelected = !favoriteButton.isSelected
if favoriteButton.isSelected {
isFavorited = true
} else {
isFavorited = false
}
}
@IBAction func minustBtnTapped(_ sender: UIButton) {
moveViewDown()
activeTextField?.endEditing(true)
tableView.isHidden = true
if quantity > 1 {
quantity -= 1
} else {
quantityMinusButton.isEnabled = false
}
quantityLabel.text = "\(quantity)"
}
@IBAction func plusBtnTapped(_ sender: UIButton) {
moveViewDown()
activeTextField?.endEditing(true)
tableView.isHidden = true
quantity += 1
quantityLabel.text = "\(quantity)"
if quantity > 1 {
quantityMinusButton.isEnabled = true
}
}
@IBAction func naBtnTapped(_ sender: UIButton) {
moveViewDown()
activeTextField?.endEditing(true)
tableView.isHidden = true
notApplicableButton.isSelected = !notApplicableButton.isSelected
if notApplicableButton.isSelected {
expDateField.text = Labels.na
let hundressYearsLater = Calendar.current.date(byAdding: .year, value: 100, to: today)
if let date = hundressYearsLater {
expDate = date
}
} else {
let sevenDaysLater = Calendar.current.date(byAdding: .day, value: 7, to: today)
if let date = sevenDaysLater {
expDate = date
datePicker.setDate(expDate, animated: true)
expDateField.text = formatter.string(from: expDate).capitalized
}
}
}
@IBAction func locationBtnTapped(_ sender: UIButton) {
tableView.isHidden = true
moveViewDown()
activeTextField?.endEditing(true)
selectedIndex = sender.tag
switch selectedIndex {
case 0:
self.location = .Fridge
case 1:
self.location = .Freezer
case 2:
self.location = .Pantry
case 3:
self.location = .Other
default:
break
}
configureLocationButtons()
}
func checkTextfields(){
nameTextField.addTarget(self, action: #selector(checkTextField(sender:)), for: .editingChanged)
categoryField.addTarget(self, action: #selector(checkTextField(sender:)), for: .editingChanged)
nameTextField.addTarget(self, action: #selector(fillCategory), for: .allEditingEvents)
}
func formatInitialData(){
adjustSpacing()
configureAppearances()
Helper.configureTableView(tableView: tableView)
//configureTableView()
if let item = itemToEdit {
nameTitle = item.name.capitalized
category = item.category
quantity = Int(item.quantity)!
addedDate = item.addedDate
expDate = item.exp
favoriteButton.isSelected = item.isFavorited
location = Location(rawValue:item.location)!
switch location {
case .Fridge:
selectedIndex = 0
case .Freezer:
selectedIndex = 1
case .Pantry:
selectedIndex = 2
case .Other:
selectedIndex = 3
}
saveButton.isEnabled = true
saveButton.setTitleColor(Colors.tealish, for: .normal)
} else {
resetView()
}
configureTextfields()
configurePickerSettings()
configureQuantityButtons()
configureLocationButtons()
Helper.formatDates(formatter: formatter)
}
func configureFavorites(item: Item) {
item.isFavorited = isFavorited
if isFavorited {
if store.allFavoritedItems.filter({$0.name == item.name}).count == 0{
let favItem = FavoritedItem(name:item.name)
realm.add(favItem)
}
}
}
func deleteFavorites(item:Item){
if !isFavorited {
if store.allFavoritedItems.filter({$0.name == item.name}).count > 0 {
if let itemToDelete = store.allFavoritedItems.filter({$0.name == item.name}).first {
realm.delete(itemToDelete)
}
}
}
}
func configureExpires(item: Item){
var daysLeft = 0
daysLeft = Helper.daysBetweenTwoDates(start: today, end: item.exp)
if daysLeft < 0 {
item.isExpired = true
item.isExpiring = false
item.isExpiringToday = false
} else if daysLeft == 0 {
item.isExpired = false
item.isExpiring = true
item.isExpiringToday = true
} else if daysLeft >= 0 && daysLeft < 4 {
item.isExpiring = true
item.isExpired = false
item.isExpiringToday = false
} else {
item.isExpiring = false
item.isExpired = false
item.isExpiringToday = false
}
}
func configureTextfields(){
nameTextField.text = nameTitle
quantityLabel.text = String(quantity)
configureNA()
categoryField.text = category
}
func configureQuantityButtons(){
if quantity == 1 {
quantityMinusButton.isEnabled = false
} else {
quantityMinusButton.isEnabled = true
}
}
func configurePickerSettings(){
customToolBarForPickers()
categoryField.inputView = picker
picker.delegate = self
picker.dataSource = self
datePicker.datePickerMode = .date
let calendar = Calendar.current
let yearComponent = calendar.component(.year, from: expDate)
if yearComponent > 2100 {
if let sevenDay = Calendar.current.date(byAdding: .day, value: 7, to: today) {
datePicker.date = sevenDay
}} else {
datePicker.date = expDate
}
}
func configureLocationButtons() {
for (index, button) in locationButtons.enumerated() {
if index == selectedIndex {
button.isSelected = true
button.backgroundColor = Colors.tealish
button.setTitleColor(.white, for: .selected)
button.layer.cornerRadius = 5
} else {
button.isSelected = false
button.backgroundColor = Colors.whiteTwo
button.setTitleColor(Colors.tealish, for: .normal)
button.layer.cornerRadius = 5
}
}
}
func adjustSpacing(){
nameTextField.layer.sublayerTransform = CATransform3DMakeTranslation(15, 0, 0)
expDateField.layer.sublayerTransform = CATransform3DMakeTranslation(15, 0, 0)
categoryField.layer.sublayerTransform = CATransform3DMakeTranslation(15, 0, 0)
}
func configureAppearances(){
nameTextField.layer.cornerRadius = 8
quantityLabel.layer.cornerRadius = 8
quantityLabel.layer.masksToBounds = true
expDateField.layer.cornerRadius = 8
locationView.layer.cornerRadius = 8
categoryField.layer.cornerRadius = 8
}
func showAlert() {
labelView = UILabel(frame: CGRect(x: 0, y: 70, width: self.view.frame.width, height: 40))
labelView.backgroundColor = Colors.tealish
if itemToEdit != nil {
labelView.text = Labels.itemEdited
} else {
labelView.text = Labels.itemAdded
}
labelView.textAlignment = .center
labelView.textColor = UIColor.white
labelView.font = UIFont(name: Fonts.montserratRegular, size: 12)
self.view.addSubview(labelView)
Timer.scheduledTimer(timeInterval: 0.7, target: self, selector: #selector(self.dismissAlert), userInfo: nil, repeats: false)
}
func dismissAlert(){
if labelView != nil {
labelView.removeFromSuperview()
}
}
func resetView(){
tableView.isHidden = true
nameTextField.text = EmptyString.none
nameTextField.autocapitalizationType = .words
if itemToEdit == nil {
nameTextField.becomeFirstResponder()
}
quantity = 1
quantityLabel.text = "1"
isFavorited = false
favoriteButton.isSelected = false
addedDate = today
let sevenDaysLater = Calendar.current.date(byAdding: .day, value: 7, to: today)
if let date = sevenDaysLater {
expDate = date
datePicker.setDate(expDate, animated: true)
}
configureNA()
picker.selectRow(0, inComponent: 0, animated: true)
category = FoodCategories.other.rawValue
categoryField.text = FoodCategories.other.rawValue
location = .Fridge
selectedIndex = 0
configureLocationButtons()
saveButton.isEnabled = false
saveButton.setTitleColor(Colors.warmGreyThree, for: .normal)
}
func configureNA(){
let calendar = Calendar.current
let yearComponent = calendar.component(.year, from: expDate)
if yearComponent > 2100 {
expDateField.text = Labels.na
notApplicableButton.isSelected = true
} else {
expDateField.text = formatter.string(from: expDate).capitalized
notApplicableButton.isSelected = false
}
}
func checkTextField(sender: UITextField) {
var textLength = 0
if let text = sender.text {
textLength = text.trimmingCharacters(in: .whitespacesAndNewlines).characters.count
}
if textLength > 0 {
saveButton.isEnabled = true
saveButton.setTitleColor(Colors.tealish, for: .normal)
} else {
tableView.isHidden = true
saveButton.isEnabled = false
saveButton.setTitleColor(Colors.warmGreyFour, for: .normal)
}
if sender == categoryField {
if let c = sender.text {
for c_ in categories {
if c != c_.rawValue {
sender.text = FoodCategories.other.rawValue
category = FoodCategories.other.rawValue
}
}
}
}
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if filteredItemsNames.count == 0 {
tableView.isHidden = true
return 0
}
tableView.isHidden = false
return filteredItemsNames.count
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let selectedCell: UITableViewCell = tableView.cellForRow(at: indexPath)!
nameTextField.text = selectedCell.textLabel!.text!.capitalized
tableView.isHidden = !tableView.isHidden
nameTextField.endEditing(true)
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: Identifiers.Cell.nameCell)
if filteredItemsNames.count == 0 {
tableView.isHidden = true
} else {
tableView.isHidden = false
cell?.textLabel?.text = self.filteredItemsNames[indexPath.row]
}
cell?.textLabel?.font = UIFont(name: Fonts.latoRegular, size: 13)
cell?.textLabel?.textColor = Colors.tealish
return cell!
}
func searchAutocompleteEntriesWithSubstring(_ substring: String) {
filteredItemsNames.removeAll(keepingCapacity: false)
for itemArray in FoodItems.all {
for item in itemArray {
let myString: NSString! = item as NSString
let substringRange: NSRange! = myString.range(of: substring)
if substringRange.location == 0 {
filteredItemsNames.append(item)
}
}
}
tableView.reloadData()
}
func fillCategory(){
guard let name = nameTextField.text else { return }
for foodGroup in foodGroups {
for (key, value) in foodGroup {
if value.contains(name) {
DispatchQueue.main.async {
self.category = key
self.categoryField.text = key
}
} else {
self.category = FoodCategories.other.rawValue
self.categoryField.text = FoodCategories.other.rawValue
}
}
}
}
}
extension AddItemsManuallyVC : UITextFieldDelegate {
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
activeTextField?.resignFirstResponder()
activeTextField?.endEditing(true)
moveViewDown()
tableView.isHidden = true
return true
}
func textFieldDidBeginEditing(_ textField: UITextField){
activeTextField = textField
if activeTextField != nameTextField {
tableView.isHidden = true
}
if textField == expDateField {
expDateField.inputView = datePicker
datePicker.datePickerMode = UIDatePickerMode.date
datePicker.addTarget(self, action: #selector(self.datePickerChanged(sender:)), for: .valueChanged)
expDateField.text = formatter.string(from: datePicker.date).capitalized
notApplicableButton.isSelected = false
moveViewDown()
} else if textField == categoryField {
moveViewUp()
}
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if textField == nameTextField {
if let text = textField.text {
let subString = (text as NSString).replacingCharacters(in: range, with: string)
searchAutocompleteEntriesWithSubstring(subString)
}
}
return true
}
}
extension AddItemsManuallyVC: UIPickerViewDelegate, UIPickerViewDataSource {
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return categories.count
}
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
category = categories[row].rawValue
categoryField.text = categories[row].rawValue
if activeTextField == categoryField {
pickerView.reloadAllComponents()
}
}
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
return categories[row].rawValue
}
func datePickerChanged(sender: UIDatePicker) {
if sender == datePicker {
expDate = sender.date
expDateField.text = formatter.string(from: sender.date).capitalized
}
}
func donePicker(sender:UIBarButtonItem) {
view.endEditing(true)
moveViewDown()
}
func customToolBarForPickers(){
let toolBar = UIToolbar()
toolBar.barStyle = UIBarStyle.default
toolBar.isTranslucent = true
toolBar.tintColor = UIColor.darkGray
toolBar.sizeToFit()
let doneButton = UIBarButtonItem(title: Labels.done, style: .plain, target: self, action: #selector(donePicker))
let spaceButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.flexibleSpace, target: nil, action: nil)
let cancelButton = UIBarButtonItem(title: Labels.cancel, style: .plain, target: self, action: #selector(donePicker))
toolBar.setItems([cancelButton, spaceButton, doneButton], animated: false)
toolBar.isUserInteractionEnabled = true
expDateField.inputAccessoryView = toolBar
categoryField.inputAccessoryView = toolBar
}
}
extension AddItemsManuallyVC : KeyboardHandling {
func moveViewDown() {
if topMarginConstraint.constant == originTopMargin { return }
topMarginConstraint.constant = originTopMargin
UIView.animate(withDuration: 0.2, animations: { () -> Void in
self.view.layoutIfNeeded()
})
}
func moveViewUp() {
if topMarginConstraint.constant != originTopMargin { return }
topMarginConstraint.constant -= 100
UIView.animate(withDuration: 0.2, animations: { () -> Void in
self.view.layoutIfNeeded()
})
}
}
|
[
-1
] |
55d213b83bbe0e1f185ee5729cf71fd0a7e45e10
|
3ed357148e46748b4ff103e3eaf8a4ed3f938623
|
/Sources/Reset/ResetError.swift
|
0ed85b4e30013ca5c507412371ba80d924d68cbb
|
[
"MIT"
] |
permissive
|
nodes-vapor/reset
|
094f983d971ce0502f6c8b3ef30aa0c2b8f6be38
|
56e3f020f6667c8c5ae27edb2089bd75b7beddd0
|
refs/heads/master
| 2021-06-25T23:22:35.497782 | 2020-10-23T18:55:06 | 2020-10-23T18:55:06 | 134,720,173 | 13 | 1 |
MIT
| 2020-10-23T18:55:08 | 2018-05-24T13:36:05 |
Swift
|
UTF-8
|
Swift
| false | false | 815 |
swift
|
import Vapor
public enum ResetError: Error {
case tokenAlreadyUsed
case userNotFound
}
// MARK: - AbortError
extension ResetError: AbortError {
public var status: HTTPResponseStatus {
switch self {
case .tokenAlreadyUsed : return .forbidden
case .userNotFound : return .notFound
}
}
public var reason: String {
switch self {
case .tokenAlreadyUsed : return "A password reset token can only be used once."
case .userNotFound : return "Could not find user."
}
}
}
// MARK: - Debuggable
extension ResetError: Debuggable {
public var identifier: String {
switch self {
case .tokenAlreadyUsed : return "tokenAlreadyUsed"
case .userNotFound : return "userNotFound"
}
}
}
|
[
-1
] |
c18206033d6229c2b0c53d206fa9b39f21862fd5
|
c48cebd1e64389284fb34c07ce5f73120b14b8da
|
/Beacon AttendanceTests/Beacon_AttendanceTests.swift
|
45a2ab3413fcda1c8f624e3f76406a5d786b93e7
|
[] |
no_license
|
aburford/Beacon-Attendance-iOS-app
|
ddfe961b714ea66e04bf6222ca0c930745bae213
|
ba94d92c3d3c5874a039041905ccdfca0fc8f20d
|
refs/heads/master
| 2020-03-18T04:15:54.136126 | 2018-08-30T22:03:23 | 2018-08-30T22:03:23 | 134,279,014 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,015 |
swift
|
//
// Beacon_AttendanceTests.swift
// Beacon AttendanceTests
//
// Created by Andrew Burford on 5/21/18.
// Copyright © 2018 Andrew Burford. All rights reserved.
//
import XCTest
@testable import Beacon_Attendance
class Beacon_AttendanceTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
|
[
360462,
229413,
204840,
278570,
344107,
155694,
229424,
237620,
229430,
163896,
180280,
376894,
352326,
311372,
196691,
385116,
237663,
254048,
319591,
221290,
204916,
131191,
311438,
196760,
426138,
311458,
377009,
295098,
139479,
229597,
311519,
205035,
286958,
327929,
344313,
147717,
368905,
278797,
254226,
368916,
262421,
377114,
237856,
237857,
278816,
311597,
98610,
180535,
336183,
311621,
344401,
377169,
368981,
155990,
368984,
98657,
270701,
270706,
139640,
311681,
311685,
106888,
385417,
385422,
213403,
385454,
377264,
311738,
33211,
336320,
311745,
278978,
254406,
188871,
278989,
328152,
287198,
279008,
279013,
319981,
279029,
254456,
279032,
377338,
377343,
279039,
254465,
303631,
139792,
279057,
303636,
279062,
393751,
279065,
377376,
377386,
197167,
385588,
115270,
385615,
426576,
369235,
287318,
295519,
139872,
279146,
287346,
139892,
287352,
344696,
311941,
336518,
311945,
369289,
344715,
311949,
287374,
377489,
311954,
352917,
230040,
271000,
377497,
303771,
221852,
377500,
205471,
344738,
139939,
279210,
287404,
205487,
303793,
336564,
287417,
303803,
287422,
377539,
287433,
164560,
385747,
279252,
361176,
418520,
287452,
369385,
312047,
279280,
312052,
230134,
172792,
344827,
221948,
205568,
295682,
197386,
434957,
426774,
197399,
426775,
197411,
295724,
312108,
197422,
353070,
164656,
295729,
197431,
336702,
353109,
377686,
230234,
189275,
435039,
295776,
303972,
385893,
246643,
295798,
361337,
279417,
254850,
369538,
295824,
279464,
140204,
377772,
304051,
230332,
377790,
353215,
213957,
213960,
345033,
386006,
418776,
50143,
123881,
287731,
271350,
295927,
328700,
328706,
410627,
320516,
295942,
386056,
353290,
377869,
238610,
418837,
140310,
369701,
238639,
312373,
238651,
377926,
238664,
304222,
279660,
173166,
312434,
377972,
279672,
377983,
402565,
386189,
238743,
238765,
238769,
402613,
353479,
402634,
189653,
419029,
279765,
148696,
296153,
279774,
304351,
304356,
222440,
328940,
386294,
386301,
320770,
386306,
328971,
312587,
353551,
320796,
222494,
353584,
345396,
386359,
378172,
279875,
312648,
337225,
304456,
230729,
222541,
238927,
353616,
378209,
230756,
386412,
279920,
296307,
116084,
181625,
337281,
148867,
296329,
296335,
9619,
370071,
173491,
304564,
353719,
361927,
296392,
280013,
312782,
239068,
271843,
280041,
296433,
329225,
296461,
304656,
329232,
370197,
402985,
394794,
288309,
312889,
288327,
239198,
99938,
312940,
222832,
288378,
337534,
337535,
263809,
288392,
239250,
419478,
337591,
280267,
403148,
9936,
9937,
370388,
272085,
345814,
280278,
345821,
321247,
321249,
345833,
345834,
67315,
173814,
288512,
288516,
321302,
345879,
321310,
255776,
313120,
362283,
378668,
280366,
296755,
280372,
345919,
436031,
403267,
280390,
345929,
18262,
362327,
345951,
362337,
345955,
296806,
288619,
280430,
214895,
313199,
362352,
182144,
305026,
67463,
329622,
337815,
214937,
239514,
436131,
436137,
362417,
288697,
362431,
280519,
214984,
362443,
329695,
436191,
313319,
436205,
43014,
354316,
313357,
354343,
354345,
346162,
288828,
436285,
288833,
288834,
436292,
403525,
436301,
338001,
338003,
280661,
329814,
354393,
280675,
280677,
43110,
321637,
313447,
436329,
280694,
215164,
215166,
280712,
346271,
436383,
362659,
239793,
182456,
280762,
223419,
379071,
280768,
149703,
346314,
280778,
321745,
280795,
387296,
280802,
379106,
346346,
321772,
436470,
149760,
411906,
272658,
338218,
321840,
379186,
280887,
321860,
289110,
215385,
379225,
280939,
354676,
436608,
362881,
240002,
436611,
108944,
190871,
149916,
420253,
141728,
289189,
108972,
272813,
338356,
436661,
289232,
281040,
256477,
281072,
174593,
420369,
207393,
289332,
174648,
338489,
338490,
281166,
281171,
297560,
436832,
436834,
313966,
420463,
346737,
313971,
346740,
420471,
330379,
117396,
346772,
264856,
314009,
289434,
346779,
314040,
363211,
363230,
289502,
264928,
330474,
289518,
322313,
117517,
322319,
166676,
207640,
289576,
191283,
273207,
289598,
281408,
281427,
281433,
330609,
174963,
207732,
158593,
224145,
355217,
256922,
289690,
420773,
289703,
363438,
347055,
289727,
273344,
330689,
363458,
379844,
19399,
183248,
248796,
347103,
314342,
347123,
240630,
257024,
330754,
330763,
175132,
248872,
314448,
339030,
281697,
281700,
257125,
273515,
207979,
404593,
363641,
363644,
150657,
248961,
330888,
363669,
339100,
380061,
429214,
199839,
265379,
249002,
306346,
3246,
421048,
208058,
265412,
290000,
298208,
298212,
298213,
330984,
298221,
298228,
216315,
208124,
437505,
322824,
257305,
339234,
372009,
412971,
306494,
216386,
224586,
331090,
314710,
372054,
159066,
314720,
281957,
380271,
208244,
249204,
290173,
306559,
314751,
224640,
298374,
314758,
314760,
142729,
388487,
314766,
282007,
290207,
314783,
314789,
282022,
314791,
396711,
396712,
380337,
380338,
150965,
380357,
339398,
306639,
413137,
429542,
306677,
372227,
306692,
306693,
323080,
282129,
175639,
388632,
282136,
396827,
134686,
347694,
265798,
282183,
265804,
396882,
306776,
44635,
396895,
323172,
224883,
314998,
323196,
339584,
282245,
282246,
290443,
323217,
282259,
282273,
282276,
298661,
298667,
224946,
110268,
224958,
282303,
274115,
306890,
241361,
282327,
298712,
298720,
282339,
282348,
282355,
339715,
216839,
339720,
372496,
323346,
282400,
339745,
315171,
257830,
421672,
282417,
200498,
282427,
282434,
282438,
216918,
241495,
282480,
241528,
339841,
282504,
315273,
315274,
184208,
372626,
380821,
282518,
282519,
118685,
298909,
323507,
290745,
274371,
151497,
372701,
298980,
380908,
315432,
102445,
233517,
176175,
282672,
241716,
225351,
315465,
315476,
307289,
315487,
356447,
45153,
438377,
233589,
266357,
422019,
241808,
381073,
299174,
299187,
405687,
258239,
389313,
299203,
299209,
372941,
266449,
176362,
307435,
438511,
381172,
184575,
381208,
282909,
151839,
233762,
217380,
332083,
332085,
332089,
282939,
438596,
332101,
323913,
348492,
323920,
348500,
168281,
332123,
332127,
323935,
242023,
160110,
242033,
291192,
340357,
225670,
242058,
373134,
242078,
315810,
315811,
381347,
340398,
127427,
283075,
291267,
324039,
373197,
160225,
291311,
291333,
340490,
283153,
258581,
283182,
283184,
234036,
315960,
348732,
242237,
70209,
348742,
70215,
348749,
381517,
332378,
201308,
111208,
184940,
373358,
389745,
209530,
373375,
152195,
348806,
316049,
111253,
316053,
111258,
111259,
176808,
299699,
422596,
422599,
291530,
225995,
242386,
422617,
422626,
234217,
299759,
234234,
299770,
299776,
291585,
430849,
291592,
62220,
422673,
430865,
291604,
422680,
234277,
283430,
152365,
422703,
422709,
152374,
160571,
430910,
160575,
160580,
381773,
201551,
242529,
349026,
357218,
308076,
242541,
209785,
177019,
185211,
308092,
398206,
291712,
381829,
316298,
308107,
349072,
324506,
324507,
390045,
185250,
185254,
373687,
373706,
316364,
234472,
234473,
349175,
201720,
127992,
357379,
234500,
234514,
308243,
357414,
300084,
308287,
218186,
341073,
439384,
234587,
300135,
316520,
357486,
144496,
234609,
300150,
291959,
300151,
160891,
300158,
234625,
349316,
349318,
234638,
373903,
169104,
177296,
308372,
185493,
119962,
300187,
300188,
283802,
234663,
300201,
300202,
373945,
283840,
259268,
283847,
283852,
259280,
316627,
333011,
234742,
128251,
439562,
292107,
414990,
251153,
177428,
349462,
382258,
300343,
382269,
177484,
406861,
259406,
234831,
283991,
357719,
374109,
333160,
284014,
316787,
357762,
112017,
234898,
259475,
275859,
357786,
251298,
333220,
374191,
292283,
300489,
210390,
210391,
210393,
144867,
316902,
251378,
308723,
300536,
259599,
308756,
398869,
374296,
374299,
308764,
431649,
169518,
431663,
194110,
349763,
218696,
292425,
128587,
333388,
128599,
333408,
300644,
415338,
243307,
54893,
325231,
325245,
194180,
415375,
153251,
300714,
210603,
415420,
333503,
218819,
259781,
333517,
333520,
325346,
153319,
325352,
300794,
325371,
300811,
284431,
243472,
366360,
325404,
399147,
431916,
284459,
300848,
259899,
325439,
153415,
341836,
415567,
325457,
317269,
341847,
284507,
350044,
128862,
284512,
284514,
276327,
292712,
423789,
325492,
276341,
341879,
317304,
333688,
112509,
55167,
325503,
333701,
243591,
243597,
325518,
333722,
350109,
292771,
415655,
284587,
243637,
301008,
153554,
292836,
292837,
317415,
325619,
432116,
292858,
415741,
333828,
358410,
399373,
145435,
317467,
325674,
309295,
129076,
243767,
358456,
309345,
194666,
260207,
432240,
415881,
104587,
235662,
284825,
284826,
333991,
284842,
227524,
309444,
227548,
194782,
301279,
317664,
243962,
375039,
325905,
325912,
211235,
432421,
211238,
358703,
358709,
260418,
6481,
366930,
383332,
383336,
416104,
285040,
211326,
317831,
227725,
252308,
285084,
121245,
342450,
293303,
293310,
416197,
129483,
342476,
342498,
358882,
334309,
391655,
432618,
375276,
309744,
416286,
375333,
244269,
375343,
23092,
375351,
244281,
301638,
309830,
293448,
55881,
416341,
309846,
416351,
268899,
39530,
301689,
244347,
326287,
375440,
334481,
318106,
318107,
342682,
285361,
318130,
383667,
293556,
285373,
39614,
375526,
285415,
342762,
342763,
293612,
154359,
432893,
162561,
285444,
383754,
310036,
326429,
293664,
326433,
400166,
293672,
375609,
285497,
252741,
318278,
293711,
244568,
244570,
301918,
293730,
342887,
310131,
400252,
359298,
359299,
260996,
113542,
392074,
228234,
56208,
293781,
318364,
310176,
310178,
293800,
236461,
326581,
326587,
326601,
359381,
433115,
343005,
326635,
187374,
383983,
318461,
293886,
293893,
433165,
384016,
433174,
252958,
203830,
359478,
277597,
302177,
392290,
253029,
15471,
351344,
285814,
392318,
187521,
384131,
285828,
302213,
285830,
302216,
228491,
326804,
285851,
351390,
253099,
253100,
318639,
367799,
113850,
294074,
64700,
228540,
228542,
302274,
367810,
195808,
310497,
302325,
261377,
228609,
253216,
261425,
351537,
286013,
286018,
146762,
294218,
294219,
318805,
425304,
163175,
327024,
318848,
253317,
384393,
368011,
318864,
318868,
318875,
310692,
245161,
286129,
286132,
228795,
425405,
302531,
425418,
302540,
310736,
228827,
286172,
286202,
359930,
286205,
302590,
253451,
359950,
146964,
253463,
302623,
286244,
245287,
245292,
196164,
286288,
179801,
343647,
286306,
310889,
204397,
138863,
188016,
294529,
229001,
188048,
425626,
229020,
302754,
40613,
40614,
40615,
229029,
384695,
286391,
327358,
212685,
302797,
384720,
302802,
278233,
278234,
212716,
212717,
360177,
229113,
278272,
319233,
311042,
360195,
278291,
278293,
286494,
409394,
319292,
360252,
360264,
188251,
376669,
245599,
425825,
425833,
417654,
188292,
294807,
376732,
311199,
319392,
294823,
327596,
294843,
188348,
237504,
294850,
384964,
344013,
212942,
24532,
294886,
311281,
311282
] |
1993eb40177980c4c311ee33c27683101506bad4
|
b6a56e251d155924f63ba8f6cfee88ca02e9f3fa
|
/ChannelIO/Source/Actions/MessageActions.swift
|
095c0143875af3e93eba249669990b9275ee093a
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
zoyi/channel-plugin-ios
|
c5a0b5ae5187866565de4a71f8bc1401e16ed1a8
|
9d10c861f8dc045af4683a85558e4e4f3e11b582
|
refs/heads/master
| 2021-01-11T10:35:02.941283 | 2020-11-20T08:02:33 | 2020-11-20T08:05:19 | 79,194,432 | 13 | 11 |
NOASSERTION
| 2020-10-06T14:41:18 | 2017-01-17T06:03:53 |
Swift
|
UTF-8
|
Swift
| false | false | 446 |
swift
|
//
// MessageActions.swift
// CHPlugin
//
// Created by R3alFr3e on 2/11/17.
// Copyright © 2017 ZOYI. All rights reserved.
//
import ReSwift
struct CreateMessage: Action {
public let payload: CHMessage?
}
struct UpdateMessage: Action {
public let payload: CHMessage
}
struct DeleteMessage: Action {
public let payload: CHMessage
}
// local message action
struct InsertWelcome : Action {}
struct InsertSupportBotEntry: Action {}
|
[
-1
] |
c7d3dd57a0b066ec206d24d0664c8bd86ea43989
|
5d3c9c3ae6849f33015b92d2dae531cbad511fe2
|
/2.SourceCode/Diary/Diary/CategoryViewController.swift
|
73c060cf50b8decffcf9802cb1c68796676b4604
|
[] |
no_license
|
anhltse03448/DiaryProject
|
caa5fe797da254489ceb6cc24048a24a1b1dbc9a
|
435ee20e101fc97fdc360c83fd4b65df95c04c44
|
refs/heads/master
| 2020-12-25T17:03:24.900074 | 2016-09-14T01:29:47 | 2016-09-14T01:29:47 | 56,583,348 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 602 |
swift
|
//
// CategoryViewController.swift
// Diary
//
// Created by Anh Tuan on 9/13/16.
// Copyright © 2016 Lê Tuấn Anh. All rights reserved.
//
import UIKit
class CategoryViewController: UIViewController {
@IBOutlet weak var tbl : UITableView!
var listDate = [DateObject]()
override func viewDidLoad() {
super.viewDidLoad()
listDate = Ultis.getAllDayOfMonth()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
extension CategoryViewController : UITableViewDataSource , UITableViewDelegate {
n
}
|
[
-1
] |
fcd8c66b16d7c5ce7ea8f1e0d84679b28e792efd
|
fec868eef94522d56cd1ff7705fd1f448a7440dc
|
/Weibo/WeiboTests/WeiboTests.swift
|
295df1e166d2e181e0e1a4146fc8c0ff6473af8a
|
[
"MIT"
] |
permissive
|
DukeLenny/Weibo
|
250388cea2af099ba5e935d17b2248de907e4453
|
ce31461f9f5bf3f09f1e4a431c87cccfa3280c95
|
refs/heads/master
| 2021-01-21T09:29:16.299210 | 2018-03-16T10:21:27 | 2018-03-16T10:21:27 | 101,973,127 | 1 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 960 |
swift
|
//
// WeiboTests.swift
// WeiboTests
//
// Created by LiDinggui on 2017/8/31.
// Copyright © 2017年 DAQSoft. All rights reserved.
//
import XCTest
@testable import Weibo
class WeiboTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
|
[
360462,
98333,
278558,
16419,
229413,
204840,
278570,
344107,
155694,
253999,
229424,
229430,
319542,
180280,
163896,
352315,
376894,
352326,
254027,
311372,
196691,
278615,
180311,
180312,
385116,
237663,
254048,
319591,
221290,
278634,
319598,
352368,
204916,
131191,
237689,
131198,
278655,
311438,
278677,
196760,
426138,
278685,
311458,
278691,
49316,
32941,
278704,
377009,
278708,
131256,
295098,
139479,
254170,
229597,
311519,
205035,
286958,
327929,
344313,
147717,
368905,
180493,
254226,
319763,
368916,
262421,
377114,
278816,
237857,
237856,
311597,
98610,
180535,
336183,
278842,
287041,
319813,
319821,
254286,
344401,
377169,
368981,
155990,
368984,
106847,
98657,
270701,
246127,
270706,
246136,
139640,
106874,
246137,
311681,
311685,
106888,
385417,
385422,
213403,
246178,
385454,
311727,
377264,
319930,
311738,
33211,
278970,
336317,
336320,
311745,
278978,
254406,
188871,
278993,
278999,
328152,
369116,
287198,
279008,
279013,
311786,
279018,
319981,
319987,
279029,
254456,
279032,
377338,
279039,
377343,
254465,
287241,
279050,
139792,
303636,
393751,
254488,
279065,
377376,
377386,
197167,
385588,
352829,
115270,
385615,
426576,
369235,
295519,
139872,
66150,
344680,
279146,
287346,
139892,
344696,
287352,
279164,
189057,
311941,
336518,
369289,
311945,
344715,
279177,
311949,
287374,
377489,
311954,
352917,
230040,
271000,
377497,
303771,
377500,
295576,
221852,
205471,
344738,
139939,
279206,
295590,
287404,
295599,
205487,
303793,
336564,
164533,
230072,
287417,
287422,
66242,
377539,
164560,
385747,
279252,
361176,
418520,
287452,
295652,
279269,
246503,
369385,
230125,
312047,
279280,
312052,
172792,
344827,
221948,
205568,
295682,
197386,
434957,
295697,
426774,
197399,
426775,
336671,
344865,
197411,
279336,
295724,
353069,
197422,
353070,
164656,
295729,
312108,
328499,
353078,
230199,
353079,
197431,
336702,
295744,
279362,
353094,
353095,
353109,
377686,
230234,
189275,
435039,
295776,
279392,
303972,
385893,
230248,
246641,
246643,
295798,
246648,
361337,
279417,
254850,
369538,
287622,
58253,
295824,
189348,
353195,
140204,
353197,
377772,
304051,
230332,
189374,
377790,
353215,
353216,
213957,
213960,
345033,
279498,
386006,
418776,
50143,
123881,
320493,
320494,
304110,
271350,
295927,
304122,
320507,
328700,
328706,
410627,
320516,
295942,
386056,
353290,
230410,
377869,
320527,
238610,
418837,
140310,
230423,
320536,
197657,
336929,
189474,
369701,
345132,
238639,
312373,
238651,
377926,
238664,
353367,
156764,
156765,
304222,
173166,
377972,
353397,
279672,
337017,
377983,
402565,
279685,
222343,
386189,
296086,
238743,
296092,
238765,
279728,
238769,
402613,
230588,
353479,
353481,
353482,
402634,
189652,
189653,
419029,
279765,
148696,
296153,
279774,
304351,
304356,
222440,
328940,
279792,
353523,
386294,
386301,
320770,
386306,
279814,
312587,
328971,
353551,
320796,
222494,
353584,
345396,
386359,
116026,
378172,
222524,
279875,
304456,
312648,
337225,
230729,
296270,
238927,
353616,
296273,
222559,
378209,
230756,
386412,
230765,
296303,
279920,
312689,
296307,
116084,
181625,
337281,
148867,
378244,
296329,
296335,
9619,
370071,
279974,
173491,
304564,
353719,
361927,
296392,
280010,
370123,
148940,
280013,
312782,
222675,
329173,
353750,
239068,
280032,
271843,
280041,
361963,
329197,
329200,
296433,
321009,
280055,
288249,
296448,
230913,
230921,
329225,
296461,
304656,
329232,
370197,
230943,
402985,
394794,
230959,
312880,
288309,
312889,
288318,
280130,
124485,
288326,
288327,
280147,
239198,
99938,
312940,
222832,
247416,
288378,
337534,
337535,
263809,
288392,
239250,
419478,
345752,
255649,
206504,
321199,
337591,
321207,
296632,
280251,
280257,
321219,
280267,
403148,
9936,
313041,
9937,
370388,
272085,
345814,
280278,
280280,
18138,
345821,
321247,
321249,
345833,
345834,
280300,
239341,
67315,
173814,
313081,
124669,
288512,
67332,
288516,
280327,
280329,
321302,
345879,
116505,
321310,
313120,
255776,
247590,
362283,
378668,
296755,
321337,
345919,
436031,
403267,
280390,
345929,
255829,
18262,
362327,
280410,
370522,
345951,
362337,
345955,
296806,
288619,
280430,
214895,
313199,
362352,
296814,
313203,
124798,
182144,
305026,
67463,
329622,
337815,
124824,
214937,
239514,
436131,
354212,
436137,
362417,
124852,
288697,
362431,
214977,
280514,
214984,
362443,
247757,
346067,
280541,
329695,
436191,
313319,
337895,
247785,
296941,
436205,
124911,
329712,
362480,
313339,
43014,
354316,
313357,
182296,
239650,
223268,
354343,
354345,
223274,
124975,
346162,
124984,
288828,
436285,
288833,
288834,
436292,
403525,
313416,
436301,
354385,
338001,
338003,
280661,
329814,
338007,
354393,
280675,
280677,
43110,
321637,
313447,
436329,
329829,
288879,
280694,
223350,
288889,
215164,
313469,
215166,
280712,
215178,
346271,
436383,
362659,
239793,
125109,
182456,
280762,
379071,
280768,
149703,
338119,
346314,
321745,
387296,
280802,
379106,
338150,
346346,
321772,
125169,
338164,
436470,
125183,
149760,
411906,
125188,
313608,
125193,
125198,
125199,
272658,
125203,
125208,
305440,
125217,
338218,
321840,
379186,
125235,
280887,
125240,
321860,
280902,
182598,
289110,
305495,
215385,
272729,
379225,
354655,
321894,
280939,
313713,
354676,
199029,
436608,
362881,
248194,
240002,
436611,
395659,
395661,
240016,
108944,
190871,
149916,
420253,
141728,
289189,
289194,
108972,
272813,
338356,
436661,
289232,
281040,
256477,
281072,
174593,
420369,
289304,
207393,
182817,
289332,
174648,
338489,
338490,
322120,
281166,
281171,
297560,
354911,
436832,
436834,
191082,
313966,
420463,
281199,
346737,
313971,
346740,
420471,
330379,
330387,
117396,
346772,
330388,
117397,
264856,
314009,
289434,
346779,
338613,
289462,
166582,
314040,
158394,
363211,
363230,
289502,
264928,
338662,
330474,
346858,
289518,
125684,
199414,
35583,
363263,
191235,
322316,
117517,
322319,
166676,
207640,
281377,
289576,
191283,
273207,
289598,
420677,
355146,
355152,
355154,
281427,
281433,
322395,
355165,
355178,
330609,
207732,
158593,
240518,
224145,
355217,
256922,
289690,
289698,
420773,
289703,
363438,
347055,
289727,
273344,
330689,
363458,
379844,
19399,
183248,
338899,
330708,
248796,
248797,
207838,
347103,
314342,
52200,
289774,
183279,
347123,
240630,
314362,
257024,
330754,
134150,
330763,
322582,
281626,
248872,
322612,
314448,
339030,
314467,
281700,
257125,
322663,
281706,
273515,
207979,
404593,
363641,
363644,
150657,
248961,
330888,
363669,
339100,
380061,
339102,
199839,
429214,
265379,
249002,
306346,
3246,
421048,
339130,
208058,
322749,
265412,
290000,
298208,
298212,
298213,
290022,
330984,
298221,
298228,
216315,
208124,
388349,
363771,
437505,
322824,
257305,
126237,
339234,
109861,
372009,
412971,
298291,
306494,
216386,
224586,
372043,
331090,
314709,
314710,
372054,
159066,
314720,
314728,
134506,
380271,
314739,
208244,
314741,
249204,
290173,
306559,
306560,
224640,
314751,
314758,
388487,
314760,
298374,
142729,
314766,
306579,
224661,
282007,
290207,
314783,
314789,
282022,
314791,
396711,
396712,
282024,
241066,
314798,
380337,
380338,
150965,
380357,
339398,
306631,
306639,
413137,
429542,
191981,
282096,
306673,
191990,
290301,
282114,
372227,
323080,
323087,
175639,
388632,
396827,
282141,
134686,
282146,
306723,
347694,
290358,
265798,
282183,
265804,
396882,
290390,
306776,
44635,
396895,
323172,
282213,
323178,
224883,
314998,
323196,
175741,
339584,
282245,
224901,
282246,
323217,
282259,
298654,
282271,
282273,
282276,
298661,
323236,
282280,
298667,
224946,
110268,
224958,
323263,
282303,
274115,
306890,
282318,
241361,
241365,
298712,
298720,
282339,
12010,
282348,
282355,
282358,
175873,
339715,
323331,
323332,
216839,
339720,
372496,
323346,
282391,
249626,
282400,
339745,
241441,
257830,
421672,
282409,
282417,
282427,
315202,
307011,
282434,
282438,
323406,
216918,
241495,
282474,
282480,
241528,
315264,
339841,
241540,
282504,
315273,
315274,
110480,
372626,
380821,
282518,
282519,
298909,
118685,
323507,
200627,
282549,
290745,
290746,
274371,
151497,
372701,
298980,
380908,
282612,
290811,
282633,
241692,
102437,
315432,
102445,
233517,
176175,
241716,
225351,
315465,
315476,
307289,
200794,
315487,
356447,
45153,
307299,
315497,
315498,
438377,
299121,
233589,
233590,
266357,
422019,
241808,
323729,
381073,
233636,
299174,
323762,
299187,
405687,
184505,
299198,
258239,
389313,
299203,
299209,
372941,
282831,
266449,
356576,
176362,
307435,
438511,
381172,
184570,
184575,
381208,
282909,
299293,
151839,
233762,
217380,
151847,
282919,
332083,
332085,
332089,
315706,
282939,
241986,
438596,
332101,
323913,
348492,
323916,
323920,
250192,
348500,
168281,
332123,
332127,
323935,
242023,
242029,
160110,
242033,
291192,
340357,
225670,
332167,
242058,
373134,
291224,
242078,
283038,
61857,
315810,
315811,
381347,
61859,
340398,
61873,
61880,
283064,
291267,
127427,
127428,
283075,
324039,
373197,
176601,
242139,
160225,
242148,
291311,
233978,
291333,
340490,
283153,
258581,
291358,
283182,
283184,
234036,
234040,
315960,
348732,
242237,
70209,
348742,
70215,
348749,
340558,
381517,
332378,
201308,
242277,
111208,
184940,
373358,
389745,
209530,
373375,
152195,
348806,
184973,
316049,
316053,
111253,
111258,
111259,
176808,
299699,
299700,
422596,
422599,
291530,
225995,
242386,
422617,
422626,
234217,
299759,
299776,
291585,
430849,
242433,
291592,
62220,
422673,
430865,
291604,
422680,
283419,
152365,
422703,
422709,
152374,
242485,
160571,
430910,
160575,
160580,
299849,
283467,
381773,
201551,
242529,
349026,
357218,
275303,
201577,
308076,
242541,
209783,
209785,
177019,
185211,
308092,
398206,
291712,
381829,
316298,
308107,
308112,
349072,
209817,
324506,
324507,
390045,
185250,
324517,
185254,
316333,
316343,
373687,
349121,
373706,
316364,
340955,
340961,
324586,
340974,
316405,
349175,
201720,
127992,
357379,
324625,
308243,
316437,
201755,
300068,
357414,
300084,
324666,
308287,
21569,
218186,
300111,
341073,
439384,
250981,
300135,
300136,
316520,
316526,
357486,
144496,
300146,
300150,
291959,
300151,
160891,
341115,
300158,
349316,
349318,
373903,
169104,
177296,
308372,
185493,
283802,
119962,
300188,
300187,
300201,
300202,
373945,
259268,
283847,
62665,
283852,
283853,
259280,
316627,
333011,
357595,
234733,
292085,
234742,
128251,
316669,
234755,
439562,
292107,
242954,
414990,
251153,
177428,
349462,
382258,
300343,
382269,
333117,
193859,
177484,
406861,
259406,
234831,
251213,
120148,
283991,
374109,
234850,
292195,
333160,
243056,
316787,
357762,
112017,
234898,
259475,
275859,
112018,
357786,
251298,
333220,
316842,
374191,
210358,
284089,
292283,
415171,
292292,
300487,
300489,
366037,
210390,
210391,
210392,
210393,
144867,
316902,
54765,
251378,
308723,
333300,
333303,
300536,
300542,
210433,
366083,
259599,
316946,
308756,
398869,
374296,
374299,
308764,
349726,
333343,
431649,
349741,
169518,
431663,
194110,
235070,
349763,
218696,
292425,
243274,
128587,
333388,
333393,
349781,
300630,
128599,
235095,
333408,
374372,
300644,
415338,
243307,
54893,
325231,
366203,
325245,
235135,
194180,
415375,
153251,
300714,
210603,
415420,
333503,
218819,
259781,
333517,
333520,
333521,
333523,
325346,
153319,
325352,
284401,
325371,
194303,
284429,
284431,
243472,
366360,
284442,
325404,
325410,
341796,
333610,
284459,
399147,
431916,
317232,
300848,
259899,
325439,
153415,
341836,
415567,
325457,
317269,
341847,
350044,
300894,
128862,
284514,
276327,
292712,
325484,
423789,
292720,
325492,
276341,
300918,
341879,
317304,
333688,
112509,
194429,
55167,
325503,
333701,
243591,
325515,
350093,
325518,
243597,
333722,
350109,
292771,
300963,
333735,
415655,
284587,
292782,
317360,
243637,
284619,
301008,
153554,
219101,
292836,
292837,
317415,
325619,
432116,
333817,
292858,
415741,
333828,
358410,
399373,
317467,
145435,
292902,
325674,
309295,
243759,
129076,
243767,
358456,
309345,
227428,
194666,
260207,
432240,
333940,
284788,
292988,
292992,
194691,
227460,
333955,
415881,
104587,
235662,
325776,
317587,
284826,
333991,
333992,
284842,
301251,
309444,
227524,
194782,
301279,
317664,
243962,
375039,
309503,
194820,
375051,
325905,
325912,
309529,
227616,
211235,
432421,
211238,
358703,
358709,
260418,
325968,
6481,
366930,
366929,
6489,
391520,
383332,
383336,
317820,
211326,
317831,
227725,
252308,
178582,
293274,
39324,
121245,
317852,
285090,
375207,
342450,
334260,
293303,
293310,
416197,
129483,
342476,
317901,
326100,
285150,
358882,
342498,
334309,
195045,
391655,
432618,
375276,
301571,
342536,
342553,
416286,
375333,
244269,
375343,
236081,
23092,
375351,
244281,
301638,
309830,
293448,
55881,
416341,
309846,
285271,
244310,
416351,
268899,
39530,
244347,
326287,
375440,
334481,
227990,
318106,
318107,
342682,
318130,
383667,
293556,
342713,
285373,
39614,
154316,
334547,
318173,
375526,
285415,
342762,
342763,
293612,
129773,
154359,
228088,
432893,
162561,
285444,
383754,
285458,
310036,
285466,
326429,
293664,
326433,
400166,
293672,
318250,
318252,
285487,
375609,
285497,
293693,
252741,
293711,
244568,
244570,
301918,
293730,
351077,
342887,
211829,
228215,
269178,
211836,
400252,
359298,
359299,
260996,
113542,
416646,
228233,
392074,
228234,
56208,
293781,
400283,
318364,
310176,
310178,
293800,
236461,
293806,
252847,
326581,
326587,
326601,
359381,
433115,
343005,
130016,
64485,
326635,
203757,
187374,
383983,
277492,
318461,
293886,
277509,
293893,
433165,
384016,
146448,
433174,
326685,
252958,
252980,
203830,
359478,
302139,
359495,
277597,
113760,
392290,
253029,
285798,
228458,
15471,
351344,
187506,
285814,
285820,
392318,
187521,
384131,
285828,
302216,
228491,
228493,
285838,
162961,
326804,
187544,
351390,
302240,
343203,
253099,
253100,
318639,
294068,
367799,
113850,
294074,
64700,
228542,
302274,
367810,
343234,
244940,
228563,
195808,
310497,
228588,
253167,
302325,
228600,
228609,
261377,
245019,
253216,
130338,
130343,
261425,
351537,
286013,
286018,
146762,
294218,
294219,
318805,
425304,
294243,
163175,
327024,
327025,
327031,
318848,
179587,
253317,
384393,
368011,
318864,
318868,
318875,
310692,
245161,
286129,
286132,
228795,
425405,
302529,
302531,
163268,
425418,
302540,
310732,
64975,
310736,
327121,
228827,
286172,
310757,
187878,
343542,
343543,
286202,
359930,
286205,
302590,
294400,
228867,
253451,
253452,
359950,
146964,
253463,
286244,
245287,
245292,
286254,
425535,
196164,
56902,
286288,
179801,
196187,
343647,
286306,
310889,
204397,
138863,
188016,
294529,
286343,
229001,
310923,
188048,
425626,
229020,
302754,
245412,
229029,
40614,
40613,
40615,
286391,
384695,
319162,
327358,
286399,
212685,
384720,
245457,
302802,
286423,
278233,
278234,
294622,
278240,
212716,
212717,
360177,
229113,
286459,
278272,
319233,
360195,
278291,
294678,
286494,
294700,
409394,
319292,
360252,
360264,
188251,
376669,
245599,
237408,
425825,
425833,
417654,
188292,
253829,
294807,
294809,
376732,
311199,
319392,
294823,
327596,
294843,
188348,
237504,
294850,
384964,
163781,
344013,
212942,
212946,
24532,
294886,
253929,
327661,
311281,
311282
] |
8ac44fbb7faa39b1a7988695383b0a170ff6c8e2
|
80b15b83b0e3bdad15aa957f42dd821d90f8b282
|
/Mia/Toolkits/CodableKit/CodableKit.swift
|
3c0947b3da52e85a4039265d5cd958e4a7f12ade
|
[
"MIT"
] |
permissive
|
fossabot/Mia
|
d8f18598b68b97c3263ba4a9a2c7974b40862d7f
|
e67fd12abe1452eb2dafcfae3ec5609be413a3e3
|
refs/heads/master
| 2020-04-07T17:26:30.534026 | 2018-11-21T15:36:42 | 2018-11-21T15:36:42 | 158,570,076 | 0 | 0 |
MIT
| 2018-11-21T15:36:37 | 2018-11-21T15:36:36 | null |
UTF-8
|
Swift
| false | false | 1,001 |
swift
|
public typealias JSONDictionary = [String: Any]
public typealias JSONArray = [[String: Any]]
public class CodableKit {
public struct Configurations {
public static var isLoggingEnabled = true
public struct Encoding {
public static var outputFormatting: JSONEncoder.OutputFormatting = []
@available(iOS 10.0, *)
public static var dateStrategy: JSONEncoder.DateEncodingStrategy = .iso8601
public static var dataStrategy: JSONEncoder.DataEncodingStrategy = .base64
}
public struct Decoding {
@available(iOS 10.0, *)
public static var dateStrategy: JSONDecoder.DateDecodingStrategy = .iso8601
public static var dataStrategy: JSONDecoder.DataDecodingStrategy = .base64
}
}
static func log(message: String) {
if Configurations.isLoggingEnabled {
Rosewood.Framework.print(framework: String(describing: self), message: message)
}
}
}
|
[
-1
] |
ecabb3d1f5ec52f8656e0086c96c31b67768509e
|
d636f72cedff58a429928a3ad797a7d4409bd54e
|
/LearnArabicLetter/InitialScene.swift
|
1dd59666fba97df0450a478a84346a0408a582cb
|
[] |
no_license
|
Bethrah/LAL
|
39f46b2a023a73d8510ab2340c45567f4da8ebe2
|
b096370ca2355e65c5a9824024feaa56cf028f07
|
refs/heads/master
| 2020-04-08T17:19:13.153773 | 2018-11-28T20:39:43 | 2018-11-28T20:39:43 | 159,561,736 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,821 |
swift
|
//
// InitialScene.swift
// LearnArabicLetter
//
// Created by Ghadah Alghamdi on 28/03/2017.
// Copyright © 2017 بدور. All rights reserved.
//
import SpriteKit
import GameplayKit
class InitialScene: SKScene {
override func didMove(to view: SKView) {
// self.size = view.bounds.size
// self.scaleMode = .aspectFill
let wait = SKAction.wait(forDuration: 2)
if (UIDevice.current.userInterfaceIdiom == .phone){
if let phoneScene = GameScene(fileNamed: "GameScene") {
// Set the scale mode to scale to fit the window
// scene.size = view.bounds.size
// scene.size = view.frame.size
// UIScreen.main.bounds.size
phoneScene.scaleMode = .aspectFill
// Present the scene
let action = SKAction.run {
view.presentScene(phoneScene, transition: SKTransition.fade(with: UIColor.white, duration: 2))
}
self.run(SKAction.sequence([wait, action]))
}
}else if (UIDevice.current.userInterfaceIdiom == .pad){
if let padScene = GameScene(fileNamed: "GameScenePad") {
// Set the scale mode to scale to fit the window
// scene.size = view.bounds.size
// scene.size = view.frame.size
// UIScreen.main.bounds.size
padScene.scaleMode = .aspectFill
// Present the scene
let action = SKAction.run {
view.presentScene(padScene, transition: SKTransition.fade(with: UIColor.white, duration: 2))
}
self.run(SKAction.sequence([wait, action]))
}
}
}
}
|
[
-1
] |
8f6149e7d47ee0b15ad0c8fb8631e1e63c45c29e
|
e32f5f90843392456442801651d802cad0e4df14
|
/legal_talk/Attorney/ClientList.swift
|
27e4b5b9c871a294e2d369a6a06e63c6303192a6
|
[] |
no_license
|
jagold/Gavel
|
57402465f6e445082b12cb7a251f5be7c2b35d83
|
53ac1a35d2995c9ac1c67d643d146b3b02d40e10
|
refs/heads/master
| 2023-04-28T09:44:30.649954 | 2020-07-14T19:56:36 | 2020-07-14T19:56:36 | 279,680,112 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 5,113 |
swift
|
//
// ClientList.swift
// legal_talk
//
// Created by Jack on 5/25/20.
// Copyright © 2020 Jack. All rights reserved.
//
import UIKit
class ClientList: UITableViewController {
//MARK: Properties
var server_action = server_handler()
let group = DispatchGroup()
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
}
// MARK: - Table view data source
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return globalData.Clients.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cellIdentifier = "ClientCell"
guard let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as? ClientCell else{
fatalError("dequeued cell not an instance of ClientCell")
}
// Configure the cell...
let client = globalData.Clients[indexPath.row]
cell.clientNameLabel.text = client.Name
return cell
}
/*
// Override to support conditional editing of the table view.
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the specified item to be editable.
return true
}
*/
/*
// Override to support editing the table view.
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
// Delete the row from the data source
tableView.deleteRows(at: [indexPath], with: .fade)
} else if editingStyle == .insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
*/
/*
// Override to support rearranging the table view.
override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
}
*/
/*
// Override to support conditional rearranging of the table view.
override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the item to be re-orderable.
return true
}
*/
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
super.prepare(for: segue, sender: sender)
switch segue.identifier ?? "" {
case "getClientInfo":
guard let clientInfo = segue.destination as? ClientInfo else{
fatalError("Unexpected destination")
}
guard let selectedClientCell = sender as? ClientCell else {
fatalError("Unexpected sender: \(String(describing: sender))")
}
guard let indexPath = tableView.indexPath(for: selectedClientCell) else {
fatalError("The selected cell is not being displayed by the table")
}
clientInfo.clientUsername = globalData.Clients[indexPath.row].Username
group.enter()
self.server_action.fetchTreatmentHistory(userName: globalData.Clients[indexPath.row].Username){treatments, doctors,attorney,name, providers in
print("index 1")
print(indexPath.row)
globalData.Treatments = treatments
globalData.Treatments.reverse()
globalData.Doctors = doctors
globalData.Providers = providers
self.group.leave()
}
group.enter()
self.server_action.fetch_limitations(User: globalData.Clients[indexPath.row].Username){limitations in
print("index 2")
print(indexPath.row)
globalData.limitations = limitations
self.group.leave()
}
self.group.notify(queue:.main){
clientInfo.nameLabel = globalData.Clients[indexPath.row].Name
}
default:
fatalError("NO hits on segue")
}
}
}
|
[
-1
] |
c323fa85a52db589c6a1eae549aeea2db10dec89
|
d0b4732d2e7565f2e9e560ca31e957b6bb9eb9ac
|
/LatPayPOS/TableView Cells/receiptTableViewCell.swift
|
1b3be46bd460d72e3df6abd8f649b90381fcad4f
|
[] |
no_license
|
DineshVinayak21/LatPayPOS
|
fbaae9ba7cc9de31d28dd46c1a021501583cf5e3
|
e4c25a0873c1bb2a20a40d2050d6ae31b261f292
|
refs/heads/master
| 2022-11-18T08:22:34.348925 | 2020-07-17T11:59:46 | 2020-07-17T11:59:46 | 280,412,415 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,121 |
swift
|
//
// receiptTableViewCell.swift
// LatPayPOS
//
// Created by user166170 on 6/13/20.
// Copyright © 2020 dss. All rights reserved.
//
import UIKit
class receiptTableViewCell: UITableViewCell
{
@IBOutlet weak var moneyImage: UIImageView!
@IBOutlet weak var receiptPrice: UILabel!
@IBOutlet weak var dateAndTime: UILabel!
@IBOutlet weak var insideView: UIView!
@IBOutlet weak var numberOfProducts: UILabel!
@IBOutlet weak var productsList: UILabel!
@IBOutlet weak var couponName: UILabel!
@IBOutlet weak var couponPrice: UILabel!
@IBOutlet weak var actualPrice: UILabel!
override func awakeFromNib()
{
cellDesign()
super.awakeFromNib()
}
override func setSelected(_ selected: Bool, animated: Bool)
{
super.setSelected(selected, animated: animated)
}
func cellDesign()
{
insideView.layer.cornerRadius = 5
numberOfProducts.isHidden = true
productsList.isHidden = true
couponName.isHidden = true
couponPrice.isHidden = true
actualPrice.isHidden = true
}
}
|
[
-1
] |
73dadca923fb56eb8d51dcc119b08b1574823663
|
2f63159c087cafc7ba88d9e5d80894665b9dbbf2
|
/FastConsumption/FastConsumption/Utils/UI/YogaExtension.swift
|
c0897d31d1280fd0b610152b8dba3c00b44be0a7
|
[] |
no_license
|
panicfrog/FastConsumption
|
74313ca34129e8ce6be971781afa321cc6a6c97e
|
0bc7e858e81f5be9fd83c11d9695f60673a13490
|
refs/heads/master
| 2023-03-09T07:25:58.111612 | 2018-04-02T07:45:50 | 2018-04-02T07:45:50 | 198,609,281 | 0 | 0 | null | 2022-12-07T21:07:31 | 2019-07-24T10:05:07 |
Swift
|
UTF-8
|
Swift
| false | false | 25,706 |
swift
|
//
// YogaExtension.swift
// FastConsumption
//
// Created by fireFrog on 2017/12/9.
// Copyright © 2017年 Macx. All rights reserved.
//
import Foundation
import YogaKit
private func setLayout(_ layout: VirtualLayout, to view:UIView) {
let yoga = view.yoga
if let isEnabled = layout.isEnabled { yoga.isEnabled = isEnabled }
if let isIncludedInLayout = layout.isIncludedInLayout { yoga.isIncludedInLayout = isIncludedInLayout }
if let direction = layout.direction { yoga.direction = direction }
if let flexDirection = layout.flexDirection { yoga.flexDirection = flexDirection }
if let justifyContent = layout.justifyContent { yoga.justifyContent = justifyContent }
if let alignContent = layout.alignContent { yoga.alignContent = alignContent }
if let alignItems = layout.alignItems { yoga.alignItems = alignItems }
if let alignSelf = layout.alignSelf { yoga.alignSelf = alignSelf }
if let position = layout.position { yoga.position = position }
if let flexWrap = layout.flexWrap { yoga.flexWrap = flexWrap }
if let overflow = layout.overflow { yoga.overflow = overflow }
if let display = layout.display { yoga.display = display }
if let flexGrow = layout.flexGrow { yoga.flexGrow = flexGrow }
if let flexShrink = layout.flexShrink { yoga.flexShrink = flexShrink }
if let flexBasis = layout.flexBasis { yoga.flexBasis = flexBasis }
if let left = layout.left { yoga.left = left }
if let top = layout.top { yoga.top = top }
if let right = layout.right { yoga.right = right }
if let bottom = layout.bottom { yoga.bottom = bottom }
if let start = layout.start { yoga.start = start }
if let end = layout.end { yoga.end = end }
if let marginLeft = layout.marginLeft { yoga.marginLeft = marginLeft }
if let marginTop = layout.marginTop { yoga.marginTop = marginTop }
if let marginRight = layout.marginRight { yoga.marginRight = marginRight }
if let marginBottom = layout.marginBottom { yoga.marginBottom = marginBottom }
if let marginStart = layout.marginStart { yoga.marginStart = marginStart }
if let marginEnd = layout.marginEnd { yoga.marginEnd = marginEnd }
if let marginHorizontal = layout.marginHorizontal { yoga.marginHorizontal = marginHorizontal }
if let marginHorizontal = layout.marginHorizontal { yoga.marginHorizontal = marginHorizontal }
if let marginVertical = layout.marginVertical { yoga.marginVertical = marginVertical }
if let margin = layout.margin { yoga.margin = margin }
if let paddingLeft = layout.paddingLeft { yoga.paddingLeft = paddingLeft }
if let paddingTop = layout.paddingTop { yoga.paddingTop = paddingTop }
if let paddingRight = layout.paddingRight { yoga.paddingRight = paddingRight }
if let paddingBottom = layout.paddingBottom { yoga.paddingBottom = paddingBottom }
if let paddingStart = layout.paddingStart { yoga.paddingStart = paddingStart }
if let paddingEnd = layout.paddingEnd { yoga.paddingEnd = paddingEnd }
if let paddingHorizontal = layout.paddingHorizontal { yoga.paddingHorizontal = paddingHorizontal }
if let paddingVertical = layout.paddingVertical { yoga.paddingVertical = paddingVertical }
if let padding = layout.padding { yoga.padding = padding }
if let borderLeftWidth = layout.borderLeftWidth { yoga.borderLeftWidth = borderLeftWidth }
if let borderTopWidth = layout.borderTopWidth { yoga.borderTopWidth = borderTopWidth }
if let borderRightWidth = layout.borderRightWidth { yoga.borderRightWidth = borderRightWidth }
if let borderBottomWidth = layout.borderBottomWidth { yoga.borderBottomWidth = borderBottomWidth }
if let borderStartWidth = layout.borderStartWidth { yoga.borderStartWidth = borderStartWidth }
if let borderEndWidth = layout.borderEndWidth { yoga.borderEndWidth = borderEndWidth }
if let borderWidth = layout.borderWidth { yoga.borderWidth = borderWidth }
if let width = layout.width { yoga.width = width }
if let height = layout.height { yoga.height = height }
if let minWidth = layout.minWidth { yoga.minWidth = minWidth }
if let minHeight = layout.minHeight { yoga.minHeight = minHeight }
if let maxWidth = layout.maxWidth { yoga.maxWidth = maxWidth }
if let maxHeight = layout.maxHeight { yoga.maxHeight = maxHeight }
if let aspectRatio = layout.aspectRatio { yoga.aspectRatio = aspectRatio }
if layout.dirty { yoga.markDirty() }
}
// MARK: - 给真实的yoga赋上虚拟layout的值
extension UIView {
func layout(_ layout: VirtualLayout) {
setLayout(layout, to: self)
}
}
//
//private let undefineValue = YGValueUndefined
//private let autoValue = YGValueAuto
private let YOGA = UIView().yoga
private let undefineValue = YGValue(value: 0, unit: YGUnit.undefined)
private let autoValue = YGValue(value: 0, unit: YGUnit.auto)
// TODO: 添加泛型支持,让设置视图能像css一样添加, 并且可以是与强类型作为限制
// MARK: - 建立一个虚拟的layout 用来复用布局
public class VirtualLayout {
var isIncludedInLayout: Bool? = nil
var isEnabled: Bool? = nil
var direction: YGDirection? = nil
var flexDirection: YGFlexDirection? = nil
var justifyContent: YGJustify? = nil
var alignContent: YGAlign? = nil
var alignItems: YGAlign? = nil
var alignSelf: YGAlign? = nil
var position: YGPositionType? = nil
var flexWrap: YGWrap? = nil
var overflow: YGOverflow? = nil
var display: YGDisplay? = nil
var flexGrow: CGFloat? = nil
var flexShrink: CGFloat? = nil
var flexBasis: YGValue? = nil
var left: YGValue? = nil
var top: YGValue? = nil
var right: YGValue? = nil
var bottom: YGValue? = nil
var start: YGValue? = nil
var end: YGValue? = nil
var marginLeft: YGValue? = nil
var marginTop: YGValue? = nil
var marginRight: YGValue? = nil
var marginBottom: YGValue? = nil
var marginStart: YGValue? = nil
var marginEnd: YGValue? = nil
var marginHorizontal: YGValue? = nil
var marginVertical: YGValue? = nil
var margin: YGValue? = nil
var paddingLeft: YGValue? = nil
var paddingTop: YGValue? = nil
var paddingRight: YGValue? = nil
var paddingBottom: YGValue? = nil
var paddingStart: YGValue? = nil
var paddingEnd: YGValue? = nil
var paddingHorizontal: YGValue? = nil
var paddingVertical: YGValue? = nil
var padding: YGValue? = nil
//内存中全部标记为nan
var borderLeftWidth : CGFloat? = nil
var borderTopWidth : CGFloat? = nil
var borderRightWidth : CGFloat? = nil
var borderBottomWidth : CGFloat? = nil
var borderStartWidth : CGFloat? = nil
var borderEndWidth : CGFloat? = nil
var borderWidth : CGFloat? = nil
var width: YGValue? = nil
var height: YGValue? = nil
var minWidth: YGValue? = nil
var minHeight: YGValue? = nil
var maxWidth: YGValue? = nil
var maxHeight: YGValue? = nil
//内存中标记为nan
var aspectRatio: CGFloat? = nil
var dirty: Bool = false
}
// MARK: - 让虚拟的layout链式调用
extension VirtualLayout {
@discardableResult
public func isIncludedInLayout(_ isIncludedInLayout: Bool) -> VirtualLayout {
self.isIncludedInLayout = isIncludedInLayout
return self
}
@discardableResult
public func isEnable(_ enabled: Bool) -> VirtualLayout {
self.isEnabled = enabled
return self
}
@discardableResult
public func direction(_ direction: YGDirection) -> VirtualLayout{
self.direction = direction
return self
}
@discardableResult
public func flexDirection(_ flexDirection: YGFlexDirection) -> VirtualLayout {
self.flexDirection = flexDirection
return self
}
@discardableResult
public func justifyContent(_ justifyContent: YGJustify) -> VirtualLayout {
self.justifyContent = justifyContent
return self
}
@discardableResult
public func alignContent(_ alignContent: YGAlign) -> VirtualLayout {
self.alignContent = alignContent
return self
}
@discardableResult
public func alignItems(_ alignItems: YGAlign) -> VirtualLayout {
self.alignItems = alignItems
return self
}
@discardableResult
public func alignSelf(_ alignSelf: YGAlign) -> VirtualLayout {
self.alignSelf = alignSelf
return self
}
@discardableResult
public func position(_ position: YGPositionType) -> VirtualLayout {
self.position = position
return self
}
@discardableResult
public func flexWrap(_ flexWrap: YGWrap) -> VirtualLayout {
self.flexWrap = flexWrap
return self
}
@discardableResult
public func overflow(_ overflow: YGOverflow) -> VirtualLayout {
self.overflow = overflow
return self
}
@discardableResult
public func display(_ display: YGDisplay) -> VirtualLayout {
self.display = display
return self
}
@discardableResult
public func flexGrow(_ flexGrow: CGFloat) -> VirtualLayout {
self.flexGrow = flexGrow
return self
}
@discardableResult
public func flexShrink(_ flexShrink: CGFloat) -> VirtualLayout {
self.flexShrink = flexShrink
return self
}
@discardableResult
public func flexBasis(_ flexBasis: YGValue) -> VirtualLayout {
self.flexBasis = flexBasis
return self
}
@discardableResult
public func left(_ left: YGValue) -> VirtualLayout {
self.left = left
return self
}
@discardableResult
public func top(_ top: YGValue) -> VirtualLayout {
self.top = top
return self
}
@discardableResult
public func right(_ right: YGValue) -> VirtualLayout {
self.right = right
return self
}
@discardableResult
public func bottom(_ bottom: YGValue) -> VirtualLayout {
self.bottom = bottom
return self
}
@discardableResult
public func start(_ start: YGValue) -> VirtualLayout {
self.start = start
return self
}
@discardableResult
public func end(_ end: YGValue) -> VirtualLayout {
self.end = end
return self
}
@discardableResult
public func leftTop(x left: YGValue, y top: YGValue) -> VirtualLayout {
self.left = left
self.top = top
return self
}
@discardableResult
public func rightTop(x right: YGValue, y top: YGValue) -> VirtualLayout {
self.right = right
self.top = top
return self
}
@discardableResult
public func leftBottom(x left: YGValue, y bottom: YGValue) -> VirtualLayout {
self.left = left
self.bottom = bottom
return self
}
@discardableResult
public func rightBottom(x right: YGValue, y bottom: YGValue) -> VirtualLayout {
self.right = right
self.bottom = bottom
return self
}
@discardableResult
public func topHeight(top: YGValue, height: YGValue) -> VirtualLayout {
self.top = top
self.height = height
return self
}
@discardableResult
public func bottomHeight(bottom: YGValue, height: YGValue) -> VirtualLayout {
self.bottom = bottom
self.height = height
return self
}
@discardableResult
public func leftWidth(left: YGValue, width: YGValue) -> VirtualLayout {
self.left = left
self.width = width
return self
}
@discardableResult
public func rightWidth(right: YGValue, width: YGValue) -> VirtualLayout {
self.right = right
self.width = width
return self
}
@discardableResult
public func leftRight(left: YGValue, right: YGValue) -> VirtualLayout {
self.left = left
self.right = right
return self
}
@discardableResult
public func topBottom(top: YGValue, bottom: YGValue) -> VirtualLayout {
self.top = top
self.bottom = bottom
return self
}
@discardableResult
public func size(width: YGValue, height: YGValue) -> VirtualLayout {
self.width = width
self.height = height
return self
}
@discardableResult
public func marginLeft(_ marginLeft: YGValue) -> VirtualLayout {
self.marginLeft = marginLeft
return self
}
@discardableResult
public func marginTop(_ marginTop: YGValue) -> VirtualLayout {
self.marginTop = marginTop
return self
}
@discardableResult
public func marginRight(_ marginRight: YGValue) -> VirtualLayout {
self.marginRight = marginRight
return self
}
@discardableResult
public func marginBottom(_ marginBottom: YGValue) -> VirtualLayout {
self.marginBottom = marginBottom
return self
}
@discardableResult
public func marginStart(_ marginStart: YGValue) -> VirtualLayout {
self.marginStart = marginStart
return self
}
@discardableResult
public func marginEnd(_ marginEnd: YGValue) -> VirtualLayout {
self.marginEnd = marginEnd
return self
}
@discardableResult
public func marginHorizontal(_ marginHorizontal: YGValue) -> VirtualLayout {
self.marginHorizontal = marginHorizontal
return self
}
@discardableResult
public func marginVertical(_ marginVertical: YGValue) -> VirtualLayout {
self.marginVertical = marginVertical
return self
}
@discardableResult
public func margin(_ margin: YGValue) -> VirtualLayout {
self.margin = margin
return self
}
@discardableResult
public func paddingLeft(_ paddingLeft: YGValue) -> VirtualLayout {
self.paddingLeft = paddingLeft
return self
}
@discardableResult
public func paddingTop(_ paddingTop: YGValue) -> VirtualLayout {
self.paddingTop = paddingTop
return self
}
@discardableResult
public func paddingRight(_ paddingRight: YGValue) -> VirtualLayout {
self.paddingRight = paddingRight
return self
}
@discardableResult
public func paddingBottom(_ paddingBottom: YGValue) -> VirtualLayout {
self.paddingBottom = paddingBottom
return self
}
@discardableResult
public func paddingStart(_ paddingStart: YGValue) -> VirtualLayout {
self.paddingStart = paddingStart
return self
}
@discardableResult
public func paddingEnd(_ paddingEnd: YGValue) -> VirtualLayout {
self.paddingEnd = paddingEnd
return self
}
@discardableResult
public func paddingHorizontal(_ paddingHorizontal: YGValue) -> VirtualLayout {
self.paddingHorizontal = paddingHorizontal
return self
}
@discardableResult
public func paddingVertical(_ paddingVertical: YGValue) -> VirtualLayout {
self.paddingVertical = paddingVertical
return self
}
@discardableResult
public func padding(_ padding: YGValue) -> VirtualLayout {
self.padding = padding
return self
}
@discardableResult
public func borderLeftWidth(_ borderLeftWidth: CGFloat) -> VirtualLayout {
self.borderLeftWidth = borderLeftWidth
return self
}
@discardableResult
public func borderTopWidth(_ borderTopWidth: CGFloat) -> VirtualLayout {
self.borderTopWidth = borderTopWidth
return self
}
@discardableResult
public func borderRightWidth(_ borderRightWidth: CGFloat) -> VirtualLayout {
self.borderRightWidth = borderRightWidth
return self
}
@discardableResult
public func borderBottomWidth(_ borderBottomWidth: CGFloat) -> VirtualLayout {
self.borderBottomWidth = borderBottomWidth
return self
}
@discardableResult
public func borderStartWidth(_ borderStartWidth: CGFloat) -> VirtualLayout {
self.borderStartWidth = borderStartWidth
return self
}
@discardableResult
public func borderEndWidth(_ borderEndWidth: CGFloat) -> VirtualLayout {
self.borderEndWidth = borderEndWidth
return self
}
@discardableResult
public func borderWidth(_ borderWidth: CGFloat) -> VirtualLayout {
self.borderWidth = borderWidth
return self
}
@discardableResult
public func width(_ width: YGValue) -> VirtualLayout {
self.width = width
return self
}
@discardableResult
public func height(_ height: YGValue) -> VirtualLayout {
self.height = height
return self
}
@discardableResult
public func minWidth(_ minWidth: YGValue) -> VirtualLayout {
self.minWidth = minWidth
return self
}
@discardableResult
public func minHeight(_ minHeight: YGValue) -> VirtualLayout {
self.minHeight = minHeight
return self
}
@discardableResult
public func maxWidth(_ maxWidth: YGValue) -> VirtualLayout {
self.maxWidth = maxWidth
return self
}
@discardableResult
public func maxHeight(_ maxHeight: YGValue) -> VirtualLayout {
self.maxHeight = maxHeight
return self
}
@discardableResult
public func aspectRatio(_ aspectRatio: CGFloat) -> VirtualLayout {
self.aspectRatio = aspectRatio
return self
}
@discardableResult
public func markDirty() -> VirtualLayout {
self.dirty = true
return self
}
}
// MARK: - 用yoga可以链式调用
extension YGLayout {
@discardableResult
public func isIncludedInLayout(_ isIncludedInLayout: Bool) -> YGLayout {
self.isIncludedInLayout = isIncludedInLayout
return self
}
@discardableResult
public func isEnable(_ enabled: Bool) -> YGLayout {
self.isEnabled = enabled
return self
}
@discardableResult
public func direction(_ direction: YGDirection) -> YGLayout{
self.direction = direction
return self
}
@discardableResult
public func flexDirection(_ flexDirection: YGFlexDirection) -> YGLayout {
self.flexDirection = flexDirection
return self
}
@discardableResult
public func justifyContent(_ justifyContent: YGJustify) -> YGLayout {
self.justifyContent = justifyContent
return self
}
@discardableResult
public func alignContent(_ alignContent: YGAlign) -> YGLayout {
self.alignContent = alignContent
return self
}
@discardableResult
public func alignItems(_ alignItems: YGAlign) -> YGLayout {
self.alignItems = alignItems
return self
}
@discardableResult
public func alignSelf(_ alignSelf: YGAlign) -> YGLayout {
self.alignSelf = alignSelf
return self
}
@discardableResult
public func position(_ position: YGPositionType) -> YGLayout {
self.position = position
return self
}
@discardableResult
public func flexWrap(_ flexWrap: YGWrap) -> YGLayout {
self.flexWrap = flexWrap
return self
}
@discardableResult
public func overflow(_ overflow: YGOverflow) -> YGLayout {
self.overflow = overflow
return self
}
@discardableResult
public func display(_ display: YGDisplay) -> YGLayout {
self.display = display
return self
}
@discardableResult
public func flexGrow(_ flexGrow: CGFloat) -> YGLayout {
self.flexGrow = flexGrow
return self
}
@discardableResult
public func flexShrink(_ flexShrink: CGFloat) -> YGLayout {
self.flexShrink = flexShrink
return self
}
// @discardableResult
// public func flexBasis(_ flexBasis: YGValue) -> YGLayout {
// self.flexBasis = flexBasis
// return self
// }
@discardableResult
public func left(_ left: YGValue) -> YGLayout {
self.left = left
return self
}
@discardableResult
public func top(_ top: YGValue) -> YGLayout {
self.top = top
return self
}
@discardableResult
public func right(_ right: YGValue) -> YGLayout {
self.right = right
return self
}
@discardableResult
public func bottom(_ bottom: YGValue) -> YGLayout {
self.bottom = bottom
return self
}
@discardableResult
public func start(_ start: YGValue) -> YGLayout {
self.start = start
return self
}
@discardableResult
public func end(_ end: YGValue) -> YGLayout {
self.end = end
return self
}
@discardableResult
public func marginLeft(_ marginLeft: YGValue) -> YGLayout {
self.marginLeft = marginLeft
return self
}
@discardableResult
public func marginTop(_ marginTop: YGValue) -> YGLayout {
self.marginTop = marginTop
return self
}
@discardableResult
public func marginRight(_ marginRight: YGValue) -> YGLayout {
self.marginRight = marginRight
return self
}
@discardableResult
public func marginBottom(_ marginBottom: YGValue) -> YGLayout {
self.marginBottom = marginBottom
return self
}
@discardableResult
public func marginStart(_ marginStart: YGValue) -> YGLayout {
self.marginStart = marginStart
return self
}
@discardableResult
public func marginEnd(_ marginEnd: YGValue) -> YGLayout {
self.marginEnd = marginEnd
return self
}
@discardableResult
public func marginHorizontal(_ marginHorizontal: YGValue) -> YGLayout {
self.marginHorizontal = marginHorizontal
return self
}
@discardableResult
public func marginVertical(_ marginVertical: YGValue) -> YGLayout {
self.marginVertical = marginVertical
return self
}
@discardableResult
public func margin(_ margin: YGValue) -> YGLayout {
self.margin = margin
return self
}
@discardableResult
public func paddingLeft(_ paddingLeft: YGValue) -> YGLayout {
self.paddingLeft = paddingLeft
return self
}
@discardableResult
public func paddingTop(_ paddingTop: YGValue) -> YGLayout {
self.paddingTop = paddingTop
return self
}
@discardableResult
public func paddingRight(_ paddingRight: YGValue) -> YGLayout {
self.paddingRight = paddingRight
return self
}
@discardableResult
public func paddingBottom(_ paddingBottom: YGValue) -> YGLayout {
self.paddingBottom = paddingBottom
return self
}
@discardableResult
public func paddingStart(_ paddingStart: YGValue) -> YGLayout {
self.paddingStart = paddingStart
return self
}
@discardableResult
public func paddingEnd(_ paddingEnd: YGValue) -> YGLayout {
self.paddingEnd = paddingEnd
return self
}
@discardableResult
public func paddingHorizontal(_ paddingHorizontal: YGValue) -> YGLayout {
self.paddingHorizontal = paddingHorizontal
return self
}
@discardableResult
public func paddingVertical(_ paddingVertical: YGValue) -> YGLayout {
self.paddingVertical = paddingVertical
return self
}
@discardableResult
public func padding(_ padding: YGValue) -> YGLayout {
self.padding = padding
return self
}
@discardableResult
public func borderLeftWidth(_ borderLeftWidth: CGFloat) -> YGLayout {
self.borderLeftWidth = borderLeftWidth
return self
}
@discardableResult
public func borderTopWidth(_ borderTopWidth: CGFloat) -> YGLayout {
self.borderTopWidth = borderTopWidth
return self
}
@discardableResult
public func borderRightWidth(_ borderRightWidth: CGFloat) -> YGLayout {
self.borderRightWidth = borderRightWidth
return self
}
@discardableResult
public func borderBottomWidth(_ borderBottomWidth: CGFloat) -> YGLayout {
self.borderBottomWidth = borderBottomWidth
return self
}
@discardableResult
public func borderStartWidth(_ borderStartWidth: CGFloat) -> YGLayout {
self.borderStartWidth = borderStartWidth
return self
}
@discardableResult
public func borderEndWidth(_ borderEndWidth: CGFloat) -> YGLayout {
self.borderEndWidth = borderEndWidth
return self
}
@discardableResult
public func borderWidth(_ borderWidth: CGFloat) -> YGLayout {
self.borderWidth = borderWidth
return self
}
@discardableResult
public func width(_ width: YGValue) -> YGLayout {
self.width = width
return self
}
@discardableResult
public func height(_ height: YGValue) -> YGLayout {
self.height = height
return self
}
@discardableResult
public func minWidth(_ minWidth: YGValue) -> YGLayout {
self.minWidth = minWidth
return self
}
@discardableResult
public func minHeight(_ minHeight: YGValue) -> YGLayout {
self.minHeight = minHeight
return self
}
@discardableResult
public func maxWidth(_ maxWidth: YGValue) -> YGLayout {
self.maxWidth = maxWidth
return self
}
@discardableResult
public func maxHeight(_ maxHeight: YGValue) -> YGLayout {
self.maxHeight = maxHeight
return self
}
@discardableResult
public func aspectRatio(_ aspectRatio: CGFloat) -> YGLayout {
self.aspectRatio = aspectRatio
return self
}
}
|
[
-1
] |
aa80dd269ea30497ff44c0e58132fb0d60953538
|
bd68bdc964fd09ef2da02c4a33e997227eec7df4
|
/JSAPI/Classes/Swaggers/APIs/Reporting_UsageAPI.swift
|
c1dcdaae9d63c1a6cd23606ba8de29d815b8c7e5
|
[] |
no_license
|
knetikmedia/knetikcloud-swift-client
|
cd83b38f6326bdd07ad2635159a6e3fd169696b6
|
c85519295c8c7b9d2337f0bd429c41454c6ff929
|
refs/heads/master
| 2021-01-12T10:21:08.072254 | 2018-03-14T16:04:53 | 2018-03-14T16:04:53 | 76,425,065 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 26,913 |
swift
|
//
// Reporting_UsageAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Alamofire
public class Reporting_UsageAPI: APIBase {
/**
* enum for parameter method
*/
public enum Method_getUsageByDay: String {
case Get = "GET"
case Head = "HEAD"
case Post = "POST"
case Put = "PUT"
case Patch = "PATCH"
case Delete = "DELETE"
case Options = "OPTIONS"
case Trace = "TRACE"
}
/**
Returns aggregated endpoint usage information by day
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- parameter completion: completion handler to receive the data and the error objects
*/
public class func getUsageByDay(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByDay? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil, completion: ((data: PageResourceUsageInfo?, error: ErrorType?) -> Void)) {
getUsageByDayWithRequestBuilder(startDate: startDate, endDate: endDate, combineEndpoints: combineEndpoints, method: method, url: url, size: size, page: page).execute { (response, error) -> Void in
completion(data: response?.body, error: error);
}
}
/**
Returns aggregated endpoint usage information by day
- GET /reporting/usage/day
- <b>Permissions Needed:</b> USAGE_ADMIN
- OAuth:
- type: oauth2
- name: oauth2_client_credentials_grant
- OAuth:
- type: oauth2
- name: oauth2_password_grant
- examples: [{contentType=application/json, example={
"number" : 1,
"last" : true,
"size" : 5,
"total_elements" : 2,
"sort" : [ {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
}, {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
} ],
"total_pages" : 7,
"number_of_elements" : 5,
"content" : [ {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
}, {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
} ],
"first" : true
}}]
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- returns: RequestBuilder<PageResourceUsageInfo>
*/
public class func getUsageByDayWithRequestBuilder(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByDay? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil) -> RequestBuilder<PageResourceUsageInfo> {
let path = "/reporting/usage/day"
let URLString = JSAPIAPI.basePath + path
let nillableParameters: [String:AnyObject?] = [
"start_date": startDate.encodeToJSON(),
"end_date": endDate.encodeToJSON(),
"combine_endpoints": combineEndpoints,
"method": method?.rawValue,
"url": url,
"size": size?.encodeToJSON(),
"page": page?.encodeToJSON()
]
let parameters = APIHelper.rejectNil(nillableParameters)
let convertedParameters = APIHelper.convertBoolToString(parameters)
let requestBuilder: RequestBuilder<PageResourceUsageInfo>.Type = JSAPIAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false)
}
/**
* enum for parameter method
*/
public enum Method_getUsageByHour: String {
case Get = "GET"
case Head = "HEAD"
case Post = "POST"
case Put = "PUT"
case Patch = "PATCH"
case Delete = "DELETE"
case Options = "OPTIONS"
case Trace = "TRACE"
}
/**
Returns aggregated endpoint usage information by hour
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- parameter completion: completion handler to receive the data and the error objects
*/
public class func getUsageByHour(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByHour? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil, completion: ((data: PageResourceUsageInfo?, error: ErrorType?) -> Void)) {
getUsageByHourWithRequestBuilder(startDate: startDate, endDate: endDate, combineEndpoints: combineEndpoints, method: method, url: url, size: size, page: page).execute { (response, error) -> Void in
completion(data: response?.body, error: error);
}
}
/**
Returns aggregated endpoint usage information by hour
- GET /reporting/usage/hour
- <b>Permissions Needed:</b> USAGE_ADMIN
- OAuth:
- type: oauth2
- name: oauth2_client_credentials_grant
- OAuth:
- type: oauth2
- name: oauth2_password_grant
- examples: [{contentType=application/json, example={
"number" : 1,
"last" : true,
"size" : 5,
"total_elements" : 2,
"sort" : [ {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
}, {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
} ],
"total_pages" : 7,
"number_of_elements" : 5,
"content" : [ {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
}, {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
} ],
"first" : true
}}]
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- returns: RequestBuilder<PageResourceUsageInfo>
*/
public class func getUsageByHourWithRequestBuilder(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByHour? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil) -> RequestBuilder<PageResourceUsageInfo> {
let path = "/reporting/usage/hour"
let URLString = JSAPIAPI.basePath + path
let nillableParameters: [String:AnyObject?] = [
"start_date": startDate.encodeToJSON(),
"end_date": endDate.encodeToJSON(),
"combine_endpoints": combineEndpoints,
"method": method?.rawValue,
"url": url,
"size": size?.encodeToJSON(),
"page": page?.encodeToJSON()
]
let parameters = APIHelper.rejectNil(nillableParameters)
let convertedParameters = APIHelper.convertBoolToString(parameters)
let requestBuilder: RequestBuilder<PageResourceUsageInfo>.Type = JSAPIAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false)
}
/**
* enum for parameter method
*/
public enum Method_getUsageByMinute: String {
case Get = "GET"
case Head = "HEAD"
case Post = "POST"
case Put = "PUT"
case Patch = "PATCH"
case Delete = "DELETE"
case Options = "OPTIONS"
case Trace = "TRACE"
}
/**
Returns aggregated endpoint usage information by minute
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- parameter completion: completion handler to receive the data and the error objects
*/
public class func getUsageByMinute(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByMinute? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil, completion: ((data: PageResourceUsageInfo?, error: ErrorType?) -> Void)) {
getUsageByMinuteWithRequestBuilder(startDate: startDate, endDate: endDate, combineEndpoints: combineEndpoints, method: method, url: url, size: size, page: page).execute { (response, error) -> Void in
completion(data: response?.body, error: error);
}
}
/**
Returns aggregated endpoint usage information by minute
- GET /reporting/usage/minute
- <b>Permissions Needed:</b> USAGE_ADMIN
- OAuth:
- type: oauth2
- name: oauth2_client_credentials_grant
- OAuth:
- type: oauth2
- name: oauth2_password_grant
- examples: [{contentType=application/json, example={
"number" : 1,
"last" : true,
"size" : 5,
"total_elements" : 2,
"sort" : [ {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
}, {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
} ],
"total_pages" : 7,
"number_of_elements" : 5,
"content" : [ {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
}, {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
} ],
"first" : true
}}]
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- returns: RequestBuilder<PageResourceUsageInfo>
*/
public class func getUsageByMinuteWithRequestBuilder(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByMinute? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil) -> RequestBuilder<PageResourceUsageInfo> {
let path = "/reporting/usage/minute"
let URLString = JSAPIAPI.basePath + path
let nillableParameters: [String:AnyObject?] = [
"start_date": startDate.encodeToJSON(),
"end_date": endDate.encodeToJSON(),
"combine_endpoints": combineEndpoints,
"method": method?.rawValue,
"url": url,
"size": size?.encodeToJSON(),
"page": page?.encodeToJSON()
]
let parameters = APIHelper.rejectNil(nillableParameters)
let convertedParameters = APIHelper.convertBoolToString(parameters)
let requestBuilder: RequestBuilder<PageResourceUsageInfo>.Type = JSAPIAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false)
}
/**
* enum for parameter method
*/
public enum Method_getUsageByMonth: String {
case Get = "GET"
case Head = "HEAD"
case Post = "POST"
case Put = "PUT"
case Patch = "PATCH"
case Delete = "DELETE"
case Options = "OPTIONS"
case Trace = "TRACE"
}
/**
Returns aggregated endpoint usage information by month
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- parameter completion: completion handler to receive the data and the error objects
*/
public class func getUsageByMonth(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByMonth? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil, completion: ((data: PageResourceUsageInfo?, error: ErrorType?) -> Void)) {
getUsageByMonthWithRequestBuilder(startDate: startDate, endDate: endDate, combineEndpoints: combineEndpoints, method: method, url: url, size: size, page: page).execute { (response, error) -> Void in
completion(data: response?.body, error: error);
}
}
/**
Returns aggregated endpoint usage information by month
- GET /reporting/usage/month
- <b>Permissions Needed:</b> USAGE_ADMIN
- OAuth:
- type: oauth2
- name: oauth2_client_credentials_grant
- OAuth:
- type: oauth2
- name: oauth2_password_grant
- examples: [{contentType=application/json, example={
"number" : 1,
"last" : true,
"size" : 5,
"total_elements" : 2,
"sort" : [ {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
}, {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
} ],
"total_pages" : 7,
"number_of_elements" : 5,
"content" : [ {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
}, {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
} ],
"first" : true
}}]
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoint. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- returns: RequestBuilder<PageResourceUsageInfo>
*/
public class func getUsageByMonthWithRequestBuilder(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByMonth? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil) -> RequestBuilder<PageResourceUsageInfo> {
let path = "/reporting/usage/month"
let URLString = JSAPIAPI.basePath + path
let nillableParameters: [String:AnyObject?] = [
"start_date": startDate.encodeToJSON(),
"end_date": endDate.encodeToJSON(),
"combine_endpoints": combineEndpoints,
"method": method?.rawValue,
"url": url,
"size": size?.encodeToJSON(),
"page": page?.encodeToJSON()
]
let parameters = APIHelper.rejectNil(nillableParameters)
let convertedParameters = APIHelper.convertBoolToString(parameters)
let requestBuilder: RequestBuilder<PageResourceUsageInfo>.Type = JSAPIAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false)
}
/**
* enum for parameter method
*/
public enum Method_getUsageByYear: String {
case Get = "GET"
case Head = "HEAD"
case Post = "POST"
case Put = "PUT"
case Patch = "PATCH"
case Delete = "DELETE"
case Options = "OPTIONS"
case Trace = "TRACE"
}
/**
Returns aggregated endpoint usage information by year
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoints. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- parameter completion: completion handler to receive the data and the error objects
*/
public class func getUsageByYear(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByYear? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil, completion: ((data: PageResourceUsageInfo?, error: ErrorType?) -> Void)) {
getUsageByYearWithRequestBuilder(startDate: startDate, endDate: endDate, combineEndpoints: combineEndpoints, method: method, url: url, size: size, page: page).execute { (response, error) -> Void in
completion(data: response?.body, error: error);
}
}
/**
Returns aggregated endpoint usage information by year
- GET /reporting/usage/year
- <b>Permissions Needed:</b> USAGE_ADMIN
- OAuth:
- type: oauth2
- name: oauth2_client_credentials_grant
- OAuth:
- type: oauth2
- name: oauth2_password_grant
- examples: [{contentType=application/json, example={
"number" : 1,
"last" : true,
"size" : 5,
"total_elements" : 2,
"sort" : [ {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
}, {
"ignore_case" : true,
"null_handling" : "NATIVE",
"property" : "property",
"ascending" : true,
"descending" : true,
"direction" : "ASC"
} ],
"total_pages" : 7,
"number_of_elements" : 5,
"content" : [ {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
}, {
"date" : 6,
"method" : "method",
"count" : 0,
"url" : "url"
} ],
"first" : true
}}]
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter combineEndpoints: (query) Whether to combine counts from different endpoints. Removes the url and method from the result object (optional, default to false)
- parameter method: (query) Filter for a certain endpoint method. Must include url as well to work (optional)
- parameter url: (query) Filter for a certain endpoint. Must include method as well to work (optional)
- parameter size: (query) The number of objects returned per page (optional, default to 25)
- parameter page: (query) The number of the page returned, starting with 1 (optional, default to 1)
- returns: RequestBuilder<PageResourceUsageInfo>
*/
public class func getUsageByYearWithRequestBuilder(startDate startDate: Int64, endDate: Int64, combineEndpoints: Bool? = nil, method: Method_getUsageByYear? = nil, url: String? = nil, size: Int32? = nil, page: Int32? = nil) -> RequestBuilder<PageResourceUsageInfo> {
let path = "/reporting/usage/year"
let URLString = JSAPIAPI.basePath + path
let nillableParameters: [String:AnyObject?] = [
"start_date": startDate.encodeToJSON(),
"end_date": endDate.encodeToJSON(),
"combine_endpoints": combineEndpoints,
"method": method?.rawValue,
"url": url,
"size": size?.encodeToJSON(),
"page": page?.encodeToJSON()
]
let parameters = APIHelper.rejectNil(nillableParameters)
let convertedParameters = APIHelper.convertBoolToString(parameters)
let requestBuilder: RequestBuilder<PageResourceUsageInfo>.Type = JSAPIAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false)
}
/**
Returns list of endpoints called (method and url)
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- parameter completion: completion handler to receive the data and the error objects
*/
public class func getUsageEndpoints(startDate startDate: Int64, endDate: Int64, completion: ((data: [String]?, error: ErrorType?) -> Void)) {
getUsageEndpointsWithRequestBuilder(startDate: startDate, endDate: endDate).execute { (response, error) -> Void in
completion(data: response?.body, error: error);
}
}
/**
Returns list of endpoints called (method and url)
- GET /reporting/usage/endpoints
- <b>Permissions Needed:</b> USAGE_ADMIN
- OAuth:
- type: oauth2
- name: oauth2_client_credentials_grant
- OAuth:
- type: oauth2
- name: oauth2_password_grant
- examples: [{contentType=application/json, example=[ "", "" ]}]
- parameter startDate: (query) The beginning of the range being requested, unix timestamp in seconds
- parameter endDate: (query) The ending of the range being requested, unix timestamp in seconds
- returns: RequestBuilder<[String]>
*/
public class func getUsageEndpointsWithRequestBuilder(startDate startDate: Int64, endDate: Int64) -> RequestBuilder<[String]> {
let path = "/reporting/usage/endpoints"
let URLString = JSAPIAPI.basePath + path
let nillableParameters: [String:AnyObject?] = [
"start_date": startDate.encodeToJSON(),
"end_date": endDate.encodeToJSON()
]
let parameters = APIHelper.rejectNil(nillableParameters)
let convertedParameters = APIHelper.convertBoolToString(parameters)
let requestBuilder: RequestBuilder<[String]>.Type = JSAPIAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false)
}
}
|
[
-1
] |
95304ed0b1b39c5095f60703b449e3a9cab9affb
|
222ad3961023f358d9293620e35b353ac7c4298e
|
/client-serverVK/Modules/Friends/Friends.swift
|
239408aa902aa89c827728c48027134de43544e0
|
[] |
no_license
|
KaDenka/client-serverVK
|
a56415da30ec0c205f91c0c548aa195739f229af
|
c4af372d9ebcfd384c9967a6f380be849cd2fd1d
|
refs/heads/main
| 2023-05-31T17:20:53.326544 | 2021-06-10T07:10:33 | 2021-06-10T07:10:33 | 374,322,235 | 0 | 0 | null | 2021-06-14T16:17:33 | 2021-06-06T09:45:05 |
Swift
|
UTF-8
|
Swift
| false | false | 821 |
swift
|
//
// Friends.swift
// client-serverVK
//
// Created by Denis Kazarin on 06.06.2021.
//
import Foundation
// MARK: - Friends
struct Friends: Codable {
let response: Response
}
// MARK: - Response
struct Response: Codable {
let count: Int
let items: [User]
}
// MARK: - User
struct User: Codable {
let canAccessClosed: Bool
let online, id: Int
let nickname, lastName: String
let photo50: String
let trackCode: String
let isClosed: Bool
let firstName: String
enum CodingKeys: String, CodingKey {
case canAccessClosed = "can_access_closed"
case online, id, nickname
case lastName = "last_name"
case photo50 = "photo_50"
case trackCode = "track_code"
case isClosed = "is_closed"
case firstName = "first_name"
}
}
|
[
-1
] |
0e7884292d8573c806f3b8e9e6a0c87a9eaf524f
|
fbfd4d3473a394082c69da4852d6ad1104ba1408
|
/ViteBusiness/Classes/Business/Trading/Spot/View/SpotOrderCell.swift
|
5a1cced97e371438a24acf37375a27d1640bfae3
|
[
"MIT"
] |
permissive
|
vitelabs/vite-business-ios
|
9c92d0e2a4157e744dd7e83b414728b6b8654196
|
bc934e2e2b9f3b42139fa1351cbc8c5f277a6673
|
refs/heads/develop
| 2023-03-10T06:38:05.694422 | 2023-03-01T14:07:04 | 2023-03-01T14:07:04 | 160,796,334 | 14 | 6 |
MIT
| 2021-04-08T08:20:48 | 2018-12-07T08:43:39 |
Swift
|
UTF-8
|
Swift
| false | false | 8,458 |
swift
|
//
// SpotOrderCell.swift
// ViteBusiness
//
// Created by Stone on 2020/4/6.
//
import Foundation
class SpotOrderCell: BaseTableViewCell {
static let cellHeight: CGFloat = 85
let typeButton = UIButton().then {
$0.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.contentEdgeInsets = UIEdgeInsets(top: 0, left: 2, bottom: 0, right: 2)
$0.isUserInteractionEnabled = false
}
let tradeLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 16, weight: .semibold)
$0.textColor = UIColor(netHex: 0x24272B)
}
let quoteLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.textColor = UIColor(netHex: 0x3E4A59, alpha: 0.3)
}
let timeLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.textColor = UIColor(netHex: 0x3E4A59, alpha: 0.3)
}
let statusLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.textColor = UIColor(netHex: 0x3E4A59, alpha: 0.45)
}
let cancelButton = UIButton().then {
$0.setTitleColor(UIColor(netHex: 0x007AFF), for: .normal)
$0.setTitleColor(UIColor(netHex: 0x007AFF).highlighted, for: .highlighted)
$0.setBackgroundImage(R.image.icon_spot_order_cancel_button_frame()?.resizable, for: .normal)
$0.setBackgroundImage(R.image.icon_spot_order_cancel_button_frame()?.highlighted.resizable, for: .highlighted)
$0.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.setTitle(R.string.localizable.spotPageCellButtonCancelTitle(), for: .normal)
$0.contentEdgeInsets = UIEdgeInsets(top: 0, left: 12, bottom: 0, right: 12)
}
let volLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.textColor = UIColor(netHex: 0x3E4A59, alpha: 0.6)
}
let priceLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.textColor = UIColor(netHex: 0x3E4A59, alpha: 0.6)
}
let dealLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.textColor = UIColor(netHex: 0x3E4A59, alpha: 0.6)
}
let averageLabel = UILabel().then {
$0.font = UIFont.systemFont(ofSize: 12, weight: .regular)
$0.textColor = UIColor(netHex: 0x3E4A59, alpha: 0.6)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
contentView.addSubview(typeButton)
contentView.addSubview(tradeLabel)
contentView.addSubview(quoteLabel)
contentView.addSubview(timeLabel)
contentView.addSubview(cancelButton)
contentView.addSubview(statusLabel)
contentView.addSubview(volLabel)
contentView.addSubview(priceLabel)
contentView.addSubview(dealLabel)
contentView.addSubview(averageLabel)
let vLine = UIView().then {
$0.backgroundColor = UIColor(netHex: 0xD3DFEF)
}
addSubview(vLine)
let hLine = UIView().then {
$0.backgroundColor = UIColor(netHex: 0xD3DFEF)
}
addSubview(hLine)
typeButton.snp.makeConstraints { (m) in
m.top.equalToSuperview().offset(16)
m.left.equalToSuperview().offset(12)
}
tradeLabel.snp.makeConstraints { (m) in
m.centerY.equalTo(typeButton)
m.left.equalTo(typeButton.snp.right).offset(4)
}
quoteLabel.snp.makeConstraints { (m) in
m.centerY.equalTo(typeButton)
m.left.equalTo(tradeLabel.snp.right).offset(2)
}
vLine.snp.makeConstraints { (m) in
m.width.equalTo(CGFloat.singleLineWidth)
m.centerY.equalTo(typeButton)
m.height.equalTo(12)
m.left.equalTo(quoteLabel.snp.right).offset(6)
}
timeLabel.snp.makeConstraints { (m) in
m.centerY.equalTo(typeButton)
m.left.equalTo(vLine.snp.right).offset(6)
}
cancelButton.snp.makeConstraints { (m) in
m.centerY.equalTo(typeButton)
m.right.equalToSuperview().offset(-12)
}
statusLabel.snp.makeConstraints { (m) in
m.centerY.equalTo(typeButton)
m.right.equalToSuperview().offset(-12)
}
volLabel.snp.makeConstraints { (m) in
m.top.equalTo(typeButton.snp.bottom).offset(7)
m.left.equalToSuperview().offset(12)
}
priceLabel.snp.makeConstraints { (m) in
m.top.equalTo(typeButton.snp.bottom).offset(7)
m.left.equalTo(contentView.snp.centerX)
}
dealLabel.snp.makeConstraints { (m) in
m.top.equalTo(volLabel.snp.bottom).offset(6)
m.left.equalToSuperview().offset(12)
}
averageLabel.snp.makeConstraints { (m) in
m.top.equalTo(priceLabel.snp.bottom).offset(6)
m.left.equalTo(contentView.snp.centerX)
}
hLine.snp.makeConstraints { (m) in
m.height.equalTo(CGFloat.singleLineWidth)
m.bottom.equalToSuperview()
m.left.right.equalToSuperview().inset(12)
}
cancelButton.rx.tap.bind { [weak self] in
guard let orderId = self?.orderId else { return }
guard let tradeTokenId = self?.tradeTokenId else { return }
Workflow.dexCancelOrderWithConfirm(account: HDWalletManager.instance.account!,
tradeTokenId: tradeTokenId,
orderId: orderId) { (r) in
if case .success = r {
}
}
}.disposed(by: rx.disposeBag)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var orderId: String?
var tradeTokenInfo: TokenInfo?
var tradeTokenId: String?
}
extension SpotOrderCell {
func bind(_ item: MarketOrder, showCancelButton: Bool) {
self.orderId = item.orderId
self.tradeTokenId = item.tradeToken
let isBuy = (item.side == 0)
if isBuy {
typeButton.setTitle(R.string.localizable.spotPageCellTypeBuy(), for: .normal)
typeButton.setTitleColor(UIColor(netHex: 0x01D764), for: .normal)
typeButton.backgroundColor = UIColor(netHex: 0x01D764, alpha: 0.1)
} else {
typeButton.setTitle(R.string.localizable.spotPageCellTypeSell(), for: .normal)
typeButton.setTitleColor(UIColor(netHex: 0xE5494D), for: .normal)
typeButton.backgroundColor = UIColor(netHex: 0xE5494D, alpha: 0.1)
}
if showCancelButton {
statusLabel.isHidden = true
cancelButton.isHidden = false
} else {
statusLabel.isHidden = false
cancelButton.isHidden = true
switch item.status {
case .open:
statusLabel.text = R.string.localizable.spotHistoryPageFilterStatusOpen()
case .closed:
statusLabel.text = R.string.localizable.spotHistoryPageFilterStatusCompleted()
case .canceled:
statusLabel.text = R.string.localizable.spotHistoryPageFilterStatusCanceled()
case .failed:
statusLabel.text = R.string.localizable.spotHistoryPageFilterStatusFailed()
}
}
tradeLabel.text = item.tradeTokenSymbol
quoteLabel.text = "/\(item.quoteTokenSymbol)"
timeLabel.text = Date(timeIntervalSince1970: TimeInterval(item.createTime)).format()
volLabel.text = R.string.localizable.spotPageCellVol("\(item.quantity) \(item.tradeTokenSymbolWithoutIndex)")
priceLabel.text = R.string.localizable.spotPageCellPrice("\(item.price) \(item.quoteTokenSymbolWithoutIndex)")
dealLabel.text = R.string.localizable.spotPageCellDeal("\(item.executedQuantity) \(item.tradeTokenSymbolWithoutIndex)")
averageLabel.text = R.string.localizable.spotPageCellAverage("\(item.executedAvgPrice) \(item.quoteTokenSymbolWithoutIndex)")
}
}
|
[
-1
] |
25d17f12d3023c930676f604995d5529978b293d
|
a9d7f7c9d448ac5c00654c652c34d4e9a804c9b1
|
/PrayerTime/Networking/Service/GeoNameService.swift
|
3eaa2fb2bba66752cb705d455032f7e577f97f73
|
[] |
no_license
|
Sheikh-AhmedJU/PrayerTime
|
98a0e8bd84f0f71cd2e0ebdb2f369ea107a1e884
|
9868819edc094ac422d1db7865a80caf71b36247
|
refs/heads/master
| 2022-11-26T23:24:31.697072 | 2020-08-02T04:34:16 | 2020-08-02T04:34:16 | 276,494,598 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,653 |
swift
|
//
// GeoNameService.swift
// PrayerTime
//
// Created by Sheikh Ahmed on 26/05/2020.
// Copyright © 2020 Sheikh Ahmed. All rights reserved.
//
import SwiftUI
protocol GeoNameServiceType: class {
func getTimeZone(latitude: Double, longitude: Double, completion: @escaping(Result<TimeZoneModel?,APIError>)-> Void)
func getLocations(searchString: String, numberOfResults: Int, completion: @escaping (Result<SuggestedLocationModel?, APIError>) -> Void)
func getGeoLocation(latitude: Double, longitude: Double, completion: @escaping(Result<SuggestedLocationModel?,APIError>)-> Void)
}
class GeoNameService: GeoNameServiceType{
var requestManager: RequestManagerType = RequestManager()
func getTimeZone(latitude: Double, longitude: Double, completion: @escaping (Result<TimeZoneModel?, APIError>) -> Void) {
let resource = GeoTimeZoneResource(latitude: latitude, longitude: longitude, userName: GlobalConstants.GeoUserName)
guard let request = try? resource.makeRequest() else { return }
// print(request.url)
requestManager.fetch(with: request, decode: {
json -> TimeZoneModel? in
guard let model = json as? TimeZoneModel else { return nil }
return model
}, completion: completion)
}
func getLocations(searchString: String, numberOfResults: Int, completion: @escaping (Result<SuggestedLocationModel?, APIError>) -> Void) {
let resource = GeoLocationResource(locationName: searchString, userName: GlobalConstants.GeoUserName, numberOfResults: numberOfResults)
guard let request = try? resource.makeRequest() else {return}
// print(request.url)
requestManager.fetch(with: request, decode: {
json -> SuggestedLocationModel? in
guard let model = json as? SuggestedLocationModel else { return nil}
return model
}, completion: completion)
}
func getGeoLocation(latitude: Double, longitude: Double, completion: @escaping (Result<SuggestedLocationModel?, APIError>) -> Void) {
let resource = ReverseGeoLocationResource(latitude: latitude, longitude: longitude, userName: GlobalConstants.GeoUserName)
guard let request = try? resource.makeRequest() else {return}
// print(request.url)
requestManager.fetch(with: request, decode: {
json -> SuggestedLocationModel? in
guard let model = json as? SuggestedLocationModel else { return nil}
return model
}, completion: completion)
}
}
|
[
-1
] |
7458c76d605a228e95d4a68e4e669cc9d6ee6a0c
|
2cb3b7226074b066d0861456c42d33af0418343d
|
/Movie review/FirstViewController.swift
|
9d603a90dbf1098b1f6c9ff4e90acbd8713de253
|
[
"Apache-2.0"
] |
permissive
|
zhengwu123/flicks
|
3073a0afa964615d657cc18262bc851b9f7e5139
|
8bceae355d568339efe6e97cacdf9c0cf8f3d829
|
refs/heads/master
| 2021-01-12T00:57:09.001047 | 2017-02-13T20:34:53 | 2017-02-13T20:34:53 | 78,319,444 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 10,978 |
swift
|
//
// FirstViewController.swift
// Movie review
//
// Created by New on 1/5/16.
// Copyright © 2016 New. All rights reserved.
//
import UIKit
import AFNetworking
//import EZLoadingActivity
class FirstViewController: UIViewController, UITableViewDataSource,UITableViewDelegate, UISearchBarDelegate
{ var filteredMovies = [NSDictionary]()
var searchController = UISearchController()
var refreshControl = UIRefreshControl()
@IBOutlet var imageOut: UIImageView!
var detailedView = detialViewController()
var movies: [NSDictionary]?
@IBOutlet var tableView: UITableView!
@IBOutlet var movietitle: UILabel!
var isSearching = false
@IBOutlet var progressView: UIProgressView!
var movietitleText = ""
var relasedate = ""
var popularity : NSNumber!
var vote_average : NSNumber!
var votecount : NSNumber!
var overview = ""
var posterPath = ""
var baseURL = ""
var imageURL :URL!
var progressBarTimer:Timer!
@IBOutlet var searchBar: UISearchBar!
override func viewDidLoad() {
super.viewDidLoad()
self.progressBarTimer = Timer.scheduledTimer(timeInterval: 0.2, target: self, selector: Selector(("updateProgressBar")), userInfo: nil, repeats: true)
//EZLoadingActivity.show("Loading...", disableUI: true)
self.tabBarController?.tabBar.backgroundColor = UIColor.blue
self.tabBarController?.tabBar.tintColor = UIColor.brown
tableView.dataSource = self
tableView.delegate = self
searchBar.delegate = self
// check internet
if Reachability.isConnectedToNetwork() == true {
print("Internet connection OK")
} else {
print("Internet connection FAILED")
let alert = UIAlertView(title: "No Internet Connection", message: "Make sure your device is connected to the internet.", delegate: nil, cancelButtonTitle: "OK")
alert.show()
}
retriveData()
refreshControl = UIRefreshControl()
refreshControl.attributedTitle = NSAttributedString(string: "Pull to refresh")
self.tableView.addSubview(refreshControl)
refreshControl.addTarget(self, action: #selector(FirstViewController.reload), for: UIControlEvents.valueChanged)
}
func updateProgressBar(){
self.progressView.progress += 0.1
if(self.progressView.progress == 1.0)
{
self.progressView.removeFromSuperview()
}
}
override func viewDidDisappear(_ animated: Bool) {
retriveData()
}
func retriveData(){
// retrieve data from internet
let apiKey = "a07e22bc18f5cb106bfe4cc1f83ad8ed"
let url = URL(string:"https://api.themoviedb.org/3/movie/now_playing?api_key=\(apiKey)")
let request = URLRequest(url: url!)
let session = URLSession(
configuration: URLSessionConfiguration.default,
delegate:nil,
delegateQueue:OperationQueue.main
)
let task : URLSessionDataTask = session.dataTask(with: request,
completionHandler: { (dataOrNil, response, error) in
if let data = dataOrNil {
if let responseDictionary = try! JSONSerialization.jsonObject(
with: data, options:[]) as? NSDictionary {
NSLog("response: \(responseDictionary)")
self.movies = responseDictionary["results"] as? [NSDictionary]
self.filteredMovies = self.movies!
self.tableView.reloadData()
}
}
});
task.resume()
}
func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
searchBar.showsCancelButton = false
searchBar.text = ""
searchBar.resignFirstResponder()
isSearching = false
// Show all movies again
filteredMovies = movies!
tableView.reloadData()
}
/* func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
let textInput: String = searchBar.text!
for i in( 0..<movies!.count) {
let movie = movies?[i]
let movieName = movie?["title"] as! String
let filteredMovieName = movieName.substring(to: movieName.characters.index(movieName.startIndex, offsetBy: textInput.characters.count))
if (textInput == filteredMovieName) {
continue
} else {
self.movies?.remove(at: i)
}
}
self.tableView.reloadData()
if searchBar.text! == "" {
retriveData()
}
}*/ func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
filteredMovies = (searchText.isEmpty ? movies : movies?.filter({(movie: NSDictionary) -> Bool in
// If dataItem matches the searchText, return true to include it
let title = movie["title"] as! String
return title.range(of: searchText, options: .caseInsensitive) != nil
}))!
//self.lowResolutionImages = [UIImage?](repeating: nil, count: (filteredMovies?.count)!)
//self.highResolutionImages = [UIImage?](repeating: nil, count: (filteredMovies?.count)!)
// Reload the collectionView now that there is new data
self.tableView.reloadData()
}
func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) {
self.searchBar.showsCancelButton = true
isSearching = true
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int{
if (tableView == self.searchDisplayController?.searchResultsTableView)
{
}
else{
if filteredMovies.count != nil{
return filteredMovies.count
}
}
return 0
}
func reload(){
self.tableView.reloadData()
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
//EZLoadingActivity.hide(success: true, animated: false)
let cell = tableView.dequeueReusableCell(withIdentifier: "movieCell") as! movieCellController
let movie = filteredMovies[indexPath.row]
let title = movie["title"] as! String
let overview = movie["overview"] as! String
let posterPath = movie["poster_path"] as! String
let baseURL = "http://image.tmdb.org/t/p/w500"
let imageURL = URL(string: baseURL + posterPath)
// cell.imageOut.setImageWithURL(imageURL!)
// cell.imageOut
cell.titleLabel.text = title
cell.DescriptionTextArea.text = overview
let imageUrl = imageURL
let imageRequest = URLRequest(url:imageUrl! )
cell.imageOut.setImageWith(
imageRequest,
placeholderImage: nil,
success: { (imageRequest, imageResponse, image) -> Void in
// imageResponse will be nil if the image is cached
if imageResponse != nil {
print("Image was NOT cached, fade in image")
cell.imageOut.alpha = 0.0
cell.imageOut.image = image
UIView.animate(withDuration: 0.3, animations: { () -> Void in
cell.imageOut.alpha = 1.0
})
} else {
print("Image was cached so just update the image")
cell.imageOut.image = image
}
},
failure: { (imageRequest, imageResponse, error) -> Void in
// do something for the failure condition
})
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let movie = filteredMovies[indexPath.row]
movietitleText = movie["title"] as! String
relasedate = movie["release_date"] as! String
popularity = movie["popularity"] as! NSNumber
vote_average = movie["vote_average"] as! NSNumber
votecount = movie["vote_count"] as! NSNumber
overview = movie["overview"] as! String
posterPath = movie["poster_path"] as! String
baseURL = "http://image.tmdb.org/t/p/w500"
imageURL = URL(string: baseURL + posterPath)!
// detailedView.releaseDate.text = "Release Date: " + relasedate
// detailedView.popularityLabel.text = "Popularity: " + s
// detailedView.vote_averageLabel.text = "Vote Average: " + s_average
// let s_average:String = String(format:"%.2f", vote_average.doubleValue)
// let s:String = String(format:"%.2f", popularity.doubleValue)
// let s_count:String = String(format:"%f", votecount.doubleValue)
// self.voteCountLabel.text = "Vote Count: " + s_count
// self.detailedLabel.text = "10000"
// self.movietitle.text = movietitleText
self.performSegue(withIdentifier: "toDetail", sender: self)
// print(movietitle)
// print(popularity)
// print(relasedate)
// print(vote_average)
// print(overview)
//print(detialViewController().releaseDate.text)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "toDetail" {
let detialViewControllerInstance = segue.destination as! detialViewController
detialViewControllerInstance.detailedLabelText = overview
detialViewControllerInstance.DetailImageURL = imageURL
detialViewControllerInstance.movieTitleText = movietitleText
let s_popularity:String = "Popularity: " + String(format:"%.2f", popularity.doubleValue)
detialViewControllerInstance.popularityLabelText = s_popularity
let s_count:String = "Vote Count: " + String(format:"%d", votecount.int32Value)
detialViewControllerInstance.voteCountLabelText = s_count
detialViewControllerInstance.releaseDateText = relasedate
let s_average:String = "Vote Average: " + String(format:"%.2f", vote_average.doubleValue)
detialViewControllerInstance.vote_averageLabelText = s_average
}
}
}
|
[
-1
] |
bddb2d8e9aa2694de1ead078ec4fd782597be5c1
|
44d6f6fb169d326ffd78cc7b3da9955460b23899
|
/Yelp/Filters.swift
|
c239eb18c4dc2329c93ab759f4ae355095db533c
|
[
"Apache-2.0"
] |
permissive
|
andrewduck/Yelp
|
28334efbd5714b382b4fa9ef38334fa57b1dc8a7
|
49c384b61d8c1535b4c50bb776ea8c0afdf9f270
|
refs/heads/master
| 2021-01-10T13:46:00.393168 | 2016-03-24T17:31:37 | 2016-03-24T17:31:37 | 54,660,118 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 11,667 |
swift
|
//
// Filters.swift
// Yelp
//
// Created by Andrew Duck on 19/3/16.
//
// Heavily inspired by Jerry Su
//
import UIKit
class Filters {
var filters = [
FilterItem(
label: "Offering a Deal",
options: [
FilterOption(label: "Offering a deal", name: "deals_filter", value: "1")
],
type: .Switch
),
FilterItem(
label: "Distance",
name: "radius_filter",
options: [
FilterOption(label: "Auto", value: "", selected: true),
FilterOption(label: "500 m", value: "500"),
FilterOption(label: "1 km", value: "1000"),
FilterOption(label: "5 km", value: "5000"),
FilterOption(label: "10 km", value: "10000"),
],
type: .SingleChoice
),
FilterItem(
label: "Sort By",
name: "sort",
options: [
FilterOption(label: "Best Match", value: "0", selected: true),
FilterOption(label: "Distance", value: "1"),
FilterOption(label: "Rating", value: "2"),
],
type: .SingleChoice
),
FilterItem(
label: "Category",
name: "categories",
options: [
FilterOption(label: "Afghan", value: "afghani"),
FilterOption(label: "African", value: "african"),
FilterOption(label: "American (New)", value: "newamerican"),
FilterOption(label: "American (Traditional)", value: "tradamerican"),
FilterOption(label: "Arabian", value: "arabian"),
FilterOption(label: "Argentine", value: "argentine"),
FilterOption(label: "Armenian", value: "armenian"),
FilterOption(label: "Asian Fusion", value: "asianfusion"),
FilterOption(label: "Australian", value: "australian"),
FilterOption(label: "Austrian", value: "austrian"),
FilterOption(label: "Bangladeshi", value: "bangladeshi"),
FilterOption(label: "Barbeque", value: "bbq"),
FilterOption(label: "Basque", value: "basque"),
FilterOption(label: "Belgian", value: "belgian"),
FilterOption(label: "Brasseries", value: "brasseries"),
FilterOption(label: "Brazilian", value: "brazilian"),
FilterOption(label: "Breakfast & Brunch", value: "breakfast_brunch"),
FilterOption(label: "British", value: "british"),
FilterOption(label: "Buffets", value: "buffets"),
FilterOption(label: "Burgers", value: "burgers"),
FilterOption(label: "Burmese", value: "burmese"),
FilterOption(label: "Cafes", value: "cafes"),
FilterOption(label: "Cafeteria", value: "cafeteria"),
FilterOption(label: "Cajun/Creole", value: "cajun"),
FilterOption(label: "Cambodian", value: "cambodian"),
FilterOption(label: "Caribbean", value: "caribbean"),
FilterOption(label: "Catalan", value: "catalan"),
FilterOption(label: "Cheesesteaks", value: "cheesesteaks"),
FilterOption(label: "Chicken Wings", value: "chicken_wings"),
FilterOption(label: "Chinese", value: "chinese"),
FilterOption(label: "Comfort Food", value: "comfortfood"),
FilterOption(label: "Creperies", value: "creperies"),
FilterOption(label: "Cuban", value: "cuban"),
FilterOption(label: "Czech", value: "czech"),
FilterOption(label: "Delis", value: "delis"),
FilterOption(label: "Diners", value: "diners"),
FilterOption(label: "Ethiopian", value: "ethiopian"),
FilterOption(label: "Fast Food", value: "hotdogs"),
FilterOption(label: "Filipino", value: "filipino"),
FilterOption(label: "Fish & Chips", value: "fishnchips"),
FilterOption(label: "Fondue", value: "fondue"),
FilterOption(label: "Food Court", value: "food_court"),
FilterOption(label: "Food Stands", value: "foodstands"),
FilterOption(label: "French", value: "french"),
FilterOption(label: "Gastropubs", value: "gastropubs"),
FilterOption(label: "German", value: "german"),
FilterOption(label: "Gluten-Free", value: "gluten_free"),
FilterOption(label: "Greek", value: "greek"),
FilterOption(label: "Halal", value: "halal"),
FilterOption(label: "Hawaiian", value: "hawaiian"),
FilterOption(label: "Himalayan/Nepalese", value: "himalayan"),
FilterOption(label: "Hot Dogs", value: "hotdog"),
FilterOption(label: "Hot Pot", value: "hotpot"),
FilterOption(label: "Hungarian", value: "hungarian"),
FilterOption(label: "Iberian", value: "iberian"),
FilterOption(label: "Indian", value: "indpak"),
FilterOption(label: "Indonesian", value: "indonesian"),
FilterOption(label: "Irish", value: "irish"),
FilterOption(label: "Italian", value: "italian"),
FilterOption(label: "Japanese", value: "japanese"),
FilterOption(label: "Korean", value: "korean"),
FilterOption(label: "Kosher", value: "kosher"),
FilterOption(label: "Laotian", value: "laotian"),
FilterOption(label: "Latin American", value: "latin"),
FilterOption(label: "Live/Raw Food", value: "raw_food"),
FilterOption(label: "Malaysian", value: "malaysian"),
FilterOption(label: "Mediterranean", value: "mediterranean"),
FilterOption(label: "Mexican", value: "mexican"),
FilterOption(label: "Middle Eastern", value: "mideastern"),
FilterOption(label: "Modern European", value: "modern_european"),
FilterOption(label: "Mongolian", value: "mongolian"),
FilterOption(label: "Moroccan", value: "moroccan"),
FilterOption(label: "Pakistani", value: "pakistani"),
FilterOption(label: "Persian/Iranian", value: "persian"),
FilterOption(label: "Peruvian", value: "peruvian"),
FilterOption(label: "Pizza", value: "pizza"),
FilterOption(label: "Polish", value: "polish"),
FilterOption(label: "Portuguese", value: "portuguese"),
FilterOption(label: "Russian", value: "russian"),
FilterOption(label: "Salad", value: "salad"),
FilterOption(label: "Sandwiches", value: "sandwiches"),
FilterOption(label: "Scandinavian", value: "scandinavian"),
FilterOption(label: "Scottish", value: "scottish"),
FilterOption(label: "Seafood", value: "seafood"),
FilterOption(label: "Singaporean", value: "singaporean"),
FilterOption(label: "Slovakian", value: "slovakian"),
FilterOption(label: "Soul Food", value: "soulfood"),
FilterOption(label: "Soup", value: "soup"),
FilterOption(label: "Southern", value: "southern"),
FilterOption(label: "Spanish", value: "spanish"),
FilterOption(label: "Steakhouses", value: "steak"),
FilterOption(label: "Sushi Bars", value: "sushi"),
FilterOption(label: "Taiwanese", value: "taiwanese"),
FilterOption(label: "Tapas Bars", value: "tapas"),
FilterOption(label: "Tapas/Small Plates", value: "tapasmallplates"),
FilterOption(label: "Tex-Mex", value: "tex-mex"),
FilterOption(label: "Thai", value: "thai"),
FilterOption(label: "Turkish", value: "turkish"),
FilterOption(label: "Ukrainian", value: "ukrainian"),
FilterOption(label: "Uzbek", value: "uzbek"),
FilterOption(label: "Vegan", value: "vegan"),
FilterOption(label: "Vegetarian", value: "vegetarian"),
FilterOption(label: "Vietnamese", value: "vietnamese")
],
type: .MultiChoice
)
]
static let sharedInstance = Filters()
private init() {}
func copyStateFrom(instance: Filters) {
for filter in 0 ..< self.filters.count {
for option in 0 ..< self.filters[filter].options.count {
self.filters[filter].options[option].selected = instance.filters[filter].options[option].selected
}
}
}
var parameters: Dictionary<String, String> {
get {
var parameters = Dictionary<String, String>()
for filter in self.filters {
switch filter.type {
case .SingleChoice:
if filter.name != nil {
let selectedOption = filter.options[filter.selectedIndex]
if selectedOption.value != "" {
parameters[filter.name!] = selectedOption.value
}
}
case .MultiChoice:
if filter.name != nil {
let selectedOptions = filter.selectedOptions
if selectedOptions.count > 0 {
parameters[filter.name!] = selectedOptions.map({ $0.value }).joinWithSeparator(",")
}
}
case .Switch:
for option in filter.options {
if option.selected && option.name != nil && option.value != "" {
parameters[option.name!] = option.value
}
}
}
}
return parameters
}
}
}
class FilterItem {
var label: String
var name: String?
var options: Array<FilterOption>
var type: FilterType
var opened: Bool = false
init(label: String, name: String? = nil, options: Array<FilterOption>, type: FilterType) {
self.label = label
self.name = name
self.options = options
self.type = type
}
var selectedIndex: Int {
get {
for i in 0 ..< self.options.count {
if self.options[i].selected {
return i
}
}
return -1
}
set {
if self.type == .SingleChoice {
self.options[self.selectedIndex].selected = false
}
self.options[newValue].selected = true
}
}
var selectedOptions: Array<FilterOption> {
get {
var options: Array<FilterOption> = []
for option in self.options {
if option.selected {
options.append(option)
}
}
return options
}
}
}
enum FilterType {
case Switch, SingleChoice, MultiChoice
}
class FilterOption {
var label: String
var name: String?
var value: String
var selected: Bool
init(label: String, name: String? = nil, value: String, selected: Bool = false) {
self.label = label
self.name = name
self.value = value
self.selected = selected
}
}
|
[
-1
] |
1cc180120eebf69bf85b1a1828095402070faa99
|
11c0202a01a84742e4afaeb7663a3e15c3afbf00
|
/CrossTalk/ToolbarView.swift
|
a03966c5b9668ee71becf970596a1f6a48af731f
|
[] |
no_license
|
DFilippov/CrossTalk
|
a2577d42d6d316f9b4bb676d756a27ce46968d55
|
4d605b8c1e4a072d0545c0eb31f23816b27f7648
|
refs/heads/master
| 2023-03-30T03:32:02.817577 | 2021-04-05T09:06:06 | 2021-04-05T09:06:06 | 354,777,079 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,637 |
swift
|
//
// ToolbarView.swift
// CrossTalk
//
// Created by Дмитрий Ф on 17/06/2020.
// Copyright © 2020 Дмитрий Ф. All rights reserved.
//
import SwiftUI
struct ToolbarView: View {
@EnvironmentObject private var viewModel: ChatViewModel
@Binding var showActionSheet: Bool
var body: some View {
HStack {
Button(action: {
self.showActionSheet = true
}) {
Image(systemName: "square.and.arrow.up")
}
.padding(.horizontal, 8)
TextField(viewModel.appState.notConnected ? "Inactive" : "Add message",
text: $viewModel.newMessageText)
.textFieldStyle(RoundedBorderTextFieldStyle())
.disabled(viewModel.appState.notConnected)
Button(action: {
self.viewModel.clear()
}) {
Image(systemName: "xmark.circle")
.disabled(viewModel.newMessageTextIsEmpty)
}
Button(action: {
self.viewModel.send()
}) {
Image(systemName: "paperplane")
}
.disabled(viewModel.newMessageTextIsEmpty)
.padding(.horizontal, 8)
}
}
}
struct ToolbarView_Previews: PreviewProvider {
static var previews: some View {
ToolbarView(showActionSheet: .constant(false))
.environmentObject(ChatViewModel())
.previewLayout(.sizeThatFits) // previews only this view - ToolbarView (without rendering the whole device)
}
}
|
[
-1
] |
4cf92d00a2aab485d7af2b392df29807118bacf4
|
550b428e3dd23e75a24f621038804b56b3b7ee72
|
/Performances/Scenes/Performer/SearchPerformersViewController.swift
|
3eeb0eeb0f39d7ee26cc1905130586dd760f2b39
|
[] |
no_license
|
nashysolutions/RecordsDemo1
|
7a59194ab58ca96bbc08bf7960b2463dde4aa24f
|
30bcc27ba063a1ac29c9fde1795aa36a954dc3a9
|
refs/heads/master
| 2023-04-18T12:15:34.017072 | 2021-05-01T11:10:17 | 2021-05-01T11:10:17 | 363,368,452 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,408 |
swift
|
import UIKit
import Records
/// Searching without fetchedResultsController
final class SearchPerformersViewController: UIViewController, UITableViewDataSource, UITextFieldDelegate {
private let context = Storage.sharedInstance.persistentContainer.viewContext
@IBOutlet private weak var tableView: PerformerTableView! {
didSet {
tableView.dataSource = self
}
}
@IBOutlet private weak var footerLabel: UILabel! {
didSet {
do {
let storedRecord: Performer? = try Performer.fetchFirst(in: context)
guard let performer = storedRecord else {
preconditionFailure(message4)
}
footerLabel.text = "Example: \"\(performer.firstName)\""
} catch {
fatalError(message1)
}
}
}
override func viewDidLoad() {
super.viewDidLoad()
title = "Performers"
}
private var performers: [Performer] = [] {
didSet {
tableView.reloadData()
}
}
@IBOutlet private weak var textField: UITextField!
@IBAction func searchButtonPressed(_ sender: UIButton) {
textField.resignFirstResponder()
performers = search()
}
private func search() -> [Performer] {
let text = textField.text ?? ""
let param = StringParameter(candidate: text, match: .beginningWith)
let query = Performer.Query(firstName: param)
do {
return try query.all(in: context)
} catch {
fatalError(message1)
}
}
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return performers.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard let tableView = tableView as? PerformerTableView else {
fatalError("Must have PerformerTableView here.")
}
let performer = performers[indexPath.row]
return tableView.dequeue(at: indexPath, for: performer)
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.resignFirstResponder()
performers = search()
return true
}
}
|
[
-1
] |
c001a163518940994210d08fb2c767a6959ba7f6
|
948b4c398601718d62cf63f0b6c3661da7bad082
|
/ArtBookProject/ArtBookProject/AppDelegate.swift
|
d492e8c4ccf67349af26792c49e8b06b1e7a06ac
|
[] |
no_license
|
evantilley/UIKit_Class
|
3b543a453ee36fa89fa947e527470561fa90e40f
|
61f0234bbe487c37d57929fd91fbbf59bfbd2b74
|
refs/heads/master
| 2020-12-03T10:59:14.929647 | 2020-01-04T01:52:50 | 2020-01-04T01:52:50 | 231,290,767 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,714 |
swift
|
//
// AppDelegate.swift
// ArtBookProject
//
// Created by Evan Tilley on 1/3/20.
// Copyright © 2020 Evan Tilley. All rights reserved.
//
import UIKit
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
// MARK: - Core Data stack
lazy var persistentContainer: NSPersistentContainer = {
/*
The persistent container for the application. This implementation
creates and returns a container, having loaded the store for the
application to it. This property is optional since there are legitimate
error conditions that could cause the creation of the store to fail.
*/
let container = NSPersistentContainer(name: "ArtBookProject")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
/*
Typical reasons for an error here include:
* The parent directory does not exist, cannot be created, or disallows writing.
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
* The device is out of space.
* The store could not be migrated to the current model version.
Check the error message to determine what the actual problem was.
*/
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
return container
}()
// MARK: - Core Data Saving support
func saveContext () {
let context = persistentContainer.viewContext
if context.hasChanges {
do {
try context.save()
} catch {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
}
}
}
}
|
[
199680,
379906,
253443,
418820,
328199,
249351,
384007,
379914,
377866,
372747,
199180,
326668,
329233,
349202,
186387,
350738,
262677,
330774,
324121,
245274,
377371,
345630,
340511,
384032,
362529,
349738,
394795,
404523,
245293,
262701,
349744,
361524,
337975,
343609,
375867,
333373,
418366,
152127,
339009,
413250,
214087,
352840,
377930,
337994,
370253,
330319,
200784,
173647,
436306,
333395,
244308,
374358,
329815,
254042,
402522,
326239,
322658,
340579,
244329,
333422,
349295,
204400,
173169,
339571,
330868,
344693,
268921,
343167,
192639,
344707,
330884,
336516,
266374,
385670,
346768,
268434,
409236,
336548,
333988,
356520,
377001,
379048,
361644,
402614,
361655,
325308,
339132,
343231,
403138,
337092,
244933,
322758,
337606,
367816,
257738,
342736,
245460,
257751,
385242,
366300,
165085,
350433,
345826,
328931,
395495,
363755,
343276,
346348,
338158,
325358,
212722,
251122,
350453,
338679,
393465,
351482,
264961,
115972,
268552,
346890,
362251,
328460,
336139,
333074,
356628,
257814,
333592,
397084,
342813,
362272,
257824,
377120,
334631,
336680,
389416,
384298,
254252,
204589,
271150,
366383,
328497,
257842,
339768,
326969,
257852,
384828,
386365,
204606,
375615,
339792,
358737,
389970,
361299,
155476,
366931,
330584,
361305,
257880,
362843,
429406,
374112,
353633,
439137,
355184,
361333,
332156,
337277,
245120,
260992,
389506,
380802,
264583,
337290,
155020,
348565,
337813,
250262,
155044,
333221,
373671,
333736,
252845,
356781,
288174,
370610,
268210,
210356,
342452,
370102,
338362,
327612,
358335,
380352,
201157,
333766,
393670,
339400,
349128,
347081,
358347,
187334,
336325,
272848,
379856,
155603,
219091,
399317,
249302,
379863,
372697,
155102,
329182,
182754,
360429,
338927,
330224,
379895,
201723,
257020,
254461
] |
b975974b026ca0ea9089c068fb4fb56c97f7ee29
|
8741bac72c4ebc1465062c65c9567e41b9d2f254
|
/architecture-MVVM/architecture-MVVM/AppDelegate.swift
|
61cf5dc6120bd9f686725596340bb32710398c4d
|
[] |
no_license
|
t2421/ios-prototypes
|
feae005db60cf2f99f3e5e876a423806c9373034
|
d29feae527e3f6ea8f1034f6557765a32aabb711
|
refs/heads/master
| 2020-05-02T02:10:57.316671 | 2019-03-26T11:35:58 | 2019-03-26T11:35:58 | 177,698,952 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,189 |
swift
|
//
// AppDelegate.swift
// architecture-MVVM
//
// Created by taigakiyotaki on 2019/03/26.
// Copyright © 2019 taigakiyotaki. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
|
[
229380,
229383,
229385,
278539,
294924,
229388,
278542,
327695,
229391,
278545,
229394,
278548,
229397,
229399,
229402,
352284,
278556,
229405,
278559,
229408,
294950,
229415,
229417,
327722,
237613,
229422,
360496,
229426,
237618,
229428,
311349,
286774,
286776,
319544,
286778,
204856,
229432,
286791,
237640,
286797,
278605,
311375,
163920,
237646,
196692,
319573,
311383,
278623,
278626,
319590,
311400,
278635,
303212,
278639,
131192,
278648,
237693,
303230,
327814,
303241,
131209,
417930,
303244,
311436,
319633,
286873,
286876,
311460,
311469,
32944,
327862,
286906,
327866,
180413,
286910,
131264,
286916,
286922,
286924,
286926,
319694,
286928,
131281,
278743,
278747,
295133,
155872,
319716,
237807,
303345,
286962,
303347,
131314,
229622,
327930,
278781,
278783,
278785,
237826,
319751,
278792,
286987,
319757,
311569,
286999,
319770,
287003,
287006,
287009,
287012,
287014,
287016,
287019,
311598,
287023,
262448,
311601,
295220,
287032,
155966,
319809,
319810,
278849,
319814,
311623,
319818,
311628,
229709,
319822,
287054,
278865,
229717,
196963,
196969,
139638,
213367,
106872,
319872,
311683,
319879,
311693,
65943,
319898,
311719,
278952,
139689,
278957,
311728,
278967,
180668,
311741,
278975,
319938,
278980,
98756,
278983,
319945,
278986,
319947,
278990,
278994,
311767,
279003,
279006,
188895,
172512,
287202,
279010,
279015,
172520,
319978,
279020,
172526,
311791,
279023,
172529,
279027,
319989,
172534,
180727,
164343,
279035,
311804,
287230,
279040,
303617,
287234,
279045,
172550,
303623,
172552,
320007,
287238,
279051,
172558,
279055,
303632,
279058,
303637,
279063,
279067,
172572,
279072,
172577,
295459,
172581,
295461,
279082,
311850,
279084,
172591,
172598,
279095,
172607,
172609,
172612,
377413,
172614,
213575,
172618,
303690,
33357,
287309,
303696,
279124,
172634,
262752,
172644,
311911,
189034,
295533,
172655,
172656,
352880,
295538,
189040,
172660,
287349,
189044,
189039,
287355,
287360,
295553,
172675,
295557,
311942,
303751,
287365,
352905,
311946,
287371,
279178,
311951,
287377,
172691,
287381,
311957,
221850,
287386,
230045,
172702,
287390,
303773,
172705,
287394,
172707,
303780,
164509,
287398,
205479,
287400,
279208,
172714,
295595,
279212,
189102,
172721,
287409,
66227,
303797,
189114,
287419,
303804,
328381,
287423,
328384,
172737,
279231,
287427,
312005,
312006,
107208,
172748,
287436,
107212,
172751,
287440,
295633,
172755,
303827,
279255,
172760,
287450,
303835,
279258,
189149,
303838,
213724,
312035,
279267,
295654,
279272,
230128,
312048,
312050,
230131,
205564,
303871,
230146,
328453,
295685,
230154,
33548,
312077,
295695,
295701,
230169,
369433,
295707,
328476,
295710,
230175,
295720,
303914,
279340,
205613,
279353,
230202,
312124,
328508,
222018,
295755,
377676,
148302,
287569,
303959,
230237,
279390,
230241,
279394,
303976,
336744,
303981,
303985,
303987,
328563,
279413,
303991,
303997,
295806,
295808,
295813,
304005,
320391,
304007,
213895,
304009,
304011,
230284,
304013,
295822,
213902,
279438,
189329,
295825,
304019,
189331,
58262,
304023,
304027,
279452,
410526,
279461,
279462,
304042,
213931,
230327,
304055,
287675,
197564,
230334,
304063,
238528,
304065,
213954,
189378,
156612,
295873,
213963,
197580,
312272,
304084,
304090,
320481,
304106,
320490,
312302,
328687,
320496,
304114,
295928,
320505,
312321,
295945,
230413,
197645,
295949,
320528,
140312,
295961,
238620,
197663,
304164,
304170,
304175,
238641,
312374,
238652,
238655,
230465,
238658,
336964,
132165,
296004,
205895,
320584,
238666,
296021,
402518,
336987,
230497,
296036,
296040,
361576,
205931,
296044,
164973,
205934,
279661,
312432,
279669,
337018,
189562,
279679,
304258,
279683,
222340,
205968,
296084,
238745,
304285,
238756,
205991,
222377,
165035,
337067,
238766,
165038,
230576,
238770,
304311,
230592,
312518,
279750,
230600,
230607,
148690,
320727,
279769,
304348,
279777,
304354,
296163,
320740,
279781,
304360,
320748,
279788,
279790,
304370,
296189,
320771,
312585,
296202,
296205,
230674,
320786,
230677,
296213,
296215,
320792,
230681,
230679,
214294,
304416,
230689,
173350,
312622,
296243,
312630,
222522,
296253,
222525,
296255,
312639,
230718,
296259,
378181,
296262,
230727,
238919,
296264,
320840,
296267,
296271,
222545,
230739,
312663,
222556,
337244,
230752,
312676,
230760,
173418,
148843,
410987,
230763,
230768,
296305,
312692,
230773,
304505,
304506,
181626,
279929,
181631,
148865,
312711,
312712,
296331,
288140,
288144,
230800,
304533,
288154,
337306,
288160,
173472,
288162,
288164,
279975,
304555,
370092,
279983,
173488,
288176,
279985,
312755,
296373,
312759,
337335,
288185,
279991,
222652,
312766,
173507,
296389,
222665,
230860,
312783,
288208,
230865,
148946,
370130,
222676,
288210,
288212,
288214,
239064,
329177,
288217,
288218,
280027,
288220,
239070,
288224,
370146,
280034,
288226,
288229,
280036,
280038,
288232,
288230,
288234,
320998,
288236,
288238,
288240,
288242,
296435,
288244,
288250,
296446,
321022,
402942,
148990,
296450,
206336,
230916,
230919,
214535,
230923,
304651,
304653,
370187,
230940,
222752,
108066,
296486,
296488,
157229,
230961,
157236,
288320,
288325,
124489,
280140,
280145,
288338,
280149,
288344,
280152,
239194,
280158,
403039,
370272,
181854,
239202,
312938,
280183,
280185,
280188,
280191,
116354,
280194,
280208,
280211,
288408,
280218,
280222,
190118,
198310,
321195,
296622,
321200,
337585,
296626,
296634,
296637,
313027,
280260,
206536,
280264,
206539,
206541,
206543,
313044,
280276,
321239,
280283,
313052,
18140,
288478,
313055,
321252,
313066,
288494,
280302,
280304,
313073,
321266,
419570,
288499,
288502,
280314,
288510,
124671,
67330,
280324,
198405,
280331,
198416,
280337,
296723,
116503,
321304,
329498,
296731,
321311,
313121,
313123,
304932,
321316,
280363,
141101,
165678,
280375,
321336,
296767,
288576,
345921,
280388,
304968,
280393,
280402,
173907,
313171,
313176,
42842,
280419,
321381,
296809,
296812,
313201,
1920,
255873,
305028,
280454,
247688,
280464,
124817,
280468,
239510,
280473,
124827,
214940,
247709,
214944,
280487,
313258,
321458,
296883,
124853,
214966,
296890,
10170,
288700,
296894,
190403,
296900,
280515,
337862,
165831,
280521,
231379,
296921,
239586,
313320,
231404,
124913,
165876,
321528,
239612,
313340,
288764,
239617,
313347,
288773,
313358,
305176,
313371,
354338,
305191,
223273,
313386,
354348,
124978,
215090,
124980,
288824,
288826,
321595,
378941,
313406,
288831,
288836,
67654,
280651,
354382,
288848,
280658,
215123,
354390,
288855,
288859,
280669,
313438,
149599,
280671,
149601,
321634,
149603,
223327,
329830,
280681,
313451,
223341,
280687,
149618,
215154,
313458,
280691,
313464,
329850,
321659,
280702,
288895,
321670,
215175,
141446,
288909,
141455,
275606,
141459,
280725,
313498,
100520,
288936,
280747,
288940,
288947,
280755,
321717,
280759,
280764,
280769,
280771,
280774,
280776,
313548,
321740,
280783,
280786,
280788,
313557,
280793,
280796,
280798,
338147,
280804,
280807,
157930,
280811,
280817,
125171,
280819,
157940,
182517,
280823,
280825,
280827,
280830,
280831,
280833,
125187,
280835,
125191,
125207,
125209,
321817,
125218,
321842,
223539,
125239,
280888,
280891,
289087,
280897,
280900,
305480,
239944,
280906,
239947,
305485,
305489,
379218,
280919,
354653,
354656,
313700,
313705,
280937,
190832,
280946,
223606,
313720,
280956,
239997,
280959,
313731,
199051,
240011,
289166,
240017,
297363,
190868,
240021,
297365,
297368,
297372,
141725,
297377,
289186,
297391,
289201,
240052,
289207,
289210,
305594,
281024,
289218,
289221,
289227,
281045,
281047,
166378,
305647,
281075,
174580,
240124,
281084,
305662,
305664,
240129,
305666,
305668,
223749,
240132,
281095,
223752,
150025,
338440,
223757,
281102,
223763,
223765,
281113,
322074,
281116,
281121,
182819,
281127,
281135,
150066,
158262,
158266,
289342,
281154,
322115,
158283,
281163,
281179,
338528,
338532,
281190,
199273,
281196,
19053,
158317,
313973,
297594,
281210,
158347,
133776,
314003,
117398,
314007,
289436,
174754,
330404,
289448,
133801,
174764,
314029,
314033,
240309,
133817,
314045,
314047,
314051,
199364,
297671,
158409,
289493,
363234,
289513,
289522,
289525,
289532,
322303,
289537,
322310,
264969,
322314,
322318,
281361,
281372,
322341,
215850,
281388,
289593,
281401,
289601,
281410,
281413,
281414,
240458,
281420,
240468,
281430,
322393,
297818,
281435,
281438,
281442,
174955,
224110,
207733,
207737,
158596,
183172,
338823,
322440,
314249,
240519,
183184,
289687,
240535,
297883,
289694,
289696,
289700,
289712,
281529,
289724,
52163,
183260,
281567,
289762,
322534,
297961,
183277,
322550,
134142,
322563,
314372,
175134,
322599,
322610,
314421,
281654,
314427,
314433,
207937,
314441,
207949,
322642,
314456,
281691,
314461,
281702,
281704,
314474,
281708,
281711,
289912,
248995,
306341,
306344,
306347,
322734,
306354,
142531,
199877,
289991,
306377,
289997,
249045,
363742,
363745,
298216,
330988,
126190,
216303,
322801,
388350,
257302,
363802,
199976,
199978,
314671,
298292,
298294,
257334,
216376,
380226,
298306,
224584,
224587,
224594,
216404,
306517,
150870,
314714,
224603,
159068,
314718,
265568,
314723,
281960,
150890,
306539,
314732,
314736,
290161,
216436,
306549,
298358,
314743,
306552,
290171,
314747,
306555,
298365,
290174,
224641,
281987,
298372,
314756,
281990,
224647,
265604,
298377,
314763,
142733,
298381,
314768,
224657,
306581,
314773,
314779,
314785,
314793,
282025,
282027,
241068,
241070,
241072,
282034,
241077,
150966,
298424,
306618,
282044,
323015,
306635,
306640,
290263,
290270,
290275,
339431,
282089,
191985,
282098,
290291,
282101,
241142,
191992,
290298,
151036,
290302,
282111,
290305,
175621,
306694,
192008,
323084,
257550,
282127,
290321,
282130,
323090,
290325,
282133,
241175,
290328,
282137,
290332,
241181,
282142,
282144,
290344,
306731,
290349,
290351,
290356,
28219,
282186,
224849,
282195,
282199,
282201,
306778,
159324,
159330,
314979,
298598,
323176,
224875,
241260,
323181,
257658,
315016,
282249,
290445,
282261,
298651,
282269,
323229,
298655,
323231,
61092,
282277,
306856,
282295,
323260,
282300,
323266,
282310,
323273,
282319,
306897,
241362,
306904,
282328,
298714,
52959,
216801,
282337,
241380,
216806,
323304,
282345,
12011,
282356,
323318,
282364,
282367,
306945,
241412,
323333,
282376,
216842,
323345,
282388,
323349,
282392,
184090,
315167,
315169,
282402,
315174,
323367,
241448,
315176,
241450,
282410,
306988,
306991,
315184,
323376,
315190,
241464,
159545,
282425,
298811,
118593,
307009,
413506,
307012,
241475,
298822,
315211,
282446,
307027,
315221,
323414,
315223,
241496,
241498,
307035,
307040,
110433,
282465,
241509,
110438,
298860,
110445,
282478,
315249,
282481,
110450,
315251,
315253,
315255,
339838,
315267,
282499,
315269,
241544,
282505,
241546,
241548,
298896,
298898,
282514,
241556,
298901,
44948,
241560,
282520,
241563,
241565,
241567,
241569,
282531,
241574,
282537,
298922,
36779,
241581,
282542,
241583,
323504,
241586,
290739,
241588,
282547,
241590,
241592,
241598,
290751,
241600,
241605,
151495,
241610,
298975,
241632,
298984,
241640,
241643,
298988,
241646,
241649,
241652,
323574,
290807,
299003,
241661,
299006,
282623,
315396,
241669,
315397,
282632,
282639,
290835,
282645,
241693,
282654,
241701,
102438,
217127,
282669,
323630,
282681,
290877,
282687,
159811,
315463,
315466,
192589,
307278,
192596,
176213,
307287,
307290,
217179,
315482,
192605,
315483,
233567,
299105,
200801,
217188,
299109,
307303,
315495,
356457,
45163,
307307,
315502,
192624,
307314,
323700,
299126,
233591,
299136,
307329,
315524,
307338,
233613,
241813,
307352,
299164,
299167,
315552,
184479,
184481,
315557,
184486,
307370,
307372,
184492,
307374,
307376,
323763,
184503,
299191,
176311,
307386,
258235,
307388,
176316,
307390,
307385,
299200,
184512,
307394,
299204,
307396,
184518,
307399,
323784,
233679,
307409,
307411,
176343,
299225,
233701,
307432,
184572,
282881,
184579,
282893,
323854,
291089,
282906,
291104,
233766,
295583,
176435,
307508,
315701,
332086,
307510,
307512,
168245,
307515,
307518,
282942,
282947,
323917,
282957,
110926,
233808,
323921,
315733,
323926,
233815,
315739,
323932,
299357,
242018,
242024,
299373,
315757,
250231,
242043,
315771,
299388,
299391,
291202,
299398,
242057,
291212,
299405,
291222,
315801,
283033,
242075,
291226,
61855,
291231,
283042,
291238,
291241,
127403,
127405,
291247,
299440,
127407,
299444,
127413,
291254,
283062,
127417,
291260,
127421,
127424,
299457,
127429,
127431,
127434,
315856,
127440,
176592,
315860,
176597,
283095,
127447,
299481,
127449,
176605,
242143,
127455,
127457,
291299,
127463,
242152,
291305,
127466,
176620,
127469,
127474,
291314,
291317,
127480,
135672,
291323,
233979,
127485,
291330,
127494,
283142,
135689,
233994,
127497,
127500,
291341,
233998,
127506,
234003,
234006,
127511,
152087,
283161,
234010,
135707,
242202,
135710,
242206,
242208,
291361,
242220,
291378,
152118,
234038,
234041,
315961,
70213,
242250,
111193,
242275,
299620,
242279,
168562,
184952,
135805,
135808,
291456,
373383,
299655,
135820,
316051,
225941,
316054,
299672,
135834,
373404,
299677,
225948,
135839,
299680,
225954,
299684,
135844,
242343,
209576,
242345,
373421,
135870,
135873,
135876,
135879,
299720,
299723,
299726,
225998,
226002,
119509,
226005,
226008,
299740,
242396,
201444,
299750,
283368,
234219,
283372,
226037,
283382,
316151,
234231,
234236,
226045,
242431,
234239,
209665,
234242,
299778,
242436,
234246,
226056,
291593,
234248,
242443,
234252,
242445,
234254,
291601,
234258,
242450,
242452,
234261,
348950,
201496,
234264,
234266,
234269,
283421,
234272,
234274,
152355,
299814,
234278,
283432,
234281,
234284,
234287,
283440,
185138,
242483,
234292,
234296,
234298,
160572,
283452,
234302,
234307,
242499,
234309,
316233,
234313,
316235,
234316,
283468,
234319,
242511,
234321,
234324,
185173,
201557,
234329,
234333,
308063,
234336,
242530,
349027,
234338,
234341,
234344,
234347,
177004,
234350,
324464,
234353,
152435,
177011,
234356,
234358,
234362,
226171,
234364,
291711,
234368,
291714,
234370,
291716,
234373,
316294,
226182,
234375,
308105,
226185,
234379,
201603,
324490,
234384,
234388,
234390,
226200,
234393,
209818,
308123,
234396,
324508,
291742,
324504,
234398,
234401,
291747,
291748,
234405,
291750,
324518,
324520,
234407,
324522,
234410,
291756,
291754,
226220,
324527,
291760,
234417,
201650,
324531,
234414,
234422,
226230,
324536,
275384,
234428,
291773,
242623,
324544,
234431,
234434,
324546,
324548,
234437,
226239,
226245,
234439,
234443,
291788,
234446,
193486,
193488,
234449,
316370,
275406,
234452,
234455,
234459,
234461,
234464,
234467,
234470,
168935,
5096,
324585,
234475,
234478,
316400,
234481,
316403,
234484,
234485,
234487,
324599,
234490,
234493,
316416,
234496,
308226,
234501,
275462,
308231,
234504,
234507,
234510,
234515,
300054,
316439,
234520,
234519,
234523,
234526,
234528,
300066,
234532,
300069,
234535,
234537,
234540,
234543,
234546,
275508,
300085,
234549,
300088,
234553,
234556,
234558,
316479,
234561,
316483,
160835,
234563,
308291,
234568,
234570,
316491,
234572,
300108,
234574,
300115,
234580,
234581,
234585,
275545,
242777,
234590,
234593,
234595,
234597,
300133,
234601,
300139,
234605,
160879,
234607,
275569,
234610,
316530,
300148,
234614,
398455,
144506,
234618,
234620,
275579,
234623,
226433,
234627,
275588,
234629,
234634,
234636,
177293,
234640,
275602,
234643,
308373,
226453,
234647,
234648,
275608,
234650,
308379,
324757,
300189,
324766,
119967,
234653,
324768,
283805,
234657,
242852,
300197,
234661,
283813,
234664,
275626,
234667,
316596,
308414,
234687,
300223,
300226,
308418,
234692,
300229,
308420,
308422,
283844,
300234,
283850,
300238,
300241,
316625,
300243,
300245,
316630,
300248,
300253,
300256,
300258,
300260,
234726,
300263,
300265,
300267,
161003,
300270,
300272,
120053,
300278,
275703,
316663,
300284,
275710,
300287,
292097,
300289,
300292,
300294,
275719,
234760,
177419,
300299,
242957,
300301,
275725,
177424,
283917,
349464,
283939,
259367,
292143,
283951,
300344,
226617,
243003,
283963,
226628,
300357,
283973,
177482,
283983,
316758,
357722,
316766,
316768,
292192,
218464,
292197,
316774,
243046,
218473,
284010,
136562,
324978,
333178,
275834,
275836,
275840,
316803,
316806,
226696,
316811,
226699,
316814,
226703,
300433,
234899,
300436,
226709,
357783,
316824,
316826,
300448,
144807,
144810,
144812,
284076,
144814,
227426,
144820,
374196,
284084,
292279,
284087,
144826,
144828,
144830,
144832,
144835,
144837,
38342,
144839,
144841,
144844,
144847,
144852,
144855,
103899,
300507,
333280,
226787,
218597,
292329,
300523,
259565,
300527,
308720,
259567,
292338,
226802,
316917,
292343,
308727,
300537,
316933,
316947,
308757,
308762,
284191,
284194,
284196,
235045,
284199,
284204,
284206,
284209,
284211,
194101,
284213,
316983,
194103,
284215,
308790,
284218,
226877,
292414,
284223,
284226,
284228,
292421,
243268,
284231,
226886,
128584,
284234,
366155,
317004,
276043,
284238,
226895,
284241,
194130,
284243,
300628,
284245,
292433,
284247,
317015,
235097,
243290,
276052,
276053,
284249,
300638,
284251,
284253,
284255,
284258,
243293,
292452,
292454,
284263,
177766,
284265,
292458,
284267,
292461,
284272,
284274,
284278,
292470,
276086,
292473,
284283,
276093,
284286,
292479,
284288,
292481,
284290,
325250,
284292,
292485,
325251,
276095,
276098,
284297,
317066,
284299,
317068,
284301,
276109,
284303,
284306,
276114,
284308,
284312,
284314,
284316,
276127,
284320,
284322,
284327,
284329,
317098,
284331,
276137,
284333,
284335,
276144,
284337,
284339,
300726,
284343,
284346,
284350,
358080,
276160,
284354,
358083,
284358,
276166,
358089,
284362,
276170,
284365,
276175,
284368,
276177,
284370,
358098,
284372,
317138,
284377,
284379,
284381,
284384,
358114,
284386,
358116,
276197,
317158,
358119,
284392,
325353,
358122,
284394,
284397,
358126,
284399,
358128,
276206,
358133,
358135,
276216,
358138,
300795,
358140,
284413,
358142,
358146,
317187,
284418,
317189,
317191,
284428,
300816,
300819,
317207,
284440,
300828,
300830,
276255,
300832,
325408,
300834,
317221,
227109,
358183,
186151,
276268,
300845,
243504,
300850,
284469,
276280,
325436,
358206,
276291,
366406,
276295,
300872,
292681,
153417,
358224,
284499,
276308,
284502,
317271,
178006,
276315,
292700,
317279,
284511,
227175,
292715,
300912,
292721,
284529,
300915,
284533,
292729,
317306,
284540,
292734,
325512,
169868,
276365,
317332,
358292,
284564,
284566,
350106,
284572,
276386,
284579,
276388,
358312,
317353,
284585,
276395,
292776,
292784,
276402,
358326,
161718,
358330,
276411,
276418,
276425,
301009,
301011,
301013,
292823,
358360,
301017,
301015,
292828,
276446,
153568,
276448,
276452,
292839,
276455,
292843,
276460,
178161,
227314,
276466,
325624,
276472,
317435,
276476,
276479,
276482,
276485,
317446,
276490,
292876,
317456,
276496,
317458,
178195,
243733,
243740,
317468,
317472,
325666,
243751,
292904,
276528,
243762,
309298,
325685,
325689,
235579,
325692,
235581,
178238,
276539,
276544,
284739,
325700,
292934,
243785,
276553,
350293,
350295,
309337,
227418,
350299,
194649,
350302,
194654,
350304,
178273,
309346,
227423,
194660,
350308,
309350,
309348,
292968,
309352,
309354,
301163,
350313,
350316,
227430,
301167,
276583,
350321,
276590,
284786,
276595,
350325,
252022,
227440,
350328,
292985,
301178,
350332,
292989,
301185,
292993,
350339,
317570,
317573,
350342,
350345,
350349,
301199,
317584,
325777,
350354,
350357,
350359,
350362,
350366,
276638,
153765,
284837,
350375,
350379,
350381,
350383,
129200,
350385,
350387,
350389,
350395,
350397,
350399,
227520,
350402,
227522,
301252,
350406,
227529,
301258,
309450,
276685,
309455,
276689,
309462,
301272,
276699,
194780,
309468,
309471,
301283,
317672,
317674,
325867,
243948,
194801,
309491,
227571,
309494,
243960,
227583,
276735,
227587,
276739,
211204,
276742,
227596,
325910,
309530,
342298,
211232,
317729,
276775,
211241,
325937,
325943,
211260,
260421,
276809,
285002,
276811,
235853,
276816,
235858,
276829,
276833,
391523,
276836,
293227,
276843,
293232,
276848,
186744,
211324,
227709,
285061,
317833,
178572,
285070,
285077,
178583,
227738,
317853,
276896,
317858,
342434,
285093,
317864,
285098,
276907,
235955,
276917,
293304,
293307,
293314,
309707,
293325,
317910,
293336,
235996,
317917,
293343,
358880,
276961,
293346,
227810,
276964,
293352,
236013,
293364,
301562,
293370,
317951,
309764,
301575,
121352,
293387,
236043,
342541,
317963,
113167,
55822,
309779,
317971,
309781,
277011,
55837,
227877,
227879,
293417,
227882,
309804,
293421,
105007,
236082,
285236,
23094,
277054,
244288,
219714,
129603,
301636,
318020,
301639,
301643,
285265,
399955,
309844,
277080,
309849,
285277,
285282,
326244,
318055,
277100,
309871,
121458,
277106,
170618,
170619,
309885,
309888,
277122,
227975,
277128,
285320,
301706,
318092,
326285,
334476,
318094,
277136,
277139,
227992,
318108,
285340,
318110,
227998,
137889,
383658,
285357,
318128,
277170,
293555,
318132,
342707,
154292,
277173,
285368,
277177,
277181,
318144,
277187,
277191,
277194,
277196,
277201,
137946,
113378,
203491,
228069,
277223,
342760,
285417,
56041,
56043,
277232,
228081,
56059,
310015,
285441,
310020,
285448,
310029,
228113,
285459,
277273,
293659,
326430,
228128,
285474,
293666,
228135,
318248,
277291,
318253,
293677,
285489,
301876,
293685,
285494,
301880,
285499,
301884,
293696,
310080,
277317,
293706,
277322,
277329,
162643,
310100,
301911,
301913,
277337,
301921,
400236,
236397,
162671,
326514,
310134,
236408,
15224,
277368,
416639,
416640,
113538,
310147,
416648,
39817,
187274,
277385,
301972,
424853,
277405,
277411,
310179,
293798,
293802,
236460,
277426,
293811,
276579,
293817,
293820,
203715,
326603,
276586,
293849,
293861,
228327,
228328,
318442,
228330,
228332,
326638,
277486,
318450,
293876,
293877,
285686,
302073,
121850,
293882,
302075,
244731,
285690,
293887,
277504,
277507,
277511,
293899,
277519,
293908,
302105,
293917,
293939,
318516,
277561,
277564,
310336,
7232,
293956,
277573,
228422,
293960,
310344,
277577,
277583,
203857,
293971,
310355,
310359,
236632,
277594,
138332,
277598,
203872,
277601,
285792,
310374,
203879,
310376,
228460,
318573,
203886,
187509,
285815,
367737,
285817,
302205,
285821,
392326,
285831,
253064,
294026,
302218,
285835,
162964,
384148,
187542,
302231,
285849,
302233,
285852,
302237,
285854,
285856,
302241,
285862,
277671,
302248,
64682,
277678,
294063,
294065,
302258,
277687,
294072,
318651,
294076,
277695,
318657,
244930,
302275,
130244,
302277,
228550,
302282,
310476,
302285,
302288,
310481,
302290,
203987,
302292,
302294,
310486,
302296,
384222,
310498,
285927,
318698,
302315,
228592,
294132,
138485,
228601,
204026,
228606,
204031,
64768,
310531,
138505,
228617,
318742,
204067,
277798,
130345,
277801,
113964,
285997,
277804,
285999,
277807,
113969,
277811,
318773,
318776,
277816,
286010,
277819,
294204,
417086,
277822,
286016,
302403,
294211,
384328,
277832,
277836,
294221,
294223,
326991,
277839,
277842,
277847,
277850,
179547,
277853,
146784,
277857,
302436,
277860,
294246,
327015,
310632,
327017,
351594,
277864,
277869,
277872,
351607,
310648,
277880,
310651,
277884,
277888,
310657,
351619,
294276,
310659,
327046,
277892,
253320,
310665,
318858,
277894,
277898,
277903,
310672,
351633,
277905,
277908,
277917,
310689,
277921,
130468,
228776,
277928,
277932,
310703,
277937,
310710,
130486,
310712,
277944,
310715,
277947,
302526,
228799,
277950,
277953,
302534,
310727,
245191,
64966,
277959,
277963,
302541,
277966,
302543,
310737,
277971,
228825,
163290,
277978,
310749,
277981,
277984,
310755,
277989,
277991,
187880,
277995,
310764,
286188,
278000,
228851,
310772,
278003,
278006,
40440,
212472,
278009,
40443,
286203,
310780,
40448,
228864,
286214,
228871,
302603,
302614,
302617,
286233,
302621,
286240,
146977,
187939,
40484,
294435,
40486,
286246,
294440,
40488,
294439,
294443,
40491,
294445,
286248,
310831,
40499,
40502,
212538,
40507,
40511,
40513,
228933,
327240,
40521,
286283,
40525,
40527,
212560,
400976,
228944,
40533,
147032,
40537,
40539,
40541,
278109,
40544,
40548,
40550,
40552,
286312,
40554,
286313,
310892,
40557,
40560,
188022,
122488,
294521,
343679,
294537,
310925,
286354,
278163,
302740,
122517,
278168,
179870,
327333,
229030,
212648,
278188,
302764,
278192,
319153,
278196,
302781,
319171,
302789,
294599,
278216,
294601,
302793,
343757,
212690,
319187,
286420,
278227,
229076,
286425,
319194,
278235,
229086,
278238,
286432,
294625,
294634,
302838,
319226,
286460,
278274,
302852,
278277,
302854,
294664,
311048,
352008,
319243,
311053,
302862,
319251,
294682,
278306,
188199,
294701,
319280,
278320,
319290,
229192,
302925,
188247,
280021,
188252,
237409,
294776,
360317,
294785,
327554,
40840,
40851,
294803,
188312,
294811,
237470,
319390,
40865,
319394,
294817,
294821,
311209,
180142,
343983,
294831,
188340,
40886,
319419,
294844,
294847,
237508,
393177,
294876,
294879,
294883,
294890,
311279,
278513,
237555,
311283,
278516,
278519,
237562
] |
6998833cfe95ca83d1b24c8d5158be372caabd92
|
6963af2821b3db74bc754e3b031e77a39716cd8f
|
/XcodeServerSDK/Server Helpers/CIServer.swift
|
483a5855f942658713a8833401637c623c0ec14d
|
[
"MIT"
] |
permissive
|
davbeck/XcodeServerSDK
|
e8732b3629b5f43cbca57e5ca1f65bf104390df0
|
599c7a7735d51824746611d3ea6dcf560a370fe6
|
refs/heads/master
| 2021-07-17T12:13:58.424040 | 2017-10-25T18:42:57 | 2017-10-25T18:42:57 | 108,276,630 | 1 | 0 | null | 2017-10-25T13:48:12 | 2017-10-25T13:48:12 | null |
UTF-8
|
Swift
| false | false | 230 |
swift
|
//
// CIServer.swift
// Buildasaur
//
// Created by Honza Dvorsky on 14/12/2014.
// Copyright (c) 2014 Honza Dvorsky. All rights reserved.
//
import Foundation
import BuildaUtils
public class CIServer : HTTPServer {
}
|
[
-1
] |
e9cc1d8301f8ea2bee4f2a24995d023336500eda
|
f44fa41b8fdd02b651959ebd93e37dbc22137297
|
/MainMenuViewController.swift
|
905c9470808038472bcc5bb79c8294ca13a781a8
|
[] |
no_license
|
CrowdAmp/MessagingApp
|
82e37d659b77fa33f28e9876179b09282efc194f
|
da7ee58e1891d961ac8d5389a0fe588ccc49edbb
|
refs/heads/master
| 2021-05-03T16:06:49.828675 | 2016-09-29T03:54:09 | 2016-09-29T03:54:09 | 61,588,847 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 821 |
swift
|
//
// MainMenuViewController.swift
//
//
// Created by Ruben Mayer on 6/21/16.
//
//
import UIKit
class MainMenuViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
|
[
275842,
230147,
224643,
313733,
280710,
287243,
306577,
279442,
306578,
369434,
280219,
299165,
275358,
313504,
315170,
225955,
295460,
288165,
304933,
326311,
286249,
289578,
289196,
370093,
302256,
292787,
289204,
286775,
280760,
298936,
292796,
299709,
292799,
283839,
277696,
288579,
293700,
299973,
165832,
293961,
280015,
212561,
307410,
301012,
237655,
301016,
298842,
241499,
280028,
280029,
280030,
298843,
278752,
311645,
290020,
291556,
294889,
309353,
311913,
296813,
277487,
276849,
308721,
227315,
296436,
315250
] |
206eca8bdb6b22818b9502b6549ae3fab0ffaa8f
|
121d0cd3550f17d6f38e7176b2ea9a238c8eea80
|
/magi/magiGlobe/magiGlobe/Classes/Tool/Extension/UIKit/UILable/UILable+Man.swift
|
fa866f2e0d7d5a71e183d734e310ef6c719ff347
|
[
"MIT"
] |
permissive
|
AnRanScheme/magiGlobe
|
cdf85f28c10bab28b27582bca3f86548e158938a
|
6a73f68ef8abc4ad121f6782cd67ada1addce9c1
|
refs/heads/master
| 2020-12-30T11:53:01.573266 | 2017-06-05T08:36:01 | 2017-06-05T08:36:01 | 91,439,298 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 151 |
swift
|
//
// UILable+Man.swift
// swift-magic
//
// Created by 安然 on 17/2/15.
// Copyright © 2017年 安然. All rights reserved.
//
import UIKit
|
[
-1
] |
aebacc80635d587a01b62c2fc21b2a9d220f5d7e
|
eeaca70caa5010cae807d19c0a6f64f1ce1753b6
|
/LbToKgViewController.swift
|
87e55358aaf61c8a7377298228510322f0b5eddd
|
[] |
no_license
|
sahilrodricks/REAL-FINAL-PROJECT
|
2083b1deeb6a2165a182f6372f87d6afdb47519e
|
fb659409594815cdcf83cac254dba2ac1fdeb41c
|
refs/heads/master
| 2021-01-20T08:41:07.389362 | 2017-05-03T17:53:40 | 2017-05-03T17:53:40 | 90,177,381 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,619 |
swift
|
//
// ViewController.swift
// MealPrep
//
// Created by Sahil Rodricks and Leon Miro on 4/24/17.
// Copyright © 2017 shp. All rights reserved.
//
import UIKit
import Social
class LbToKgViewController: UIViewController {
//Lable and Text Feild outlet
@IBOutlet weak var label: UILabel!
@IBOutlet weak var textField: UITextField!
//Occurs when UIButton is clicked.
@IBAction func convertToKilograms() {
//Assigns value in text field to the wight in lbs
let weightInLbs = Double(textField.text!)
let conversionFactor: Double = 2.2 //lbs
//Coversion from lbs to kg
let weightInKg = (weightInLbs!) / conversionFactor
//Sets the weight of kg to the text value of the label
label.text = String(weightInKg)
}
@IBAction func dismissKeyboard(_ sender: Any) {
self.resignFirstResponder()
}
//Dismiss keyboard when user touches elsewhere
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
self.view.endEditing(true)
}
@IBAction func tweetOut() {
let alert = UIAlertController(title: "share", message: "share your number", preferredStyle: .actionSheet)
let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
let twitterAction = UIAlertAction(title: "Share on Twitter", style: .default) { (action) in print("Success")
if SLComposeViewController.isAvailable(forServiceType: SLServiceTypeTwitter) {
let post = SLComposeViewController(forServiceType: SLServiceTypeTwitter)!
self.present(post, animated: true, completion: nil)
}
else {
self.showAlert(service: "Twitter")
}
}
alert.addAction(twitterAction)
alert.addAction(cancelAction)
self.present(alert, animated: true, completion: nil)
}
func showAlert(service: String) {
let alert = UIAlertController(title: "error", message: "You are not connected to \(service)", preferredStyle: .alert)
let action = UIAlertAction(title: "Dismiss", style: .cancel, handler: nil)
alert.addAction(action)
present(alert, animated: true, completion: nil)
}
}
|
[
-1
] |
25a60f53471d758513049a2c082acaa23f91bec6
|
4814bd46b89ad48ff9797ca73f110e6dcc5f215e
|
/oneshotchallenge/VCs/CelebrationController/CelebrationView.swift
|
69134cad14985ae7f20ad9f96e9c94793dfa8e6c
|
[] |
no_license
|
sickcowboy/oneshot
|
251629f8b03fc32ee1d7933b6a8002a63d84fd3f
|
b0fb1c76284a9adaee4046bacb37ab0a60b378b3
|
refs/heads/master
| 2020-05-22T00:08:56.551196 | 2018-07-09T17:42:37 | 2018-07-09T17:42:37 | 186,165,216 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,037 |
swift
|
//
// CelebrationView.swift
// oneshotchallenge
//
// Created by Dennis Galvén on 2018-06-17.
// Copyright © 2018 GalvenD. All rights reserved.
//
import UIKit
class CelebrationView: UIView {
//MARK: - views
let headLineLabel: UILabel = {
let label = UILabel()
label.font = UIFont.boldSystemFont(ofSize: 44)
label.textAlignment = .center
label.textColor = Colors.sharedInstance.primaryTextColor
label.text = "Congratulations"
return label
}()
//MARK: - init
override init(frame: CGRect) {
super.init(frame: frame)
addLabel()
}
//MARK: - label animation functions
fileprivate func addLabel() {
addSubview(headLineLabel)
headLineLabel.constraintLayout(top: nil, leading: nil, trailing: nil, bottom: nil,
centerX: centerXAnchor, centerY: centerYAnchor)
}
func animate() {
UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.5, options: .curveEaseOut, animations: {
self.headLineLabel.transform = CGAffineTransform(scaleX: 1.1, y: 1.1)
}, completion: { _ in
UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.5, options: .curveEaseOut, animations: {
self.headLineLabel.transform = CGAffineTransform(scaleX: 1, y: 1)
self.addFireWork()
}, completion: nil)
})
}
fileprivate func addFireWork() {
let fireWork = FireWork()
fireWork.layer.zPosition = -1
addSubview(fireWork)
fireWork.constraintLayout(top: nil, leading: nil, trailing: nil, bottom: nil,
centerX: centerXAnchor, centerY: centerYAnchor)
fireWork.animate()
}
//MARK: - error handling
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
|
[
-1
] |
b1c556f4c550f08a321e1064c74eb913fe0c4fe4
|
d8069f7b7c218c8927f467c0868b924997d220f7
|
/Pods/NVActivityIndicatorView/Source/NVActivityIndicatorView/NVActivityIndicatorView.swift
|
d03cb4fbdf72039783dac4d0d83555f1cc7e8e5e
|
[
"MIT"
] |
permissive
|
beauguard/corona-alert
|
6e0fe0e6d855f3f254993da018a1205dc7c30fba
|
3b5b2100a3728ca8cee1e2010a0e4c8579b7eed4
|
refs/heads/main
| 2023-02-13T20:27:41.417802 | 2021-01-15T22:19:50 | 2021-01-15T22:19:50 | 330,023,084 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 19,097 |
swift
|
//
// NVActivityIndicatorView.swift
// NVActivityIndicatorView
//
// The MIT License (MIT)
// Copyright (c) 2016 Vinh Nguyen
// 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, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 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 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
import UIKit
/**
Enum of animation types used for activity indicator view.
- Blank: Blank animation.
- BallPulse: BallPulse animation.
- BallGridPulse: BallGridPulse animation.
- BallClipRotate: BallClipRotate animation.
- SquareSpin: SquareSpin animation.
- BallClipRotatePulse: BallClipRotatePulse animation.
- BallClipRotateMultiple: BallClipRotateMultiple animation.
- BallPulseRise: BallPulseRise animation.
- BallRotate: BallRotate animation.
- CubeTransition: CubeTransition animation.
- BallZigZag: BallZigZag animation.
- BallZigZagDeflect: BallZigZagDeflect animation.
- BallTrianglePath: BallTrianglePath animation.
- BallScale: BallScale animation.
- LineScale: LineScale animation.
- LineScaleParty: LineScaleParty animation.
- BallScaleMultiple: BallScaleMultiple animation.
- BallPulseSync: BallPulseSync animation.
- BallBeat: BallBeat animation.
- BallDoubleBounce: BallDoubleBounce animation.
- LineScalePulseOut: LineScalePulseOut animation.
- LineScalePulseOutRapid: LineScalePulseOutRapid animation.
- BallScaleRipple: BallScaleRipple animation.
- BallScaleRippleMultiple: BallScaleRippleMultiple animation.
- BallSpinFadeLoader: BallSpinFadeLoader animation.
- LineSpinFadeLoader: LineSpinFadeLoader animation.
- TriangleSkewSpin: TriangleSkewSpin animation.
- Pacman: Pacman animation.
- BallGridBeat: BallGridBeat animation.
- SemiCircleSpin: SemiCircleSpin animation.
- BallRotateChase: BallRotateChase animation.
- Orbit: Orbit animation.
- AudioEqualizer: AudioEqualizer animation.
- CircleStrokeSpin: CircleStrokeSpin animation.
*/
public enum NVActivityIndicatorType: CaseIterable {
/**
Blank.
- returns: Instance of NVActivityIndicatorAnimationBlank.
*/
case blank
/**
BallPulse.
- returns: Instance of NVActivityIndicatorAnimationBallPulse.
*/
case ballPulse
/**
BallGridPulse.
- returns: Instance of NVActivityIndicatorAnimationBallGridPulse.
*/
case ballGridPulse
/**
BallClipRotate.
- returns: Instance of NVActivityIndicatorAnimationBallClipRotate.
*/
case ballClipRotate
/**
SquareSpin.
- returns: Instance of NVActivityIndicatorAnimationSquareSpin.
*/
case squareSpin
/**
BallClipRotatePulse.
- returns: Instance of NVActivityIndicatorAnimationBallClipRotatePulse.
*/
case ballClipRotatePulse
/**
BallClipRotateMultiple.
- returns: Instance of NVActivityIndicatorAnimationBallClipRotateMultiple.
*/
case ballClipRotateMultiple
/**
BallPulseRise.
- returns: Instance of NVActivityIndicatorAnimationBallPulseRise.
*/
case ballPulseRise
/**
BallRotate.
- returns: Instance of NVActivityIndicatorAnimationBallRotate.
*/
case ballRotate
/**
CubeTransition.
- returns: Instance of NVActivityIndicatorAnimationCubeTransition.
*/
case cubeTransition
/**
BallZigZag.
- returns: Instance of NVActivityIndicatorAnimationBallZigZag.
*/
case ballZigZag
/**
BallZigZagDeflect
- returns: Instance of NVActivityIndicatorAnimationBallZigZagDeflect
*/
case ballZigZagDeflect
/**
BallTrianglePath.
- returns: Instance of NVActivityIndicatorAnimationBallTrianglePath.
*/
case ballTrianglePath
/**
BallScale.
- returns: Instance of NVActivityIndicatorAnimationBallScale.
*/
case ballScale
/**
LineScale.
- returns: Instance of NVActivityIndicatorAnimationLineScale.
*/
case lineScale
/**
LineScaleParty.
- returns: Instance of NVActivityIndicatorAnimationLineScaleParty.
*/
case lineScaleParty
/**
BallScaleMultiple.
- returns: Instance of NVActivityIndicatorAnimationBallScaleMultiple.
*/
case ballScaleMultiple
/**
BallPulseSync.
- returns: Instance of NVActivityIndicatorAnimationBallPulseSync.
*/
case ballPulseSync
/**
BallBeat.
- returns: Instance of NVActivityIndicatorAnimationBallBeat.
*/
case ballBeat
/**
BallDoubleBounce.
- returns: Instance of NVActivityIndicatorAnimationBallDoubleBounce.
*/
case ballDoubleBounce
/**
LineScalePulseOut.
- returns: Instance of NVActivityIndicatorAnimationLineScalePulseOut.
*/
case lineScalePulseOut
/**
LineScalePulseOutRapid.
- returns: Instance of NVActivityIndicatorAnimationLineScalePulseOutRapid.
*/
case lineScalePulseOutRapid
/**
BallScaleRipple.
- returns: Instance of NVActivityIndicatorAnimationBallScaleRipple.
*/
case ballScaleRipple
/**
BallScaleRippleMultiple.
- returns: Instance of NVActivityIndicatorAnimationBallScaleRippleMultiple.
*/
case ballScaleRippleMultiple
/**
BallSpinFadeLoader.
- returns: Instance of NVActivityIndicatorAnimationBallSpinFadeLoader.
*/
case ballSpinFadeLoader
/**
LineSpinFadeLoader.
- returns: Instance of NVActivityIndicatorAnimationLineSpinFadeLoader.
*/
case lineSpinFadeLoader
/**
TriangleSkewSpin.
- returns: Instance of NVActivityIndicatorAnimationTriangleSkewSpin.
*/
case triangleSkewSpin
/**
Pacman.
- returns: Instance of NVActivityIndicatorAnimationPacman.
*/
case pacman
/**
BallGridBeat.
- returns: Instance of NVActivityIndicatorAnimationBallGridBeat.
*/
case ballGridBeat
/**
SemiCircleSpin.
- returns: Instance of NVActivityIndicatorAnimationSemiCircleSpin.
*/
case semiCircleSpin
/**
BallRotateChase.
- returns: Instance of NVActivityIndicatorAnimationBallRotateChase.
*/
case ballRotateChase
/**
Orbit.
- returns: Instance of NVActivityIndicatorAnimationOrbit.
*/
case orbit
/**
AudioEqualizer.
- returns: Instance of NVActivityIndicatorAnimationAudioEqualizer.
*/
case audioEqualizer
/**
Stroke.
- returns: Instance of NVActivityIndicatorAnimationCircleStrokeSpin.
*/
case circleStrokeSpin
// swiftlint:disable:next cyclomatic_complexity function_body_length
func animation() -> NVActivityIndicatorAnimationDelegate {
switch self {
case .blank:
return NVActivityIndicatorAnimationBlank()
case .ballPulse:
return NVActivityIndicatorAnimationBallPulse()
case .ballGridPulse:
return NVActivityIndicatorAnimationBallGridPulse()
case .ballClipRotate:
return NVActivityIndicatorAnimationBallClipRotate()
case .squareSpin:
return NVActivityIndicatorAnimationSquareSpin()
case .ballClipRotatePulse:
return NVActivityIndicatorAnimationBallClipRotatePulse()
case .ballClipRotateMultiple:
return NVActivityIndicatorAnimationBallClipRotateMultiple()
case .ballPulseRise:
return NVActivityIndicatorAnimationBallPulseRise()
case .ballRotate:
return NVActivityIndicatorAnimationBallRotate()
case .cubeTransition:
return NVActivityIndicatorAnimationCubeTransition()
case .ballZigZag:
return NVActivityIndicatorAnimationBallZigZag()
case .ballZigZagDeflect:
return NVActivityIndicatorAnimationBallZigZagDeflect()
case .ballTrianglePath:
return NVActivityIndicatorAnimationBallTrianglePath()
case .ballScale:
return NVActivityIndicatorAnimationBallScale()
case .lineScale:
return NVActivityIndicatorAnimationLineScale()
case .lineScaleParty:
return NVActivityIndicatorAnimationLineScaleParty()
case .ballScaleMultiple:
return NVActivityIndicatorAnimationBallScaleMultiple()
case .ballPulseSync:
return NVActivityIndicatorAnimationBallPulseSync()
case .ballBeat:
return NVActivityIndicatorAnimationBallBeat()
case .ballDoubleBounce:
return NVActivityIndicatorAnimationBallDoubleBounce()
case .lineScalePulseOut:
return NVActivityIndicatorAnimationLineScalePulseOut()
case .lineScalePulseOutRapid:
return NVActivityIndicatorAnimationLineScalePulseOutRapid()
case .ballScaleRipple:
return NVActivityIndicatorAnimationBallScaleRipple()
case .ballScaleRippleMultiple:
return NVActivityIndicatorAnimationBallScaleRippleMultiple()
case .ballSpinFadeLoader:
return NVActivityIndicatorAnimationBallSpinFadeLoader()
case .lineSpinFadeLoader:
return NVActivityIndicatorAnimationLineSpinFadeLoader()
case .triangleSkewSpin:
return NVActivityIndicatorAnimationTriangleSkewSpin()
case .pacman:
return NVActivityIndicatorAnimationPacman()
case .ballGridBeat:
return NVActivityIndicatorAnimationBallGridBeat()
case .semiCircleSpin:
return NVActivityIndicatorAnimationSemiCircleSpin()
case .ballRotateChase:
return NVActivityIndicatorAnimationBallRotateChase()
case .orbit:
return NVActivityIndicatorAnimationOrbit()
case .audioEqualizer:
return NVActivityIndicatorAnimationAudioEqualizer()
case .circleStrokeSpin:
return NVActivityIndicatorAnimationCircleStrokeSpin()
}
}
}
/// Function that performs fade in/out animation.
public typealias FadeInAnimation = (UIView) -> Void
/// Function that performs fade out animation.
///
/// - Note: Must call the second parameter on the animation completion.
public typealias FadeOutAnimation = (UIView, @escaping () -> Void) -> Void
// swiftlint:disable file_length
/// Activity indicator view with nice animations
public final class NVActivityIndicatorView: UIView {
// swiftlint:disable identifier_name
/// Default type. Default value is .BallSpinFadeLoader.
public static var DEFAULT_TYPE: NVActivityIndicatorType = .ballSpinFadeLoader
/// Default color of activity indicator. Default value is UIColor.white.
public static var DEFAULT_COLOR = UIColor.white
/// Default color of text. Default value is UIColor.white.
public static var DEFAULT_TEXT_COLOR = UIColor.white
/// Default padding. Default value is 0.
public static var DEFAULT_PADDING: CGFloat = 0
/// Default size of activity indicator view in UI blocker. Default value is 60x60.
public static var DEFAULT_BLOCKER_SIZE = CGSize(width: 60, height: 60)
/// Default display time threshold to actually display UI blocker. Default value is 0 ms.
///
/// - note:
/// Default time that has to be elapsed (between calls of `startAnimating()` and `stopAnimating()`) in order to actually display UI blocker. It should be set thinking about what the minimum duration of an activity is to be worth showing it to the user. If the activity ends before this time threshold, then it will not be displayed at all.
public static var DEFAULT_BLOCKER_DISPLAY_TIME_THRESHOLD = 0
/// Default minimum display time of UI blocker. Default value is 0 ms.
///
/// - note:
/// Default minimum display time of UI blocker. Its main purpose is to avoid flashes showing and hiding it so fast. For instance, setting it to 200ms will force UI blocker to be shown for at least this time (regardless of calling `stopAnimating()` ealier).
public static var DEFAULT_BLOCKER_MINIMUM_DISPLAY_TIME = 0
/// Default message displayed in UI blocker. Default value is nil.
public static var DEFAULT_BLOCKER_MESSAGE: String?
/// Default message spacing to activity indicator view in UI blocker. Default value is 8.
public static var DEFAULT_BLOCKER_MESSAGE_SPACING = CGFloat(8.0)
/// Default font of message displayed in UI blocker. Default value is bold system font, size 20.
public static var DEFAULT_BLOCKER_MESSAGE_FONT = UIFont.boldSystemFont(ofSize: 20)
/// Default background color of UI blocker. Default value is UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
public static var DEFAULT_BLOCKER_BACKGROUND_COLOR = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)
/// Default fade in animation.
public static var DEFAULT_FADE_IN_ANIMATION: FadeInAnimation = { view in
view.alpha = 0
UIView.animate(withDuration: 0.25) {
view.alpha = 1
}
}
/// Default fade out animation.
public static var DEFAULT_FADE_OUT_ANIMATION: FadeOutAnimation = { view, complete in
UIView.animate(withDuration: 0.25,
animations: {
view.alpha = 0
},
completion: { completed in
if completed {
complete()
}
})
}
// swiftlint:enable identifier_name
/// Animation type.
public var type: NVActivityIndicatorType = NVActivityIndicatorView.DEFAULT_TYPE
@available(*, unavailable, message: "This property is reserved for Interface Builder. Use 'type' instead.")
@IBInspectable var typeName: String {
get {
return getTypeName()
}
set {
_setTypeName(newValue)
}
}
/// Color of activity indicator view.
@IBInspectable public var color: UIColor = NVActivityIndicatorView.DEFAULT_COLOR
/// Padding of activity indicator view.
@IBInspectable public var padding: CGFloat = NVActivityIndicatorView.DEFAULT_PADDING
/// Current status of animation, read-only.
@available(*, deprecated)
public var animating: Bool { return isAnimating }
/// Current status of animation, read-only.
public private(set) var isAnimating: Bool = false
/**
Returns an object initialized from data in a given unarchiver.
self, initialized using the data in decoder.
- parameter decoder: an unarchiver object.
- returns: self, initialized using the data in decoder.
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
backgroundColor = UIColor.clear
isHidden = true
}
/**
Create a activity indicator view.
Appropriate NVActivityIndicatorView.DEFAULT_* values are used for omitted params.
- parameter frame: view's frame.
- parameter type: animation type.
- parameter color: color of activity indicator view.
- parameter padding: padding of activity indicator view.
- returns: The activity indicator view.
*/
public init(frame: CGRect, type: NVActivityIndicatorType? = nil, color: UIColor? = nil, padding: CGFloat? = nil) {
self.type = type ?? NVActivityIndicatorView.DEFAULT_TYPE
self.color = color ?? NVActivityIndicatorView.DEFAULT_COLOR
self.padding = padding ?? NVActivityIndicatorView.DEFAULT_PADDING
super.init(frame: frame)
isHidden = true
}
// Fix issue #62
// Intrinsic content size is used in autolayout
// that causes mislayout when using with MBProgressHUD.
/**
Returns the natural size for the receiving view, considering only properties of the view itself.
A size indicating the natural size for the receiving view based on its intrinsic properties.
- returns: A size indicating the natural size for the receiving view based on its intrinsic properties.
*/
override public var intrinsicContentSize: CGSize {
return CGSize(width: bounds.width, height: bounds.height)
}
override public var bounds: CGRect {
didSet {
// setup the animation again for the new bounds
if oldValue != bounds, isAnimating {
setUpAnimation()
}
}
}
/**
Start animating.
*/
public final func startAnimating() {
guard !isAnimating else {
return
}
isHidden = false
isAnimating = true
layer.speed = 1
setUpAnimation()
}
/**
Stop animating.
*/
public final func stopAnimating() {
guard isAnimating else {
return
}
isHidden = true
isAnimating = false
layer.sublayers?.removeAll()
}
// MARK: Internal
// swiftlint:disable:next identifier_name
func _setTypeName(_ typeName: String) {
for item in NVActivityIndicatorType.allCases {
if String(describing: item).caseInsensitiveCompare(typeName) == ComparisonResult.orderedSame {
type = item
break
}
}
}
func getTypeName() -> String {
return String(describing: type)
}
// MARK: Privates
private final func setUpAnimation() {
let animation: NVActivityIndicatorAnimationDelegate = type.animation()
#if swift(>=4.2)
var animationRect = frame.inset(by: UIEdgeInsets(top: padding, left: padding, bottom: padding, right: padding))
#else
var animationRect = UIEdgeInsetsInsetRect(frame, UIEdgeInsets(top: padding, left: padding, bottom: padding, right: padding))
#endif
let minEdge = min(animationRect.width, animationRect.height)
layer.sublayers = nil
animationRect.size = CGSize(width: minEdge, height: minEdge)
animation.setUpAnimation(in: layer, size: animationRect.size, color: color)
}
}
|
[
315685,
116265,
213173,
177365,
12567,
287672,
152823,
294140
] |
ffa233360a9e724da3b7589da73c897fa16fa8e7
|
a868fa14f06e39d17b7bdc12a9162fa512545b5b
|
/Notepad.ver3/SceneDelegate.swift
|
46ae3198472cd7cc00bdd01926b9dc766be417eb
|
[
"MIT"
] |
permissive
|
GeonHyeongKim/Notepad_with_photo_attachment.ver3
|
3c585c2fe97092bb5d28e3476ae237be7c3e7ae3
|
3d134fbb1444ede5679994550bae951eba419cae
|
refs/heads/master
| 2023-02-01T09:45:25.923437 | 2020-12-19T13:37:29 | 2020-12-19T13:37:29 | 310,163,416 | 1 | 0 |
MIT
| 2020-11-05T02:04:35 | 2020-11-05T01:53:53 | null |
UTF-8
|
Swift
| false | false | 2,535 |
swift
|
//
// SceneDelegate.swift
// Notepad.ver3
//
// Created by gunhyeong on 2020/11/05.
// Copyright © 2020 geonhyeong. All rights reserved.
//
import UIKit
@available(iOS 13.0, *)
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func sceneDidEnterBackground(_ scene: UIScene) {
DataManager.shared.saveContext()
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
// Save changes in the application's managed object context when the application transitions to the background.
}
}
|
[
393221,
163849,
393228,
393231,
393251,
344103,
393260,
393269,
213049,
376890,
16444,
393277,
376906,
327757,
254032,
286804,
368728,
254045,
368736,
180322,
376932,
286833,
286845,
286851,
417925,
262284,
360598,
286880,
286889,
377003,
377013,
164029,
327872,
180418,
377030,
377037,
180432,
377047,
418008,
385243,
377063,
327915,
205037,
393457,
393461,
393466,
418044,
336124,
385281,
336129,
262405,
164107,
180491,
336140,
368913,
262417,
262423,
377118,
377121,
262437,
254253,
336181,
262455,
393539,
262473,
344404,
213333,
270687,
262497,
418145,
262501,
213354,
246124,
262508,
262512,
213374,
385420,
262551,
262553,
385441,
385444,
262567,
385452,
262574,
393649,
385460,
262587,
344512,
262593,
336326,
360917,
369119,
328178,
328180,
328183,
328190,
254463,
328193,
98819,
164362,
328207,
410129,
393748,
377372,
188959,
385571,
197160,
377384,
33322,
352822,
197178,
418364,
188990,
369224,
270922,
385610,
352844,
385617,
352865,
262761,
352875,
344694,
352888,
336513,
377473,
336517,
344710,
385671,
148106,
377485,
352919,
98969,
336549,
344745,
336556,
164535,
336568,
328379,
164539,
328387,
352969,
385743,
385749,
189154,
369382,
361196,
344832,
336644,
344843,
328462,
361231,
394002,
336660,
418581,
418586,
434971,
369436,
369439,
418591,
262943,
418594,
336676,
418600,
418606,
271154,
328498,
369464,
361274,
328516,
336709,
328520,
361289,
336712,
328523,
336715,
361300,
213848,
426842,
361307,
197469,
254813,
361310,
361318,
344936,
361323,
361335,
328574,
369544,
222129,
345036,
386004,
345046,
386012,
386019,
328690,
435188,
328703,
328710,
418822,
377867,
328715,
386070,
336922,
345119,
377888,
328747,
345134,
345139,
361525,
361537,
377931,
197708,
189525,
156762,
402523,
361568,
148580,
345200,
361591,
361594,
410746,
214150,
345224,
386187,
337048,
345247,
361645,
337076,
402615,
361657,
402636,
328925,
165086,
165092,
222438,
328942,
386286,
206084,
115973,
328967,
345377,
345380,
353572,
345383,
337207,
345400,
378170,
369979,
337224,
337230,
337235,
353634,
337252,
402792,
345449,
99692,
271731,
378232,
337278,
181639,
353674,
181644,
181650,
181655,
230810,
181671,
181674,
181679,
181682,
337330,
181687,
370105,
181691,
181697,
337350,
181704,
337366,
271841,
329192,
361961,
329195,
116211,
337399,
402943,
337416,
329227,
419341,
419345,
329234,
419351,
345626,
419357,
345631,
370208,
419360,
394787,
419363,
370214,
419369,
394796,
419377,
419386,
206397,
419401,
353868,
419404,
419408,
214611,
419412,
403040,
345702,
222831,
370298,
353920,
345737,
198282,
403085,
403092,
345750,
419484,
345758,
345763,
419492,
419498,
419502,
370351,
419507,
337588,
419510,
419513,
419518,
403139,
337607,
419528,
419531,
419536,
272083,
394967,
419545,
345819,
419548,
181982,
419551,
345829,
419560,
337643,
419564,
337647,
370416,
141052,
337661,
337671,
362249,
362252,
395022,
362256,
321300,
345888,
116512,
378664,
354107,
354112,
247618,
370504,
329545,
345932,
354124,
370510,
247639,
337751,
370520,
313181,
182110,
354143,
345965,
354157,
345968,
345971,
345975,
182136,
403321,
1914,
354173,
247692,
395148,
337809,
247701,
329625,
436127,
436133,
247720,
337834,
362414,
337845,
190393,
247760,
346064,
346069,
329699,
354275,
190440,
247790,
354314,
346140,
337980,
436290,
378956,
395340,
436307,
338005,
329816,
100454,
329833,
329857,
329868,
329886,
411806,
346273,
362661,
100525,
379067,
387261,
256193,
395467,
411862,
256214,
411865,
411869,
411874,
379108,
411877,
387303,
395496,
346344,
338154,
387307,
346350,
338161,
436474,
321787,
379135,
411905,
43279,
379154,
395539,
387350,
338201,
387353,
182559,
338212,
248112,
362823,
436556,
321880,
362844,
379234,
354674,
182642,
321911,
420237,
379279,
354728,
338353,
338363,
338382,
272849,
248279,
256474,
182755,
338404,
338411,
330225,
248309,
199165,
248332,
330254,
199182,
199189,
420377,
330268,
191012,
330320,
199250,
191069,
346722,
248427,
191085,
338544,
191093,
346743,
330384,
346769,
150184,
174775,
248505,
174778,
363198,
223936,
355025,
273109,
264919,
338661,
264942,
330479,
363252,
338680,
207620,
264965,
191240,
338701,
199455,
396067,
346917,
396070,
215854,
338764,
330581,
330585,
265056,
265059,
355180,
330612,
330643,
412600,
207809,
379849,
396246,
330711,
248794,
248799,
437219,
257009,
265208,
330750,
199681,
338951,
330761,
330769,
330775,
248863,
158759,
404526,
396337,
330803,
396340,
339002,
388155,
339010,
248905,
330827,
330830,
248915,
183384,
339037,
412765,
257121,
322660,
265321,
330869,
248952,
420985,
330886,
347288,
248986,
44199,
380071,
339118,
249018,
339133,
322763,
330959,
330966,
265433,
265438,
388320,
363757,
339199,
396552,
175376,
175397,
208167,
273709,
372016,
437553,
347442,
199989,
175416,
396601,
208189,
437567,
175425,
437571,
437576,
437584,
331089,
396634,
175451,
437596,
429408,
175458,
208228,
175461,
175464,
265581,
331124,
175478,
249210,
175484,
249215,
175487,
249219,
175491,
249225,
249228,
249235,
175514,
175517,
396703,
175523,
355749,
396723,
380353,
339401,
380364,
339406,
372177,
339414,
249303,
413143,
339418,
339421,
249310,
339425,
249313,
339429,
339435,
249329,
69114,
372229,
339464,
249355,
208399,
175637,
134689,
339504,
265779,
421442,
413251,
265796,
265806,
224854,
224858,
339553,
257636,
224871,
372328,
257647,
372338,
339572,
224885,
224888,
224891,
224895,
126597,
421509,
224905,
11919,
224914,
126611,
224917,
224920,
126618,
208539,
224923,
224927,
224933,
257705,
224939,
224943,
257713,
257717,
224949,
257721,
224954,
257725,
224960,
257733,
224966,
224970,
257740,
224976,
257745,
257748,
224982,
257752,
257762,
224996,
225000,
339696,
225013,
225021,
339711,
257791,
225027,
257796,
339722,
257805,
225039,
249617,
225044,
167701,
372500,
257815,
225049,
257820,
225054,
184096,
257825,
225059,
339748,
225068,
257837,
413485,
225074,
257843,
225077,
225080,
397113,
225083,
397116,
257853,
225088,
225094,
225097,
323404,
257872,
225105,
339795,
397140,
225109,
225113,
257881,
257884,
225120,
413539,
225128,
257897,
225138,
339827,
257909,
372598,
225142,
257914,
257917,
225150,
257922,
380803,
225156,
339845,
225166,
397201,
225171,
380823,
225176,
225183,
372698,
372704,
372707,
356336,
380919,
405534,
266295,
266298,
217158,
421961,
200786,
356440,
217180,
430181,
266351,
356467,
266365,
266375,
381069,
225425,
250003,
225430,
250008,
356507,
250012,
225439,
135328,
192674,
225442,
438434,
225445,
225448,
225451,
225456,
430257,
225459,
225462,
225468,
389309,
225472,
225476,
389322,
225488,
225491,
225494,
266454,
225497,
225500,
225503,
225506,
356580,
225511,
225515,
225519,
381177,
356631,
356638,
356641,
356644,
356647,
389417,
266537,
356650,
356656,
332081,
307507,
340276,
356662,
397623,
332091,
225599,
332098,
201030,
348489,
332107,
151884,
430422,
348503,
332118,
332130,
250211,
340328,
250217,
348523,
348528,
332153,
356734,
389503,
332158,
438657,
250239,
332162,
348548,
356741,
332175,
160152,
373146,
373149,
70048,
356783,
324032,
201158,
127473,
217590,
340473,
324095,
324100,
324103,
324112,
340501,
324118,
324122,
340512,
332325,
324134,
356908,
324141,
324143,
356917,
324150,
324156,
168509,
348734,
324161,
324165,
356935,
381513,
324171,
324174,
324177,
389724,
332381,
373344,
340580,
348777,
381546,
119432,
340628,
184983,
373399,
340639,
258723,
332460,
332464,
332473,
381626,
332484,
332487,
332494,
357070,
357074,
332512,
332521,
340724,
332534,
155647,
348926,
389927,
348979,
152371,
398141,
127815,
357202,
389971,
357208,
136024,
389979,
430940,
357212,
357215,
201580,
201583,
349041,
340850,
201589,
430967,
324473,
398202,
119675,
324476,
340859,
430973,
324479,
340863,
324482,
324485,
324488,
185226,
381834,
324493,
324496,
324499,
430996,
324502,
324511,
422817,
324514,
201638,
373672,
324525,
5040,
324534,
5047,
324539,
324542,
349129,
340940,
340942,
209874,
340958,
431073,
398307,
340964,
209896,
201712,
209904,
349173,
381947,
201724,
349181,
431100,
431107,
209944,
209948,
250915,
250917,
169002,
357419,
209966,
209969,
209973,
209976,
209980,
209988,
209991,
431180,
209996,
349268,
250968,
210011,
373853,
341094,
210026,
210028,
349296,
210032,
210037,
210042,
210045,
349309,
160896,
349313,
152704,
210053,
210056,
349320,
259217,
373905,
210068,
210072,
210078,
210081,
210085,
210089,
210096,
210100,
324792,
210108,
357571,
210116,
210128,
333010,
210132,
333016,
210139,
210144,
218355,
251123,
218361,
275709,
128254,
275713,
242947,
275717,
275723,
333075,
349460,
333079,
251161,
349486,
349492,
415034,
251211,
210261,
365912,
259423,
374113,
251236,
374118,
234867,
390518,
357756,
374161,
112021,
349591,
333222,
210357,
259516,
415168,
366035,
415187,
366039,
415192,
415197,
415200,
333285,
415208,
366057,
366064,
415217,
415225,
415258,
415264,
366118,
415271,
382503,
349739,
144940,
415279,
415282,
415286,
210488,
415291,
415295,
333387,
333396,
333400,
333415,
423529,
423533,
333423,
210547,
415354,
333440,
267910,
267929,
333472,
333512,
259789,
358100,
366301,
333535,
366308,
366312,
431852,
399086,
366319,
210673,
366322,
399092,
366326,
333566,
268042,
210700,
210707,
399129,
333593,
333595,
366384,
358192,
210740,
366388,
358201,
399166,
325441,
366403,
325447,
341831,
341835,
341839,
341844,
415574,
358235,
341852,
350046,
399200,
358256,
268144,
358260,
325494,
186233,
333690,
243584,
325505,
333699,
399244,
333709,
333725,
333737,
382891,
333767,
358348,
333777,
219094,
358372,
153572,
350190,
333819,
350204,
325633,
325637,
350214,
333838,
350225,
350232,
333851,
350238,
350241,
374819,
350245,
350249,
350252,
178221,
350260,
350272,
243782,
350281,
350286,
374865,
252021,
342134,
374904,
333989,
333998,
334012,
260299,
350411,
350417,
350423,
350426,
334047,
350449,
358645,
350454,
350459,
350462,
350465,
350469,
325895,
268553,
194829,
350477,
268560,
350481,
432406,
350487,
350491,
350494,
325920,
350500,
350505,
358701,
391469,
350510,
358705,
358714,
358717,
383307,
358738,
334162,
383331,
383334,
391531,
383342,
334204,
391564,
366991,
334224,
342431,
375209,
326059,
342453,
334263,
326087,
358857,
195041,
334312,
104940,
375279,
350724,
186898,
342546,
350740,
342551,
334359,
342555,
334364,
416294,
350762,
252463,
358962,
334386,
334397,
252483,
219719,
399957,
244309,
334425,
326240,
334466,
334469,
391813,
162446,
326291,
342680,
342685,
260767,
342711,
244410,
260802,
350918,
154318,
342737,
391895,
154329,
416476,
64231,
113389,
342769,
203508,
375541,
342777,
391938,
391949,
375569,
375572,
375575,
375580,
162592,
334633,
326444,
383794,
326452,
326455,
375613,
244542,
375616,
326468,
244552,
342857,
326474,
326479,
326486,
416599,
342875,
244572,
326494,
326503,
433001,
326508,
400238,
326511,
211826,
211832,
392061,
351102,
260993,
400260,
211846,
252823,
400279,
392092,
400286,
359335,
211885,
400307,
351169,
359362,
170950,
326599,
359367,
359383,
359389,
383968,
359411,
261109,
244728,
261112,
383999,
261130,
359452,
261148,
261155,
261160,
261166,
359471,
375868,
384099,
384102,
367724,
384108,
326764,
343155,
384115,
212095,
384136,
384140,
384144,
384152,
384158,
384161,
351399,
384169,
367795,
384182,
384189,
351424,
384192,
343232,
244934,
367817,
244938,
384202,
253132,
326858,
343246,
384209,
146644,
351450,
384225,
359650,
343272,
351467,
384247,
351480,
384250,
351483,
343307,
384270,
261391,
253202,
261395,
384276,
384284,
245021,
384290,
253218,
171304,
245032,
384299,
351535,
245042,
326970,
384324,
343366,
212296,
212304,
367966,
343394,
343399,
367981,
343410,
155000,
327035,
245121,
245128,
253321,
155021,
384398,
245137,
245143,
245146,
245149,
343453,
245152,
245155,
155045,
245158,
40358,
245163,
327090,
343478,
359867,
384444,
146878,
327108,
327112,
384457,
327118,
359887,
359891,
343509,
368093,
155103,
343535,
343540,
368120,
343545,
359948,
359951,
400977,
400982,
179803,
138865,
155255,
155274,
368289,
245410,
245415,
425652,
425663,
155328,
245463,
155352,
155356,
212700,
155364,
245477,
155372,
245487,
212723,
245495,
409336,
155394,
155404,
245528,
155423,
360224,
155439,
204592,
155444,
155448,
417596,
384829,
360262,
155463,
155477,
376665,
155484,
261982,
425823,
155488,
376672,
155492,
327532,
261997,
376686,
262000,
262003,
425846,
147319,
327542,
262006,
262009,
262012,
155517,
155523,
155526,
360327,
155532,
262028,
262031,
262034,
262037,
262040,
262043,
155550,
253854,
262046,
262049,
262052,
327590,
155560,
155563,
155566,
327613,
393152,
311244,
212945,
393170,
155604,
155620,
253924,
155622,
253927,
327655,
360432,
393204,
360439,
253944,
393209,
393215
] |
e49456eaa72f655071a6f7d7f9145afc32a18ffe
|
7c6801f0af8a243acdc785ac78f3874471b0d80d
|
/TestProject/TestProject/UI/Details/Manager/DetailsLayoutManager.swift
|
053fa34454b068116c20965ec05a08e3c4e7ce17
|
[] |
no_license
|
Ivan515/TestProject
|
19a051259c883ebbf7b47df0772bad2b26f59fee
|
0949e3e0dad07a189e833f7c681e9620c625d91f
|
refs/heads/master
| 2022-11-19T13:35:29.900216 | 2020-07-24T10:32:22 | 2020-07-24T10:32:22 | 281,203,531 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,503 |
swift
|
//
// DetailsLayoutManager.swift
// TestProject
//
// Created by Ivan Apet on 7/21/20.
// Copyright © 2020 Ivan Apet. All rights reserved.
//
import UIKit
class DetailsLayoutManager: NSObject {
private let model: CarInfoModel!
private let vc: DetailsViewController!
private let tableView: UITableView!
private var cellData = [UITableViewCell]()
init(vc: DetailsViewController, model: CarInfoModel, tableView: UITableView) {
self.vc = vc
self.model = model
self.tableView = tableView
super.init()
configure()
}
}
extension DetailsLayoutManager {
func configure() {
makeCells()
tableView.dataSource = self
}
}
extension DetailsLayoutManager : UITableViewDelegate {
}
extension DetailsLayoutManager: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return cellData.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return cellData[indexPath.row]
}
}
// MARK: -
// MARK: - cells
extension DetailsLayoutManager {
func makeCells() {
cellData.append(photosCell(model: model))
cellData.append(generalInfoCell(model: model))
cellData.append(oneLabelCell(type: .empty))
cellData.append(progressCell(model: model))
cellData.append(oneLabelCell(type: .listingDetails))
cellData.append(smallInfoCell(type: .price, infoValue: model.makeCarPrice()))
cellData.append(smallInfoCell(type: .photos, infoValue: model.makePhotosCountString()))
cellData.append(oneLabelCell(type: .vehicleDetails))
cellData.append(smallInfoCell(type: .trim, infoValue: model.trim ?? ""))
cellData.append(smallInfoCell(type: .features, infoValue: "Add Features"))
cellData.append(smallInfoCell(type: .transmission, infoValue: model.transmission))
cellData.append(smallInfoCell(type: .mileage, infoValue: model.makeMillesString()))
cellData.append(smallInfoCell(type: .zipCode, infoValue: model.addresses.first?.zipcode))
cellData.append(oneLabelCell(type: .contactInfo))
cellData.append(smallInfoCell(type: .email, infoValue: model.owner?.email))
cellData.append(smallInfoCell(type: .phone, infoValue: model.phone))
}
}
extension DetailsLayoutManager {
func photosCell(model: CarInfoModel) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(ofType: ImagesTableCell.self)
cell.set(images: model.images)
return cell
}
func generalInfoCell(model: CarInfoModel) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(ofType: GeneralInfoTableCell.self)
cell.set(model: model)
return cell
}
func oneLabelCell(type: OneLabelCellType) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(ofType: OneLabelTableCell.self)
cell.set(type: type)
return cell
}
func progressCell(model: CarInfoModel) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(ofType: ProgressTableCell.self)
cell.set(model: model)
return cell
}
func smallInfoCell(type: InfoCellType, infoValue: String?) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(ofType: SmallInfoTableCell.self)
cell.set(type: type, value: infoValue)
return cell
}
}
|
[
-1
] |
cfac62759437adff9e66421414d6e33f41ec5023
|
111747d94df1994d78c350b45c99fcea6b0db7e8
|
/BA_JonathanKofahl/BA_JonathanKofahl/TribeViewController.swift
|
b221ada81d5f20982b3d8dd15a775d42953d4513
|
[] |
no_license
|
jonathankofahl/bachelor-thesis_2017
|
1b845ceb66354377524669eb90eb80c6e8be3120
|
079ce0b9428f2b8abb7bed66c850235fbc110cbc
|
refs/heads/master
| 2022-07-31T11:52:52.367521 | 2017-08-08T16:24:30 | 2017-08-08T16:24:30 | 94,015,173 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,367 |
swift
|
//
// TribeViewController.swift
// BA_JonathanKofahl
//
// Created by Jonathan Kofahl on 12.06.17.
//
//
import UIKit
class TribeViewController: UIViewController {
//MARK: - Variables & Outlets
var containerView: ContainerViewController!
@IBOutlet weak var topView: UIView!
@IBOutlet weak var stackView: UIStackView!
var defaults = UserDefaults.standard
//MARK: - Methods
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.containerView.initialize()
//MARK: - Color load from UserDefaults
if defaults.value(forKey: "appColor") != nil {
let color = UIColor.init(hexString: defaults.value(forKey: "appColor") as! String)
topView.backgroundColor = color
for view in stackView.arrangedSubviews {
view.backgroundColor = color
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "embedContainer" {
self.containerView = segue.destination as! ContainerViewController
}
}
var option = 0
@IBAction func swapButton2Pressed(_ sender: Any) {
if option == 0 {
option = 1
self.containerView.currentSegueIdentifier = "embedSecond"
self.containerView.swapViewControllers()
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(1), execute: {
self.option = 2
})
}
}
@IBAction func swapButtonPressed(_ sender: Any) {
if option == 2 {
option = 3
self.containerView.currentSegueIdentifier = "embedFirst"
self.containerView.swapViewControllers()
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(1), execute: {
self.option = 0
})
}
}
@IBAction func cancelNewTree(_ sender: Any) {
let infoController = self.tabBarController?.viewControllers?[0] as! InformationViewController
infoController.alertFunc(sender: sender, parentController: self)
}
}
|
[
-1
] |
9bc3e26065c877657fe6578761317bd0c9e9349e
|
2e727c621f9225631cf7f3b6d1f78eea76b7c52a
|
/LoginApp/AppDelegate/AppDelegate.swift
|
e65c235febbb88dbc2adfbbd6d3e6c0e9e716655
|
[] |
no_license
|
jlivcane/LoginApp
|
f465104258f16153e583e31d27cced57daf951f4
|
fd618ad793aba24efe61581e89ab48cd54ffc3bd
|
refs/heads/master
| 2022-12-22T16:36:10.255935 | 2020-10-01T12:26:36 | 2020-10-01T12:26:36 | 294,147,513 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,432 |
swift
|
//
// AppDelegate.swift
// LoginApp
//
// Created by jekaterina.livcane on 07/09/2020.
// Copyright © 2020 jekaterina.livcane. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
|
[
393222,
393224,
393230,
393250,
344102,
393266,
163891,
213048,
376889,
385081,
393275,
376905,
327756,
254030,
286800,
368727,
180313,
368735,
180320,
376931,
368752,
262283,
327871,
180416,
180431,
377046,
377060,
327914,
205036,
393456,
393460,
418043,
336123,
336128,
385280,
262404,
180490,
262416,
262422,
262436,
336180,
262454,
262472,
344403,
65880,
262496,
262499,
213352,
246123,
262507,
262510,
213372,
385419,
262550,
262552,
385440,
385443,
262573,
393647,
385458,
262586,
344511,
262592,
360916,
369118,
328177,
328179,
328182,
328189,
328192,
164361,
328206,
393747,
254490,
188958,
385570,
33316,
197159,
377383,
352821,
188987,
418363,
369223,
385609,
385616,
352856,
352864,
369253,
262760,
352874,
254587,
336512,
148105,
352918,
98968,
344744,
361129,
336555,
385713,
434867,
164534,
336567,
328378,
164538,
328386,
352968,
418507,
385748,
361179,
139997,
189153,
369381,
344831,
336643,
344835,
344841,
336659,
418580,
418585,
434970,
418589,
262942,
418593,
336675,
328484,
418598,
418605,
336696,
361273,
328515,
336708,
328519,
336711,
361288,
328522,
336714,
426841,
254812,
361309,
197468,
361315,
361322,
328573,
377729,
369542,
345035,
345043,
386003,
386011,
386018,
386022,
435187,
328702,
328714,
386069,
336921,
386073,
336925,
345118,
377887,
345138,
386101,
197707,
345169,
156761,
361567,
148578,
345199,
386167,
361593,
410745,
214149,
345222,
386186,
337047,
345246,
214175,
337071,
337075,
386258,
328924,
222437,
328941,
386285,
345376,
345379,
345382,
337205,
345399,
378169,
369978,
337222,
337229,
337234,
263508,
402791,
345448,
378227,
271745,
181638,
353673,
181643,
181654,
230809,
181670,
181673,
181681,
337329,
181684,
181690,
361917,
181696,
337349,
181703,
337365,
271839,
329191,
361960,
329194,
337398,
337415,
329226,
419343,
419349,
345625,
370205,
419359,
394786,
419362,
370213,
419368,
206395,
214593,
419400,
419402,
353867,
214610,
345701,
222830,
370297,
403075,
345736,
198280,
345749,
345757,
345762,
419491,
345765,
419497,
419501,
419506,
419509,
419512,
337592,
419517,
337599,
419527,
419530,
419535,
272081,
419542,
394966,
419544,
181977,
419547,
419550,
419559,
337642,
419563,
337645,
370415,
337659,
141051,
337668,
395021,
362255,
321299,
116509,
345887,
378663,
354106,
354111,
247617,
354117,
329544,
354130,
247637,
337750,
370519,
313180,
345964,
345967,
345970,
345974,
403320,
354172,
247691,
337808,
247700,
329623,
436132,
337833,
337844,
346057,
247759,
346063,
329697,
190439,
247789,
346139,
436289,
378954,
395339,
338004,
329832,
329855,
329867,
329885,
346272,
100524,
379066,
387260,
256191,
346316,
411861,
411864,
411873,
379107,
387301,
346343,
338152,
387306,
387312,
346355,
436473,
321786,
379134,
411903,
379152,
395538,
387349,
338199,
182558,
338211,
248111,
362822,
436555,
190796,
321879,
379233,
354673,
321910,
248186,
420236,
379278,
354727,
338352,
330189,
338381,
338386,
338403,
338409,
248308,
199164,
330252,
330267,
354855,
199249,
174695,
248425,
191084,
338543,
191092,
346742,
330383,
354974,
150183,
248504,
223934,
355024,
273108,
355028,
264918,
183005,
256734,
436962,
338660,
338664,
264941,
207619,
338700,
256786,
199452,
363293,
396066,
346916,
396069,
215853,
338763,
330580,
265055,
387944,
355179,
330610,
330642,
355218,
396245,
330710,
248792,
248798,
183282,
265207,
330748,
265214,
330760,
330768,
248862,
396328,
158761,
199728,
330800,
396339,
339001,
388154,
388161,
248904,
330826,
248914,
183383,
339036,
412764,
257120,
265320,
248951,
420984,
330889,
248985,
339097,
44197,
380070,
339112,
249014,
126144,
330965,
388319,
388347,
175375,
159005,
175396,
208166,
273708,
372015,
347441,
372018,
199988,
175415,
396600,
437566,
175423,
437570,
437575,
437583,
331088,
437587,
331093,
396633,
175450,
175457,
208227,
175460,
175463,
437620,
175477,
249208,
175483,
175486,
249214,
175489,
249218,
249227,
249234,
175513,
175516,
396705,
175522,
355748,
380332,
396722,
216517,
380360,
216522,
339404,
372176,
208337,
339412,
413141,
339417,
249308,
339424,
339428,
339434,
249328,
69113,
339461,
380432,
175635,
339503,
265778,
265795,
396872,
265805,
224853,
224857,
224870,
257646,
372337,
224884,
224887,
224890,
224894,
224897,
372353,
216707,
126596,
339588,
224904,
11918,
159374,
224913,
126610,
339601,
224916,
224919,
126616,
224922,
224926,
224929,
224932,
224936,
257704,
224942,
257712,
224947,
257720,
257732,
224969,
339662,
224981,
224986,
257761,
224993,
257764,
224999,
339695,
225012,
257787,
225020,
339710,
257790,
225025,
257794,
339721,
257801,
257804,
225038,
257807,
225043,
372499,
225048,
257819,
225053,
225058,
339747,
339749,
257833,
225066,
257836,
225070,
225073,
372532,
397112,
225082,
397115,
225087,
323402,
257868,
225103,
257871,
397139,
225108,
225112,
257883,
257886,
225119,
225127,
257896,
274280,
257901,
225137,
257908,
225141,
257912,
257916,
225148,
257920,
225155,
339844,
225165,
397200,
225170,
380822,
225175,
225180,
118691,
184244,
372702,
372706,
356335,
380918,
405533,
430129,
217157,
421960,
356439,
421990,
266350,
356466,
266362,
381068,
225423,
250002,
250004,
225429,
356506,
225437,
135327,
225441,
438433,
225444,
438436,
225447,
225450,
225455,
430256,
225458,
225461,
225466,
389307,
225470,
381120,
372929,
430274,
225475,
389320,
225484,
225487,
225490,
225493,
266453,
225496,
225499,
225502,
225505,
356578,
225510,
225514,
225518,
372976,
381176,
389380,
356640,
356643,
356649,
356655,
332080,
340275,
356660,
397622,
332090,
225597,
332097,
201028,
348488,
332106,
332117,
250199,
250202,
332125,
250210,
348525,
332152,
389502,
250238,
332161,
332172,
373145,
340379,
324030,
266687,
340451,
127471,
340472,
324094,
266754,
324099,
324102,
324111,
340500,
324117,
324131,
332324,
381481,
324139,
356907,
324142,
324149,
324155,
348733,
324160,
324164,
348743,
381512,
324170,
324173,
324176,
332380,
340627,
184982,
373398,
258721,
332453,
332459,
389805,
332463,
381617,
332471,
332483,
332486,
373449,
332493,
357069,
357073,
332511,
332520,
340718,
332533,
348924,
389892,
389926,
152370,
340789,
348982,
398139,
127814,
357206,
430939,
357211,
357214,
201579,
201582,
349040,
340849,
201588,
430965,
324472,
398201,
119674,
340858,
324475,
430972,
340861,
324478,
324481,
398211,
324484,
324487,
381833,
324492,
324495,
324498,
430995,
324501,
324510,
422816,
324513,
201637,
398245,
324524,
340909,
324533,
5046,
324538,
324541,
398279,
340939,
340941,
209873,
340957,
431072,
398306,
340963,
209895,
201711,
349172,
349180,
439294,
209943,
209946,
250914,
357410,
185380,
357418,
209965,
209968,
209971,
209975,
209979,
209987,
209990,
341071,
349267,
250967,
210010,
341091,
210025,
210027,
210030,
210036,
210039,
341113,
349308,
210044,
349311,
152703,
160895,
210052,
349319,
210055,
210067,
210071,
210077,
210080,
251044,
210084,
210088,
210095,
210098,
210115,
332997,
210127,
333009,
210131,
333014,
210138,
210143,
218354,
218360,
251128,
275706,
275712,
275715,
275721,
333078,
251160,
349484,
349491,
251189,
415033,
251210,
357708,
210260,
259421,
365921,
333154,
251235,
333162,
234866,
390516,
333175,
357755,
136590,
112020,
357792,
259515,
415166,
415185,
366034,
366038,
415191,
415193,
415196,
415199,
423392,
333284,
366056,
366061,
210420,
415224,
423423,
415257,
415263,
366117,
415270,
415278,
415281,
415285,
415290,
415293,
349761,
333386,
333399,
366172,
333413,
423528,
423532,
210544,
415353,
333439,
415361,
267909,
333498,
210631,
333511,
358099,
333534,
431851,
210672,
210695,
268041,
210698,
366348,
210706,
399128,
333594,
210719,
358191,
366387,
399159,
358200,
325440,
366401,
341829,
325446,
341834,
341838,
341843,
358234,
341851,
399199,
259938,
399206,
268143,
358255,
399215,
358259,
341876,
333689,
243579,
325504,
333698,
333724,
382890,
358339,
333774,
358371,
333818,
268298,
333850,
178218,
243781,
374864,
342111,
342133,
374902,
333997,
334011,
260289,
260298,
350410,
350416,
350422,
350425,
268507,
334045,
350445,
375026,
358644,
350458,
350461,
350464,
325891,
350467,
350475,
375053,
268559,
350480,
432405,
350486,
350490,
325914,
325917,
350493,
350498,
350504,
358700,
350509,
391468,
358704,
358713,
358716,
383306,
334161,
383321,
383330,
383333,
383341,
334203,
268668,
194941,
391563,
366990,
416157,
342430,
375208,
326058,
375216,
334262,
334275,
326084,
358856,
195039,
334304,
334311,
375277,
334321,
350723,
186897,
342545,
334358,
342550,
342554,
334363,
350761,
252461,
334384,
383536,
334394,
252482,
219718,
334407,
334420,
350822,
375400,
334465,
334468,
162445,
326290,
342679,
342683,
260766,
342710,
244409,
260797,
334528,
260801,
350917,
391894,
154328,
416473,
64230,
342766,
342776,
391937,
391948,
375568,
326416,
375571,
162591,
326441,
326451,
326454,
326460,
244540,
326467,
244551,
326473,
326477,
326485,
326490,
326502,
375656,
433000,
326507,
326510,
211825,
211831,
359295,
351104,
342915,
400259,
236430,
342930,
252822,
392091,
400285,
252836,
359334,
211884,
400306,
351168,
326598,
359366,
359382,
359388,
383967,
343015,
359407,
261108,
244726,
261111,
383997,
261129,
359451,
261147,
261153,
261159,
359470,
359476,
343131,
384101,
384107,
367723,
384114,
351364,
384135,
384139,
384143,
384151,
384160,
384168,
367794,
244916,
384181,
367800,
384188,
384191,
326855,
244937,
384201,
253130,
343244,
384208,
146642,
384224,
359649,
343270,
351466,
384246,
351479,
343306,
359694,
384275,
384283,
245020,
384288,
245029,
171302,
351534,
245040,
425276,
384323,
212291,
343365,
212303,
367965,
343393,
343398,
367980,
343409,
253303,
154999,
343417,
327034,
245127,
384397,
245136,
245142,
245145,
343450,
245148,
245151,
245154,
245157,
245162,
327084,
359865,
384443,
146876,
327107,
384453,
327110,
327115,
327117,
359886,
359890,
343507,
368092,
343534,
343539,
368119,
343544,
409091,
359947,
359955,
343630,
327275,
245357,
138864,
155254,
155273,
368288,
245409,
425638,
155322,
425662,
155327,
245460,
155351,
155354,
212699,
245475,
155363,
245483,
409335,
155393,
155403,
245525,
360223,
155442,
155447,
155461,
360261,
155482,
261981,
425822,
155487,
376671,
155490,
155491,
327531,
261996,
376685,
261999,
262002,
327539,
262005,
262008,
262011,
155516,
155521,
155525,
360326,
155531,
262027,
262030,
262033,
262036,
262039,
262042,
155549,
262045,
262048,
262051,
327589,
155559,
155562,
155565,
393150,
393169,
155611,
155619,
253923,
155621,
253926,
327654,
393203,
360438,
393206,
393212,
155646
] |
b94d0500d3fabf32bb79fbc401c8f6b947dce8de
|
00f16c32602f623232bd062334b29636a50c4836
|
/iOSApp/HGSS/HGSS/Common/Utils/Constants.swift
|
fb8ca65dd7aa4c97e50e574197151f896bb9d2a6
|
[
"Apache-2.0",
"CC-BY-3.0",
"CC-BY-4.0"
] |
permissive
|
mariotudan/HGSS-rescue
|
4233ab03f299c5cac597f978a632967173053e9e
|
6f7dc8861de255af8ee9fd8af36178cbec8607fb
|
refs/heads/master
| 2021-06-16T07:53:12.575730 | 2017-05-21T08:10:41 | 2017-05-21T08:10:41 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 339 |
swift
|
//
// Constants.swift
// HGSS
//
// Created by Nikola Majcen on 20/05/2017.
// Copyright © 2017 Nikola Majcen. All rights reserved.
//
import Foundation
struct Constants {
struct UserDefaults {
static let userToken = "userToken"
static let userId = "userId"
static let username = "username"
}
}
|
[
-1
] |
886869fe80754a4badd1d1ec6113d9901d9d4f96
|
e01795dee635d4a0bdc785c22bac201e908a2138
|
/Convenio/View Controllers/MapViewController.swift
|
f5c2f758e0cf2b533ba96debeb7b283c41ba4b02
|
[] |
no_license
|
uhsjcl/convenio-ios
|
49ea32e93e8c75fb12c0a773508d60a96a31795e
|
8954948286ef712cabffef2673f2203e7cfae92d
|
refs/heads/master
| 2022-11-11T23:50:16.772614 | 2020-07-06T18:35:06 | 2020-07-06T18:35:06 | 198,298,507 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,873 |
swift
|
//
// MapViewController.swift
// Convenio
//
// Created by Anshay Saboo on 11/30/19.
// Copyright © 2019 Anshay Saboo. All rights reserved.
//
import UIKit
import Mapbox
import SideMenuSwift
class MapViewController: UIViewController {
@IBOutlet weak var mapView: MGLMapView!
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
var mapBoundary: MGLCoordinateBounds!
var eventsToDisplay: [Event] = []
var locations: [Location] = []
var selectedEvent: Event!
override func viewDidLoad() {
super.viewDidLoad()
// begin setting up the view
setupMapView()
// display the indicator
activityIndicator.startAnimating()
}
override func viewDidLayoutSubviews() {
mapView.roundTopTwoCorners()
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "ShowEventDetails" {
let dest: EventDetailsViewController = segue.destination as! EventDetailsViewController
dest.eventToShow = selectedEvent
}
}
// Fetch the geo dataset with coordinates of all points
func setupAnnotations() {
setupEvents()
MapManager.getAllUniGeoPoints { (locations, success) in
// hide activity indicator
self.activityIndicator.isHidden = true
// display annotations
self.locations = locations
self.addEventAnnotations()
}
}
func setupMapView() {
// delegate
mapView.delegate = self
// zoom in on University High School
let uniCoords = CLLocationCoordinate2D(latitude: 33.651785, longitude: -117.822857)
mapView.setCenter(uniCoords, zoomLevel: 17, animated: false)
// set boundaries
let northeast = CLLocationCoordinate2D(latitude: 33.657009, longitude: -117.816946)
let southwest = CLLocationCoordinate2D(latitude: 33.645963, longitude: -117.829540)
mapBoundary = MGLCoordinateBounds(sw: southwest, ne: northeast)
// show user location
mapView.showsUserLocation = true
mapView.showsHeading = true
}
// Populate the event array with demo events
func setupEvents() {
setupMapView()
let startDate = "4:30 PM".toDate(withFormat: "h:mm a")
let endDate = "5:30 PM".toDate(withFormat: "h:mm a")
let event = Event(title: "Cookie Decorating", startTime: startDate, endTime: endDate, room: "509B", type: "ACTIVITY")
eventsToDisplay.append(event)
let event2 = Event(title: "Open Certamen", startTime: startDate, endTime: endDate, room: "210", type: "ACADEMIC")
eventsToDisplay.append(event2)
let event3 = Event(title: "That's Entertainment!", startTime: startDate, endTime: endDate, room: "Theater", type: "ACTIVITY")
eventsToDisplay.append(event3)
let event4 = Event(title: "Latin Oratory", startTime: startDate, endTime: endDate, room: "316", type: "ACADEMIC")
eventsToDisplay.append(event4)
}
func addEventAnnotations() {
// loop through the events and add each one to the view
for ev: Event in eventsToDisplay {
// create an annotation for each
let anno = MGLPointAnnotation()
// get the coordinates of the location specified
anno.coordinate = MapManager.getCoordinatesOfRoom(room: ev.room, locations: locations)
anno.title = ev.title
anno.subtitle = ev.getLocationFormatted()
mapView.addAnnotation(anno)
}
}
@IBAction func menuButtonClicked(_ sender: Any) {
sideMenuController?.revealMenu()
}
}
// MARK:- MapView Delegate
extension MapViewController: MGLMapViewDelegate {
func mapView(_ mapView: MGLMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage? {
let annoImage = UIImage(cgImage: (UIImage(named: "MapAnnotation")?.cgImage)!, scale: 6, orientation: .up)
return MGLAnnotationImage(image: annoImage, reuseIdentifier: "image")
}
func mapViewDidFinishLoadingMap(_ mapView: MGLMapView) {
setupAnnotations()
}
func mapView(_ mapView: MGLMapView, annotationCanShowCallout annotation: MGLAnnotation) -> Bool {
return true
}
func mapView(_ mapView: MGLMapView, tapOnCalloutFor annotation: MGLAnnotation) {
// transfer to the details screen
mapView.deselectAnnotation(annotation, animated: true)
// get the event that was selected
selectedEvent = eventsToDisplay.first(where: { (ev) -> Bool in
return ev.title == annotation.title
})
performSegue(withIdentifier: "ShowEventDetails", sender: self)
}
}
|
[
-1
] |
02c6068116cad6820a92a279b0aedd74b72553eb
|
6c306ab5ed0e0df3eb5633782ed52dc52b4794e1
|
/RandomUsers/RandomUsers/models/Dob.swift
|
370e16db04cbc1ef87acfa73dd88a118c804a732
|
[] |
no_license
|
arman5991/RandomUsers
|
b810eb30266e33b5887d23abfd7bf91196413835
|
52086dde789175555315a9ef829fdabcd8220ad7
|
refs/heads/master
| 2020-05-30T16:14:57.177190 | 2019-06-02T12:26:00 | 2019-06-02T12:26:00 | 189,841,864 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 226 |
swift
|
//
// Dob.swift
// RandomUsers
//
// Created by Arman Vardanyan on 5/27/19.
// Copyright © 2019 Arman Vardanyan. All rights reserved.
//
import Foundation
struct Dob: Codable {
var date: String!
var age: Int!
}
|
[
-1
] |
c97322f2e0927c5d688710e93eea6a945d64f420
|
e9a2daa2b0a3c6ca4d89c25c8a03bc35bacb858f
|
/ch05/IfSwitch.swift
|
f8c92ddf894a59ebd5d3aab700ad2e0483265a19
|
[] |
no_license
|
Arc1el/Swift
|
e95ba3c9d6565c3b23e9887c2866e064fa27ccfc
|
1e2e882c6e9585605cc3bfff05a787b2838fb8e9
|
refs/heads/master
| 2020-11-28T01:43:27.055995 | 2020-02-17T07:08:38 | 2020-02-17T07:08:38 | 229,671,347 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 680 |
swift
|
let first : Int = 5
let second : Int = 7
if first > second
{
print("first > second")
}
else if first < second
{
print("first < second")
}
else
{
print("first == second")
}
//결과는 "first < second"가 출력됨
var biggerValue : Int = 0
if first > second
{
biggerValue = first
}
else if first < second
{
biggerValue = second
}
else if first == 5
{
biggerValue = 100
}
print(biggerValue)
let integerValue : Int = 5
switch integerValue
{
case 0 :
print("Value == zero")
case 1...10 :
print("Value == 1-10")
fallthrough
case Int.min..<0, 101..<Int.max :
print("Value < 0 or Value > 100")
default :
print("10 < Value <= 100")
}
|
[
-1
] |
d5385fa8008b5b376a1d5f3125e7d75cd70198b7
|
86feacf80b8a8b640ba299a1e15b4f9ae3b08d12
|
/GV24/Models/DistanceWork.swift
|
1fbd1f30172a0730c9f5ef4a965e4d2390daf3f3
|
[] |
no_license
|
tuanhuy224/GV247New
|
bc05088dde62a5ca377e866ba8cd59b980c26433
|
d081282f9f3a2964c2e293abea3a9fcbdae34e00
|
refs/heads/master
| 2021-01-25T08:12:36.240094 | 2017-09-25T09:54:42 | 2017-09-25T09:54:42 | 93,725,449 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 411 |
swift
|
//
// DistanceWork.swift
// GV24
//
// Created by dinhphong on 9/6/17.
// Copyright © 2017 admin. All rights reserved.
//
import Foundation
import UIKit
class DistanceWork {
var nameLocation: String?
var distance: String?
var workType: String?
init() {
self.nameLocation = "Hiện tại"
self.distance = "5 km"
self.workType = "Tất cả"
}
}
|
[
-1
] |
480161dcd0b58010b12dc559f7ca334c55e678d9
|
280d16e848c545580e0e909ede867dac43d619b2
|
/CocoaMVCCountApp/View/CountView.swift
|
3445986d859ee2a3161510c49992279b5aa18bae
|
[] |
no_license
|
akio0911/countApp_CocoaMVC
|
b4fc3938b43dab4b295baf2c302124f9b0019e4d
|
d0512d0123cda5d475131a457a38ee241afd7b83
|
refs/heads/main
| 2023-03-08T19:01:36.811001 | 2021-02-13T05:14:01 | 2021-02-13T05:14:01 | 338,764,889 | 0 | 0 | null | 2021-02-14T08:58:04 | 2021-02-14T08:58:03 | null |
UTF-8
|
Swift
| false | false | 869 |
swift
|
//
// CountView.swift
// CocoaMVCCountApp
//
// Created by Shotaro Maruyama on 2021/02/13.
//
//
import UIKit
final class CountView: UIView {
let label: UILabel
let minusButton: UIButton
let plusButton: UIButton
required init?(coder aDecoder: NSCoder) {
// ここで初期化しないとエラーになるが…なぜ?というかこのinitはいつ呼ばれる?
self.label = UILabel()
self.minusButton = UIButton()
self.plusButton = UIButton()
super.init(coder:aDecoder)
}
override init(frame:CGRect) {
// ここで画面レイアウトするというが、self.viewのframeが決まっていないのにどうやって?
self.label = UILabel()
self.minusButton = UIButton()
self.plusButton = UIButton()
super.init(frame: frame)
}
}
|
[
-1
] |
8eef9e6ec1d8220b1d73d3c1d2e9d6e05d36c7d2
|
3feb63f4633ead7049f042bf1b9555961c221880
|
/BooleanPath_Demo/DemoView.swift
|
9fc8ea4b55c61b25c9b56130ffd106ddef1ce85e
|
[
"MIT"
] |
permissive
|
lkzhao/BooleanPath
|
5633c9ae442abde993e7a5b7e9172d791e5d9d92
|
fd857c5342910182feec8fb34843d4fb579bdb29
|
refs/heads/master
| 2022-02-25T23:28:26.367169 | 2019-03-10T07:20:29 | 2019-03-10T07:20:29 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,641 |
swift
|
//
// DemoView.swift
// BooleanPath_Demo
//
// Created by Takuto Nakamura on 2019/03/10.
// Copyright © 2019 Takuto Nakamura. All rights reserved.
//
import Cocoa
import BooleanPath
class DemoView: NSView {
required init?(coder decoder: NSCoder) {
super.init(coder: decoder)
self.wantsLayer = true
self.layer?.backgroundColor = NSColor.white.cgColor
}
override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)
let w: CGFloat = self.frame.width
let h: CGFloat = self.frame.height
NSColor.black.set()
let pathA = NSBezierPath(rect: NSRect(x: w / 10 - 30, y: h / 2 - 30, width: 60, height: 60))
let pathB = NSBezierPath(ovalIn: NSRect(x: w / 10, y: h / 2, width: 50, height: 50))
pathA.stroke()
pathB.stroke()
let unionPath: NSBezierPath = pathA.union(pathB)
unionPath.transform(using: AffineTransform(translationByX: w / 5, byY: 0))
unionPath.fill()
let intersectionPath: NSBezierPath = pathA.intersection(pathB)
intersectionPath.transform(using: AffineTransform(translationByX: 2 * w / 5, byY: 0))
intersectionPath.fill()
let subtractionPath: NSBezierPath = pathA.subtraction(pathB)
subtractionPath.transform(using: AffineTransform(translationByX: 3 * w / 5, byY: 0))
subtractionPath.fill()
let differencePath: NSBezierPath = pathA.difference(pathB)
differencePath.transform(using: AffineTransform(translationByX: 4 * w / 5, byY: 0))
differencePath.fill()
}
}
|
[
-1
] |
3defbe4405c6f4c28fd43495f6ed973af753b9c6
|
8aeb89d0d0f8c15301c7887dfa37b1a4f23c57f0
|
/MCPTT/UI/Channel/ChannelList/ChannelListModel/ChannelListViewModel.swift
|
283cb4cf84d8a6ce8862a73b2b3f4ef890aa46bd
|
[] |
no_license
|
vnaik2/HCS-iOS
|
49aa3b9c664e6e8abec08c1a6fd3fbf5cf09bad9
|
eb86a7bae54497cbdcb0efec89ac196f14198612
|
refs/heads/master
| 2020-04-01T19:58:01.592826 | 2018-10-09T10:12:35 | 2018-10-09T10:12:35 | 153,580,911 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,864 |
swift
|
//
// ChannelListViewModel.swift
// mcpttapp
//
// Created by Toor, Sanju on 04/10/18.
// Copyright © 2018 Harman connected services. All rights reserved.
//
import Foundation
struct Channel {
let channelID: String?
let channelStatus: String?
let channelName: String?
let channelThumbnailImageName: String?
let channelIconImageName: String?
let newReceiveddMessagecount: String?
let missedPTTCount: String?
let pttCallIconImageName: String?
let broadcastMessageImageName: String?
let channelStatusDescription: String?
}
class ChannelListViewModel {
private init() {}
static let shared = ChannelListViewModel()
func fetchChannelData (completion: @escaping ([Channel], [Channel]) -> ()) {
if let path = Bundle.main.path(forResource: "channelListDemoData", ofType: "json") {
do {
var idlechannelsData = [Channel]()
var activechannelsData = [Channel]()
let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .mappedIfSafe)
print(data)
let jsonResult = try JSONSerialization.jsonObject(with: data,
options: JSONSerialization.ReadingOptions.mutableLeaves) as? Dictionary<String, AnyObject>
let channels = jsonResult?["channels"] as? [[String: String]]
for channel in channels ?? [[:]] {
let channel = Channel(channelID: channel["channel_id"],
channelStatus: channel["channel_Status"],
channelName: channel["channel_name"],
channelThumbnailImageName: channel["channel_status_image_name"],
channelIconImageName: channel["channel_icon_image_Name"],
newReceiveddMessagecount: channel["new_received_message_count"],
missedPTTCount: channel["missed_ptt_call_count"],
pttCallIconImageName: channel["ptt_call_icon_image_name"],
broadcastMessageImageName: channel["broadcast_message_call_status_image"],
channelStatusDescription: channel["channel_description_status"])
if(channel.channelStatus == "active") {
activechannelsData.append(channel)
} else {
idlechannelsData.append(channel)
}
}
DispatchQueue.main.async {
completion(idlechannelsData, activechannelsData)
}
} catch {
}
}
}
}
|
[
-1
] |
495c21b2103104c53d165b16c366d723d9311f21
|
326ad7a07a7d79bb7c8d5aab3a8bb5c96efa09ae
|
/Sources/WebURLTestSupport/TestSuite.swift
|
99d552120e941f93d06eeb61517a853c324c4356
|
[
"Apache-2.0"
] |
permissive
|
iCodeIN/swift-url
|
0cde32cf3eb4c24ba32c0de41e3b4b2e3f4ddea4
|
65598f3cc309f56d6db5329c2da22bc91fc01b0a
|
refs/heads/main
| 2023-08-27T10:50:15.700152 | 2021-10-27T05:07:43 | 2021-10-27T05:13:26 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,475 |
swift
|
// Copyright The swift-url Contributors.
//
// 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, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/// A description of a test suite.
///
/// This groups a series of related types, which can be used to simplify some boilerplate code.
///
public protocol TestSuite {
/// A testcase. A set of input data and expected results.
///
associatedtype TestCase: Hashable, Codable
/// The set of possible failures that may occur when testing a particular `TestCase`.
///
associatedtype TestFailure: Hashable
/// Additional information captured while testing a particular `TestCase`.
///
associatedtype CapturedData: Hashable = Void
// Note:
// Ideally, we'd have the harness here as an "associated protocol", and then we could build
// some more functionality, such as adding a `runTest<H: Harness>(TestCase, using: H)` requirement.
//
// I've tried a bunch of stuff, like open classes, but anything I add in protocol extensions on 'TestSuite'
// won't get dynamic dispatch. We're really quite limited in what we can express, so this can't be much more
// than a bag-o-types.
}
/// The result of testing a particular `TestCase` from the given `Suite`.
///
/// This includes the case that was tested, any failures that occurred, and any additional captured data.
///
public struct TestResult<Suite: TestSuite> {
/// The number of cases that have been tested prior to this one.
///
public var testNumber: Int
/// The `TestCase` that was tested.
///
public var testCase: Suite.TestCase
/// The failures that were encountered while testing `testCase`. If empty, the test did not encounter any unexpected results.
///
public var failures: Set<Suite.TestFailure>
/// Any additional captured data gathered while running the test.
///
public var captures: Suite.CapturedData?
public init(testNumber: Int, testCase: Suite.TestCase) {
self.testNumber = testNumber
self.testCase = testCase
self.captures = nil
self.failures = []
}
}
/// An object which is able to run test-cases from a `TestSuite` and collect the results.
///
/// Each `TestSuite` adds its own protocol which refines this one, adding requirements for the functionality it needs,
/// and implements the `_runTestCase` method using those requirements. Conformers should implement those additional requirements,
/// as well as `reportTestResult` and (optionally) `markSection`, but **not** `_runTestCase`.
///
public protocol TestHarnessProtocol {
associatedtype Suite: TestSuite
/// Private method which is implemented by protocols which refine `TestHarnessProtocol`.
/// Unless you are defining a new `TestSuite`, **DO NOT IMPLEMENT THIS**.
///
func _runTestCase(_ testcase: Suite.TestCase, _ result: inout TestResult<Suite>)
/// Report the result of running a test from the suite.
///
mutating func reportTestResult(_ result: TestResult<Suite>)
/// Optional method which marks the start of a new section of tests.
/// All results reported after this method is called are considered as belonging to tests in this section.
///
mutating func markSection(_ name: String)
}
extension TestHarnessProtocol {
public mutating func markSection(_ name: String) {
// Optional.
}
public mutating func runTests(_ tests: [Suite.TestCase]) {
var index = 0
for testcase in tests {
var result = TestResult<Suite>(testNumber: index, testCase: testcase)
_runTestCase(testcase, &result)
reportTestResult(result)
index += 1
}
}
public mutating func runTests(_ tests: FlatSectionedArray<Suite.TestCase>) {
var index = 0
for sectionOrTestcase in tests {
switch sectionOrTestcase {
case .sectionHeader(let name):
markSection(name)
case .element(let testcase):
var result = TestResult<Suite>(testNumber: index, testCase: testcase)
_runTestCase(testcase, &result)
reportTestResult(result)
index += 1
}
}
}
}
|
[
-1
] |
57ec4a904c44edc14dc0c5d0b5795bb2be78b4ff
|
63cb59844749aa78bb505b26cc2f588ce29cc7ee
|
/SmackChat/Model/Channel.swift
|
da20b0f1e5efca50872fe72bc045f0061f3c5839
|
[] |
no_license
|
Masirevic/SmackChat---Revision
|
6aaf9793cc3f5458b70e4a61ab70d82b3bcee6e1
|
a595600dbd7592529dd0cafe97ab5aee151d120f
|
refs/heads/master
| 2021-09-04T00:41:22.785273 | 2018-01-13T13:05:48 | 2018-01-13T13:05:48 | 117,074,024 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 341 |
swift
|
//
// Channel.swift
// SmackChat
//
// Created by Ljubomir on 1/11/18.
// Copyright © 2018 Ljubomir. All rights reserved.
//
import Foundation
struct Channel : Decodable {
public private (set) var channelTitle: String!
public private (set) var channelDescription: String!
public private (set) var id: String!
}
|
[
-1
] |
4465cc3acacb48aa4678a40d7c67bfb96a25b207
|
43b658d020b164a998bc80d5ef326b1032aa837f
|
/GPSTester/AppDelegate.swift
|
d73b9e9d8afffea6c24b5522f5bcc94925f7e194
|
[] |
no_license
|
minho-park/GPSTester
|
e60a52dcaf9a5178ef64bc6472d252862793bd21
|
36562b98723e9025a6a9d3f17bfbc9d607a669e0
|
refs/heads/master
| 2020-03-08T08:16:44.309271 | 2018-04-04T07:18:11 | 2018-04-04T07:18:11 | 128,018,465 | 0 | 1 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,363 |
swift
|
//
// AppDelegate.swift
// GPSTester
//
// Created by Strawnut - Developer on 2018. 3. 22..
// Copyright © 2018년 Strawnut. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window?.rootViewController = GTMainViewController();
self.window?.makeKeyAndVisible()
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
|
[
229380,
229383,
229385,
294924,
229388,
229391,
327695,
229394,
229397,
229399,
229402,
278556,
229405,
229408,
294950,
229415,
229417,
327722,
237613,
229422,
229426,
237618,
229428,
286774,
286776,
319544,
286778,
204856,
229432,
352318,
286791,
237640,
286797,
237646,
311375,
278605,
163920,
196692,
319573,
311383,
319590,
311400,
278635,
303212,
278639,
131192,
237693,
303230,
327814,
303241,
131209,
417930,
303244,
311436,
319633,
286873,
286876,
311460,
311469,
32944,
327862,
286906,
327866,
180413,
286910,
131264,
286916,
286922,
286924,
286926,
319694,
286928,
131281,
278743,
278747,
295133,
155872,
319716,
237807,
303345,
286962,
131314,
229622,
327930,
278781,
278783,
278785,
237826,
319751,
278792,
286987,
319757,
311569,
286999,
319770,
287003,
287006,
287009,
287012,
287014,
287016,
287019,
311598,
287023,
262448,
311601,
287032,
155966,
319809,
319810,
278849,
319814,
311623,
319818,
311628,
229709,
319822,
287054,
278865,
229717,
196963,
196969,
139638,
213367,
106872,
319872,
311683,
311693,
65943,
319898,
311719,
278952,
139689,
278957,
311728,
278967,
180668,
311741,
278975,
319938,
278980,
98756,
278983,
319945,
278986,
319947,
278990,
278994,
311767,
279003,
279006,
188895,
172512,
287202,
279010,
279015,
172520,
319978,
279020,
172526,
311791,
279023,
172529,
279027,
319989,
172534,
180727,
164343,
279035,
311804,
287230,
279040,
303617,
287234,
279045,
172550,
303623,
172552,
320007,
287238,
279051,
172558,
279055,
303632,
279058,
303637,
279063,
279067,
172572,
279072,
172577,
295459,
172581,
295461,
279082,
311850,
279084,
172591,
172598,
279095,
172607,
172609,
172612,
377413,
172614,
213575,
172618,
303690,
33357,
287309,
303696,
279124,
172634,
262752,
254563,
172644,
311911,
189034,
295533,
172655,
172656,
352880,
295538,
189039,
172660,
287349,
189040,
189044,
287355,
287360,
295553,
172675,
295557,
311942,
303751,
287365,
352905,
311946,
279178,
287371,
311951,
287377,
172691,
287381,
311957,
221850,
287386,
230045,
172702,
287390,
303773,
172705,
287394,
172707,
303780,
164509,
287398,
205479,
295583,
279208,
287400,
295595,
279212,
172714,
189102,
172721,
287409,
66227,
303797,
189114,
287419,
303804,
328381,
287423,
328384,
172737,
279231,
287427,
312005,
312006,
107208,
172748,
287436,
107212,
172751,
287440,
295633,
172755,
303827,
279255,
172760,
287450,
303835,
279258,
189149,
303838,
213724,
312035,
279267,
295654,
279272,
230128,
312048,
312050,
230131,
189169,
205564,
303871,
230146,
328453,
295685,
230154,
33548,
312077,
295695,
295701,
230169,
369433,
295707,
328476,
295710,
230175,
295720,
303914,
279340,
205613,
279353,
230202,
312124,
328508,
222018,
295755,
377676,
148302,
287569,
303959,
230237,
279390,
230241,
279394,
312163,
303976,
336744,
303985,
303987,
328563,
279413,
303991,
303997,
295806,
295808,
295813,
304005,
320391,
304007,
213895,
304009,
304011,
230284,
304013,
295822,
279438,
189329,
295825,
304019,
189331,
279445,
58262,
304023,
304027,
279452,
410526,
279461,
279462,
304042,
213931,
230327,
304055,
287675,
230334,
304063,
238528,
304065,
213954,
295873,
156612,
189378,
213963,
197580,
312272,
304084,
304090,
320481,
304106,
320490,
312302,
328687,
320496,
304114,
295928,
320505,
312321,
295945,
230413,
197645,
295949,
320528,
140312,
295961,
238620,
197663,
304164,
304170,
238641,
312374,
238652,
238655,
230465,
238658,
336964,
132165,
296004,
205895,
320584,
238666,
296021,
402518,
336987,
230497,
296036,
296040,
361576,
205931,
296044,
164973,
205934,
312432,
279669,
304249,
337018,
189562,
279679,
66690,
279683,
222340,
205968,
296084,
238745,
304285,
238756,
205991,
222377,
165035,
337067,
238766,
165038,
230576,
238770,
304311,
230592,
312518,
279750,
230600,
230607,
148690,
320727,
279769,
304348,
279777,
304354,
296163,
320740,
279781,
304360,
320748,
279788,
279790,
304370,
296189,
320771,
312585,
296202,
296205,
230674,
320786,
230677,
296213,
214294,
320792,
230681,
296215,
304416,
230689,
320803,
173350,
312622,
296243,
312630,
222522,
296253,
230718,
296255,
312639,
222525,
296259,
378181,
296262,
230727,
238919,
296264,
320840,
296267,
296271,
222545,
230739,
312663,
222556,
337244,
230752,
312676,
230760,
173418,
148843,
410987,
230763,
230768,
296305,
312692,
230773,
304505,
304506,
181626,
181631,
312711,
312712,
296331,
288140,
288144,
230800,
304533,
288154,
337306,
173472,
288160,
288162,
288164,
279975,
304555,
370092,
279983,
173488,
288176,
279985,
312755,
296373,
312759,
337335,
288185,
279991,
222652,
312766,
173507,
296389,
222665,
230860,
312783,
288208,
230865,
288210,
370130,
222676,
280021,
288212,
288214,
239064,
329177,
288217,
288218,
280027,
288220,
239070,
288224,
288226,
370146,
280036,
288229,
280038,
288230,
288232,
280034,
288234,
320998,
288236,
288238,
288240,
288242,
296435,
288244,
288250,
296446,
321022,
402942,
148990,
296450,
206336,
230916,
312837,
230919,
214535,
230923,
304651,
304653,
370187,
230940,
222752,
108066,
296486,
296488,
157229,
230961,
157236,
288320,
288325,
124489,
280140,
280145,
288338,
280149,
288344,
280152,
239194,
280158,
403039,
370272,
181854,
239202,
312938,
280183,
280185,
280188,
280191,
116354,
280194,
280208,
280211,
288408,
280218,
280222,
419489,
190118,
198310,
321195,
296622,
321200,
337585,
296626,
296634,
296637,
419522,
280260,
419525,
206536,
280264,
206539,
206541,
206543,
263888,
313044,
280276,
321239,
280283,
313052,
18140,
288478,
313055,
419555,
321252,
313066,
288494,
280302,
280304,
313073,
321266,
419570,
288499,
288502,
288510,
124671,
67330,
280324,
198405,
313093,
288519,
280331,
198416,
280337,
296723,
116503,
321304,
329498,
296731,
321311,
313121,
313123,
304932,
321316,
280363,
141101,
165678,
280375,
321336,
296767,
288576,
345921,
280388,
304968,
280393,
280402,
173907,
313171,
313176,
280419,
321381,
296812,
313201,
1920,
255873,
305028,
247688,
280464,
124817,
280468,
239510,
280473,
124827,
214940,
247709,
214944,
280487,
313258,
321458,
296883,
124853,
214966,
296890,
10170,
288700,
296894,
190403,
296900,
280515,
337862,
165831,
280521,
231379,
296921,
354265,
354270,
239586,
313320,
354281,
231404,
124913,
165876,
321528,
239612,
313340,
288764,
239617,
313347,
288773,
313358,
305176,
313371,
354338,
305191,
223273,
313386,
354348,
124978,
215090,
124980,
288824,
288826,
321595,
378941,
313406,
288831,
288836,
67654,
280651,
354382,
288848,
280658,
215123,
354390,
288855,
288859,
280669,
313438,
149599,
280671,
149601,
321634,
149603,
223327,
329830,
280681,
313451,
223341,
280687,
149618,
215154,
313458,
280691,
313464,
329850,
321659,
280702,
288895,
321670,
215175,
141446,
288909,
141455,
141459,
280725,
313498,
100520,
288936,
280747,
288940,
288947,
280755,
321717,
280759,
280764,
280769,
280771,
280774,
280776,
313548,
321740,
280783,
280786,
280788,
313557,
280793,
280796,
280798,
338147,
280804,
280807,
157930,
280811,
280817,
125171,
157940,
182517,
280823,
280825,
280827,
280830,
280831,
280833,
125187,
280835,
125191,
125207,
125209,
321817,
125218,
321842,
223539,
125239,
280888,
280891,
289087,
280897,
280900,
305480,
239944,
280906,
239947,
305485,
305489,
379218,
280919,
248153,
354653,
313700,
313705,
280937,
280940,
190832,
280946,
223606,
313720,
280956,
239997,
280959,
313731,
199051,
240011,
289166,
240017,
297363,
190868,
240021,
297365,
297368,
297372,
141725,
297377,
289186,
297391,
289201,
240052,
289207,
289210,
305594,
281024,
289218,
289221,
289227,
281045,
281047,
166378,
305647,
281075,
174580,
240124,
281084,
305662,
305664,
240129,
305666,
305668,
223749,
240132,
281095,
223752,
150025,
338440,
223757,
281102,
223763,
223765,
281113,
322074,
281116,
281121,
182819,
281127,
150066,
158262,
158266,
289342,
281154,
322115,
158283,
281163,
281179,
338528,
338532,
281190,
199273,
281196,
19053,
158317,
313973,
297594,
281210,
158347,
264845,
133776,
314003,
117398,
314007,
289436,
174754,
330404,
289448,
133801,
174764,
314029,
314033,
240309,
133817,
314045,
314047,
314051,
199364,
297671,
199367,
158409,
256716,
289493,
363234,
289513,
289522,
289525,
289532,
322303,
289537,
322310,
264969,
322314,
322318,
281361,
281372,
322341,
215850,
281388,
289593,
281401,
289601,
281410,
281413,
281414,
240458,
281420,
240468,
281430,
322393,
297818,
281435,
281438,
281442,
174955,
224110,
207733,
207737,
158596,
183172,
338823,
322440,
314249,
240519,
183184,
289687,
240535,
297883,
289694,
289696,
289700,
289712,
281529,
289724,
52163,
183260,
281567,
289762,
322534,
297961,
183277,
322550,
134142,
322563,
314372,
330764,
175134,
322599,
322610,
314421,
281654,
314427,
314433,
207937,
314441,
207949,
322642,
314456,
281691,
314461,
281702,
281704,
314474,
281708,
281711,
248995,
306341,
306344,
306347,
322734,
306354,
142531,
199877,
289991,
306377,
289997,
249045,
290008,
363742,
363745,
298216,
330988,
126190,
216303,
322801,
388350,
257302,
363802,
199976,
199978,
314671,
298292,
298294,
257334,
216376,
380226,
298306,
224584,
224587,
224594,
216404,
306517,
150870,
314714,
224603,
159068,
314718,
265568,
314723,
281960,
150890,
306539,
314732,
314736,
290161,
216436,
306549,
298358,
314743,
306552,
290171,
314747,
306555,
298365,
290174,
224641,
281987,
298372,
314756,
281990,
224647,
265604,
298377,
314763,
298381,
142733,
314768,
224657,
306581,
314773,
314779,
314785,
314793,
282025,
282027,
241068,
241070,
241072,
282034,
241077,
150966,
298424,
306618,
282044,
323015,
306635,
306640,
290263,
290270,
290275,
339431,
282089,
191985,
282098,
290291,
282101,
241142,
191992,
290298,
151036,
290302,
282111,
290305,
175621,
306694,
192008,
323084,
257550,
290321,
323090,
282130,
290325,
282133,
241175,
290328,
282137,
290332,
241181,
282142,
282144,
290344,
306731,
290349,
290351,
290356,
28219,
282186,
224849,
282195,
282199,
282201,
306778,
159324,
159330,
314979,
298598,
323176,
224875,
241260,
323181,
257658,
315016,
282249,
290445,
324757,
282261,
175770,
298651,
282269,
323229,
298655,
323231,
61092,
282277,
306856,
282295,
323260,
282300,
323266,
282310,
323273,
282319,
306897,
241362,
306904,
282328,
298714,
52959,
282337,
216801,
241380,
216806,
323304,
282345,
12011,
282356,
323318,
282364,
282367,
306945,
241412,
323333,
282376,
216842,
323345,
282388,
323349,
282392,
184090,
315167,
315169,
282402,
315174,
323367,
241448,
315176,
241450,
282410,
306988,
306991,
315184,
323376,
315190,
241464,
159545,
282425,
298811,
118593,
307009,
413506,
307012,
241475,
298822,
148946,
315211,
282446,
307027,
315221,
323414,
315223,
241496,
241498,
307035,
307040,
110433,
282465,
241509,
110438,
298860,
110445,
282478,
315249,
282481,
110450,
315251,
315253,
315255,
339838,
315267,
282499,
315269,
241544,
282505,
241546,
241548,
298896,
298898,
282514,
241556,
298901,
241560,
282520,
241563,
241565,
241567,
241569,
241574,
282537,
298922,
36779,
241581,
282542,
241583,
323504,
241586,
282547,
241588,
290739,
241590,
241592,
241598,
290751,
241600,
241605,
151495,
241610,
298975,
241632,
298984,
241640,
241643,
298988,
241646,
241649,
241652,
323574,
290807,
299003,
241661,
299006,
282623,
315396,
241669,
315397,
282632,
282639,
290835,
282645,
241693,
282654,
241701,
102438,
217127,
282669,
323630,
282681,
290877,
282687,
159811,
315463,
315466,
192589,
307278,
192596,
176213,
307287,
307290,
217179,
315482,
192605,
315483,
233567,
299105,
200801,
217188,
299109,
307303,
315495,
356457,
45163,
307307,
315502,
192624,
307314,
323700,
299126,
233591,
299136,
307329,
307338,
233613,
241813,
307352,
299164,
241821,
299167,
315552,
184479,
184481,
315557,
184486,
307370,
307372,
184492,
307374,
307376,
299185,
323763,
184503,
176311,
307385,
307386,
258235,
307388,
176316,
307390,
299200,
184512,
307394,
299204,
307396,
184518,
307399,
323784,
233679,
307409,
307411,
176343,
299225,
233701,
307432,
184572,
282881,
184579,
282893,
291089,
282906,
291104,
233766,
176435,
307508,
315701,
332086,
307510,
151864,
168245,
307515,
307518,
282942,
151874,
282947,
323917,
282957,
110926,
233808,
323921,
315733,
323926,
233815,
315739,
323932,
299357,
276053,
242018,
242024,
299373,
315757,
250231,
242043,
315771,
299388,
299391,
291202,
299398,
242057,
291212,
299405,
291222,
315801,
291226,
242075,
283033,
61855,
291231,
283042,
291238,
291241,
127403,
127405,
291247,
299440,
127407,
299444,
127413,
283062,
291254,
127417,
291260,
127421,
127424,
299457,
127429,
127431,
127434,
315856,
176592,
315860,
176597,
127447,
299481,
176605,
242143,
291299,
127463,
242152,
291305,
127466,
176620,
127474,
291314,
291317,
127480,
135672,
291323,
233979,
127485,
291330,
283142,
127497,
233994,
135689,
127500,
291341,
233998,
127506,
234003,
234006,
127511,
152087,
283161,
234010,
135707,
242202,
135710,
242206,
242208,
291361,
242220,
291378,
152118,
234038,
234041,
70213,
242250,
111193,
242275,
299620,
242279,
168562,
184952,
135805,
135808,
291456,
373383,
299655,
135820,
316051,
225941,
316054,
299672,
135834,
373404,
299677,
225948,
135839,
299680,
225954,
299684,
135844,
242343,
209576,
242345,
373421,
135870,
135873,
135876,
135879,
299720,
299723,
299726,
225998,
226002,
119509,
226005,
226008,
299740,
242396,
201444,
299750,
283368,
234219,
283372,
226037,
283382,
316151,
234231,
234236,
226045,
242431,
234239,
209665,
234242,
299778,
242436,
234246,
226056,
291593,
234248,
242443,
234252,
242445,
234254,
291601,
234258,
242450,
242452,
234261,
348950,
201496,
234264,
234266,
234269,
283421,
234272,
234274,
152355,
299814,
234278,
283432,
234281,
234284,
234287,
283440,
185138,
242483,
234292,
234296,
234298,
160572,
283452,
234302,
234307,
242499,
234309,
316233,
234313,
316235,
234316,
283468,
234319,
242511,
234321,
234324,
185173,
201557,
234329,
234333,
308063,
234336,
242530,
349027,
234338,
234341,
234344,
234347,
177004,
234350,
324464,
234353,
152435,
177011,
234356,
234358,
234362,
234364,
291711,
234368,
291714,
234370,
291716,
234373,
316294,
226182,
234375,
308105,
226185,
234379,
234384,
234388,
234390,
226200,
234393,
209818,
308123,
234396,
324508,
291742,
324504,
234401,
291747,
291748,
234405,
291750,
324518,
324520,
234407,
324522,
234410,
291756,
291754,
226220,
324527,
291760,
234417,
201650,
324531,
234414,
234422,
226230,
324536,
275384,
234428,
291773,
242623,
324544,
234431,
234434,
324546,
324548,
234437,
226245,
226239,
234439,
234443,
291788,
234446,
275406,
193486,
234449,
316370,
193488,
234452,
234455,
234459,
234461,
234464,
234467,
234470,
168935,
5096,
324585,
234475,
234478,
316400,
234481,
316403,
234484,
234485,
234487,
324599,
234490,
234493,
316416,
234496,
308226,
234501,
308231,
234504,
234507,
234510,
234515,
300054,
316439,
234520,
234519,
234523,
234526,
234528,
300066,
234532,
300069,
234535,
234537,
234540,
234543,
234546,
275508,
300085,
234549,
300088,
234553,
234556,
234558,
316479,
234561,
316483,
160835,
234563,
308291,
234568,
234570,
316491,
234572,
300108,
234574,
300115,
234580,
234581,
242777,
234585,
275545,
234590,
234593,
234595,
234597,
300133,
234601,
300139,
234605,
160879,
234607,
275569,
234610,
316530,
300148,
234614,
398455,
144506,
234618,
234620,
275579,
234623,
226433,
234627,
275588,
234629,
234634,
275594,
234636,
177293,
234640,
275602,
234643,
308373,
226453,
234647,
275606,
234648,
234650,
308379,
275608,
300189,
324766,
119967,
234653,
324768,
283805,
234657,
242852,
300197,
234661,
283813,
234664,
177318,
275626,
234667,
316596,
308414,
234687,
300223,
300226,
308418,
234692,
300229,
308420,
308422,
283844,
316610,
300234,
283850,
300238,
283854,
300241,
316625,
300243,
300245,
316630,
300248,
300253,
300256,
300258,
300260,
234726,
300263,
300265,
300267,
161003,
300270,
300272,
120053,
300278,
275703,
316663,
300284,
275710,
300287,
292097,
300289,
161027,
300292,
300294,
275719,
234760,
177419,
300299,
242957,
300301,
275725,
177424,
283917,
349451,
349464,
415009,
283939,
259367,
292143,
283951,
300344,
226617,
243003,
283963,
226628,
300357,
283973,
177482,
283983,
316758,
357722,
316766,
316768,
292192,
218464,
292197,
316774,
243046,
218473,
136562,
324978,
275834,
333178,
275836,
275840,
316803,
316806,
226696,
316811,
226699,
316814,
226703,
300433,
234899,
300436,
226709,
357783,
316824,
316826,
300448,
144807,
144810,
144812,
284076,
144814,
227426,
144820,
374196,
284084,
292279,
284087,
144826,
144828,
144830,
144832,
227430,
144835,
144837,
38342,
144839,
144841,
144844,
144847,
144852,
144855,
103899,
300507,
333280,
218597,
292329,
300523,
259565,
300527,
308720,
259567,
292338,
226802,
316917,
292343,
308727,
300537,
316933,
316947,
308757,
308762,
316959,
284191,
284194,
284196,
235045,
284199,
235047,
284204,
284206,
284209,
284211,
194101,
284213,
316983,
194103,
284215,
308790,
284218,
226877,
284223,
284226,
284228,
292421,
243268,
284231,
226886,
128584,
284234,
366155,
317004,
276043,
284238,
226895,
284241,
194130,
284243,
300628,
284245,
292433,
284247,
317015,
235097,
243290,
284249,
284251,
284253,
300638,
284255,
243293,
284258,
292452,
292454,
284263,
177766,
284265,
292458,
284267,
292461,
284272,
284274,
284278,
292470,
276086,
292473,
284283,
276093,
284286,
276095,
284288,
292479,
284290,
325250,
284292,
292485,
276098,
292481,
284297,
317066,
284299,
317068,
284301,
276109,
284303,
284306,
276114,
284308,
284312,
276122,
284314,
284316,
276127,
284320,
284322,
284327,
284329,
317098,
284331,
276137,
284333,
284335,
276144,
284337,
284339,
300726,
284343,
284346,
284350,
358080,
276160,
284354,
358083,
284358,
276166,
358089,
284362,
276170,
284365,
276175,
284368,
276177,
284370,
358098,
284372,
317138,
284377,
284379,
284381,
284384,
358114,
284386,
358116,
276197,
317158,
358119,
284392,
325353,
358122,
284394,
284397,
358126,
276206,
358128,
284399,
358133,
358135,
276216,
358138,
300795,
358140,
284413,
358142,
358146,
317187,
284418,
317189,
317191,
284428,
300816,
300819,
317207,
300828,
300830,
276255,
300832,
325408,
300834,
317221,
227109,
358183,
186151,
276268,
300845,
243504,
300850,
284469,
276280,
325436,
358206,
276291,
366406,
276295,
300872,
292681,
153417,
358224,
284499,
276308,
178006,
317271,
284502,
276315,
292700,
317279,
284511,
227175,
292715,
300912,
292721,
284529,
300915,
284533,
292729,
317306,
284540,
292734,
325512,
169868,
317332,
358292,
284564,
284566,
399252,
350106,
284572,
276386,
284579,
276388,
358312,
317353,
284585,
276395,
292776,
292784,
276402,
358326,
161718,
358330,
276411,
276418,
276425,
301009,
301011,
301013,
292823,
358360,
301017,
301015,
292828,
276446,
276448,
153568,
292839,
276455,
292843,
276460,
178161,
227314,
276466,
325624,
276472,
317435,
276476,
276479,
276482,
276485,
317446,
276490,
350218,
292876,
350222,
317456,
276496,
317458,
178195,
243733,
243740,
317468,
317472,
325666,
243751,
292904,
276528,
243762,
309298,
325685,
325689,
235579,
325692,
235581,
178238,
276539,
276544,
284739,
325700,
243779,
292934,
243785,
350293,
350295,
309337,
194649,
227418,
350302,
194654,
350304,
178273,
309346,
227423,
194660,
350308,
309350,
309348,
292968,
309352,
309354,
301163,
350313,
350316,
276586,
301167,
276583,
350321,
276590,
227440,
284786,
350325,
252022,
276595,
350328,
292985,
301178,
292989,
301185,
292993,
350339,
317570,
317573,
350342,
350345,
350349,
301199,
317584,
325777,
350354,
350357,
350359,
350362,
350366,
276638,
153765,
284837,
350375,
350379,
350381,
350383,
129200,
350385,
350387,
350389,
350395,
350397,
350399,
227520,
350402,
227522,
301252,
350406,
227529,
301258,
309450,
276685,
309455,
276689,
309462,
301272,
276699,
194780,
309468,
309471,
301283,
317672,
317674,
325867,
243948,
194801,
227571,
309491,
309494,
243960,
227583,
276735,
276739,
211204,
276742,
227596,
325910,
309530,
342298,
276766,
211232,
317729,
211241,
325937,
325943,
211260,
260421,
276809,
285002,
276811,
235853,
276816,
235858,
276829,
276833,
391523,
276836,
293227,
276843,
293232,
276848,
186744,
211324,
227709,
285061,
366983,
317833,
178572,
285070,
293263,
285077,
178583,
227738,
317853,
276896,
317858,
342434,
285093,
317864,
285098,
276907,
235955,
276917,
293304,
293307,
293314,
309707,
293325,
317910,
293336,
235996,
317917,
293343,
358880,
276961,
293346,
276964,
293352,
236013,
293364,
301562,
317951,
309764,
301575,
121352,
293387,
236043,
342541,
317963,
113167,
55822,
309779,
317971,
309781,
277011,
55837,
227877,
227879,
293417,
227882,
309804,
293421,
105007,
236082,
285236,
23094,
277054,
244288,
129603,
301636,
318020,
301639,
301643,
285265,
399955,
309844,
277080,
309849,
285277,
285282,
326244,
318055,
277100,
309871,
121458,
170618,
170619,
309885,
309888,
277122,
227975,
277128,
285320,
301706,
318092,
326285,
334476,
318094,
277136,
277139,
227992,
318108,
285340,
318110,
227998,
137889,
383658,
285357,
318128,
277170,
293555,
318132,
154292,
277173,
342707,
277177,
277181,
318144,
277187,
277191,
277194,
277196,
277201,
342745,
137946,
342747,
342749,
113378,
203491,
228069,
277223,
342760,
285417,
56041,
56043,
277232,
228081,
56059,
310015,
285441,
310020,
310029,
228113,
285459,
277273,
293659,
326430,
228128,
285474,
293666,
228135,
318248,
277291,
318253,
293677,
285489,
301876,
293685,
285494,
301880,
285499,
301884,
293696,
310080,
277317,
293706,
277322,
277329,
162643,
310100,
301911,
277337,
301913,
301921,
400236,
236397,
162671,
326514,
310134,
236408,
15224,
277368,
416639,
416640,
113538,
310147,
416648,
39817,
187274,
277385,
301972,
424853,
277405,
277411,
310179,
293798,
293802,
236460,
277426,
293811,
276579,
293817,
293820,
203715,
326603,
342994,
293849,
293861,
228327,
228328,
318442,
228332,
326638,
277486,
351217,
318450,
293876,
293877,
285686,
302073,
121850,
293882,
302075,
285690,
244731,
293887,
277504,
277507,
277511,
293899,
277519,
293908,
293917,
293939,
318516,
277561,
277564,
310336,
236609,
7232,
293956,
277573,
228422,
293960,
310344,
277577,
277583,
203857,
293971,
310355,
310359,
236632,
277594,
138332,
277598,
203872,
285792,
277601,
310374,
203879,
310376,
277608,
228460,
318573,
203886,
187509,
285815,
367737,
285817,
302205,
285821,
392326,
253064,
294026,
302218,
285835,
162964,
384148,
187542,
302231,
285849,
302233,
285852,
302237,
285854,
285856,
302241,
285862,
277671,
302248,
64682,
277678,
294063,
294065,
302258,
277687,
294072,
318651,
294076,
277695,
318657,
244930,
302275,
130244,
302277,
228550,
302282,
310476,
302285,
302288,
310481,
302290,
203987,
302292,
302294,
310486,
302296,
384222,
310498,
285927,
318698,
302315,
228592,
294132,
138485,
228601,
204026,
228606,
204031,
64768,
310531,
138505,
228617,
318742,
204067,
277798,
130345,
277801,
113964,
285997,
277804,
285999,
277807,
113969,
277811,
318773,
318776,
277816,
286010,
277819,
294204,
417086,
277822,
302403,
294211,
384328,
277832,
277836,
294221,
294223,
326991,
277839,
277842,
277847,
277850,
179547,
277853,
146784,
277857,
302436,
277860,
294246,
327015,
310632,
327017,
351594,
277864,
277869,
277872,
351607,
310648,
277880,
310651,
277884,
277888,
310657,
351619,
294276,
310659,
327046,
277892,
253320,
310665,
318858,
277894,
277898,
277903,
310672,
351633,
277905,
277908,
277917,
310689,
277921,
130468,
228776,
277928,
277932,
310703,
277937,
310710,
130486,
310712,
277944,
310715,
277947,
302526,
228799,
277950,
277953,
302534,
310727,
245191,
64966,
277959,
277963,
302541,
277966,
302543,
310737,
277971,
228825,
163290,
277978,
310749,
277981,
277984,
310755,
277989,
277991,
187880,
277995,
310764,
286188,
278000,
228851,
310772,
327156,
278003,
278006,
40440,
212472,
278009,
40443,
286203,
310780,
40448,
228864,
286214,
228871,
302603,
302614,
302617,
286233,
302621,
286240,
146977,
187939,
40484,
294435,
40486,
286246,
294440,
40488,
294439,
294443,
40491,
294445,
286248,
310831,
245288,
40499,
40502,
212538,
40507,
40511,
40513,
228933,
40521,
286283,
40525,
40527,
212560,
400976,
40529,
228944,
40533,
147032,
40537,
40539,
40541,
278109,
40544,
40548,
40550,
40552,
286312,
40554,
286313,
310892,
40557,
40560,
188022,
122488,
294521,
343679,
294537,
310925,
286354,
278163,
302740,
122517,
278168,
179870,
327333,
229030,
212648,
278188,
302764,
278192,
319153,
278196,
302781,
319171,
302789,
294599,
278216,
294601,
302793,
343757,
212690,
319187,
286420,
278227,
229076,
286425,
319194,
278235,
229086,
278238,
286432,
294625,
294634,
302838,
319226,
286460,
278274,
302852,
278277,
302854,
294664,
311048,
352008,
319243,
311053,
302862,
319251,
294682,
278306,
188199,
294701,
319280,
278320,
319290,
229192,
302925,
188247,
188252,
237409,
294776,
360317,
294785,
327554,
360322,
40840,
40851,
294803,
188312,
294811,
237470,
319390,
40865,
319394,
294817,
294821,
311209,
180142,
343983,
294831,
188340,
40886,
319419,
294844,
294847,
237508,
393177,
294876,
294879,
294883,
393190,
294890,
311279,
278513,
237555,
311283,
278516,
237562
] |
8cd1e0899a57a04d6c6e0ba50bd3250a6bbf4cfc
|
d86ecc1c7e4090872b46a44dc735245ffc06734c
|
/Gigs/Gigs/View Controllers/GigDetailViewController.swift
|
afc49732055c4634b6eac2713dc7311a4337beb4
|
[] |
no_license
|
jlconnerly/ios-gigs
|
777076dda5947976492c5f42dc6d2f0a63081736
|
5ca176a3aefc10dda1d63a826a790dcf5fbd0d3e
|
refs/heads/master
| 2020-06-06T15:30:49.054477 | 2019-06-20T22:52:47 | 2019-06-20T22:52:47 | 192,778,754 | 0 | 0 | null | 2019-06-19T17:44:06 | 2019-06-19T17:44:06 | null |
UTF-8
|
Swift
| false | false | 2,469 |
swift
|
//
// GigDetailViewController.swift
// Gigs
//
// Created by Jake Connerly on 6/20/19.
// Copyright © 2019 jake connerly. All rights reserved.
//
import UIKit
class GigDetailViewController: UIViewController {
@IBOutlet weak var jobTitleTextView: UITextField!
@IBOutlet weak var dueDatePicker: UIDatePicker!
@IBOutlet weak var descriptionTextView: UITextView!
var gigController: GigController!
var gig: Gig?
override func viewDidLoad() {
super.viewDidLoad()
noGigUpdateViews()
}
func getGig() {
guard let gigController = gigController,
let gig = gig else { return }
gigController.fetchDetails(for: gig) { result in
if let gig = try? result.get() {
DispatchQueue.main.async {
self.updateViews(with: gig)
}
}
}
}
@IBAction func saveButtonTapped(_ sender: UIBarButtonItem) {
if let newGigTitle = jobTitleTextView.text,
!newGigTitle.isEmpty,
let newGigDescription = descriptionTextView.text,
!newGigDescription.isEmpty {
let newGigDueDate = dueDatePicker.date
let newGig = Gig(title: newGigTitle, description: newGigDescription, dueDate: newGigDueDate)
gigController.addGig(newGig: newGig) { (error) in
if let error = error {
print("Error occured adding new gig: \(error)")
}else {
DispatchQueue.main.async {
self.navigationController?.popToRootViewController(animated: true)
}
}
}
}
}
func noGigUpdateViews() {
self.title = "Add New Gig"
}
func updateViews(with newGig: Gig) {
if gig == nil {
self.title = "New Gig"
}else {
jobTitleTextView?.text = newGig.title
dueDatePicker?.date = newGig.dueDate
descriptionTextView?.text = newGig.description
}
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
|
[
-1
] |
d051c9f1f939b7d5dff7b8faab5ba89303355456
|
f4258a5e11e71e9e2e23f2c13cf25bce0d19ab11
|
/Sources/ModelsSTU3/ResearchStudy.swift
|
cddaabab6c514e2eb5efb36f6faa06bc17f8772e
|
[
"Apache-2.0"
] |
permissive
|
apple/FHIRModels
|
31c4ff9ebad0e7067a96651ecb494f415f3ef39e
|
861afd5816a98d38f86220eab2f812d76cad84a0
|
refs/heads/main
| 2023-04-05T12:58:09.219915 | 2023-04-01T05:30:26 | 2023-04-01T05:30:26 | 274,484,771 | 154 | 41 |
Apache-2.0
| 2022-08-10T16:21:41 | 2020-06-23T18:53:17 |
Swift
|
UTF-8
|
Swift
| false | false | 13,680 |
swift
|
//
// ResearchStudy.swift
// HealthSoftware
//
// Generated from FHIR 3.0.1.11917 (http://hl7.org/fhir/StructureDefinition/ResearchStudy)
// Copyright 2020 Apple Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import FMCore
/**
Investigation to increase healthcare-related patient-independent knowledge.
A process where a researcher or organization plans and then executes a series of steps intended to increase the field
of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other
information about medications, devices, therapies and other interventional and investigative techniques. A
ResearchStudy involves the gathering of information about human or animal subjects.
*/
open class ResearchStudy: DomainResource {
override open class var resourceType: ResourceType { return .researchStudy }
/// Business Identifier for study
public var identifier: [Identifier]?
/// Name for this study
public var title: FHIRPrimitive<FHIRString>?
/// Steps followed in executing study
public var `protocol`: [Reference]?
/// Part of larger study
public var partOf: [Reference]?
/// The current state of the study.
public var status: FHIRPrimitive<ResearchStudyStatus>
/// Classifications for the study
public var category: [CodeableConcept]?
/// Drugs, devices, conditions, etc. under study
public var focus: [CodeableConcept]?
/// Contact details for the study
public var contact: [ContactDetail]?
/// References and dependencies
public var relatedArtifact: [RelatedArtifact]?
/// Used to search for the study
public var keyword: [CodeableConcept]?
/// Geographic region(s) for study
public var jurisdiction: [CodeableConcept]?
/// What this is study doing
public var description_fhir: FHIRPrimitive<FHIRString>?
/// Inclusion & exclusion criteria
public var enrollment: [Reference]?
/// When the study began and ended
public var period: Period?
/// Organization responsible for the study
public var sponsor: Reference?
/// The individual responsible for the study
public var principalInvestigator: Reference?
/// Location involved in study execution
public var site: [Reference]?
/// Reason for terminating study early
public var reasonStopped: CodeableConcept?
/// Comments made about the event
public var note: [Annotation]?
/// Defined path through the study for a subject
public var arm: [ResearchStudyArm]?
/// Designated initializer taking all required properties
public init(status: FHIRPrimitive<ResearchStudyStatus>) {
self.status = status
super.init()
}
/// Convenience initializer
public convenience init(
arm: [ResearchStudyArm]? = nil,
category: [CodeableConcept]? = nil,
contact: [ContactDetail]? = nil,
contained: [ResourceProxy]? = nil,
description_fhir: FHIRPrimitive<FHIRString>? = nil,
enrollment: [Reference]? = nil,
`extension`: [Extension]? = nil,
focus: [CodeableConcept]? = nil,
id: FHIRPrimitive<FHIRString>? = nil,
identifier: [Identifier]? = nil,
implicitRules: FHIRPrimitive<FHIRURI>? = nil,
jurisdiction: [CodeableConcept]? = nil,
keyword: [CodeableConcept]? = nil,
language: FHIRPrimitive<FHIRString>? = nil,
meta: Meta? = nil,
modifierExtension: [Extension]? = nil,
note: [Annotation]? = nil,
partOf: [Reference]? = nil,
period: Period? = nil,
principalInvestigator: Reference? = nil,
`protocol`: [Reference]? = nil,
reasonStopped: CodeableConcept? = nil,
relatedArtifact: [RelatedArtifact]? = nil,
site: [Reference]? = nil,
sponsor: Reference? = nil,
status: FHIRPrimitive<ResearchStudyStatus>,
text: Narrative? = nil,
title: FHIRPrimitive<FHIRString>? = nil)
{
self.init(status: status)
self.arm = arm
self.category = category
self.contact = contact
self.contained = contained
self.description_fhir = description_fhir
self.enrollment = enrollment
self.`extension` = `extension`
self.focus = focus
self.id = id
self.identifier = identifier
self.implicitRules = implicitRules
self.jurisdiction = jurisdiction
self.keyword = keyword
self.language = language
self.meta = meta
self.modifierExtension = modifierExtension
self.note = note
self.partOf = partOf
self.period = period
self.principalInvestigator = principalInvestigator
self.`protocol` = `protocol`
self.reasonStopped = reasonStopped
self.relatedArtifact = relatedArtifact
self.site = site
self.sponsor = sponsor
self.text = text
self.title = title
}
// MARK: - Codable
private enum CodingKeys: String, CodingKey {
case arm
case category
case contact
case description_fhir = "description"; case _description_fhir = "_description"
case enrollment
case focus
case identifier
case jurisdiction
case keyword
case note
case partOf
case period
case principalInvestigator
case `protocol` = "protocol"
case reasonStopped
case relatedArtifact
case site
case sponsor
case status; case _status
case title; case _title
}
/// Initializer for Decodable
public required init(from decoder: Decoder) throws {
let _container = try decoder.container(keyedBy: CodingKeys.self)
// Decode all our properties
self.arm = try [ResearchStudyArm](from: _container, forKeyIfPresent: .arm)
self.category = try [CodeableConcept](from: _container, forKeyIfPresent: .category)
self.contact = try [ContactDetail](from: _container, forKeyIfPresent: .contact)
self.description_fhir = try FHIRPrimitive<FHIRString>(from: _container, forKeyIfPresent: .description_fhir, auxiliaryKey: ._description_fhir)
self.enrollment = try [Reference](from: _container, forKeyIfPresent: .enrollment)
self.focus = try [CodeableConcept](from: _container, forKeyIfPresent: .focus)
self.identifier = try [Identifier](from: _container, forKeyIfPresent: .identifier)
self.jurisdiction = try [CodeableConcept](from: _container, forKeyIfPresent: .jurisdiction)
self.keyword = try [CodeableConcept](from: _container, forKeyIfPresent: .keyword)
self.note = try [Annotation](from: _container, forKeyIfPresent: .note)
self.partOf = try [Reference](from: _container, forKeyIfPresent: .partOf)
self.period = try Period(from: _container, forKeyIfPresent: .period)
self.principalInvestigator = try Reference(from: _container, forKeyIfPresent: .principalInvestigator)
self.`protocol` = try [Reference](from: _container, forKeyIfPresent: .`protocol`)
self.reasonStopped = try CodeableConcept(from: _container, forKeyIfPresent: .reasonStopped)
self.relatedArtifact = try [RelatedArtifact](from: _container, forKeyIfPresent: .relatedArtifact)
self.site = try [Reference](from: _container, forKeyIfPresent: .site)
self.sponsor = try Reference(from: _container, forKeyIfPresent: .sponsor)
self.status = try FHIRPrimitive<ResearchStudyStatus>(from: _container, forKey: .status, auxiliaryKey: ._status)
self.title = try FHIRPrimitive<FHIRString>(from: _container, forKeyIfPresent: .title, auxiliaryKey: ._title)
try super.init(from: decoder)
}
/// Encodable
public override func encode(to encoder: Encoder) throws {
var _container = encoder.container(keyedBy: CodingKeys.self)
// Encode all our properties
try arm?.encode(on: &_container, forKey: .arm)
try category?.encode(on: &_container, forKey: .category)
try contact?.encode(on: &_container, forKey: .contact)
try description_fhir?.encode(on: &_container, forKey: .description_fhir, auxiliaryKey: ._description_fhir)
try enrollment?.encode(on: &_container, forKey: .enrollment)
try focus?.encode(on: &_container, forKey: .focus)
try identifier?.encode(on: &_container, forKey: .identifier)
try jurisdiction?.encode(on: &_container, forKey: .jurisdiction)
try keyword?.encode(on: &_container, forKey: .keyword)
try note?.encode(on: &_container, forKey: .note)
try partOf?.encode(on: &_container, forKey: .partOf)
try period?.encode(on: &_container, forKey: .period)
try principalInvestigator?.encode(on: &_container, forKey: .principalInvestigator)
try `protocol`?.encode(on: &_container, forKey: .`protocol`)
try reasonStopped?.encode(on: &_container, forKey: .reasonStopped)
try relatedArtifact?.encode(on: &_container, forKey: .relatedArtifact)
try site?.encode(on: &_container, forKey: .site)
try sponsor?.encode(on: &_container, forKey: .sponsor)
try status.encode(on: &_container, forKey: .status, auxiliaryKey: ._status)
try title?.encode(on: &_container, forKey: .title, auxiliaryKey: ._title)
try super.encode(to: encoder)
}
// MARK: - Equatable & Hashable
public override func isEqual(to _other: Any?) -> Bool {
guard let _other = _other as? ResearchStudy else {
return false
}
guard super.isEqual(to: _other) else {
return false
}
return arm == _other.arm
&& category == _other.category
&& contact == _other.contact
&& description_fhir == _other.description_fhir
&& enrollment == _other.enrollment
&& focus == _other.focus
&& identifier == _other.identifier
&& jurisdiction == _other.jurisdiction
&& keyword == _other.keyword
&& note == _other.note
&& partOf == _other.partOf
&& period == _other.period
&& principalInvestigator == _other.principalInvestigator
&& `protocol` == _other.`protocol`
&& reasonStopped == _other.reasonStopped
&& relatedArtifact == _other.relatedArtifact
&& site == _other.site
&& sponsor == _other.sponsor
&& status == _other.status
&& title == _other.title
}
public override func hash(into hasher: inout Hasher) {
super.hash(into: &hasher)
hasher.combine(arm)
hasher.combine(category)
hasher.combine(contact)
hasher.combine(description_fhir)
hasher.combine(enrollment)
hasher.combine(focus)
hasher.combine(identifier)
hasher.combine(jurisdiction)
hasher.combine(keyword)
hasher.combine(note)
hasher.combine(partOf)
hasher.combine(period)
hasher.combine(principalInvestigator)
hasher.combine(`protocol`)
hasher.combine(reasonStopped)
hasher.combine(relatedArtifact)
hasher.combine(site)
hasher.combine(sponsor)
hasher.combine(status)
hasher.combine(title)
}
}
/**
Defined path through the study for a subject.
Describes an expected sequence of events for one of the participants of a study. E.g. Exposure to drug A, wash-out,
exposure to drug B, wash-out, follow-up.
*/
open class ResearchStudyArm: BackboneElement {
/// Label for study arm
public var name: FHIRPrimitive<FHIRString>
/// Categorization of study arm
public var code: CodeableConcept?
/// Short explanation of study path
public var description_fhir: FHIRPrimitive<FHIRString>?
/// Designated initializer taking all required properties
public init(name: FHIRPrimitive<FHIRString>) {
self.name = name
super.init()
}
/// Convenience initializer
public convenience init(
code: CodeableConcept? = nil,
description_fhir: FHIRPrimitive<FHIRString>? = nil,
`extension`: [Extension]? = nil,
id: FHIRPrimitive<FHIRString>? = nil,
modifierExtension: [Extension]? = nil,
name: FHIRPrimitive<FHIRString>)
{
self.init(name: name)
self.code = code
self.description_fhir = description_fhir
self.`extension` = `extension`
self.id = id
self.modifierExtension = modifierExtension
}
// MARK: - Codable
private enum CodingKeys: String, CodingKey {
case code
case description_fhir = "description"; case _description_fhir = "_description"
case name; case _name
}
/// Initializer for Decodable
public required init(from decoder: Decoder) throws {
let _container = try decoder.container(keyedBy: CodingKeys.self)
// Decode all our properties
self.code = try CodeableConcept(from: _container, forKeyIfPresent: .code)
self.description_fhir = try FHIRPrimitive<FHIRString>(from: _container, forKeyIfPresent: .description_fhir, auxiliaryKey: ._description_fhir)
self.name = try FHIRPrimitive<FHIRString>(from: _container, forKey: .name, auxiliaryKey: ._name)
try super.init(from: decoder)
}
/// Encodable
public override func encode(to encoder: Encoder) throws {
var _container = encoder.container(keyedBy: CodingKeys.self)
// Encode all our properties
try code?.encode(on: &_container, forKey: .code)
try description_fhir?.encode(on: &_container, forKey: .description_fhir, auxiliaryKey: ._description_fhir)
try name.encode(on: &_container, forKey: .name, auxiliaryKey: ._name)
try super.encode(to: encoder)
}
// MARK: - Equatable & Hashable
public override func isEqual(to _other: Any?) -> Bool {
guard let _other = _other as? ResearchStudyArm else {
return false
}
guard super.isEqual(to: _other) else {
return false
}
return code == _other.code
&& description_fhir == _other.description_fhir
&& name == _other.name
}
public override func hash(into hasher: inout Hasher) {
super.hash(into: &hasher)
hasher.combine(code)
hasher.combine(description_fhir)
hasher.combine(name)
}
}
|
[
-1
] |
ccf80048314f58541fb167c79483496525a5d3a0
|
b303f266511fcfc1b0fbc38e0452856e50a1ed44
|
/Qunduiz/Controllers/ViewController.swift
|
27b970797cd30ed0762315cd6ad9e0262e850249
|
[] |
no_license
|
hsmnzaydn/Qunduiz
|
119310eba75c2fbd0fe8c9b9ea3d48fe9b1e9bcd
|
fee3ba83c52f76601056807032b332dfba46b598
|
refs/heads/master
| 2020-05-09T23:00:41.661870 | 2019-04-13T17:52:25 | 2019-04-13T17:52:25 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 3,305 |
swift
|
//
// ViewController.swift
// Qunduiz
//
// Created by Omer on 3.04.2019.
// Copyright © 2019 Omer Varoglu. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var listCardView: UIView!
@IBOutlet weak var singleCardView: UIView!
@IBOutlet weak var lineCardView: UIView!
@IBOutlet weak var listSelectedLabel: UILabel!
@IBOutlet weak var singleSelectedLabel: UILabel!
@IBOutlet weak var lineSelectedLabel: UILabel!
var questions : [Questions] = []
var answers : [Answers] = []
var name: String = ""
var score: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
self.navigationController?.isNavigationBarHidden = false
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Devam", style: UIBarButtonItem.Style.plain, target: self, action: #selector(startQuiz))
let listgestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(listSelected))
listCardView.addGestureRecognizer(listgestureRecognizer)
let singeGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(singeSelected))
singleCardView.addGestureRecognizer(singeGestureRecognizer)
let lineGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(lineSelected))
lineCardView.addGestureRecognizer(lineGestureRecognizer)
}
override func viewDidAppear(_ animated: Bool) {
self.navigationController?.navigationBar.barStyle = UIBarStyle.default
}
@objc func listSelected () {
listSelectedLabel.text = "✔️"
singleSelectedLabel.text = ""
lineSelectedLabel.text = ""
}
@objc func singeSelected () {
listSelectedLabel.text = ""
singleSelectedLabel.text = "✔️"
lineSelectedLabel.text = ""
}
@objc func lineSelected () {
listSelectedLabel.text = ""
singleSelectedLabel.text = ""
lineSelectedLabel.text = "✔️"
}
@objc func startQuiz() {
if listSelectedLabel.text == "✔️" {
let vc = storyboard!.instantiateViewController(withIdentifier: "ListTableViewController") as! ListTableViewController
vc.questions = questions
vc.tableView.reloadData()
self.navigationController?.pushViewController(vc, animated: true)
}else if singleSelectedLabel.text == "✔️" {
let vc = storyboard!.instantiateViewController(withIdentifier: "PagingTableViewController") as! PagingTableViewController
vc.questions = questions
vc.tableView.reloadData()
self.navigationController?.pushViewController(vc, animated: true)
}else if lineSelectedLabel.text == "✔️" {
let vc = storyboard!.instantiateViewController(withIdentifier: "QuestionHeaderTableViewController") as! QuestionHeaderTableViewController
vc.questions = questions
vc.tableView.reloadData()
self.navigationController?.pushViewController(vc, animated: true)
}else {
ViewUtils.showAlert(withController: self, title: "HATA!", message: "Lutfen gorunum seciniz.")
}
}
}
|
[
-1
] |
80e19ce91bf8b14e81b31847d227f9f17f4612ed
|
aab349911366c808ff019845f9dd6e4ff399fe4a
|
/Sources/ComposableArchitecture/Internal/Exports.swift
|
7819c28f93beb4fb03c8abf52fae45b7125f57a0
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
HealthTap/swift-composable-architecture
|
92fc0e258a63e8b3da51346965d388ddfe42d40f
|
95f2dc2cdbdf195784a2ee2cf74a82a794b1bf22
|
refs/heads/main
| 2023-08-18T13:24:54.405425 | 2021-08-25T05:02:09 | 2021-08-25T05:02:09 | 280,331,218 | 0 | 0 | null | 2020-07-17T05:04:37 | 2020-07-17T05:04:36 | null |
UTF-8
|
Swift
| false | false | 172 |
swift
|
@_exported import CasePaths
@_exported import CombineSchedulers
@_exported import CustomDump
@_exported import IdentifiedCollections
@_exported import XCTestDynamicOverlay
|
[
-1
] |
41a2a7c5680c0e2ff9d2c2be86826f0d3acaeda3
|
27fe17dde5610cf4457bc674bba39ceb0b406673
|
/DynamicCell/Utilities/CommentFlowLayout.swift
|
74363ad6d2ed26f6bdd69bbab87a1622706c8c22
|
[] |
no_license
|
aPuYue/DynamicCell
|
ccd1c1068384760051e856713def98921e3e1598
|
9dd2ba6901ed42d61387b02ad4f0cf5c57daaf96
|
refs/heads/main
| 2023-03-31T12:04:59.666469 | 2021-04-02T19:37:59 | 2021-04-02T19:37:59 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,503 |
swift
|
//
// CommentFlowLayout.swift
// DynamicCell
//
// Created by Mohannad on 29.03.2021.
//
import Foundation
import UIKit
final class CommentFlowLayout : UICollectionViewFlowLayout {
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
let layoutAttributesObjects = super.layoutAttributesForElements(in: rect)?.map{ $0.copy() } as? [UICollectionViewLayoutAttributes]
layoutAttributesObjects?.forEach({ layoutAttributes in
if layoutAttributes.representedElementCategory == .cell {
if let newFrame = layoutAttributesForItem(at: layoutAttributes.indexPath)?.frame {
layoutAttributes.frame = newFrame
}
}
})
return layoutAttributesObjects
}
override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
guard let collectionView = collectionView else {
fatalError()
}
guard let layoutAttributes = super.layoutAttributesForItem(at: indexPath)?.copy() as? UICollectionViewLayoutAttributes else {
return nil
}
layoutAttributes.frame.origin.x = sectionInset.left
layoutAttributes.frame.size.width = collectionView.safeAreaLayoutGuide.layoutFrame.width - sectionInset.left - sectionInset.right
return layoutAttributes
}
}
|
[
361413
] |
166dc13340a3eb12dd541caccd01349b014c9c69
|
f4e28a27c2e5249eeec8052f28b5f41f19232dc3
|
/inviti/Model/UserDefaultsName.swift
|
9021dd986715cc17f19d1a010ab28976b0e131c1
|
[
"MIT"
] |
permissive
|
hannahchiu6/inviti
|
f6f16f2b8caf9c2a780ebc9b69411d9e076a8b7e
|
b25d6cd4e474fb08a9f95824a46b28ed5677dbd0
|
refs/heads/main
| 2023-06-26T17:59:34.667839 | 2021-07-24T06:33:02 | 2021-07-24T06:33:02 | 366,328,645 | 2 | 2 |
MIT
| 2021-07-24T06:32:05 | 2021-05-11T09:34:19 |
Swift
|
UTF-8
|
Swift
| false | false | 255 |
swift
|
//
// UserDefaultsName.swift
// inviti
//
// Created by Hannah.C on 03.06.21.
//
import Foundation
extension UserDefaults {
enum Keys: String {
case uid
case displayName
case email
case image
}
}
|
[
-1
] |
78576f4642f332f600294b95f0ee12d632b8ce7a
|
c92553144d5403c2fdff17155ef16cdeff37a386
|
/Source/SwiftLintBuiltInRules/Rules/Idiomatic/StaticOperatorRule.swift
|
8c41bc7e6eef15f1f8f5bbe5cf35e1e5f7eaa166
|
[
"MIT"
] |
permissive
|
realm/SwiftLint
|
63c0d3bf7c20e7d46f33db4811be200b694ffc0c
|
b281a8d33a958a6c70c3ef18d4182378f337fd3a
|
refs/heads/main
| 2023-08-31T00:51:35.540847 | 2023-08-30T20:57:10 | 2023-08-30T20:57:10 | 35,732,214 | 19,192 | 2,903 |
MIT
| 2023-09-14T20:58:41 | 2015-05-16T16:59:31 |
Swift
|
UTF-8
|
Swift
| false | false | 3,357 |
swift
|
import SwiftSyntax
struct StaticOperatorRule: SwiftSyntaxRule, ConfigurationProviderRule, OptInRule {
var configuration = SeverityConfiguration<Self>(.warning)
static let description = RuleDescription(
identifier: "static_operator",
name: "Static Operator",
description: "Operators should be declared as static functions, not free functions",
kind: .idiomatic,
nonTriggeringExamples: [
Example("""
class A: Equatable {
static func == (lhs: A, rhs: A) -> Bool {
return false
}
"""),
Example("""
class A<T>: Equatable {
static func == <T>(lhs: A<T>, rhs: A<T>) -> Bool {
return false
}
"""),
Example("""
public extension Array where Element == Rule {
static func == (lhs: Array, rhs: Array) -> Bool {
if lhs.count != rhs.count { return false }
return !zip(lhs, rhs).contains { !$0.0.isEqualTo($0.1) }
}
}
"""),
Example("""
private extension Optional where Wrapped: Comparable {
static func < (lhs: Optional, rhs: Optional) -> Bool {
switch (lhs, rhs) {
case let (lhs?, rhs?):
return lhs < rhs
case (nil, _?):
return true
default:
return false
}
}
}
""")
],
triggeringExamples: [
Example("""
↓func == (lhs: A, rhs: A) -> Bool {
return false
}
"""),
Example("""
↓func == <T>(lhs: A<T>, rhs: A<T>) -> Bool {
return false
}
"""),
Example("""
↓func == (lhs: [Rule], rhs: [Rule]) -> Bool {
if lhs.count != rhs.count { return false }
return !zip(lhs, rhs).contains { !$0.0.isEqualTo($0.1) }
}
"""),
Example("""
private ↓func < <T: Comparable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case let (lhs?, rhs?):
return lhs < rhs
case (nil, _?):
return true
default:
return false
}
}
""")
]
)
func makeVisitor(file: SwiftLintFile) -> ViolationsSyntaxVisitor {
Visitor(viewMode: .sourceAccurate)
}
}
private extension StaticOperatorRule {
final class Visitor: ViolationsSyntaxVisitor {
override var skippableDeclarations: [DeclSyntaxProtocol.Type] { .all }
override func visitPost(_ node: FunctionDeclSyntax) {
if node.isFreeFunction, node.isOperator {
violations.append(node.funcKeyword.positionAfterSkippingLeadingTrivia)
}
}
}
}
private extension FunctionDeclSyntax {
var isFreeFunction: Bool {
parent?.is(CodeBlockItemSyntax.self) ?? false
}
var isOperator: Bool {
switch name.tokenKind {
case .binaryOperator:
return true
default:
return false
}
}
}
|
[
-1
] |
7bd924460c3a18ee52da12bf320c543aa8ec7352
|
f83b208f10ae9cbe384887c96e896f0ca3a6a69c
|
/Secret Message/ImageViewController.swift
|
4367a5e05386d04173a5a261b020a92536d93996
|
[] |
no_license
|
em0072/Burn
|
a38deb91477dd45aaf24b21f304872059c72991b
|
3516ac3ec06a659335cfa5841be01909c2030a28
|
refs/heads/master
| 2021-01-10T12:34:03.269756 | 2016-04-12T07:19:56 | 2016-04-12T07:19:56 | 54,885,196 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 12,838 |
swift
|
//
// ImageViewController.swift
// Secret Message
//
// Created by Митько Евгений on 17.03.16.
// Copyright © 2016 Evgeny Mitko. All rights reserved.
//
import UIKit
import AVKit
import AVFoundation
import CoreMedia
class ImageViewController: UIViewController, UINavigationControllerDelegate {
//MARK: Stored Properties
var fileType = String()
var imageView = UIImageView()
var videoURL = NSURL()
var moviePlayer = AVPlayerViewController()
var message = Messages()
var friendsArray = [BackendlessUser]()
var recipientList = [BackendlessUser]()
//MARK: View Methodes
override func viewDidLoad() {
super.viewDidLoad()
layoutView()
if message.fileType == "image" {
downloadImage()
let senderName = message.senderName
print("This is recepients for this message \(message.recepients![0].name)")
self.navigationItem.title = "From: \(senderName!)"
} else {
imageView.image = videoSnapshot(videoURL)
}
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(true)
}
override func viewDidAppear(animated: Bool) {
super.viewWillAppear(true)
}
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(true)
}
//MARK: Helper Methods
func videoSnapshot(vidURL: NSURL) -> UIImage? {
let size = Size(x: 162, y: 323, width: 90, height: 90)
let playButton = UIButton(frame: CGRect(x: size.x, y: size.y, width: size.width, height: size.height))
playButton.setImage(UIImage(named: "playButton")!, forState: .Normal)
playButton.setImage(UIImage(named: "playButtonPressed")!, forState: .Highlighted)
playButton.addTarget(self, action: #selector(ImageViewController.playVideo), forControlEvents: .TouchUpInside)
view.addSubview(playButton)
let asset = AVURLAsset(URL: vidURL)
let generator = AVAssetImageGenerator(asset: asset)
generator.appliesPreferredTrackTransform = true
let timestamp = CMTime(seconds: 1, preferredTimescale: 60)
do {
let imageRef = try generator.copyCGImageAtTime(timestamp, actualTime: nil)
return UIImage(CGImage: imageRef)
}
catch let error as NSError
{
print("Image generation failed with error \(error)")
return nil
}
}
func playVideo() {
print("Start to play video")
let player = AVPlayer(URL: videoURL)
moviePlayer.player = player
presentViewController(self.moviePlayer, animated: true, completion: {
self.moviePlayer.player!.play()
})
}
func report () {
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = "Users[userRelations].objectId = \'\(activeUser.objectId)\'"
var error: Fault?
let bc = backendless.data.of(BackendlessUser.ofClass()).find(dataQuery, fault: &error)
if error == nil {
print("Friends have been found: \(bc.data.count)")
self.friendsArray = bc.data as! [BackendlessUser]
}
let alertController = DOAlertController(title: "Report", message: "Do you want to report or block this user?", preferredStyle: .ActionSheet)
// Create the action.
let ReportAction = DOAlertAction(title: "Report", style: .Default) { action in
NSLog("ReportAction action occured.")
self.reportAction()
}
// Create the action.
let BlockAction = DOAlertAction(title: "Report and Block user", style: .Destructive) { action in
NSLog("BlockAction action occured.")
self.blockUser()
}
let CancelAction = DOAlertAction(title: "Cancel", style: .Cancel, handler: nil)
alertController.titleFont = UIFont(name: "Lato-Regular", size: 18)
alertController.titleTextColor = UIColor.blackColor()
alertController.messageFont = UIFont(name: "Lato-Light", size: 16)
alertController.messageTextColor = UIColor.blackColor()
alertController.buttonFont[.Default] = UIFont(name: "Lato-Regular", size: 16)
alertController.buttonTextColor[.Default] = UIColor.whiteColor()
// Add the action.
alertController.addAction(ReportAction)
alertController.addAction(BlockAction)
alertController.addAction(CancelAction)
// Show alert
presentViewController(alertController, animated: true, completion: nil)
}
func reportAction () {
print("StartReport Action")
var serchResult = [BackendlessUser]()
let adminObjectId = "E93B7920-090D-4217-FF79-DD1966194C00"
let whereClause = "objectId = '\(adminObjectId)'"
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
var error: Fault?
let bc = backendless.data.of(BackendlessUser.ofClass()).find(dataQuery, fault: &error)
if error == nil {
print("Contacts have been found: \(bc.data)")
serchResult = bc.getCurrentPage() as! [BackendlessUser]
print("Search Results \(serchResult)")
for user in serchResult {
if user.name == "admin" {
print("new sender = \(user.name)")
self.recipientList.append(user)
}
}
print("new sender = \(recipientList)")
message.recepients = recipientList
let dataStore = backendless.data.of(Message.ofClass())
dataStore.save(message, response: { (result) in
self.sendPush(self.message.recepients![0])
print("message succkesfully sent")
self.dismissViewControllerAnimated(true, completion: nil)
// percentOfCompletion += percentForMessage
// ARSLineProgress.updateWithProgress(CGFloat(percentOfCompletion))
// if i == self.sendList.count - 1 {
// ARSLineProgress.showSuccess()
// self.sendList.removeAll()
// self.clearImageVideoSendListAndDissmis()
// }
}, error: { (error) in
let title = NSLocalizedString("Try Again!", comment: "account success note title")
let message = NSLocalizedString("Please, capture a photo/video or pick one in photo library", comment: "account success message body")
print(error)
// ARSLineProgress.showFail()
Utility.simpleAlert(title, message: message, sender: self)
})
}
}
func blockUser() {
let senderId = message.senderId
print("senderId = \(senderId)")
var blockingSender = BackendlessUser()
var serchResult = [BackendlessUser]()
let whereClause = "objectId = '\(senderId!)'"
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
var error: Fault?
let bc = backendless.data.of(BackendlessUser.ofClass()).find(dataQuery, fault: &error)
if error == nil {
print("Contacts have been found: \(bc.data)")
serchResult = bc.getCurrentPage() as! [BackendlessUser]
print("Search Results \(serchResult)")
if serchResult.count > 0 {
blockingSender = serchResult[0]
if self.isFriend(blockingSender) {
for user in friendsArray {
if blockingSender.email == user.email {
let index = friendsArray.indexOf(user)!
friendsArray.removeAtIndex(index)
activeUser.updateProperties(["userRelations":friendsArray])
backendless.userService.update(activeUser, response: { (updatedUser) in
print("\(activeUser.name) add \(blockingSender.name) to block list")
self.reportAction()
}) { (error) in
print(error.description)
}
}
}
}
print("This is user that needs block - \(blockingSender.name)")
var blockList = loadBlockList()
blockList.append(blockingSender)
activeUser.updateProperties(["blockList":blockList])
backendless.userService.update(activeUser, response: { (updatedUser) in
print("\(activeUser.name) add \(blockingSender.name) to block list")
self.reportAction()
}) { (error) in
print(error.description)
}
}
}
}
func isFriend(user: BackendlessUser) -> Bool {
for friend in friendsArray {
if friend.objectId == user.objectId {
return true
}
}
return false
}
func loadBlockList () -> [BackendlessUser] {
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = "Users[blockList].objectId = \'\(activeUser.objectId)\'"
var error: Fault?
let bc = backendless.data.of(BackendlessUser.ofClass()).find(dataQuery, fault: &error)
if error == nil {
print("Contacts in BL have been found: \(bc.data.count)")
let blockArray = bc.data as! [BackendlessUser]
if blockArray.count > 0 {
return blockArray
} else {
return []
}
}
else {
print("Server reported an error: \(error)")
return []
}
}
func sendPush(sender: BackendlessUser) {
let publishOptions = PublishOptions()
publishOptions.headers = ["ios-badge":"1",
"ios-sound":"Sound12.aif",
"ios-alert":"\(activeUser.name!) send you a message!"]
// publishOptions.addHeader("publisher_name", value: activeUser.name)
var error: Fault?
let messageStatus = backendless.messagingService.publish(sender.objectId, message: "\(activeUser.name!) send you a message!", publishOptions: publishOptions, error: &error)
if error == nil {
print("MessageStatus = \(messageStatus.status) ['\(messageStatus.messageId)']")
}
else {
print("Server reported an error: \(error)")
}
}
func downloadImage() {
let stringURL = message.file?.fileURL
print("StringURL is \(stringURL!)")
let url = NSURL(string: stringURL!)!
let urlData = NSData(contentsOfURL: url)
imageView.image = UIImage(data: urlData!)
}
func dismissView() {
progressViewManager.show()
var recipientArray = message.recepients!
if recipientArray.count == 1 {
// DeleteIt
let fileFullURL = message.file!.fileURL
let fileURLArray = fileFullURL.componentsSeparatedByString("files/")
let fileURL = fileURLArray[1]
print(fileURLArray[1])
backendless.fileService.remove(fileURL, response: { (respone) in
print(respone)
progressViewManager.hide()
}, error: { (error) in
print(error)
})
backendless.data.of(Messages.ofClass()).remove(message)
} else {
for recipt in recipientArray {
if recipt.objectId == activeUser.objectId {
let index = recipientArray.indexOf(recipt)
recipientArray.removeAtIndex(index!)
message.recepients = recipientArray
var error: Fault?
let result = backendless.data.save(message, error: &error) as? Messages
if error == nil {
print("PhoneBook havs been updated: \(result)")
progressViewManager.hide()
}
else {
print("Server reported an error: \(error)")
}
}
}
}
self.dismissViewControllerAnimated(true) {
}
}
}
|
[
-1
] |
08132a589e67f50f62a5d89ce72e56bfecf4e758
|
dfe8824bf709b2fca6e2b0b500acc1b2387b758f
|
/TestProject/AppDelegate.swift
|
fb9077afd0da2b871e92b12684887d220dfc48e2
|
[] |
no_license
|
ryanchutx/TestProject
|
52ff5d2dfb2c701cc6621c4b8742d90866d3118f
|
ea0365e606b6212fb9cbd55b487942942322f4b3
|
refs/heads/master
| 2023-03-09T07:10:12.650104 | 2021-02-13T19:53:50 | 2021-02-13T19:53:50 | 338,655,441 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,346 |
swift
|
//
// AppDelegate.swift
// TestProject
//
// Created by Ryan Chu on 2/13/21.
//
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
|
[
393222,
393224,
393230,
393250,
344102,
393261,
393266,
213048,
385081,
376889,
393275,
376905,
327756,
254030,
286800,
368727,
180313,
368735,
180320,
376931,
286831,
368752,
286844,
417924,
262283,
286879,
286888,
377012,
164028,
327871,
377036,
180431,
377046,
418007,
418010,
377060,
327914,
205036,
393456,
393460,
418043,
336123,
385280,
336128,
262404,
180490,
164106,
368911,
262416,
262422,
377117,
262436,
336180,
262454,
393538,
262472,
344403,
213332,
65880,
262496,
418144,
262499,
213352,
246123,
262507,
262510,
213372,
385419,
393612,
262550,
262552,
385440,
385443,
385451,
262573,
393647,
385458,
262586,
344511,
262592,
360916,
369118,
328177,
328179,
328182,
328189,
328192,
164361,
410128,
393747,
254490,
188958,
385570,
33316,
377383,
197159,
352821,
197177,
418363,
188987,
369223,
385609,
385616,
352864,
369253,
262760,
352874,
352887,
254587,
377472,
148105,
377484,
352918,
98968,
344744,
361129,
336555,
385713,
434867,
164534,
336567,
164538,
328378,
328386,
352968,
344776,
352971,
418507,
352973,
385742,
385748,
361179,
189153,
369381,
361195,
418553,
344831,
336643,
344835,
344841,
361230,
336659,
418580,
418585,
434970,
369435,
418589,
262942,
418593,
336675,
328484,
418598,
418605,
336696,
361273,
328515,
336708,
328519,
361288,
336711,
328522,
336714,
426841,
254812,
361309,
197468,
361315,
361322,
328573,
377729,
369542,
361360,
222128,
345035,
386003,
345043,
386011,
386018,
386022,
435187,
328714,
361489,
386069,
386073,
336921,
336925,
345118,
377887,
345133,
345138,
386101,
361536,
197707,
189520,
345169,
156761,
361567,
148578,
345199,
386167,
361593,
410745,
361598,
214149,
345222,
386186,
337047,
345246,
214175,
337071,
337075,
386258,
328924,
66782,
222437,
386285,
328941,
386291,
345376,
353570,
345379,
410917,
345382,
337205,
345399,
378169,
369978,
337222,
337229,
337234,
263508,
402791,
345448,
271730,
378227,
271745,
181638,
353673,
181643,
181654,
230809,
181670,
181673,
181678,
181681,
337329,
181684,
181690,
361917,
181696,
337349,
181703,
337365,
271839,
329191,
361960,
329194,
116210,
337398,
337415,
329226,
419339,
419343,
419349,
419355,
370205,
419359,
394786,
419362,
370213,
419368,
419376,
206395,
214593,
419400,
419402,
353867,
419406,
419410,
394853,
345701,
222830,
370297,
403070,
403075,
345736,
198280,
403091,
345749,
419483,
345757,
345762,
419491,
345765,
419497,
419501,
370350,
419506,
419509,
419512,
337592,
419517,
337599,
419527,
419530,
419535,
272081,
419542,
394966,
419544,
181977,
345818,
419547,
419550,
419559,
337642,
419563,
337645,
370415,
337659,
141051,
337668,
362247,
395021,
362255,
116509,
345887,
378663,
345905,
354106,
354111,
247617,
354117,
370503,
329544,
345930,
370509,
354130,
247637,
337750,
370519,
313180,
354142,
354150,
354156,
345964,
345967,
345970,
345974,
403320,
354172,
247691,
337808,
247700,
329623,
436126,
436132,
337833,
362413,
337844,
346057,
247759,
346063,
329697,
354277,
190439,
247789,
354313,
346139,
436289,
378954,
395339,
338004,
100453,
329832,
329855,
329867,
329885,
411805,
346272,
100524,
387249,
379066,
387260,
256191,
395466,
346316,
411861,
411864,
411868,
411873,
379107,
411876,
387301,
346343,
338152,
387306,
387312,
346355,
436473,
321786,
379134,
411903,
411916,
379152,
395538,
387349,
338199,
387352,
182558,
338211,
395566,
248111,
362822,
436555,
190796,
379233,
354673,
248186,
420236,
379278,
272786,
354727,
338352,
330189,
338381,
338386,
338403,
338409,
248308,
199164,
330252,
199186,
420376,
330267,
354855,
10828,
199249,
346721,
174695,
248425,
191084,
338543,
191092,
346742,
330383,
354974,
150183,
174774,
248504,
174777,
223934,
355024,
273108,
355028,
264918,
183005,
256734,
436962,
338660,
338664,
264941,
363251,
207619,
264964,
338700,
256786,
199452,
363293,
396066,
346916,
396069,
215853,
355122,
355131,
355140,
355143,
338763,
355150,
330580,
355166,
265055,
265058,
355175,
387944,
355179,
330610,
330642,
355218,
412599,
207808,
379848,
396245,
330710,
248792,
248798,
347105,
257008,
183282,
265207,
330748,
265214,
330760,
330768,
248862,
396328,
158761,
347176,
199728,
396336,
330800,
396339,
339001,
388154,
388161,
347205,
248904,
330826,
248914,
412764,
339036,
257120,
265320,
248951,
420984,
330889,
347287,
339097,
248985,
44197,
380070,
339112,
249014,
126144,
330958,
330965,
265432,
265436,
388319,
388347,
175375,
159005,
175396,
208166,
273708,
347437,
372015,
347441,
372018,
199988,
44342,
175415,
396600,
437566,
175423,
437570,
437575,
437583,
331088,
437587,
331093,
396633,
175450,
437595,
175457,
208227,
175460,
175463,
265580,
437620,
175477,
249208,
175483,
175486,
249214,
175489,
249218,
249224,
249227,
249234,
175513,
175516,
396705,
175522,
355748,
380332,
396722,
208311,
388542,
372163,
216517,
380360,
216522,
339404,
372176,
208337,
339412,
413141,
339417,
339420,
249308,
339424,
249312,
339428,
339434,
249328,
69113,
372228,
208398,
380432,
175635,
265778,
265795,
396872,
265805,
224853,
224857,
257633,
224870,
372327,
257646,
372337,
224884,
224887,
224890,
224894,
224897,
372353,
216707,
126596,
421508,
224904,
224909,
11918,
159374,
224913,
126610,
339601,
224916,
224919,
126616,
224922,
208538,
224926,
224929,
224932,
224936,
257704,
224942,
257712,
224947,
257716,
257720,
224953,
257724,
224959,
257732,
224965,
224969,
339662,
224975,
257747,
224981,
224986,
257761,
224993,
257764,
224999,
339695,
225012,
257787,
225020,
339710,
257790,
225025,
257794,
257801,
339721,
257804,
225038,
257807,
225043,
372499,
167700,
225048,
257819,
225053,
184094,
225058,
257833,
225066,
257836,
413484,
225070,
225073,
372532,
257845,
225079,
397112,
225082,
397115,
225087,
225092,
225096,
323402,
257868,
225103,
257871,
397139,
225108,
225112,
257883,
257886,
225119,
257890,
339814,
225127,
274280,
257896,
257901,
225137,
339826,
257908,
225141,
257912,
225148,
257916,
257920,
225155,
339844,
225165,
397200,
225170,
380822,
225175,
225180,
118691,
184244,
372664,
372702,
372706,
356335,
380918,
372738,
405533,
430129,
266294,
421960,
356439,
421990,
266350,
356466,
266362,
381068,
225423,
250002,
250004,
225429,
356506,
225437,
135327,
225441,
438433,
225444,
438436,
225447,
438440,
225450,
258222,
225455,
430256,
225458,
225461,
225466,
389307,
225470,
381120,
372929,
430274,
225475,
389320,
225484,
225487,
225490,
266453,
225493,
225496,
225499,
225502,
225505,
356578,
225510,
217318,
225514,
225518,
372976,
381176,
397571,
389380,
356637,
356640,
356643,
356646,
266536,
356649,
356655,
332080,
340275,
356660,
397622,
332090,
225597,
332097,
201028,
348488,
332106,
332117,
348502,
250199,
250202,
332125,
250210,
348522,
348525,
348527,
332152,
389502,
250238,
332161,
356740,
332172,
373145,
340379,
389550,
324030,
266687,
160234,
127471,
340472,
324094,
266754,
324099,
324102,
324111,
340500,
324117,
324131,
332324,
381481,
356907,
324139,
324142,
356916,
324149,
324155,
348733,
324164,
356934,
348743,
381512,
324170,
324173,
324176,
389723,
332380,
373343,
381545,
340627,
373398,
184982,
258721,
332453,
332459,
389805,
332463,
381617,
332471,
332483,
332486,
373449,
332493,
357069,
357073,
332511,
332520,
340718,
332533,
348924,
389892,
373510,
389926,
348978,
152370,
340789,
348982,
398139,
127814,
357201,
357206,
389978,
430939,
357211,
357214,
201579,
201582,
349040,
340849,
430965,
381813,
324472,
398201,
340858,
324475,
430972,
340861,
324478,
119674,
324481,
373634,
398211,
324484,
324487,
381833,
324492,
324495,
324498,
430995,
324501,
324510,
422816,
324513,
398245,
201637,
324524,
340909,
324533,
324538,
324541,
398279,
340939,
340941,
209873,
340957,
431072,
398306,
340963,
209895,
201711,
349172,
381946,
349180,
439294,
431106,
209943,
357410,
250914,
185380,
357418,
209965,
209971,
209975,
209979,
209987,
209990,
209995,
341071,
349267,
250967,
210010,
341091,
210025,
210030,
210036,
210039,
349308,
210044,
349311,
160895,
152703,
210052,
349319,
210055,
218247,
210067,
210077,
210080,
251044,
210084,
185511,
210095,
210098,
210107,
210115,
332997,
210127,
333009,
210131,
333014,
210138,
210143,
218354,
218360,
251128,
275706,
275712,
275715,
275721,
349459,
333078,
251160,
349484,
349491,
251189,
415033,
357708,
210260,
365911,
259421,
365921,
333154,
251235,
374117,
333162,
234866,
390516,
333175,
357755,
251271,
136590,
374160,
112020,
349590,
357792,
259515,
415166,
415185,
366034,
366038,
415191,
415193,
415196,
415199,
423392,
333284,
415207,
366056,
366061,
415216,
210420,
415224,
423423,
415257,
415263,
366117,
415270,
144939,
415278,
415281,
415285,
210487,
415290,
415293,
349761,
415300,
333386,
366172,
333413,
423528,
423532,
210544,
415353,
333439,
415361,
267909,
333498,
210631,
333511,
358099,
153302,
333534,
366307,
366311,
431851,
366318,
210672,
366321,
366325,
210695,
268041,
210698,
366348,
210706,
399128,
333594,
210719,
358191,
366387,
210739,
399159,
358200,
325440,
366401,
341829,
325446,
46920,
341834,
341838,
341843,
415573,
358234,
341851,
350045,
399199,
259938,
399206,
268143,
358255,
399215,
358259,
341876,
333689,
243579,
325504,
333698,
333708,
333724,
382890,
350146,
358371,
350189,
350193,
350202,
333818,
350206,
350213,
268298,
350224,
350231,
333850,
350237,
350240,
350244,
350248,
178218,
350251,
350256,
350259,
350271,
243781,
350285,
374864,
342111,
342133,
374902,
432271,
333997,
334011,
260289,
260298,
350410,
350416,
350422,
211160,
350425,
268507,
334045,
350445,
375026,
358644,
350458,
350461,
350464,
325891,
350467,
350475,
375053,
268559,
350480,
432405,
350486,
325914,
350490,
325917,
350493,
350498,
194852,
350504,
358700,
391468,
350509,
358704,
358713,
358716,
383306,
334161,
383321,
383330,
383333,
391530,
383341,
334203,
268668,
194941,
391563,
366990,
416157,
342430,
268701,
375208,
326058,
375216,
334262,
334275,
326084,
358856,
195039,
334304,
334311,
375277,
334321,
350723,
391690,
186897,
342545,
334358,
342550,
342554,
334363,
350761,
252461,
334384,
383536,
358961,
334394,
252482,
219718,
334407,
334420,
350822,
375400,
334465,
334468,
162445,
326290,
342679,
342683,
260766,
342710,
244409,
260797,
260801,
350917,
154317,
391894,
154328,
416473,
64230,
113388,
342766,
375535,
203506,
342776,
391937,
391948,
375568,
326416,
375571,
375574,
162591,
326441,
383793,
326451,
326454,
326460,
260924,
375612,
244540,
326467,
244551,
326473,
326477,
326485,
416597,
326490,
342874,
326502,
375656,
433000,
326507,
326510,
211825,
211831,
351097,
392060,
359295,
351104,
342915,
400259,
236430,
342930,
252822,
392091,
400285,
252836,
359334,
211884,
400306,
351168,
359361,
326598,
359366,
359382,
359388,
383967,
343015,
359407,
261108,
244726,
261111,
383997,
261129,
359451,
261147,
211998,
261153,
261159,
359470,
359476,
343131,
384098,
384101,
384107,
367723,
187502,
343154,
384114,
212094,
351364,
384135,
384139,
384143,
351381,
384160,
384168,
367794,
384181,
367800,
384191,
351423,
326855,
244937,
253130,
343244,
146642,
359649,
343270,
351466,
351479,
343306,
261389,
359694,
253200,
384275,
245020,
245029,
171302,
351534,
376110,
245040,
425276,
384323,
212291,
343365,
212303,
367965,
343393,
343398,
367980,
425328,
343409,
253303,
154999,
343417,
327034,
245127,
384397,
245136,
245142,
245145,
343450,
245148,
245151,
245154,
245157,
245162,
327084,
359865,
384443,
146876,
327107,
384453,
327110,
327115,
327117,
359886,
359890,
343507,
368092,
343534,
343539,
368119,
343544,
368122,
409091,
359947,
359955,
359983,
343630,
179802,
155239,
327275,
245357,
138864,
155254,
155273,
368288,
245409,
425638,
425649,
155322,
425662,
155327,
155351,
155354,
212699,
155363,
245475,
155371,
245483,
409335,
155393,
155403,
155422,
360223,
155438,
155442,
155447,
417595,
155461,
360261,
376663,
155482,
261981,
425822,
155487,
376671,
155490,
155491,
327531,
261996,
376685,
261999,
262002,
327539,
262005,
147317,
425845,
262008,
262011,
155516,
155521,
155525,
360326,
376714,
155531,
262027,
262030,
262033,
262036,
262039,
262042,
155549,
262045,
262048,
262051,
327589,
155559,
155562,
155565,
393150,
393169,
384977,
155611,
155619,
253923,
155621,
253926,
327654,
204784,
393203,
360438,
253943,
393206,
393212,
155646
] |
98c65e95cf67eb5129ded438c52941c2da6089ee
|
53a1fd892b825012bfe7cc35b2de36603fb3c22b
|
/ConditionController/ConditionController/Util.swift
|
5f75c14aab8bb64be167a918500b1ee96e3cdcb2
|
[] |
no_license
|
olivicky/AirConditionController
|
caa535d5048b27cf262e31070daf5624c20c3be7
|
3882a77be06e01a765bd9b755aed5855c6aa4402
|
refs/heads/master
| 2021-01-17T16:58:50.166407 | 2018-10-06T15:34:26 | 2018-10-06T15:34:26 | 84,126,368 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 923 |
swift
|
//
// Util.swift
// ConditionController
//
// Created by Beta 8.0 Technology on 06/10/16.
// Copyright © 2016 vincenzoOlivito. All rights reserved.
//
import Foundation
import SystemConfiguration.CaptiveNetwork
public class Util {
class func getSSID() -> String? {
let interfaces = CNCopySupportedInterfaces()
if interfaces == nil {
return nil
}
let interfacesArray = interfaces as! [String]
if interfacesArray.count <= 0 {
return nil
}
let interfaceName = interfacesArray[0] as String
let unsafeInterfaceData = CNCopyCurrentNetworkInfo(interfaceName as CFString)
if unsafeInterfaceData == nil {
return nil
}
let interfaceData = unsafeInterfaceData as! Dictionary <String,AnyObject>
return interfaceData["SSID"] as? String
}
}
|
[
-1
] |
14b18adae6b89640a2c1c97dbc0a04bfb579b725
|
f71db802bd142f2efc1c6b20bf5e71b8859f88c3
|
/CameraTest/ViewController.swift
|
cbdba4494862f69d5f217689f2f112a5a67ff3b2
|
[] |
no_license
|
loucimj/CameraTest
|
b20d68b5786a3072c19ee5bcf3d420cc1820ccfe
|
1a4ccbc57a8c89347365f0b8a7f07061bde11296
|
refs/heads/master
| 2020-12-03T13:10:12.397562 | 2016-09-04T16:50:19 | 2016-09-04T16:50:19 | 67,357,063 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,905 |
swift
|
import UIKit
import AVFoundation
import Foundation
class ViewController: UIViewController, CameraHandler {
var previewView : UIView!;
var boxView:UIView!;
var session:AVCaptureSession = AVCaptureSession()
var captureDevice : AVCaptureDevice?
var videoDataOutput: AVCaptureVideoDataOutput = AVCaptureVideoDataOutput()
var videoDataOutputQueue : dispatch_queue_t?
var previewLayer:AVCaptureVideoPreviewLayer = AVCaptureVideoPreviewLayer()
var currentFrame:CIImage = CIImage()
var cameraPreviewView:UIView!
var isCameraRunning:Bool = false
var isSetupCompleted: Bool = false
override func viewDidLoad() {
super.viewDidLoad()
self.cameraPreviewView = UIView(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.size.width, UIScreen.mainScreen().bounds.size.height));
self.cameraPreviewView.contentMode = UIViewContentMode.ScaleAspectFit
self.view.addSubview(cameraPreviewView);
//Add a box view
self.boxView = UIView(frame: CGRectMake(0, 0, 100, 200));
self.boxView.backgroundColor = UIColor.greenColor();
self.boxView.alpha = 0.3;
self.view.addSubview(self.boxView);
self.setupAVCapture();
}
override func viewWillAppear(animated: Bool) {
if !isCameraRunning {
startRunning();
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
override func shouldAutorotate() -> Bool {
if (UIDevice.currentDevice().orientation == UIDeviceOrientation.LandscapeLeft ||
UIDevice.currentDevice().orientation == UIDeviceOrientation.LandscapeRight ||
UIDevice.currentDevice().orientation == UIDeviceOrientation.Unknown) {
return false;
}
else {
return true;
}
}
}
|
[
-1
] |
fbcfb5e9991eb6906c8d6152030cd8d80db1c4f4
|
fddc98a22382734e061a5ae767a5bcd4dfda1b26
|
/Sources/SKLabel.swift
|
0813c646aec29a111c1b6e0c59124740c5fb6551
|
[
"MIT"
] |
permissive
|
motylevm/skstylekit
|
1a9848b098970e31d8253ecf018157dcbcca1f81
|
1aa5eaaac98f2345d2ee3fd6b66c1a06689f84ba
|
refs/heads/master
| 2021-01-19T11:53:42.761726 | 2019-07-08T08:19:40 | 2019-07-08T08:19:40 | 69,779,160 | 76 | 11 |
MIT
| 2018-09-19T09:33:14 | 2016-10-02T04:39:32 |
Swift
|
UTF-8
|
Swift
| false | false | 2,606 |
swift
|
//
// Copyright (c) 2016 Mikhail Motylev https://twitter.com/mikhail_motylev
//
// 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, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import UIKit
open class SKLabel: UILabel {
// MARK: - Private properties
private var hasExternalAttributedText: Bool = false
var suppressStyleOnTextChange: Bool = false
// MARK: - Style properties
@IBInspectable open var styleName: String? {
get {
return style?.name
}
set {
style = StyleKit.style(withName: newValue)
}
}
open var style: SKStyle? {
didSet {
if oldValue != style {
applyCurrentStyle(includeTextStyle: !hasExternalAttributedText && text != nil)
}
}
}
// MARK: - Style application
open func applyCurrentStyle(includeTextStyle: Bool) {
if includeTextStyle {
style?.apply(label: self, text: text)
hasExternalAttributedText = false
}
else {
style?.apply(view: self)
}
}
// MARK: - Overridden properties
override open var text: String? {
didSet {
if !suppressStyleOnTextChange {
applyCurrentStyle(includeTextStyle: true)
}
}
}
override open var attributedText: NSAttributedString? {
didSet {
hasExternalAttributedText = attributedText != nil
}
}
}
|
[
-1
] |
252249b1a313c939a68ba31a6ec79b400cb9f9f1
|
2c76a070db9549e91ad75572458e06a44b9f732b
|
/jenkinsTest/AppDelegate.swift
|
9a959682abe72259a7063a23fc0b27985da03dbe
|
[] |
no_license
|
JacopoMangiavacchi/jenkinsTest
|
ec5bd3787464d4f880a2b858c906303d0899830e
|
894189c81d6f0acb0c2c346e78dadf93115e9ce9
|
refs/heads/master
| 2021-08-14T14:44:16.186718 | 2017-11-16T02:05:06 | 2017-11-16T02:05:06 | 110,712,588 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,192 |
swift
|
//
// AppDelegate.swift
// jenkinsTest
//
// Created by Jacopo Mangiavacchi on 11/15/17.
// Copyright © 2017 Jacopo Mangiavacchi. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
|
[
229380,
229383,
229385,
278539,
294924,
229388,
278542,
229391,
327695,
278545,
229394,
278548,
229397,
229399,
229402,
352284,
229405,
278556,
278559,
229408,
294950,
229415,
229417,
327722,
237613,
229422,
360496,
229426,
237618,
229428,
286774,
286776,
319544,
286778,
204856,
229432,
286791,
237640,
286797,
278605,
311375,
163920,
237646,
196692,
319573,
311383,
278623,
278626,
319590,
311400,
278635,
303212,
278639,
131192,
278648,
237693,
303230,
327814,
303241,
131209,
417930,
303244,
311436,
319633,
286873,
286876,
311460,
311469,
32944,
327862,
286906,
327866,
180413,
286910,
131264,
286916,
295110,
286922,
286924,
286926,
319694,
286928,
131281,
131278,
278743,
278747,
295133,
155872,
131299,
319716,
237807,
303345,
286962,
131314,
229622,
327930,
278781,
278783,
278785,
237826,
319751,
278792,
286987,
319757,
311569,
286999,
319770,
287003,
287006,
287009,
287012,
287014,
287016,
287019,
311598,
287023,
262448,
311601,
287032,
155966,
319809,
319810,
278849,
319814,
311623,
319818,
311628,
229709,
319822,
287054,
278865,
229717,
196963,
196969,
139638,
213367,
106872,
319872,
311683,
311693,
65943,
319898,
311719,
278952,
139689,
278957,
311728,
278967,
180668,
311741,
278975,
319938,
98756,
278980,
278983,
319945,
278986,
319947,
278990,
278994,
311767,
279003,
279006,
188895,
172512,
287202,
279010,
279015,
172520,
319978,
279020,
172526,
311791,
279023,
172529,
279027,
319989,
172534,
180727,
164343,
279035,
311804,
287230,
279040,
303617,
287234,
279045,
172550,
303623,
172552,
287238,
320007,
279051,
172558,
279055,
303632,
279058,
303637,
279063,
279067,
172572,
279072,
172577,
295459,
172581,
295461,
279082,
311850,
279084,
172591,
172598,
279095,
172607,
172612,
377413,
172614,
172618,
303690,
33357,
287309,
303696,
279124,
172634,
262752,
172644,
311911,
189034,
295533,
189039,
172656,
352880,
295538,
189040,
172660,
287349,
189044,
172655,
287355,
287360,
295553,
172675,
295557,
287365,
311942,
303751,
352905,
311946,
287371,
279178,
311951,
287377,
172691,
287381,
311957,
221850,
287386,
230045,
172702,
164509,
287390,
172705,
287394,
172707,
303780,
303773,
287398,
205479,
287400,
279208,
172714,
295595,
279212,
189102,
172721,
287409,
66227,
303797,
189114,
287419,
303804,
328381,
287423,
328384,
172737,
279231,
287427,
312006,
172748,
287436,
107212,
172751,
287440,
295633,
172755,
303827,
279255,
172760,
287450,
303835,
279258,
189149,
303838,
213724,
312035,
279267,
295654,
279272,
230128,
312048,
312050,
230131,
205564,
303871,
230146,
328453,
295685,
230154,
33548,
312077,
295695,
295701,
230169,
369433,
295707,
328476,
295710,
230175,
295720,
303914,
279340,
205613,
279353,
230202,
312124,
328508,
222018,
295755,
377676,
148302,
287569,
303959,
230237,
279390,
230241,
279394,
303976,
336744,
303985,
328563,
303987,
279413,
303991,
303997,
295806,
295808,
295813,
304005,
320391,
213895,
304007,
304009,
304011,
230284,
304013,
295822,
213902,
279438,
189329,
295825,
304019,
189331,
58262,
304023,
304027,
279452,
410526,
279461,
279462,
304042,
213931,
230327,
304055,
287675,
230334,
304063,
304065,
213954,
189378,
156612,
295873,
213963,
197580,
312272,
304084,
304090,
320481,
304106,
320490,
312302,
328687,
320496,
304114,
295928,
320505,
312321,
295945,
230413,
197645,
295949,
320528,
140312,
295961,
238620,
197663,
304164,
304170,
238641,
312374,
238652,
238655,
230465,
238658,
336964,
296004,
320584,
238666,
296021,
402518,
336987,
230497,
296036,
296040,
361576,
205931,
164973,
205934,
279661,
312432,
279669,
337018,
189562,
279683,
222340,
205968,
296084,
238745,
304285,
238756,
205991,
222377,
165035,
337067,
238766,
165038,
230576,
238770,
304311,
230592,
312518,
279750,
230600,
230607,
148690,
320727,
279769,
304348,
279777,
304354,
296163,
320740,
279781,
304360,
320748,
279788,
279790,
304370,
296189,
320771,
312585,
296202,
296205,
230674,
320786,
230677,
296213,
296215,
320792,
230681,
230679,
230689,
173350,
312622,
296243,
312630,
222522,
296253,
222525,
296255,
312639,
230718,
296259,
378181,
296262,
230727,
238919,
296264,
320840,
296267,
296271,
222545,
230739,
312663,
222556,
337244,
230752,
312676,
230760,
173418,
148843,
410987,
230763,
230768,
296305,
312692,
230773,
304505,
304506,
279929,
181631,
312711,
296331,
288140,
288144,
230800,
304533,
337306,
288154,
288160,
288162,
288164,
279975,
304555,
370092,
279983,
173488,
288176,
279985,
312755,
296373,
312759,
279991,
288185,
337335,
222652,
312766,
173507,
296389,
222665,
230860,
312783,
288208,
230865,
288210,
370130,
222676,
288212,
288214,
148946,
239064,
288217,
288218,
280027,
288220,
329177,
239070,
288224,
280034,
288226,
280036,
288229,
280038,
288230,
288232,
370146,
288234,
320998,
288236,
288238,
288240,
288242,
296435,
288244,
288250,
296446,
321022,
402942,
148990,
296450,
206336,
230916,
230919,
214535,
230923,
304651,
304653,
370187,
230940,
222752,
108066,
296486,
296488,
157229,
239152,
230961,
157236,
288320,
288325,
124489,
280140,
280145,
288338,
280149,
288344,
280152,
239194,
280158,
403039,
181854,
370272,
239202,
312938,
280183,
280185,
280188,
280191,
116354,
280194,
280208,
280211,
288408,
280218,
280222,
190118,
321195,
296622,
321200,
337585,
296626,
296634,
296637,
280260,
206536,
280264,
206539,
206541,
206543,
313044,
280276,
321239,
280283,
313052,
288478,
313055,
321252,
313066,
288494,
280302,
280304,
313073,
321266,
419570,
288499,
288502,
280314,
288510,
124671,
67330,
280324,
198405,
280331,
198416,
280337,
296723,
116503,
321304,
329498,
296731,
321311,
313121,
313123,
304932,
321316,
280363,
141101,
165678,
321336,
296767,
288576,
345921,
337732,
304968,
280393,
280402,
173907,
313171,
313176,
42842,
280419,
321381,
296809,
296812,
313201,
1920,
255873,
305028,
280454,
247688,
280464,
124817,
280468,
239510,
280473,
124827,
214940,
247709,
214944,
280487,
313258,
321458,
296883,
124853,
214966,
296890,
10170,
288700,
296894,
190403,
296900,
280515,
337862,
165831,
280521,
231379,
296921,
239586,
313320,
231404,
124913,
165876,
321528,
239612,
313340,
288764,
239617,
313347,
288773,
313358,
305176,
313371,
354338,
305191,
223273,
313386,
354348,
124978,
215090,
124980,
288824,
288826,
321595,
313406,
288831,
288836,
67654,
280651,
354382,
288848,
280658,
215123,
354390,
288855,
288859,
280669,
313438,
149599,
280671,
149601,
321634,
149603,
223327,
329830,
280681,
313451,
223341,
280687,
149618,
215154,
313458,
280691,
313464,
329850,
321659,
280702,
288895,
321670,
215175,
141446,
141455,
141459,
275606,
280725,
313498,
100520,
288936,
280747,
288940,
288947,
280755,
321717,
280759,
280764,
280769,
280771,
280774,
280776,
313548,
321740,
280783,
280786,
280788,
313557,
280793,
280796,
280798,
338147,
280804,
280807,
157930,
280811,
280817,
125171,
280819,
157940,
182517,
280823,
280825,
280827,
280830,
280831,
280833,
125187,
280835,
125191,
125207,
125209,
321817,
125218,
321842,
223539,
125239,
305464,
280888,
289087,
108865,
280897,
280900,
305480,
239944,
280906,
239947,
305485,
305489,
379218,
280919,
354653,
313700,
280937,
190832,
280946,
223606,
313720,
280956,
280959,
313731,
199051,
240011,
289166,
240017,
297363,
190868,
240021,
297365,
297368,
297372,
141725,
297377,
289186,
297391,
289201,
240052,
289207,
289210,
305594,
281024,
289218,
289221,
289227,
281045,
281047,
166378,
305647,
281075,
174580,
240124,
281084,
305662,
305664,
240129,
305666,
305668,
223749,
240132,
330244,
223752,
150025,
338440,
281095,
223757,
281102,
223765,
281113,
322074,
281116,
281121,
182819,
289317,
281127,
281135,
150066,
158262,
158266,
289342,
281154,
322115,
158283,
281163,
281179,
338528,
338532,
281190,
199273,
281196,
19053,
158317,
313973,
297594,
281210,
158347,
182926,
133776,
314003,
117398,
314007,
289436,
174754,
330404,
289448,
174764,
314029,
314033,
240309,
133817,
314045,
314047,
314051,
199364,
297671,
158409,
289493,
363234,
289513,
289522,
289525,
289532,
322303,
289537,
322310,
264969,
322314,
322318,
281361,
281372,
322341,
215850,
281388,
281401,
289593,
289601,
281410,
281413,
281414,
240458,
281420,
240468,
281430,
322393,
297818,
281435,
281438,
281442,
174955,
224110,
207733,
207737,
158596,
183172,
338823,
322440,
314249,
240519,
142226,
289687,
240535,
289694,
289696,
289700,
281529,
289724,
52163,
183260,
281567,
289762,
322534,
297961,
183277,
322550,
134142,
322563,
330764,
175134,
322599,
322610,
314421,
281654,
314427,
314433,
207937,
314441,
207949,
322642,
314456,
281691,
314461,
281702,
281704,
314474,
281708,
281711,
289912,
248995,
306341,
306344,
306347,
322734,
306354,
142531,
199877,
289991,
306377,
289997,
249045,
363742,
363745,
298216,
330988,
126190,
216303,
322801,
388350,
257302,
363802,
199976,
199978,
314671,
298292,
298294,
257334,
216376,
380226,
298306,
224584,
224587,
224594,
216404,
306517,
150870,
314714,
224603,
159068,
314718,
265568,
314723,
281960,
150890,
306539,
314732,
314736,
290161,
216436,
306549,
298358,
314743,
306552,
290171,
314747,
306555,
290174,
298365,
224641,
281987,
298372,
314756,
281990,
224647,
265604,
298377,
314763,
142733,
298381,
314768,
224657,
306581,
314773,
314779,
314785,
314793,
282025,
282027,
241068,
241070,
241072,
282034,
241077,
150966,
298424,
306618,
282044,
323015,
306635,
306640,
290263,
290270,
290275,
339431,
282089,
191985,
282098,
290291,
282101,
241142,
191992,
290298,
151036,
290302,
282111,
290305,
175621,
306694,
192008,
323084,
257550,
282127,
290321,
282130,
323090,
290325,
282133,
241175,
290328,
282137,
290332,
241181,
282142,
282144,
290344,
306731,
290349,
290351,
290356,
224849,
282195,
282199,
282201,
306778,
159324,
159330,
314979,
298598,
323176,
224875,
241260,
323181,
257658,
315016,
282249,
290445,
282261,
175770,
298651,
282269,
323229,
298655,
323231,
61092,
282277,
306856,
282295,
323260,
282300,
323266,
282310,
323273,
282319,
306897,
241362,
306904,
282328,
298714,
52959,
216801,
282337,
241380,
216806,
323304,
282345,
12011,
282356,
323318,
282364,
282367,
306945,
241412,
323333,
282376,
216842,
323345,
282388,
323349,
282392,
184090,
315167,
315169,
282402,
315174,
323367,
241448,
315176,
241450,
282410,
306988,
306991,
315184,
323376,
315190,
241464,
159545,
282425,
298811,
118593,
307009,
413506,
307012,
241475,
315211,
282446,
307027,
315221,
323414,
315223,
241496,
241498,
307035,
307040,
110433,
282465,
241509,
110438,
298860,
110445,
282478,
315249,
282481,
110450,
315251,
315253,
315255,
339838,
315267,
282499,
315269,
241544,
282505,
241546,
241548,
298896,
282514,
298898,
241556,
44948,
298901,
241560,
282520,
241563,
241565,
241567,
241569,
282531,
241574,
282537,
298922,
36779,
241581,
282542,
241583,
323504,
241586,
290739,
241588,
282547,
241590,
241592,
241598,
290751,
241600,
241605,
151495,
241610,
298975,
241632,
298984,
241640,
241643,
298988,
241646,
241649,
241652,
323574,
290807,
299003,
241661,
299006,
282623,
315396,
241669,
315397,
282632,
307211,
282639,
290835,
282645,
241693,
282654,
102438,
217127,
282669,
323630,
282681,
290877,
282687,
159811,
315463,
315466,
192589,
307278,
192596,
176213,
307287,
307290,
217179,
315482,
192605,
315483,
233567,
299105,
200801,
217188,
299109,
307303,
315495,
356457,
45163,
307307,
315502,
192624,
307314,
323700,
299126,
233591,
299136,
307329,
307338,
233613,
241813,
307352,
299164,
299167,
315552,
184479,
184481,
315557,
184486,
307370,
307372,
184492,
307374,
307376,
299185,
323763,
184503,
299191,
176311,
307385,
258235,
307388,
176316,
307390,
307386,
299200,
184512,
307394,
299204,
307396,
184518,
307399,
323784,
233679,
307409,
307411,
176343,
299225,
233701,
307432,
184572,
282881,
184579,
184586,
282893,
291089,
282906,
291104,
233766,
299304,
176435,
315701,
332086,
307510,
168245,
307515,
307518,
282942,
282947,
323917,
282957,
110926,
233808,
323921,
315733,
323926,
233815,
315739,
323932,
299357,
242018,
242024,
299373,
315757,
250231,
242043,
315771,
299388,
299391,
291202,
299398,
242057,
291212,
299405,
291222,
315801,
291226,
242075,
283033,
61855,
291231,
283042,
291238,
291241,
127403,
127405,
291247,
299440,
127407,
299444,
127413,
291254,
283062,
127417,
291260,
127421,
127424,
299457,
127429,
127434,
315856,
127440,
315860,
176597,
127447,
283095,
299481,
127449,
176605,
242143,
127455,
127457,
291299,
127460,
340454,
127463,
242152,
291305,
176620,
127469,
127474,
291314,
291317,
127480,
135672,
291323,
233979,
127485,
291330,
127490,
127494,
283142,
127497,
233994,
135689,
127500,
291341,
233998,
127506,
234003,
127509,
234006,
127511,
152087,
283161,
234010,
135707,
242202,
135710,
242206,
242208,
291361,
242220,
291378,
234038,
152118,
234041,
70213,
242250,
111193,
242275,
299620,
242279,
168562,
184952,
135805,
135808,
291456,
299655,
373383,
316051,
225941,
316054,
299672,
135834,
373404,
299677,
225948,
135839,
299680,
225954,
299684,
135844,
242343,
209576,
242345,
373421,
299706,
135870,
135873,
135876,
135879,
299720,
299723,
299726,
225998,
226002,
119509,
226005,
226008,
299740,
242396,
201444,
299750,
283368,
234219,
283372,
226037,
283382,
316151,
234231,
234236,
226045,
242431,
234239,
209665,
234242,
242436,
234246,
226056,
291593,
234248,
242443,
234252,
242445,
234254,
291601,
234258,
242450,
242452,
234261,
201496,
234264,
234266,
234269,
234272,
234274,
152355,
299814,
234278,
283432,
234281,
234284,
234287,
283440,
185138,
242483,
234292,
234296,
234298,
160572,
283452,
234302,
234307,
242499,
234309,
316233,
234313,
316235,
234316,
283468,
234319,
242511,
234321,
234324,
185173,
201557,
234329,
234333,
308063,
234336,
242530,
349027,
234338,
234344,
234347,
177004,
234350,
324464,
234353,
152435,
177011,
234356,
234358,
234362,
226171,
291711,
234368,
291714,
234370,
291716,
234373,
226182,
234375,
308105,
226185,
234379,
234384,
234388,
234390,
226200,
234393,
209818,
308123,
234396,
324504,
291742,
324508,
234398,
234401,
291747,
291748,
234405,
291750,
234407,
324520,
324518,
324522,
234410,
291756,
291754,
226220,
324527,
291760,
234414,
234417,
324531,
201650,
234422,
226230,
324536,
275384,
234428,
291773,
242623,
324544,
226239,
234434,
324546,
234431,
226245,
234437,
234439,
324548,
234443,
291788,
234446,
275406,
193486,
193488,
234449,
234452,
234455,
234459,
234461,
234464,
234467,
234470,
168935,
5096,
324585,
234475,
234478,
316400,
234481,
316403,
234484,
234485,
234487,
234490,
234493,
316416,
234496,
234501,
275462,
308231,
234504,
234507,
234510,
234515,
300054,
316439,
234520,
234519,
234523,
234526,
234528,
300066,
234532,
300069,
234535,
234537,
234540,
234543,
234546,
275508,
300085,
234549,
300088,
234553,
234556,
234558,
316479,
234561,
316483,
160835,
234563,
308291,
234568,
234570,
316491,
234572,
300108,
234574,
300115,
234580,
234581,
234585,
275545,
242777,
234590,
234593,
234595,
234597,
300133,
234601,
300139,
234605,
160879,
234607,
275569,
234610,
316530,
300148,
234614,
398455,
144506,
234618,
234620,
275579,
234623,
226433,
234627,
275588,
234629,
234634,
234636,
177293,
234640,
275602,
234643,
308373,
226453,
234647,
234648,
275608,
234650,
308379,
324757,
300189,
324766,
119967,
234653,
283805,
234657,
324768,
242852,
300197,
234661,
283813,
234664,
275626,
234667,
316596,
308414,
234687,
300223,
300226,
308418,
234692,
300229,
308420,
308422,
283844,
300234,
283850,
300238,
300241,
316625,
300243,
300245,
316630,
300248,
300253,
300256,
300258,
300260,
234726,
300263,
300265,
300267,
161003,
300270,
300272,
120053,
300278,
275703,
316663,
300284,
275710,
300287,
292097,
300289,
161027,
300292,
300294,
275719,
234760,
177419,
300299,
242957,
300301,
275725,
177424,
283917,
349464,
283939,
259367,
292143,
283951,
300344,
226617,
243003,
283963,
226628,
300357,
283973,
177482,
283983,
316758,
357722,
316766,
292192,
316768,
218464,
292197,
316774,
243046,
218473,
284010,
136562,
324978,
275834,
333178,
275836,
275840,
316803,
316806,
226696,
316811,
226699,
316814,
226703,
300433,
234899,
300436,
226709,
357783,
316824,
316826,
300448,
144807,
144810,
144812,
144814,
144820,
374196,
284084,
292279,
284087,
144826,
144828,
144830,
144832,
144835,
144837,
38342,
144839,
144841,
144844,
144847,
144852,
144855,
103899,
300507,
333280,
226787,
218597,
292329,
300523,
259565,
300527,
308720,
259567,
292338,
316917,
292343,
308727,
300537,
316933,
316947,
308757,
308762,
284194,
284196,
235045,
284199,
284204,
284206,
284209,
284211,
194101,
284213,
316983,
194103,
284215,
308790,
284218,
226877,
284223,
284226,
284228,
292421,
243268,
284231,
226886,
128584,
284234,
276043,
317004,
366155,
284238,
226895,
284241,
194130,
284243,
300628,
284245,
276052,
284247,
276053,
235097,
243290,
284249,
284251,
317015,
284253,
300638,
243293,
284255,
284258,
292452,
292454,
284263,
177766,
284265,
292458,
284267,
292461,
284272,
284274,
284278,
292470,
276086,
292473,
284283,
276093,
284286,
292479,
276095,
292481,
284290,
325250,
284292,
292485,
276098,
284288,
284297,
317066,
284299,
317068,
284301,
276109,
284303,
284306,
276114,
284308,
284312,
284314,
284316,
276127,
284320,
284322,
284327,
284329,
317098,
284331,
276137,
284333,
284335,
284337,
284339,
300726,
284343,
284346,
284350,
358080,
276160,
284354,
358083,
284358,
358089,
284362,
276170,
284365,
276175,
284368,
276177,
284370,
358098,
284372,
317138,
284377,
284379,
284381,
284384,
358114,
284386,
358116,
276197,
358119,
284392,
325353,
358122,
284394,
284397,
358126,
284399,
358128,
276206,
358133,
358135,
276216,
358138,
300795,
358140,
284413,
358142,
358146,
284418,
317187,
317189,
317191,
284428,
300816,
300819,
317207,
284440,
300828,
300830,
276255,
300832,
325408,
300834,
317221,
227109,
358183,
186151,
276268,
243504,
300850,
284469,
276280,
325436,
358206,
276291,
366406,
276295,
300872,
292681,
153417,
358224,
284499,
276308,
284502,
317271,
178006,
276315,
292700,
317279,
284511,
227175,
292715,
292721,
284529,
300915,
284533,
292729,
317306,
284540,
292734,
325512,
169868,
276365,
317332,
358292,
284564,
284566,
350106,
284572,
276386,
284579,
276388,
358312,
317353,
292776,
284585,
276395,
276402,
358326,
161718,
358330,
276411,
276418,
276425,
301009,
301011,
301013,
292823,
358360,
301017,
301015,
292828,
276446,
153568,
276452,
292839,
276455,
292843,
276460,
292845,
178161,
227314,
325624,
276472,
317435,
276479,
276482,
276485,
317446,
276490,
292876,
317456,
276496,
317458,
178195,
243733,
243740,
317468,
317472,
325666,
243751,
292904,
276528,
243762,
309298,
325685,
325689,
235579,
325692,
276539,
178238,
235581,
276544,
284739,
325700,
243779,
292934,
243785,
276553,
350293,
350295,
309337,
227418,
350299,
194654,
227423,
350304,
178273,
309346,
350302,
194660,
350308,
309350,
309348,
292968,
309352,
227426,
227430,
276583,
350313,
350316,
301167,
276590,
350321,
284786,
276595,
301163,
350325,
252022,
227440,
350328,
292985,
301178,
350332,
292989,
301185,
292993,
350339,
317570,
317573,
350342,
350345,
350349,
301199,
317584,
325777,
350354,
350357,
350359,
350362,
350366,
276638,
153765,
284837,
350375,
350379,
350381,
350383,
350385,
350387,
350389,
350395,
350397,
350399,
227520,
350402,
227522,
301252,
350406,
227529,
301258,
309450,
276685,
309455,
276689,
309462,
301272,
276699,
194780,
309468,
309471,
301283,
317672,
317674,
325867,
243948,
194801,
309494,
243960,
227583,
276735,
227587,
276739,
211204,
276742,
227596,
325910,
309530,
342298,
211232,
317729,
276775,
211241,
325937,
325943,
211260,
260421,
285002,
276811,
235853,
276816,
235858,
276829,
276833,
391523,
276836,
293227,
276843,
293232,
276848,
186744,
211324,
227709,
285061,
317833,
178572,
285070,
285077,
178583,
227738,
317853,
276896,
317858,
342434,
285093,
317864,
285098,
276907,
235955,
276917,
293304,
293307,
293314,
309707,
293325,
317910,
293336,
235996,
317917,
293343,
358880,
276961,
293346,
227810,
276964,
293352,
236013,
293364,
301562,
317951,
309764,
301575,
121352,
293387,
236043,
342541,
317963,
113167,
55822,
309779,
317971,
309781,
55837,
227877,
227879,
293417,
227882,
309804,
293421,
105007,
236082,
285236,
23094,
277054,
244288,
129603,
301636,
318020,
301639,
301643,
285265,
309844,
277080,
309849,
285277,
285282,
326244,
318055,
277100,
121458,
277106,
170618,
170619,
309885,
309888,
277122,
227975,
277128,
285320,
301706,
318092,
326285,
334476,
318094,
277136,
277139,
227992,
334488,
318108,
285340,
318110,
227998,
137889,
383658,
285357,
318128,
277170,
293555,
342707,
154292,
277173,
285368,
277177,
277181,
318144,
277187,
277191,
277194,
277196,
277201,
137946,
113378,
203491,
228069,
277223,
342760,
285417,
56041,
56043,
277232,
228081,
56059,
310015,
310020,
285448,
310029,
228113,
285459,
277273,
293659,
326430,
228128,
285474,
293666,
228135,
318248,
277291,
318253,
293677,
285489,
301876,
293685,
285494,
301880,
285499,
301884,
293696,
310080,
277317,
277329,
162643,
310100,
301911,
301913,
277337,
301921,
400236,
236397,
162671,
326514,
310134,
236408,
277368,
15224,
416639,
416640,
113538,
310147,
416648,
277385,
39817,
187274,
301972,
424853,
277405,
277411,
310179,
293798,
293802,
236460,
277426,
293811,
276579,
293817,
293820,
203715,
326603,
276586,
293849,
293861,
228327,
228328,
318442,
228330,
228332,
326638,
277486,
318450,
293876,
293877,
285686,
302073,
121850,
293882,
302075,
244731,
285690,
293887,
277504,
277507,
277511,
293899,
277519,
293908,
302105,
293917,
293939,
318516,
277561,
277564,
310336,
7232,
293956,
277573,
228422,
293960,
310344,
277577,
277583,
203857,
293971,
310355,
310359,
236632,
277594,
138332,
277598,
203872,
277601,
285792,
310374,
203879,
310376,
228460,
318573,
203886,
187509,
285815,
367737,
285817,
302205,
285821,
392326,
285831,
294026,
302218,
285835,
162964,
384148,
187542,
302231,
285849,
302233,
285852,
302237,
285854,
285856,
302241,
285862,
277671,
302248,
64682,
277678,
294063,
294065,
302258,
277687,
294072,
318651,
294076,
277695,
318657,
244930,
302275,
130244,
302277,
228550,
302282,
310476,
302285,
302288,
310481,
302290,
203987,
302292,
302294,
310486,
302296,
384222,
310498,
285927,
318698,
302315,
228592,
294132,
138485,
228601,
204026,
228606,
204031,
64768,
310531,
138505,
228617,
318742,
204067,
277798,
130345,
277801,
277804,
285997,
285999,
277807,
113969,
277811,
318773,
318776,
277816,
286010,
277819,
294204,
417086,
277822,
286016,
302403,
294211,
384328,
277832,
277836,
294221,
294223,
326991,
277839,
277842,
277847,
277850,
179547,
277853,
277857,
302436,
277860,
294246,
327015,
310632,
327017,
351594,
277864,
277869,
277872,
351607,
310648,
277880,
310651,
277884,
277888,
310657,
351619,
294276,
310659,
277892,
277894,
253320,
310665,
318858,
327046,
277898,
277903,
310672,
351633,
277905,
277908,
277917,
310689,
277921,
130468,
277928,
277932,
310703,
277937,
310710,
130486,
310712,
277944,
310715,
277947,
302526,
277950,
277953,
302534,
310727,
245191,
64966,
277959,
277963,
302541,
277966,
302543,
310737,
277971,
228825,
277978,
310749,
277981,
277984,
310755,
277989,
277991,
187880,
277995,
310764,
286188,
278000,
228851,
310772,
278003,
278006,
40440,
212472,
278009,
40443,
286203,
40448,
228864,
286214,
228871,
302603,
302614,
286233,
302617,
302621,
286240,
146977,
187939,
40484,
294435,
40486,
286246,
294440,
40488,
294439,
294443,
40491,
294445,
196133,
310831,
245288,
286248,
40499,
40502,
212538,
40507,
40511,
40513,
228933,
40521,
286283,
40525,
40527,
212560,
400976,
228944,
40533,
40537,
40539,
40541,
278109,
40544,
40548,
40550,
40552,
286312,
40554,
286313,
310892,
40557,
40560,
188022,
122488,
294521,
343679,
294537,
310925,
286354,
278163,
302740,
122517,
278168,
179870,
327333,
229030,
212648,
278188,
302764,
319153,
278196,
302781,
319171,
302789,
294599,
278216,
294601,
302793,
343757,
212690,
319187,
278227,
286420,
229076,
286425,
319194,
278235,
229086,
278238,
286432,
294625,
294634,
302838,
319226,
286460,
278274,
302852,
278277,
302854,
294664,
311048,
352008,
319243,
311053,
302862,
319251,
294682,
278306,
188199,
294701,
278320,
319280,
319290,
229192,
302925,
188247,
280021,
237409,
229233,
294776,
360317,
294785,
327554,
40840,
294803,
40851,
188312,
294811,
237470,
319390,
40865,
319394,
294817,
294821,
311209,
180142,
343983,
188340,
40886,
319419,
294844,
294847,
309354,
393177,
294876,
294879,
294883,
294890,
311279,
278513,
237555,
311283,
278516,
278519,
237562
] |
8397f9f63480db07a644a65d85adde78c10f2801
|
a8a9e6bf412f6ed21575cb67ed864fac625d0ae9
|
/BlueDomain/AppDelegate.swift
|
0932eb1f9174901847c2c31041903770362f92c0
|
[] |
no_license
|
Faizy51/LanguageTranslatorPOC
|
cedbc83975df2c9e2bda4455d68d82edf2ba1ef0
|
15d0a58c0f00554cdb0f89d816f2c16cba6b7afb
|
refs/heads/master
| 2021-05-18T00:32:54.828755 | 2020-03-29T12:37:01 | 2020-03-29T12:37:01 | 251,025,215 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,406 |
swift
|
//
// AppDelegate.swift
// BlueDomain
//
// Created by Faizyy on 25/03/20.
// Copyright © 2020 faiz. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
|
[
393222,
393224,
393230,
393250,
344102,
393261,
393266,
163891,
213048,
376889,
385081,
393275,
376905,
327756,
254030,
286800,
368727,
180313,
368735,
180320,
376931,
286831,
368752,
286844,
417924,
262283,
286879,
286888,
377012,
327871,
180416,
377036,
180431,
377046,
377060,
327914,
205036,
393456,
393460,
336123,
418043,
336128,
385280,
262404,
180490,
368911,
262416,
262422,
377117,
262436,
336180,
262454,
393538,
262472,
344403,
213332,
65880,
262496,
418144,
262499,
213352,
246123,
262507,
262510,
213372,
385419,
393612,
262550,
262552,
385440,
385443,
385451,
262573,
393647,
385458,
262586,
344511,
262592,
360916,
369118,
328177,
328179,
328182,
328189,
328192,
164361,
328206,
410128,
393747,
254490,
188958,
385570,
33316,
377383,
197159,
352821,
188987,
418363,
369223,
385609,
385616,
352856,
352864,
369253,
262760,
352874,
352887,
254587,
377472,
336512,
148105,
377484,
352918,
98968,
344744,
361129,
336555,
385713,
434867,
164534,
336567,
164538,
328378,
328386,
352968,
344776,
352971,
418507,
352973,
385742,
385748,
361179,
189153,
369381,
361195,
418553,
344831,
336643,
344835,
344841,
361230,
336659,
418580,
418585,
434970,
369435,
418589,
262942,
418593,
336675,
328484,
418598,
418605,
336696,
361273,
328515,
336708,
328519,
336711,
361288,
328522,
336714,
426841,
197468,
361309,
254812,
361315,
361322,
328573,
377729,
369542,
361360,
222128,
345035,
345043,
386003,
386011,
386018,
386022,
435187,
328702,
328714,
361489,
386069,
336921,
386073,
336925,
345118,
377887,
345133,
345138,
386101,
197707,
189520,
345169,
156761,
361567,
148578,
345199,
386167,
361593,
410745,
361598,
214149,
345222,
386186,
337047,
345246,
214175,
337071,
337075,
345267,
386258,
328924,
66782,
222437,
328941,
386285,
386291,
345376,
353570,
345379,
410917,
345382,
337205,
345399,
378169,
369978,
337222,
337229,
337234,
263508,
402791,
345448,
271730,
378227,
271745,
181638,
353673,
181643,
181649,
181654,
230809,
181670,
181673,
337329,
181681,
181684,
181690,
361917,
181696,
337349,
181703,
337365,
271839,
329191,
361960,
329194,
116210,
337398,
337415,
329226,
419339,
419343,
419349,
345625,
419355,
370205,
419359,
419362,
394786,
370213,
419368,
419376,
206395,
214593,
419400,
419402,
353867,
419406,
214610,
419410,
345701,
394853,
222830,
370297,
403070,
353919,
403075,
198280,
345736,
403091,
345749,
345757,
345762,
419491,
345765,
419497,
419501,
370350,
419506,
419509,
337592,
419512,
419517,
337599,
419527,
419530,
419535,
272081,
394966,
419542,
419544,
181977,
345818,
419547,
419550,
419559,
337642,
419563,
337645,
370415,
141051,
337659,
337668,
362247,
395021,
362255,
321299,
116509,
345887,
378663,
345905,
354106,
354111,
247617,
354117,
370503,
329544,
345930,
370509,
354130,
247637,
337750,
370519,
313180,
354142,
345964,
345967,
345970,
345974,
403320,
354172,
247691,
337808,
247700,
329623,
436126,
436132,
337833,
362413,
337844,
346057,
247759,
346063,
329697,
354277,
190439,
247789,
354313,
346139,
436289,
378954,
395339,
338004,
100453,
329832,
329855,
329867,
329885,
411805,
346272,
362660,
100524,
387249,
379066,
387260,
256191,
395466,
346316,
411861,
411864,
411868,
411873,
379107,
411876,
387301,
346343,
338152,
387306,
387312,
346355,
436473,
321786,
379134,
411903,
379152,
395538,
387349,
338199,
387352,
182558,
338211,
395566,
248111,
362822,
436555,
190796,
321879,
379233,
354673,
321910,
248186,
420236,
379278,
272786,
354727,
338352,
330189,
338381,
338386,
256472,
338403,
338409,
248308,
199164,
330252,
199186,
420376,
330267,
354855,
10828,
199249,
174695,
248425,
191084,
338543,
191092,
346742,
330383,
354974,
150183,
174774,
248504,
174777,
223934,
355024,
273108,
355028,
264918,
183005,
436962,
338660,
338664,
264941,
363251,
207619,
264964,
338700,
256786,
199452,
363293,
396066,
346916,
396069,
215853,
355122,
355131,
355140,
355143,
338763,
355150,
330580,
355166,
265055,
355175,
387944,
355179,
330610,
330642,
355218,
412599,
207808,
379848,
396245,
330710,
248792,
248798,
347105,
257008,
183282,
265207,
330748,
265214,
330760,
330768,
248862,
396328,
158761,
199728,
330800,
396336,
396339,
339001,
388154,
388161,
347205,
248904,
330826,
248914,
339036,
412764,
257120,
265320,
248951,
420984,
330889,
347287,
248985,
339097,
44197,
380070,
339112,
249014,
330958,
330965,
265432,
388319,
388347,
175375,
159005,
175396,
208166,
273708,
372015,
347441,
372018,
199988,
44342,
175415,
396600,
437566,
175423,
437570,
437575,
437583,
331088,
437587,
331093,
396633,
175450,
437595,
175457,
208227,
175460,
175463,
265580,
437620,
175477,
249208,
175483,
249214,
175486,
175489,
249218,
249227,
249234,
175513,
175516,
396705,
175522,
355748,
380332,
396722,
208311,
388542,
372163,
216517,
380360,
216522,
339404,
372176,
208337,
339412,
413141,
339417,
249308,
339420,
339424,
339428,
339434,
249328,
69113,
372228,
339461,
208398,
380432,
175635,
339503,
265778,
265795,
396872,
265805,
224853,
224857,
257633,
224870,
372327,
257646,
372337,
224884,
224887,
224890,
224894,
372353,
224897,
216707,
339588,
126596,
421508,
224904,
224909,
159374,
11918,
339601,
126610,
224913,
224916,
224919,
126616,
208538,
224922,
224926,
224929,
224932,
257704,
224936,
224942,
257712,
224947,
257716,
257720,
224953,
257724,
224959,
257732,
224965,
224969,
339662,
224975,
257747,
224981,
224986,
224993,
257761,
257764,
224999,
339695,
225012,
257787,
225020,
339710,
257790,
225025,
257794,
339721,
257801,
257804,
225038,
257807,
225043,
167700,
372499,
225048,
257819,
225053,
184094,
225058,
339747,
339749,
257833,
225066,
257836,
413484,
225070,
225073,
372532,
257845,
225079,
397112,
225082,
397115,
225087,
225092,
225096,
323402,
257868,
225103,
257871,
397139,
225108,
225112,
257883,
257886,
225119,
257890,
339814,
225127,
257896,
274280,
257901,
225137,
339826,
257908,
225141,
257912,
257916,
225148,
257920,
225155,
339844,
225165,
397200,
225170,
380822,
225175,
225180,
118691,
184244,
372664,
372702,
372706,
356335,
380918,
405533,
430129,
266294,
266297,
217157,
421960,
356439,
430180,
421990,
266350,
356466,
266362,
381068,
225423,
250002,
250004,
225429,
356506,
225437,
135327,
225441,
438433,
225444,
438436,
225447,
438440,
225450,
258222,
225455,
430256,
225458,
225461,
225466,
389307,
225470,
381120,
372929,
430274,
225475,
389320,
225484,
225487,
225490,
225493,
266453,
225496,
225499,
225502,
225505,
356578,
217318,
225510,
225514,
225518,
372976,
381176,
389380,
61722,
356637,
356640,
356643,
356646,
266536,
356649,
356655,
332080,
340275,
356660,
397622,
332090,
225597,
332097,
201028,
348488,
332106,
332117,
348502,
250199,
250202,
332125,
250210,
348525,
332152,
250238,
389502,
332161,
356740,
332172,
373145,
340379,
389550,
324030,
266687,
340451,
160234,
127471,
340472,
324094,
266754,
324099,
324102,
324111,
340500,
324117,
324131,
332324,
381481,
324139,
356907,
324142,
356916,
324149,
324155,
348733,
324160,
324164,
356934,
348743,
381512,
324170,
324173,
324176,
389723,
332380,
381545,
340627,
184982,
373398,
258721,
332453,
332459,
389805,
332463,
381617,
332471,
332483,
332486,
373449,
332493,
357069,
357073,
332511,
332520,
340718,
332533,
348924,
373510,
389926,
152370,
348978,
340789,
348982,
398139,
127814,
357206,
389978,
430939,
357211,
357214,
201579,
201582,
349040,
340849,
201588,
430965,
381813,
324472,
398201,
119674,
324475,
430972,
340861,
324478,
340858,
324481,
373634,
398211,
324484,
324487,
381833,
324492,
324495,
324498,
430995,
324501,
324510,
422816,
324513,
398245,
201637,
324524,
340909,
324533,
5046,
324538,
324541,
398279,
340939,
340941,
209873,
340957,
431072,
398306,
340963,
209895,
201711,
349172,
381946,
349180,
439294,
431106,
209943,
250914,
357410,
185380,
357418,
209965,
209968,
209971,
209975,
209979,
209987,
209990,
341071,
349267,
250967,
210010,
341091,
210025,
210027,
210030,
210036,
210039,
341113,
210044,
349308,
152703,
160895,
349311,
210052,
349319,
210055,
210067,
210071,
210077,
210080,
210084,
251044,
185511,
210088,
210095,
210098,
210107,
210115,
332997,
210127,
333009,
210131,
333014,
210138,
210143,
218354,
251128,
218360,
275706,
275712,
275715,
275721,
349459,
333078,
251160,
349484,
349491,
251189,
415033,
251210,
357708,
210260,
365911,
259421,
365921,
333154,
251235,
374117,
333162,
234866,
390516,
333175,
357755,
251271,
136590,
112020,
349590,
357792,
259515,
415166,
415185,
366034,
366038,
415191,
415193,
415196,
415199,
423392,
333284,
415207,
366056,
366061,
415216,
210420,
415224,
423423,
415257,
415263,
366117,
415270,
144939,
415278,
415281,
415285,
210487,
415290,
415293,
349761,
415300,
333386,
333399,
366172,
333413,
423528,
423532,
210544,
415353,
333439,
415361,
267909,
153227,
333498,
333511,
210631,
259788,
358099,
153302,
333534,
366307,
366311,
431851,
366318,
210672,
366321,
366325,
210695,
268041,
210698,
366348,
210706,
399128,
333594,
358191,
210739,
366387,
399159,
358200,
325440,
366401,
341829,
325446,
46920,
341834,
341838,
341843,
415573,
358234,
341851,
350045,
399199,
259938,
399206,
268143,
358255,
399215,
358259,
341876,
333689,
243579,
325504,
333698,
333708,
333724,
382890,
350146,
358339,
333774,
358371,
350189,
350193,
333818,
350202,
350206,
350213,
268298,
350224,
350231,
333850,
350237,
350240,
350244,
350248,
178218,
350251,
350256,
350259,
350271,
243781,
350285,
374864,
342111,
342133,
374902,
432271,
333997,
334011,
260289,
350410,
260298,
350416,
350422,
211160,
350425,
268507,
334045,
350445,
375026,
358644,
350458,
350461,
350464,
325891,
350467,
350475,
375053,
268559,
350480,
432405,
350486,
350490,
325914,
325917,
350493,
350498,
350504,
358700,
350509,
391468,
358704,
358713,
358716,
383306,
334161,
383321,
383330,
383333,
391530,
383341,
334203,
268668,
194941,
391563,
366990,
268701,
342430,
416157,
375208,
326058,
375216,
334262,
334275,
326084,
358856,
195039,
334304,
334311,
375277,
334321,
350723,
186897,
342545,
334358,
342550,
342554,
334363,
358941,
350761,
252461,
334384,
358961,
383536,
334394,
252482,
219718,
334407,
334420,
350822,
375400,
334465,
334468,
162445,
326290,
342679,
342683,
260766,
342710,
244409,
260797,
334528,
260801,
350917,
154317,
391894,
154328,
416473,
64230,
113388,
342766,
375535,
203506,
342776,
391937,
391948,
326416,
375568,
375571,
162591,
326441,
326451,
326454,
244540,
326460,
260924,
375612,
326467,
244551,
326473,
326477,
326485,
416597,
326490,
342874,
326502,
375656,
433000,
326507,
326510,
211825,
211831,
351097,
392060,
359295,
351104,
342915,
400259,
236430,
342930,
252822,
392091,
400285,
252836,
359334,
211884,
400306,
351168,
359361,
326598,
359366,
359382,
359388,
383967,
343015,
359407,
261108,
244726,
261111,
383997,
261129,
359451,
261147,
211998,
261153,
261159,
359470,
359476,
343131,
384098,
384101,
367723,
384107,
187502,
343154,
384114,
212094,
351364,
384135,
384139,
384143,
351381,
384151,
384160,
384168,
367794,
244916,
384181,
367800,
384188,
351423,
384191,
384198,
326855,
244937,
384201,
253130,
343244,
384208,
146642,
384224,
359649,
343270,
351466,
384246,
351479,
384249,
343306,
261389,
359694,
253200,
261393,
384275,
384283,
245020,
384288,
245029,
171302,
351534,
376110,
245040,
384314,
425276,
384323,
212291,
343365,
212303,
367965,
343393,
343398,
367980,
425328,
343409,
154999,
253303,
343417,
327034,
245127,
384397,
245136,
245142,
245145,
343450,
245148,
245151,
245154,
245157,
245162,
327084,
359865,
384443,
146876,
327107,
384453,
327110,
327115,
327117,
359886,
359890,
343507,
368092,
343534,
343539,
368119,
343544,
368122,
409091,
359947,
359955,
359983,
343630,
327275,
245357,
138864,
155254,
155273,
368288,
245409,
425638,
425649,
155322,
425662,
155327,
245460,
155351,
155354,
212699,
245475,
155363,
245483,
155371,
409335,
155393,
155403,
245525,
155422,
360223,
155438,
155442,
155447,
155461,
360261,
376663,
155482,
261981,
425822,
155487,
376671,
155490,
155491,
327531,
261996,
376685,
261999,
262002,
327539,
425845,
262005,
147317,
262008,
262011,
155516,
155521,
155525,
360326,
376714,
262027,
155531,
262030,
262033,
262036,
262039,
262042,
155549,
262045,
262048,
262051,
327589,
155559,
155562,
155565,
393150,
384977,
393169,
155611,
155619,
253923,
155621,
327654,
253926,
393203,
360438,
253943,
393206,
393212,
155646
] |
23517de6120f683f27e7df3de25dc2bb4a3e88c0
|
c679e5505a60ca0e5e583c37252f4f28fc478cea
|
/Grab n Go Express/Controllers/BillValidatorController.swift
|
b33c91bea5cc3c3ce5d4254b96613335a9964c52
|
[] |
no_license
|
lulzzz/Grab-N-Go-Express
|
1bad5ff8a105ebe01a3743373db841a41d232445
|
edb38a98082906342b94614e48c671c6134d5573
|
refs/heads/master
| 2021-01-21T11:53:16.086401 | 2017-07-31T18:55:40 | 2017-07-31T18:55:40 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,468 |
swift
|
//
// BillValidatorCntroller.swift
// Grab n Go Express
//
// Created by Adam Arthur on 10/29/16.
// Copyright © 2016 Adam Arthur. All rights reserved.
//
import Foundation
/*
This file implements a SIMPLE implementation of the MEI Retail EBDS Serial Protocol.
What is the EBDS Serial Protocol? Simply put, it's a serial protocol that allows
for the control of currency acceptors. Currently, this protocol supports the
MEI Series 2000 acceptors.
http://www.meigroup.com/global/americas/transport/transport_products/bill_acceptors/series_2000/
I do NOT make the representation that this is a proper implementation of the protocol.
I do NOT have access to the documentation regarding how this protocol works -- I've had
to reverse engineer it.
Why was this necessary? Quite simply, no libraries exist for Mac or iOS, and since this is
an iOS application, I needed to make it.
How it works
First, to get this to work, you need to establish a physical connection between the iDevice
and the Validator.
This is accomplished by using a RedPark Lighting to Serial Cable.
Getting communication working with that is a pain in the ass for a swift project, and I'll
document it elsewhere.
I was able to find SOME documentation online, from some Chinese site. But for the most part
I had to reverse engineer the protocol from using a port sniffer and a few other means.
*/
|
[
-1
] |
e1ed1049d3a99efa60c3fb6e8c72cce060ea9f94
|
575516b7b226e8946c6eed47a2c58a05e823906d
|
/admob/AdMobExampleSwift/AppDelegate.swift
|
539f5ad6f5d46e9b924123ba2e4c55ef563ece5e
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
svahora/quickstart-ios
|
38f9648e4527d9a74fe904e4cfb8e84dbb4e207c
|
0cc8069813ef34d43b37f2c924eb49d6e93f9c8e
|
refs/heads/master
| 2020-04-09T09:38:36.311533 | 2018-11-30T21:24:19 | 2018-11-30T21:24:19 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,074 |
swift
|
//
// Copyright (c) 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// AppDelegate.swift
// AdMobExampleSwift
//
// [START firebase_config]
import UIKit
import Firebase
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Use Firebase library to configure APIs
FirebaseApp.configure()
return true
}
// [END firebase_config]
}
|
[
151073,
54346,
244606
] |
96887794c05b33e2f9bf453c868509b996b6e09e
|
b7f51d573a65955cffb5115883d14dff86bb9b71
|
/RssReaderApp/TableViewController.swift
|
fff4eb6ea62f115a626ec09460b53ed6fe276ec3
|
[] |
no_license
|
Jmizutani/RssReaderApp
|
7c4a35d2efbe2937c814b27385e0eb07e94f2443
|
6d9a58a380837b2151713fa6b56508efc1c72a15
|
refs/heads/master
| 2020-04-15T15:30:42.093545 | 2019-01-13T09:18:25 | 2019-01-13T09:18:25 | 164,796,551 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 4,285 |
swift
|
//
// TableViewController.swift
// RssReaderApp
//
// Created by 水谷純也 on 2019/01/05.
// Copyright © 2019 水谷純也. All rights reserved.
//
import UIKit
import Alamofire
import SwiftyJSON
class TableViewController: UITableViewController {
var fetchFrom:String?
var Parent:UIViewController?
var entries:[Entry]=[]
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate=self
tableView.dataSource=self
self.tableView.register(UINib(nibName: "FeedTableViewCell", bundle: nil), forCellReuseIdentifier: "FeedTableViewCell")
Alamofire.request(fetchFrom!).responseJSON{response in
if let values=response.result.value{
JSON(values)["items"].forEach{i,value in
self.entries.append(Entry(title:value["title"].string!,desc:value["description"].string!,link:value["link"].string!))
}
self.tableView.reloadData()
}
}
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
}
// MARK: - Table view data source
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return self.entries.count
}
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 90
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "FeedTableViewCell", for: indexPath) as! FeedTableViewCell
let entry = self.entries[indexPath.row]
cell.title.text = entry.title
//cell.desc.text = entry.desc
cell.link=entry.link
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let detailViewController = DetailViewController()
detailViewController.entry = self.entries[indexPath.row]
Parent!.navigationController!.pushViewController(detailViewController , animated: true)
}
/*
// Override to support conditional editing of the table view.
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the specified item to be editable.
return true
}
*/
/*
// Override to support editing the table view.
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
// Delete the row from the data source
tableView.deleteRows(at: [indexPath], with: .fade)
} else if editingStyle == .insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
*/
/*
// Override to support rearranging the table view.
override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {
}
*/
/*
// Override to support conditional rearranging of the table view.
override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the item to be re-orderable.
return true
}
*/
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
|
[
-1
] |
92e345485769ec11747764eb68e285997e60bce4
|
adb753936b7ba2c5b8544956707c2d89e6fef1ee
|
/NexsysOneTask/UserProfileScene/UserProfileViewController.swift
|
bddfd3aae082cc628dd4b962e60cafa10637561f
|
[] |
no_license
|
atif-khan/NexsysOneTask
|
c6210bd073fb2802a53805e4775c2d4beff1e995
|
f27b089958de1174cc3662bdbe257e4ae4b86290
|
refs/heads/master
| 2022-10-29T22:01:07.765138 | 2020-06-15T09:57:17 | 2020-06-15T09:57:17 | 272,401,766 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 1,073 |
swift
|
//
// UserProfileViewController.swift
// NexsysOneTask
//
// Created by Atif Khan on 15/06/2020.
// Copyright © 2020 Atif Khan. All rights reserved.
//
import UIKit
class UserProfileViewController: UIViewController {
@IBOutlet weak var nameTF: UITextField!
@IBOutlet weak var emailTF: UITextField!
@IBOutlet weak var ageTF: UITextField!
@IBOutlet weak var departmentTF: UITextField!
var user: User!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
nameTF.text = user.name
emailTF.text = user.email
ageTF.text = "\(user.age)"
departmentTF.text = user.department
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
|
[
-1
] |
1dfc4c3dd8a64db303a75c48471107e6a69d79fb
|
a47583e1f5430673ba15502218c0784c075c081a
|
/RsyncOSX/RsyncParametersProcess.swift
|
082903fba1123bc28392b6ec75ba1b979cc50268
|
[
"MIT"
] |
permissive
|
zyjia/RsyncOSX
|
767f52c7f0838554ffe13b02ae1feaad316034ca
|
c8cb59bb7f2e09bc32b4263bc23a2e262709a9c4
|
refs/heads/master
| 2020-03-18T05:25:39.166522 | 2018-05-20T05:10:30 | 2018-05-20T05:10:30 | null | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 9,079 |
swift
|
//
// rsyncProcessArguments.swift
// Rsync
//
// Created by Thomas Evensen on 08/02/16.
// Copyright © 2016 Thomas Evensen. All rights reserved.
//
import Foundation
final class RsyncParametersProcess {
private var stats: Bool?
private var arguments: [String]?
var localCatalog: String?
var offsiteCatalog: String?
var offsiteUsername: String?
var offsiteServer: String?
var remoteargs: String?
var linkdestparam: String?
// if snapshot
// --link-dest=~/catalog/current /Volumes/Home/thomas/catalog/ user@host:~/catalog/01
private var current: String = "current"
// Set initial parameter1 .. paramater6, parameters are computed by RsyncOSX
private func setParameters1To6(_ config: Configuration, dryRun: Bool, forDisplay: Bool) {
let parameter1: String = config.parameter1
let parameter2: String = config.parameter2
let parameter3: String = config.parameter3
let parameter4: String = config.parameter4
let offsiteServer: String = config.offsiteServer
self.arguments!.append(parameter1)
if forDisplay {self.arguments!.append(" ")}
self.arguments!.append(parameter2)
if forDisplay {self.arguments!.append(" ")}
if offsiteServer.isEmpty == false {
if parameter3.isEmpty == false {
self.arguments!.append(parameter3)
if forDisplay {self.arguments!.append(" ")}
}
}
self.arguments!.append(parameter4)
if forDisplay {self.arguments!.append(" ")}
if offsiteServer.isEmpty {
// nothing
} else {
self.sshportparameter(config, forDisplay: forDisplay)
}
}
private func sshportparameter(_ config: Configuration, forDisplay: Bool) {
let parameter5: String = config.parameter5
let parameter6: String = config.parameter6
// -e
self.arguments!.append(parameter5)
if forDisplay {self.arguments!.append(" ")}
if let sshport = config.sshport {
// "ssh -p xxx"
if forDisplay {self.arguments!.append(" \"")}
self.arguments!.append("ssh -p " + String(sshport))
if forDisplay {self.arguments!.append("\" ")}
} else {
// ssh
self.arguments!.append(parameter6)
}
if forDisplay {self.arguments!.append(" ")}
}
// Compute user selected parameters parameter8 ... parameter14
// Brute force, check every parameter, not special elegant, but it works
private func setParameters8To14(_ config: Configuration, dryRun: Bool, forDisplay: Bool) {
self.stats = false
if config.parameter8 != nil {
self.appendParameter(parameter: config.parameter8!, forDisplay: forDisplay)
}
if config.parameter9 != nil {
self.appendParameter(parameter: config.parameter9!, forDisplay: forDisplay)
}
if config.parameter10 != nil {
self.appendParameter(parameter: config.parameter10!, forDisplay: forDisplay)
}
if config.parameter11 != nil {
self.appendParameter(parameter: config.parameter11!, forDisplay: forDisplay)
}
if config.parameter12 != nil {
self.appendParameter(parameter: config.parameter12!, forDisplay: forDisplay)
}
if config.parameter13 != nil {
self.appendParameter(parameter: config.parameter13!, forDisplay: forDisplay)
}
if config.parameter14 != nil {
self.appendParameter(parameter: config.parameter14!, forDisplay: forDisplay)
}
// Append --stats parameter to collect info about run
if dryRun {
self.dryrunparameter(config, forDisplay: forDisplay)
} else {
if self.stats == false {
self.appendParameter(parameter: "--stats", forDisplay: forDisplay)
}
}
}
private func dryrunparameter(_ config: Configuration, forDisplay: Bool) {
let dryrun: String = config.dryrun
self.arguments!.append(dryrun)
if forDisplay {self.arguments!.append(" ")}
if self.stats! == false {
self.arguments!.append("--stats")
if forDisplay {self.arguments!.append(" ")}
}
}
// Check userselected parameter and append it
// to arguments array passed to rsync or displayed
// on screen.
private func appendParameter (parameter: String, forDisplay: Bool) {
if parameter.count > 1 {
if parameter == "--stats" {
self.stats = true
}
self.arguments!.append(parameter)
if forDisplay {
self.arguments!.append(" ")
}
}
}
/// Function for initialize arguments array. RsyncOSX computes four argumentstrings
/// two arguments for dryrun, one for rsync and one for display
/// two arguments for realrun, one for rsync and one for display
/// which argument to compute is set in parameter to function
/// - parameter config: structure (configuration) holding configuration for one task
/// - parameter dryRun: true if compute dryrun arguments, false if compute arguments for real run
/// - paramater forDisplay: true if for display, false if not
/// - returns: Array of Strings
func argumentsRsync (_ config: Configuration, dryRun: Bool, forDisplay: Bool) -> [String] {
self.localCatalog = config.localCatalog
self.remoteargs(config)
self.setParameters1To6(config, dryRun: dryRun, forDisplay: forDisplay)
self.setParameters8To14(config, dryRun: dryRun, forDisplay: forDisplay)
switch config.task {
case "backup", "combined":
self.argumentsforbackup(dryRun: dryRun, forDisplay: forDisplay)
case "snapshot":
self.remoteargssnapshot(config)
self.argumentsforsnapshot(dryRun: dryRun, forDisplay: forDisplay)
case "restore":
self.argumentsforrestore(dryRun: dryRun, forDisplay: forDisplay)
default:
break
}
return self.arguments!
}
private func remoteargs(_ config: Configuration) {
self.offsiteCatalog = config.offsiteCatalog
self.offsiteUsername = config.offsiteUsername
self.offsiteServer = config.offsiteServer
if self.offsiteServer!.isEmpty == false {
if config.rsyncdaemon != nil {
if config.rsyncdaemon == 1 {
self.remoteargs = self.offsiteUsername! + "@" + self.offsiteServer! + "::" + self.offsiteCatalog!
} else {
self.remoteargs = self.offsiteUsername! + "@" + self.offsiteServer! + ":" + self.offsiteCatalog!
}
} else {
self.remoteargs = self.offsiteUsername! + "@" + self.offsiteServer! + ":" + self.offsiteCatalog!
}
}
}
// Additional parameters if snapshot
private func remoteargssnapshot(_ config: Configuration) {
let snapshotnum = config.snapshotnum ?? 1
self.linkdestparam = "--link-dest=" + config.offsiteCatalog + String(snapshotnum - 1)
if self.remoteargs != nil {
self.remoteargs! += String(snapshotnum)
}
self.offsiteCatalog! += String(snapshotnum)
}
private func argumentsforbackup(dryRun: Bool, forDisplay: Bool) {
// Backup
self.arguments!.append(self.localCatalog!)
if self.offsiteServer!.isEmpty {
if forDisplay {self.arguments!.append(" ")}
self.arguments!.append(self.offsiteCatalog!)
if forDisplay {self.arguments!.append(" ")}
} else {
if forDisplay {self.arguments!.append(" ")}
self.arguments!.append(remoteargs!)
if forDisplay {self.arguments!.append(" ")}
}
}
private func argumentsforsnapshot(dryRun: Bool, forDisplay: Bool) {
self.arguments!.append(self.linkdestparam!)
if forDisplay {self.arguments!.append(" ")}
self.arguments!.append(self.localCatalog!)
if self.offsiteServer!.isEmpty {
if forDisplay {self.arguments!.append(" ")}
self.arguments!.append(self.offsiteCatalog!)
if forDisplay {self.arguments!.append(" ")}
} else {
if forDisplay {self.arguments!.append(" ")}
self.arguments!.append(remoteargs!)
if forDisplay {self.arguments!.append(" ")}
}
}
private func argumentsforrestore(dryRun: Bool, forDisplay: Bool) {
if self.offsiteServer!.isEmpty {
self.arguments!.append(self.offsiteCatalog!)
if forDisplay {self.arguments!.append(" ")}
} else {
if forDisplay {self.arguments!.append(" ")}
self.arguments!.append(remoteargs!)
if forDisplay {self.arguments!.append(" ")}
}
self.arguments!.append(self.localCatalog!)
}
init () {
self.arguments = [String]()
}
}
|
[
-1
] |
763245b9aefa37c7629836291472ad643a35f681
|
3cda8d8c43df0290eee807e067b33db3bea6763f
|
/Kindle/BookPageController.swift
|
c596a89b7b8efafbaf7423307c52e92b9dc3ec09
|
[] |
no_license
|
jahngalt/KindleProject
|
1a8e8291e8c955af1814deeb93637d0be2c4be5e
|
1aadb892f7936bd788ab97099529d7acb8dbb96d
|
refs/heads/master
| 2021-04-05T07:20:15.765777 | 2020-03-23T09:59:52 | 2020-03-23T09:59:52 | 248,532,567 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 2,053 |
swift
|
//
// BookPageController.swift
// Kindle
//
// Created by Oleg Kudimov on 3/17/20.
// Copyright © 2020 Oleg Kudimov. All rights reserved.
//
import UIKit
class BookPageController: UICollectionViewController, UICollectionViewDelegateFlowLayout {
var book: Book?
override func viewDidLoad() {
super.viewDidLoad()
collectionView.backgroundColor = .white
navigationItem.title = self.book?.title
collectionView.register(PageCell.self, forCellWithReuseIdentifier: "cellid")
//Changing scroll direction and setting speed
let layout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout
layout?.scrollDirection = .horizontal
layout?.minimumLineSpacing = 0
collectionView.isPagingEnabled = true
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Close", style: .plain, target: self, action: #selector(handleCloseBook))
}
@objc func handleCloseBook(){
dismiss(animated: true, completion: nil)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: view.frame.width, height: view.frame.height - 44 - 20)
}
override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return book?.pages.count ?? 0
}
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let pageCell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellid", for: indexPath) as! PageCell
let page = book?.pages[indexPath.item]
pageCell.textLabel.text = page?.text
// if indexPath.item % 2 == 0 {
// cell.backgroundColor = .red
// } else {
// cell.backgroundColor = .blue
// }
return pageCell
}
}
|
[
-1
] |
b55b3682e4402fcede50067543f7bb180e73c56f
|
015ee375b228bbdc64b3edc0bffa9a2edfe5d180
|
/Flix/ViewControllers/GridCell.swift
|
60bcfd3ea402916728f45a7a1d3cceec4b87b3c7
|
[] |
no_license
|
smahboob/Flix
|
0476b18d468dd93b9d2d62c6ea06a15d2ad79250
|
65c3427229e09f957cb03c332e5cfb5bfd38445a
|
refs/heads/main
| 2022-12-24T01:38:38.716288 | 2020-10-02T23:31:22 | 2020-10-02T23:31:22 | 298,708,774 | 0 | 0 | null | null | null | null |
UTF-8
|
Swift
| false | false | 190 |
swift
|
//
// GridCell.swift
// Flix
//
// Created by Saad Mahboob on 28/09/2020.
//
import UIKit
class GridCell: UICollectionViewCell {
@IBOutlet weak var posterImage: UIImageView!
}
|
[
-1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.