This file contains hidden or 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 length: Int { | |
get { | |
return count(self) | |
} | |
} | |
func contains(s: String) -> Bool | |
{ |
This file contains hidden or 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 | |
extension String | |
{ | |
var length: Int { | |
get { | |
return self.characters.count | |
} | |
} | |
This file contains hidden or 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 PushNotificationManager { | |
class var isPushNotificationEnable: Bool { | |
let osVersion = UIDevice.currentDevice().systemVersion | |
if osVersion < "8.0" { | |
let types = UIApplication.sharedApplication().enabledRemoteNotificationTypes() | |
if types == UIRemoteNotificationType.None { | |
// push notification disabled | |
return false | |
}else{ | |
// push notification enable |
This file contains hidden or 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 | |
extension NSObject { | |
var isPublicClass: Bool { | |
return self.dynamicType.isPublicClass | |
} | |
class var isPublicClass: Bool { | |
return _PUBLIC_IOS_CLASSES.contains(NSStringFromClass(self)) | |
} |
This file contains hidden or 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 | |
let CBBProgresViewTag = 23452 | |
class M2XHUD : M13ProgressHUD { | |
override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> UIView? { | |
return nil // allow to touch on any other place of the UI without blocking | |
} | |
} |
This file contains hidden or 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
// | |
// HowToGoViewController.swift | |
// Test | |
// | |
// Created by Haydar Karkin on 5.06.2015. | |
// Copyright (c) 2015 Haydar Karkin. All rights reserved. | |
// | |
import UIKit | |
import MapKit |