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 Document { | |
var count: Int? | |
let item: Int | |
let pag: Paragraph | |
init(media: Media, pag: Paragraph) { | |
self.item = 1 | |
self.pag = pag | |
File().open() |
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
protocol NotificationKey: RawRepresentable, CustomStringConvertible {} | |
protocol NotificationCenterAbility { | |
associatedtype T: NotificationKey | |
static var center: NSNotificationCenter { get } | |
static func post(key: T, object: AnyObject?, userInfo: [NSObject : AnyObject]?) | |
} | |
extension NotificationCenterAbility { | |
static var center: NSNotificationCenter { |
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
struct ViewModel { | |
subscript(tasteButton: TasteButton) -> Bool { | |
get { | |
guard let status = tasteList[tasteButton.rawValue] else { | |
return false | |
} | |
return status | |
} | |
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
struct Constants {} | |
private extension Constants { | |
struct UserDefault { | |
static let AllergiesList = "..." | |
} | |
} |
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 | |
/** | |
How to use it | |
```` | |
AlertView | |
.alert("Are you sure?", message: "Send this message to your friend") | |
.will("OK") { | |
// Do something because User choose OK | |
} |
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 UITableView { | |
/** | |
Use it as a trick to remove the separator lines of blank cells at the bottom of tableView. | |
*/ | |
func removeBottomSeparatorLine() { | |
tableFooterView = UIView(frame: CGRect.zero) | |
} | |
func scrollToLastRowOfSection(section: Int, atScrollPosition: UITableViewScrollPosition = .Top, animated: Bool = false) { |
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
{ | |
"expand": "renderedFields,names,schema,transitions,operations,editmeta,changelog,versionedRepresentations", | |
"id": "10002", | |
"self": "http://www.example.com/jira/rest/api/2/issue/10002", | |
"key": "EX-1", | |
"fields": { | |
"watcher": { | |
"self": "http://www.example.com/jira/rest/api/2/issue/EX-1/watchers", | |
"isWatching": false, | |
"watchCount": 1, |
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 FLAnimatedImage | |
extension FLAnimatedImage { | |
/** | |
Provide only the name of gif file. | |
IMPORTANT: The file MUST have extension as "gif". | |
*/ | |
convenience init(withGIFName fileName: 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
import UIKit | |
import FLAnimatedImage | |
extension FLAnimatedImage { | |
/** | |
Init with the GIF file in your mainBundle. | |
*/ | |
convenience init?(withGIFName fileName: String) { | |
guard |
NewerOlder