Skip to content

Commit

Permalink
bleh
Browse files Browse the repository at this point in the history
  • Loading branch information
psobot committed Jun 25, 2015
1 parent 861ad5c commit 24d144e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Hangover UI Sandbox/Base.lproj/Main.storyboard
Expand Up @@ -679,7 +679,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowSizeStyle="automatic" viewBased="YES" id="595-DV-qj4">
<rect key="frame" x="0.0" y="0.0" width="578" height="270"/>
<rect key="frame" x="0.0" y="0.0" width="576" height="0.0"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down
7 changes: 4 additions & 3 deletions Hangover UI Sandbox/SandboxViewController.swift
Expand Up @@ -13,10 +13,11 @@ class SandboxViewController: NSViewController, NSTableViewDataSource, NSTableVie
@IBOutlet weak var conversationTableView: NSTableView!

let messages = [
// ("Oh hey, person number 1.", ChatMessageView.Orientation.Left),
// ("Hey person number 2, what's up?", ChatMessageView.Orientation.Right),
// ("Not all that much, just testing out this chat client.", ChatMessageView.Orientation.Left),
("Oh hey, person number 1.", ChatMessageView.Orientation.Left),
("Hey person number 2, what's up?", ChatMessageView.Orientation.Right),
("Not all that much, just testing out this chat client.", ChatMessageView.Orientation.Left),
("Coooooooooool beans. Will this longer message wrap onto multiple lines and possibly cause any issues?", ChatMessageView.Orientation.Right),
("Here's an emoji: 😄.", ChatMessageView.Orientation.Left),
]

override func viewDidAppear() {
Expand Down
4 changes: 3 additions & 1 deletion Hangover/NSView.swift
Expand Up @@ -14,7 +14,9 @@ extension NSView {
let nibName = T.className().componentsSeparatedByString(".").last
if NSBundle.mainBundle().loadNibNamed(nibName!, owner: owner, topLevelObjects: &objects) {
if let objects = objects {
return objects.filter { $0 is T }.map { $0 as! T }.filter { $0.identifier == identifier }.first
let candidate = objects.filter { $0 is T }.map { $0 as! T }.filter { $0.identifier == identifier }.first
assert(candidate != nil, "Could not find view with identifier \(identifier) in \(nibName).xib.")
return candidate
}
}
assert(false, "Could not find view with identifier \(identifier) in \(nibName).xib.")
Expand Down

0 comments on commit 24d144e

Please sign in to comment.