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 | |
import CoreLocation | |
let beaconManagerDidEnterRegionsNotification = "beaconManagerDidEnterRegionsNotification" | |
let beaconManagerDidExitRegionsNotification = "beaconManagerDidExitRegionsNotification" | |
let beaconManagerUserInfoEnteredRegionsKey = "enteredRegions" | |
let beaconManagerUserInfoExitedRegionsKey = "exitedRegions" | |
class BeaconManager: NSObject, CLLocationManagerDelegate { | |
private var manager = CLLocationManager() |
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
// MARK: - UIImage (Base64 Encoding) | |
public enum ImageFormat { | |
case PNG | |
case JPEG(CGFloat) | |
} | |
extension UIImage { | |
public func base64(format: ImageFormat) -> String { |
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
// | |
// Badge.swift | |
// Extensions for Rounded UILabel and UIButton, Badged UIBarButtonItem. | |
// | |
// Usage: | |
// let label = UILabel(badgeText: "Rounded Label"); | |
// let button = UIButton(type: .System); button.rounded = true | |
// let barButton = UIBarButtonItem(badge: "42", title: "How Many Roads", target: self, action: "answer") | |
// | |
// Created by Yonat Sharon on 06.04.2015. |