Skip to content
Browse files

now with shiny date-view component

  • Loading branch information...
1 parent cc0e41c commit f1642d10bd4898d015e08ceace3c5e29da43c603 @ConradIrwin committed Nov 20, 2011
View
10 Airpad.xcodeproj/project.pbxproj
@@ -52,6 +52,8 @@
CE5210F9146F422F00EAF9F9 /* DGSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = CE5210C9146F422E00EAF9F9 /* DGSwitch.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
CE521111146F422F00EAF9F9 /* slider.png in Resources */ = {isa = PBXBuildFile; fileRef = CE5210F8146F422E00EAF9F9 /* slider.png */; };
CE9026901470CB02005070F7 /* AirbrakeView.m in Sources */ = {isa = PBXBuildFile; fileRef = CE90268F1470CB02005070F7 /* AirbrakeView.m */; };
+ CEA677991477A9CE00D39569 /* AirbrakeDateView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEA677981477A9CE00D39569 /* AirbrakeDateView.m */; };
+ CEA677A51478867E00D39569 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEA677A41478867E00D39569 /* QuartzCore.framework */; };
CEB9A64A146D08D6008901DB /* AirbrakeModel.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = CEB9A648146D08D6008901DB /* AirbrakeModel.xcdatamodeld */; };
CEC44B86146F568D000CB29D /* DataTableDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CEC44B85146F568D000CB29D /* DataTableDelegate.m */; };
CEC636DB146CF7FE0036FA02 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC636DA146CF7FE0036FA02 /* UIKit.framework */; };
@@ -158,6 +160,9 @@
CE521112146F424000EAF9F9 /* DGSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DGSwitch.h; sourceTree = "<group>"; };
CE90268E1470CB02005070F7 /* AirbrakeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AirbrakeView.h; sourceTree = "<group>"; };
CE90268F1470CB02005070F7 /* AirbrakeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AirbrakeView.m; sourceTree = "<group>"; };
+ CEA677971477A9CE00D39569 /* AirbrakeDateView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AirbrakeDateView.h; sourceTree = "<group>"; };
+ CEA677981477A9CE00D39569 /* AirbrakeDateView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AirbrakeDateView.m; sourceTree = "<group>"; };
+ CEA677A41478867E00D39569 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
CEB9A649146D08D6008901DB /* AirbrakeModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = AirbrakeModel.xcdatamodel; sourceTree = "<group>"; };
CEC44B84146F568D000CB29D /* DataTableDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataTableDelegate.h; sourceTree = "<group>"; };
CEC44B85146F568D000CB29D /* DataTableDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataTableDelegate.m; sourceTree = "<group>"; };
@@ -185,6 +190,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ CEA677A51478867E00D39569 /* QuartzCore.framework in Frameworks */,
CE00EA8F146CF9D4004AB0EC /* MessageUI.framework in Frameworks */,
CEC636DB146CF7FE0036FA02 /* UIKit.framework in Frameworks */,
CEC636DD146CF7FE0036FA02 /* Foundation.framework in Frameworks */,
@@ -304,6 +310,8 @@
CE5210C9146F422E00EAF9F9 /* DGSwitch.m */,
CE521112146F424000EAF9F9 /* DGSwitch.h */,
CE5210F8146F422E00EAF9F9 /* slider.png */,
+ CEA677971477A9CE00D39569 /* AirbrakeDateView.h */,
+ CEA677981477A9CE00D39569 /* AirbrakeDateView.m */,
CEC44B84146F568D000CB29D /* DataTableDelegate.h */,
CEC44B85146F568D000CB29D /* DataTableDelegate.m */,
CE00E9F6146CF876004AB0EC /* AirbrakeDetailView.xib */,
@@ -387,6 +395,7 @@
CEC636D9146CF7FE0036FA02 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ CEA677A41478867E00D39569 /* QuartzCore.framework */,
CE00EA8E146CF9D4004AB0EC /* MessageUI.framework */,
CEC636DA146CF7FE0036FA02 /* UIKit.framework */,
CEC636DC146CF7FE0036FA02 /* Foundation.framework */,
@@ -596,6 +605,7 @@
CE5210F9146F422F00EAF9F9 /* DGSwitch.m in Sources */,
CEC44B86146F568D000CB29D /* DataTableDelegate.m in Sources */,
CE9026901470CB02005070F7 /* AirbrakeView.m in Sources */,
+ CEA677991477A9CE00D39569 /* AirbrakeDateView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
17 Airpad/AirbrakeDateView.h
@@ -0,0 +1,17 @@
+//
+// AirbrakeDateView.h
+// Airpad
+//
+// Created by Conrad Irwin on 19/11/2011.
+// Copyright (c) 2011 Rapportive. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <QuartzCore/QuartzCore.h>
+
+@interface AirbrakeDateView : UIView
+@property (nonatomic, strong) NSDate *startDate;
+@property (nonatomic, strong) NSDate *endDate;
+@property (nonatomic, assign) NSInteger count;
+
+@end
View
209 Airpad/AirbrakeDateView.m
@@ -0,0 +1,209 @@
+//
+// AirbrakeDateView.m
+// Airpad
+//
+// Created by Conrad Irwin on 19/11/2011.
+// Copyright (c) 2011 Rapportive. All rights reserved.
+//
+
+#import "AirbrakeDateView.h"
+#import "NSDate+DateISOParser.h"
+
+#define DAYS_TO_SHOW 35
+
+@implementation AirbrakeDateView
+@synthesize startDate;
+@synthesize endDate;
+@synthesize count;
+
+- (id)initWithFrame:(CGRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+ // Initialization code
+ }
+ return self;
+}
+
+- (bool) isWeekend:(NSDate*)date
+{
+ NSCalendar *cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
+ NSDateComponents *day = [cal components:NSWeekdayCalendarUnit fromDate: date];
+ return ([day weekday] == 1 || [day weekday] == 7);
+}
+
+- (UIFont*)font
+{
+ return [UIFont systemFontOfSize:12];
+}
+
+- (NSString*) formatDate:(NSDate*)date
+{
+ NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
+ [fmt setDateFormat: @"d MMM HH:mm"];
+ return[fmt stringFromDate:date];
+}
+- (NSString*) getYear:(NSDate*) date
+{
+ NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
+ [fmt setDateFormat: @"Y"];
+ return [fmt stringFromDate:date];
+}
+
+- (CGFloat) dayOffset
+{
+ NSCalendar *cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
+ NSDateComponents *day = [cal components:NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit fromDate: [NSDate date]];
+ return (((day.hour * 60.0) + day.minute) * 60.0 + day.second) / 86400.0;
+}
+
+- (NSDate*) startOfLine
+{
+ return [NSDate dateWithTimeInterval: 0 - (DAYS_TO_SHOW * 86400.0) sinceDate:[NSDate date]];
+}
+
+- (bool) date:(NSDate*)date isSameTime:(NSDate*)other
+{
+ return [[self formatDate:date] isEqualToString: [self formatDate: other]];
+}
+
+- (bool) date:(NSDate*)date isSameDate:(NSDate*)other
+{
+ NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
+ [fmt setDateFormat: @"d mmm Y"];
+ return [[fmt stringFromDate:date] isEqualToString: [fmt stringFromDate:other]];
+}
+
+- (NSString*) countFormatted
+{
+ if (self.count == 1) {
+ return @"(once only)";
+ } else if (self.count == 2) {
+ return @"(twice only)";
+ } else {
+ return [NSString stringWithFormat:@"(%i times)", count];
+ }
+}
+
+// Only override drawRect: if you perform custom drawing.
+// An empty implementation adversely affects performance during animation.
+- (void)drawRect:(CGRect)rect
+{
+ [super drawRect:rect];
+ CGContextRef con = UIGraphicsGetCurrentContext();
+ NSDate* startOfLine = [self startOfLine];
+ CGFloat mid = [self frame].size.height * 2.5 / 4.0;
+ CGFloat prehistoryDistance = 16.0;
+ CGFloat padding = 85.0; // Enough space for a dashWidth and date to appear on the right-hand-side of the line.
+ CGFloat day = ([self frame].size.width - 2.0 * padding - prehistoryDistance) / (DAYS_TO_SHOW);
+ CGFloat offset = padding + prehistoryDistance + day * (1.0 - [self dayOffset]);
+ CGFloat dashTop = [self frame].size.height / 4.0;
+ CGFloat dashWidth = day / 3.0;
+ CGFloat weekBottom = [self frame].size.height * 6.0 / 8.0;
+ CGFloat weekendBottom = [self frame].size.height;
+ CGFloat bottom;
+
+ // Draw: the horizontal line
+ CGContextMoveToPoint(con, padding + prehistoryDistance, mid);
+ CGContextAddLineToPoint(con, [self frame].size.width - padding, mid);
+
+ // Draw: the per-day ticks
+ for(NSInteger i = 0; i < DAYS_TO_SHOW; i++) {
+ NSDate *date = [NSDate dateWithTimeInterval: ((i + 1) * 86400.0) sinceDate:startOfLine];
+ if ([self isWeekend: date]) {
+ bottom = weekendBottom;
+ } else {
+ bottom = weekBottom;
+ }
+ CGContextMoveToPoint(con, i * day + offset, mid);
+ CGContextAddLineToPoint(con, i * day + offset, bottom);
+ }
+
+ CGContextSetLineWidth(con, 0.5);
+ CGContextStrokePath(con);
+
+ // Draw: the dotted prehistory line at the front
+ CGContextMoveToPoint(con, padding, mid);
+ CGContextAddLineToPoint(con, padding + prehistoryDistance, mid);
+ CGFloat dashes[] = {2.0, 2.0};
+ CGContextSetLineDash(con, 0.0, dashes, 2);
+ CGContextSetLineWidth(con, 0.5);
+ CGContextStrokePath(con);
+ CGContextSetLineDash(con, 0.0, NULL, 0);
+
+ if (!startDate || !endDate) {
+ return;
+ }
+
+ // Draw: The upwards dash for start, with label
+ CGFloat startDistance = MAX(padding, padding + prehistoryDistance + day * ([startDate timeIntervalSinceDate:startOfLine] / 86400.0));
+ NSString* startFormatted = [self formatDate: startDate];
+ CGSize startSize = [startFormatted sizeWithFont:[self font]];
+
+ CGContextMoveToPoint(con, startDistance, mid);
+ CGContextAddLineToPoint(con, startDistance, dashTop);
+ CGContextAddLineToPoint(con, startDistance - dashWidth, dashTop);
+ [startFormatted drawInRect:CGRectMake(startDistance - dashWidth - startSize.width - 5.0, 0.0, startSize.width, startSize.height) withFont:[self font]];
+
+ if (startDistance <= padding + prehistoryDistance) {
+ NSString *year = [self getYear: endDate];
+ CGSize yearSize = [year sizeWithFont:[self font]];
+ [year drawInRect: CGRectMake(startDistance - dashWidth - 5.0 - (startSize.width + yearSize.width) / 2.0, startSize.height, yearSize.width, yearSize.height) withFont:[self font]];
+ }
+
+ // Draw: the upwards dash for end, with label
+ CGFloat endDistance = MAX(padding, padding + prehistoryDistance + day * ([endDate timeIntervalSinceDate:startOfLine] / 86400.0));
+ NSString *endFormatted;
+
+ if ([self date:startDate isSameTime:endDate]) {
+ endFormatted = [self countFormatted];
+ } else {
+ endFormatted = [self formatDate: endDate];
+ }
+ CGSize endSize = [endFormatted sizeWithFont:[self font]];
+ CGContextMoveToPoint(con, endDistance, mid);
+ CGContextAddLineToPoint(con, endDistance, dashTop);
+ CGContextAddLineToPoint(con, endDistance + dashWidth, dashTop);
+ [endFormatted drawInRect:CGRectMake(endDistance + dashWidth + 5.0, 0.0, endSize.width, endSize.height) withFont:[self font]];
+
+
+ // Draw: the occurance rate.
+ if ([self count] > 1 && ![self date:startDate isSameTime:endDate]) {
+ NSString *rateString;
+ if ([self count] == 2) {
+ rateString = @"(twice only)";
+ } else if ([self date:startDate isSameDate: endDate]) {
+ rateString = [NSString stringWithFormat: @"(%i times)", count];
+ } else {
+ rateString = [NSString stringWithFormat: @"(%i times, %0.2f/day)", count, count * 86400.0 / ([endDate timeIntervalSinceDate:startDate]) ];
+ }
+
+ CGSize rateSize = [rateString sizeWithFont: [self font]];
+
+ CGFloat midSpace = endDistance - startDistance;
+ CGFloat leftSpace = startDistance - startSize.width;
+ CGFloat rightSpace = self.frame.size.width - endDistance - endSize.width;
+ CGFloat ratePosition;
+
+ // Position the rate label, either
+ // 1. In the middle if it fits (for awesomeness)
+ // 2. To the left or right, whichever there's more space (if it fits)
+ // 3. In¡ the middle if it doesn't fit anywhere, for symetrical disaster.
+ if (rateSize.width + 10.0 < midSpace) {
+ ratePosition = startDistance + (midSpace - rateSize.width) / 2.0;
+ } else if (rateSize.width + 10.0 < leftSpace && leftSpace >= rightSpace) {
+ ratePosition = (leftSpace - rateSize.width) / 2.0;
+ } else if (rateSize.width + 10.0 < rightSpace) {
+ ratePosition = endDistance + (rightSpace - rateSize.width) / 2.0;
+ } else {
+ ratePosition = startDistance + (midSpace - rateSize.width) / 2.0;
+ }
+
+ [rateString drawInRect:CGRectMake(ratePosition, 0.0, rateSize.width, rateSize.height) withFont:[self font]];
+ }
+
+ CGContextSetLineWidth(con, 0.5);
+ CGContextStrokePath(con);
+}
+
+@end
View
199 Airpad/AirbrakeDetailView.xib
@@ -45,12 +45,13 @@
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{703, 197}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="505842771"/>
<string key="NSReuseIdentifierKey">_NS:212</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace">
+ <object class="NSColorSpace" key="NSCustomColorSpace" id="283029389">
<int key="NSID">2</int>
</object>
</object>
@@ -65,6 +66,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{248, 8}, {207, 30}}</string>
<reference key="NSSuperview" ref="505842771"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="132950111"/>
<string key="NSReuseIdentifierKey">_NS:289</string>
<bool key="IBUIOpaque">NO</bool>
@@ -96,6 +98,7 @@
</array>
<string key="NSFrameSize">{703, 44}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="838818495"/>
<string key="NSReuseIdentifierKey">_NS:372</string>
<bool key="IBUIOpaque">NO</bool>
@@ -136,6 +139,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{23, 56}, {548, 93}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="765046713"/>
<string key="NSReuseIdentifierKey">_NS:345</string>
<bool key="IBUIOpaque">NO</bool>
@@ -144,7 +148,7 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">Label</string>
- <object class="NSColor" key="IBUITextColor" id="146766628">
+ <object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
@@ -163,39 +167,13 @@
<int key="NSfFlags">16</int>
</object>
</object>
- <object class="IBUILabel" id="10598196">
- <reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 157}, {663, 35}}</string>
- <reference key="NSSuperview" ref="191373211"/>
- <reference key="NSNextKeyView" ref="1065586996"/>
- <string key="NSReuseIdentifierKey">_NS:345</string>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
- <int key="IBUIContentMode">7</int>
- <bool key="IBUIUserInteractionEnabled">NO</bool>
- <string key="targetRuntimeIdentifier">IBIPadFramework</string>
- <string key="IBUIText">Label</string>
- <reference key="IBUITextColor" ref="146766628"/>
- <nil key="IBUIHighlightedColor"/>
- <int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">10</float>
- <object class="IBUIFontDescription" key="IBUIFontDescription">
- <int key="type">1</int>
- <double key="pointSize">17</double>
- </object>
- <object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">17</double>
- <int key="NSfFlags">16</int>
- </object>
- </object>
<object class="IBUIView" id="765046713">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{579, 64}, {103, 27}}</string>
<reference key="NSSuperview" ref="191373211"/>
- <reference key="NSNextKeyView" ref="10598196"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:212</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -208,6 +186,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{15, 193}, {688, 575}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:640</string>
<object class="NSColor" key="IBUIBackgroundColor">
@@ -241,6 +220,7 @@
<int key="NSvFlags">274</int>
<string key="NSFrame">{{0, 193}, {703, 575}}</string>
<reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="677071853"/>
<string key="NSReuseIdentifierKey">_NS:408</string>
<bool key="IBUIClipsSubviews">YES</bool>
@@ -254,9 +234,25 @@
<float key="IBUISectionHeaderHeight">10</float>
<float key="IBUISectionFooterHeight">10</float>
</object>
+ <object class="IBUIView" id="842627445">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{7, 155}, {689, 28}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="1065586996"/>
+ <string key="NSReuseIdentifierKey">_NS:212</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <reference key="NSCustomColorSpace" ref="283029389"/>
+ </object>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
</array>
<string key="NSFrameSize">{703, 768}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="928114621"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@@ -326,14 +322,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">occurrenceLabel</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="10598196"/>
- </object>
- <int key="connectionID">17</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">titleLabel</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="132950111"/>
@@ -365,6 +353,14 @@
<int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">dateView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="842627445"/>
+ </object>
+ <int key="connectionID">50</int>
+ </object>
+ <object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">projectsClicked:</string>
<reference key="source" ref="870237916"/>
@@ -412,12 +408,12 @@
<reference key="object" ref="191373211"/>
<array class="NSMutableArray" key="children">
<reference ref="765046713"/>
- <reference ref="10598196"/>
<reference ref="505842771"/>
<reference ref="132950111"/>
<reference ref="1065586996"/>
<reference ref="677071853"/>
<reference ref="928114621"/>
+ <reference ref="842627445"/>
</array>
<reference key="parent" ref="0"/>
</object>
@@ -455,11 +451,6 @@
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">13</int>
- <reference key="object" ref="10598196"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="132950111"/>
<reference key="parent" ref="191373211"/>
@@ -509,6 +500,11 @@
<reference key="object" ref="870237916"/>
<reference key="parent" ref="505842771"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">48</int>
+ <reference key="object" ref="842627445"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -518,7 +514,6 @@
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="13.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="20.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -532,15 +527,125 @@
<string key="42.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="47.CustomClassName">AirbrakeView</string>
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="48.CustomClassName">AirbrakeDateView</string>
+ <string key="48.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">47</int>
+ <int key="maxID">50</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">AirbrakeDateView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/AirbrakeDateView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">AirbrakeDetailViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <dictionary class="NSMutableDictionary" key="actions">
+ <string key="openClicked:">id</string>
+ <string key="projectsClicked:">id</string>
+ <string key="resolveStateChanged:">id</string>
+ <string key="viewChangerChanged:">id</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="actionInfosByName">
+ <object class="IBActionInfo" key="openClicked:">
+ <string key="name">openClicked:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="projectsClicked:">
+ <string key="name">projectsClicked:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="resolveStateChanged:">
+ <string key="name">resolveStateChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo" key="viewChangerChanged:">
+ <string key="name">viewChangerChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="outlets">
+ <string key="backtraceText">UITextView</string>
+ <string key="dataTable">UITableView</string>
+ <string key="dateView">AirbrakeDateView</string>
+ <string key="occurrenceLabel">UILabel</string>
+ <string key="projectMenuButton">UIBarButtonItem</string>
+ <string key="resolveSlider">DGSwitch</string>
+ <string key="titleLabel">UILabel</string>
+ <string key="toolbar">UIToolbar</string>
+ <string key="viewChanger">UISegmentedControl</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="backtraceText">
+ <string key="name">backtraceText</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dataTable">
+ <string key="name">dataTable</string>
+ <string key="candidateClassName">UITableView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="dateView">
+ <string key="name">dateView</string>
+ <string key="candidateClassName">AirbrakeDateView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="occurrenceLabel">
+ <string key="name">occurrenceLabel</string>
+ <string key="candidateClassName">UILabel</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="projectMenuButton">
+ <string key="name">projectMenuButton</string>
+ <string key="candidateClassName">UIBarButtonItem</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="resolveSlider">
+ <string key="name">resolveSlider</string>
+ <string key="candidateClassName">DGSwitch</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="titleLabel">
+ <string key="name">titleLabel</string>
+ <string key="candidateClassName">UILabel</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="toolbar">
+ <string key="name">toolbar</string>
+ <string key="candidateClassName">UIToolbar</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="viewChanger">
+ <string key="name">viewChanger</string>
+ <string key="candidateClassName">UISegmentedControl</string>
+ </object>
+ </dictionary>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/AirbrakeDetailViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">AirbrakeView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/AirbrakeView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">DGSwitch</string>
+ <string key="superclassName">UIControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/DGSwitch.h</string>
+ </object>
+ </object>
+ </array>
</object>
- <object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
View
2 Airpad/AirbrakeDetailViewController.h
@@ -13,6 +13,7 @@
#import "AirbrakeListViewController.h"
#import "DGSwitch.h"
#import "DataTableDelegate.h"
+#import "AirbrakeDateView.h"
@interface AirbrakeDetailViewController : UIViewController <UISplitViewControllerDelegate, UIPopoverControllerDelegate>
@property (weak, nonatomic) IBOutlet UITableView *dataTable;
@@ -24,6 +25,7 @@
@property (weak, nonatomic) AirbrakeListViewController* listView;
@property (weak, nonatomic) IBOutlet UISegmentedControl *viewChanger;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *projectMenuButton;
+@property (weak, nonatomic) IBOutlet AirbrakeDateView *dateView;
@property (nonatomic, strong) DataTableDelegate *dataTableDelegate;
@property (nonatomic, strong) AirbrakeUser* user;
View
6 Airpad/AirbrakeDetailViewController.m
@@ -22,6 +22,7 @@ @implementation AirbrakeDetailViewController {
@synthesize occurrenceLabel;
@synthesize backtraceText;
@synthesize projectMenuButton;
+@synthesize dateView;
@synthesize listView;
@synthesize viewChanger;
@@ -100,6 +101,7 @@ - (void)viewDidUnload
[self setResolveSlider:nil];
[self setDataTable:nil];
[self setViewChanger:nil];
+ [self setDateView:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
@@ -190,6 +192,10 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
[resolveSlider setOn: [user.currentAirbrake.isResolved boolValue]];
[titleLabel setText: user.currentAirbrake.errorMessage];
[occurrenceLabel setText: [self occurrenceDescription]];
+ [dateView setStartDate: user.currentAirbrake.earliestSeenAt];
+ [dateView setEndDate: user.currentAirbrake.latestSeenAt];
+ [dateView setCount: [user.currentAirbrake.noticesCount integerValue]];
+ [dateView setNeedsDisplay];
[dataTable reloadData];
} else if (context == @"projectFilter") {
View
2 Airpad/Airpad-Info.plist
@@ -11,7 +11,7 @@
<key>CFBundleIconFiles</key>
<array/>
<key>CFBundleIdentifier</key>
- <string>com.jelzo.test.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>com.rapportive.conrad.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

0 comments on commit f1642d1

Please sign in to comment.
Something went wrong with that request. Please try again.