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
| func drawHorizontalGradient(over container : UIView, left leftColor: UIColor, right rightColor: UIColor) { | |
| let maskLayer = CAGradientLayer() | |
| maskLayer.colors = [leftColor.CGColor, rightColor.CGColor] | |
| maskLayer.startPoint = CGPointMake(0.0, 0.5) | |
| maskLayer.endPoint = CGPointMake(1.0, 0.5) | |
| maskLayer.bounds = container.bounds | |
| maskLayer.anchorPoint = CGPointZero | |
| container.layer.insertSublayer(maskLayer, atIndex: 0) | |
| } |
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
| // Copyright (c) 2015 Rinat Enikeev | |
| // | |
| // 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 |
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
| 0xDDbd1FF8f241A2b806809741578eFFF029222DCd |
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
| 0xDDbd1FF8f241A2b806809741578eFFF029222DCd |
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: - ImageMessageModel | |
| import Chatto | |
| import ChattoAdditions | |
| protocol ImageMessageModelProtocol: PhotoMessageModelProtocol { | |
| var url: URL? { get set } | |
| } | |
| public class ImageMessageModel: PhotoMessageModel<MessageModel>, ImageMessageModelProtocol { | |
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 UIKit | |
| import BTKit | |
| class ViewController: UITableViewController { | |
| private var ruuviTagsSet = Set<RuuviTag>() | |
| private var ruuviTags = [RuuviTag]() | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |