This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
var composedCount : Int { | |
var count = 0 | |
enumerateSubstrings(in: startIndex..<endIndex, options: .byComposedCharacterSequences) {_ in count+=1} | |
return count | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// GTMapGridDataSource.m | |
// GallopTravel | |
// | |
// Created by Anton Glezman on 08.12.16. | |
// Copyright © 2016 Globus It. All rights reserved. | |
// | |
#import "GTMapGridDataSource.h" | |
#import "GTDataProviderProtocol.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// GTMapDatasource.m | |
// GallopTravel | |
// | |
// Created by Anton Glezman on 02.06.16. | |
// Copyright © 2016 Globus It. All rights reserved. | |
// | |
@interface GTMapDatasource() <GTMapDataSourceDelegate, GTPoiDataSourceDelegate> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<OpenLife.ApiOnboardingResponse | |
URL : "http://dev.openlife.staging.globus-ltd.com/v1/slides" | |
MIMEType : "application/json" | |
StatusCode : internal server error (500) | |
Headers : { | |
"X-Rate-Limit-Reset" : "0", | |
"X-Rate-Limit-Limit" : "4", | |
"Content-Type" : "application/json; charset=UTF-8", | |
"Server" : "nginx/1.10.3", | |
"X-Rate-Limit-Remaining" : "2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://github.com/CocoaPods/Specs.git' | |
inhibit_all_warnings! | |
def core_pods | |
pod 'Globus/CoreFoundation/DateFormatter' | |
pod 'Globus/ApiManager' | |
pod 'Globus/Model' | |
pod 'Globus/Timer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Базовый класс | |
class Parameters { | |
var parameters: [String: Any] = [:] | |
/** | |
Добавить параметр. | |
- parameter parameter: имя параметра; | |
- parameter value: значение параметра. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBAction func gmail(_ sender: Any) { | |
let compose = "googlegmail:///co?subject=Subject&body=some text&to=test@example.com" | |
.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)! | |
let url = URL(string: compose)! | |
if UIApplication.shared.canOpenURL(url) { | |
UIApplication.shared.open(url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIFont { | |
static var largeTitle: UIFont { | |
basisSFPro(FontFamily.SFProText.bold, size: 40, iPhone5Size: 28, textStyle: .largeTitle) | |
} | |
static var title1: UIFont { | |
basisSFPro(FontFamily.SFProText.bold, size: 24, iPhone5Size: 20, textStyle: .title1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/// https://semver.org/ | |
struct Version: Comparable, CustomStringConvertible { | |
let major: Int | |
let minor: Int | |
let patch: Int | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public extension Data { | |
struct HexEncodingOptions: OptionSet { | |
public let rawValue: Int | |
public static let upperCase = HexEncodingOptions(rawValue: 1 << 0) | |
public init(rawValue: Int) { | |
self.rawValue = rawValue | |
} |
OlderNewer