Skip to content

Instantly share code, notes, and snippets.

private var messages: [Message] {
return dataStore.messagesForConversation(with: userId)
}
class MessagingViewController: UIViewController {
@IBOutlet private var tableView: UITableView!
@IBOutlet private var messageTextField: UITextView!
/// Assigned by the conversations view controller when the segue in triggered.
var dataSource: MessagingDataSource?
override func viewDidLoad() {
super.viewDidLoad()
@mischa-hildebrand
mischa-hildebrand / Swift Chat - 1 - Podfile.rb
Last active October 14, 2018 22:13
Swift Chat - 1 - Podfile
target 'IntiveChatApp' do
pod 'Starscream', '~> 3.0.2'
end
@mischa-hildebrand
mischa-hildebrand / QueueHandler.swift
Last active September 5, 2017 16:35 — forked from kayoslab/QueueHandler.swift
A simple Generic Queue with different priority Levels
import Foundation
/// Subclass this Class with a non generic Type.
/// - note: Please override the init function with a private
/// access modifactor and create a singleton, so you
/// can ensure that there are no more Queues as you
/// are expecting.
internal class QueueHandler<T> {
private var queues: Set<Queue<T>>
/// Checks if any Queue contains an Element waiting for execution.