Skip to content

Instantly share code, notes, and snippets.

@reklis
Created February 11, 2013 15:45
Show Gist options
  • Save reklis/4755223 to your computer and use it in GitHub Desktop.
Save reklis/4755223 to your computer and use it in GitHub Desktop.
Countdown View using FlipCounter
#import <UIKit/UIKit.h>
#import "FlipCounterView.h"
void SplitTimeIntervalIntoComponents(NSTimeInterval t, int* hours, int* minutes, int* seconds);
@protocol CountdownViewDelegate;
@interface CountdownView : UIView
{
@private
FlipCounterView* hoursCounter;
FlipCounterView* minutesCounter;
FlipCounterView* secondsCounter;
NSTimer* timer;
}
@property (retain, nonatomic) IBOutlet UILabel *leftColon;
@property (retain, nonatomic) IBOutlet UILabel *rightColon;
@property (retain, nonatomic) IBOutlet UIActivityIndicatorView *spinner;
@property (retain, nonatomic) IBOutlet UILabel *hoursLabel;
@property (retain, nonatomic) IBOutlet UILabel *minutesLabel;
@property (retain, nonatomic) IBOutlet UILabel *secondsLabel;
@property (retain, nonatomic) IBOutlet UIButton *cancelButton;
@property (readwrite,nonatomic,assign) id<CountdownViewDelegate> delegate;
@property (readwrite,nonatomic,retain) NSDate* targetDate;
- (void) countdownTo:(NSDate*)date;
- (void) tick:(NSTimer*)t;
- (IBAction) cancel:(id)sender;
@end
@protocol CountdownViewDelegate <NSObject>
@optional
- (BOOL) countdownViewShouldDisplayCancel:(CountdownView*)countdown;
- (void) countdownViewDidComplete:(CountdownView*)countdown;
- (void) countdownViewDidCancel:(CountdownView*)countdown;
- (NSDate*) currentDateForCountdownView:(CountdownView*)countdown;
@end
#import "CountdownView.h"
#import "TestFlight.h"
inline void SplitTimeIntervalIntoComponents(NSTimeInterval t, int* hours, int* minutes, int* seconds)
{
NSTimeInterval minutesLeft = t / 60;
NSTimeInterval hoursLeft = minutesLeft / 60;
*hours = floor(hoursLeft);
*minutes = floor(minutesLeft - (floor(hoursLeft)*60));
*seconds = floor(t - (floor(minutesLeft)*60));
}
@interface CountdownView(Private)
- (void) initializeDigits;
- (void) signalDone;
- (void) displayCancelButton;
- (void) startTimer;
- (NSDate*) coordinatedDate;
@end
@implementation CountdownView
@synthesize leftColon;
@synthesize rightColon;
@synthesize spinner;
@synthesize hoursLabel;
@synthesize minutesLabel;
@synthesize secondsLabel;
@synthesize cancelButton;
@synthesize delegate;
@synthesize targetDate;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
}
return self;
}
- (void)dealloc {
[timer release];
[targetDate release];
[hoursCounter release];
[minutesCounter release];
[secondsCounter release];
[cancelButton release];
[hoursLabel release];
[minutesLabel release];
[secondsLabel release];
[spinner release];
[rightColon release];
[leftColon release];
[super dealloc];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
// Drawing code
}
*/
- (void)initializeDigits
{
CGSize s = [FlipCounterView sizeForNumberOfDigits:2];
if (hoursCounter) {
[hoursCounter removeFromSuperview];
[hoursCounter release];
hoursCounter = nil;
}
hoursCounter = [[FlipCounterView alloc] initWithFrame:CGRectMake(50, 180, s.width, s.height)];
[hoursCounter add:10 animated:NO];
[hoursCounter subtract:10 animated:NO];
[hoursCounter setAlpha:0];
[self addSubview:hoursCounter];
if (minutesCounter) {
[minutesCounter removeFromSuperview];
[minutesCounter release];
minutesCounter = nil;
}
minutesCounter = [[FlipCounterView alloc] initWithFrame:CGRectMake(195, 180, s.width, s.height)];
[minutesCounter add:10 animated:NO];
[minutesCounter subtract:10 animated:NO];
[minutesCounter setAlpha:0];
[self addSubview:minutesCounter];
if (secondsCounter) {
[secondsCounter removeFromSuperview];
[secondsCounter release];
secondsCounter = nil;
}
secondsCounter = [[FlipCounterView alloc] initWithFrame:CGRectMake(345, 180, s.width, s.height)];
[secondsCounter add:10 animated:NO];
[secondsCounter subtract:10 animated:NO];
[secondsCounter setAlpha:0];
[self addSubview:secondsCounter];
[UIView animateWithDuration:.25
animations:^{
[hoursLabel setAlpha:1];
[hoursCounter setAlpha:1];
[minutesLabel setAlpha:1];
[minutesCounter setAlpha:1];
[secondsLabel setAlpha:1];
[secondsCounter setAlpha:1];
[leftColon setAlpha:1];
[rightColon setAlpha:1];
} completion:^(BOOL finished) {
[spinner stopAnimating];
}];
}
- (void) countdownTo:(NSDate*)date
{
[TestFlight passCheckpoint:@"Countdown"];
[self initializeDigits];
[self displayCancelButton];
self.targetDate = date;
[self startTimer];
}
- (void)startTimer
{
int h;
int m;
int s;
SplitTimeIntervalIntoComponents([self.targetDate timeIntervalSinceDate:[self coordinatedDate]], &h, &m, &s);
[hoursCounter add:h animated:YES];
[minutesCounter add:m animated:YES];
[secondsCounter add:s animated:YES];
if (timer) {
[timer invalidate];
[timer release];
timer = nil;
}
timer = [[NSTimer alloc] initWithFireDate:[NSDate date]
interval:1
target:self
selector:@selector(tick:)
userInfo:nil
repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:timer
forMode:NSRunLoopCommonModes];
}
- (void)tick:(NSTimer *)t
{
NSTimeInterval secondsLeft = [self.targetDate timeIntervalSinceDate:[self coordinatedDate]];
int h;
int m;
int s;
SplitTimeIntervalIntoComponents(secondsLeft, &h, &m, &s);
int hCV = hoursCounter.counterValue;
if (0 != hCV) {
int hD = hCV - h;
if (hD > 0) {
[hoursCounter subtract:hD animated:YES];
[minutesCounter add:59 animated:YES];
}
}
int mCV = minutesCounter.counterValue;
if (0 != mCV) {
int mD = mCV - m;
if (mD > 0) {
[minutesCounter subtract:mD animated:YES];
[secondsCounter add:59 animated:YES];
}
}
int sD = secondsCounter.counterValue - s;
if (sD > 0) {
[secondsCounter subtract:sD animated:YES];
}
if (secondsLeft <= 0) {
[timer invalidate];
[timer release];
timer = nil;
[self signalDone];
}
}
- (NSDate *)coordinatedDate
{
if ([self.delegate respondsToSelector:@selector(currentDateForCountdownView:)]) {
return [self.delegate currentDateForCountdownView:self];
} else {
return [NSDate date];
}
}
- (void)displayCancelButton
{
if ([self.delegate respondsToSelector:@selector(countdownViewShouldDisplayCancel:)]) {
BOOL enable = [self.delegate countdownViewShouldDisplayCancel:self];
[self.cancelButton setHidden:!enable];
} else {
[self.cancelButton setHidden:YES];
}
}
- (IBAction)cancel:(id)sender {
[timer invalidate];
[timer release];
timer = nil;
if ([self.delegate respondsToSelector:@selector(countdownViewDidCancel:)]) {
[self.delegate countdownViewDidCancel:self];
}
}
- (void)signalDone
{
if ([self.delegate respondsToSelector:@selector(countdownViewDidComplete:)]) {
[self.delegate countdownViewDidComplete:self];
}
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1072</int>
<string key="IBDocument.SystemVersion">10K549</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1038.36</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">933</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBUIActivityIndicatorView</string>
<string>IBUIButton</string>
<string>IBUIImageView</string>
<string>IBUIView</string>
<string>IBUILabel</string>
<string>IBProxyObject</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</array>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="IBUIImageView" id="529036807">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{493, 389}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="239275259"/>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">dialog-bg.png</string>
</object>
</object>
<object class="IBUIImageView" id="933416565">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 149}, {173, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="373673563"/>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">dialog-debate-begins-in.png</string>
</object>
</object>
<object class="IBUILabel" id="239275259">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{9, 81}, {474, 52}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="933416565"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwLjI1AA</bytes>
</object>
<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 type="base64-UTF8" key="IBUIText">U2VlIHRoZSBhdWRpZW5jZSBvcGlvbmlvbiBpbiByZWFsLXRpbWUKRWxlY3Rpb25NZXRlciBnb2VzIE9O
IHdoZW4gdGhlIGRlYmF0ZSBzdGFydHM</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">headerColor</string>
<object class="NSColor" key="NSColor" id="526176308">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">2</int>
<int key="IBUITextAlignment">1</int>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">14</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">14</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="530053781">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{70, 273}, {62, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="971856847"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<float key="IBUIAlpha">0.0</float>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">HOURS</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
<object class="NSColorSpace" key="NSCustomColorSpace" id="571003354">
<int key="NSID">1</int>
</object>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">1</int>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="786924395">
<int key="type">2</int>
<double key="pointSize">12</double>
</object>
<object class="NSFont" key="IBUIFont" id="430187185">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">12</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="971856847">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{208, 273}, {77, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1015907800"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<float key="IBUIAlpha">0.0</float>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">MINUTES</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
<reference key="NSCustomColorSpace" ref="571003354"/>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">1</int>
<reference key="IBUIFontDescription" ref="786924395"/>
<reference key="IBUIFont" ref="430187185"/>
</object>
<object class="IBUILabel" id="1015907800">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{358, 273}, {85, 21}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="386594760"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<float key="IBUIAlpha">0.0</float>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">SECONDS</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
<reference key="NSCustomColorSpace" ref="571003354"/>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">1</int>
<reference key="IBUIFontDescription" ref="786924395"/>
<reference key="IBUIFont" ref="430187185"/>
</object>
<object class="IBUIButton" id="386594760">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">-2147483356</int>
<string key="NSFrame">{{174, 331}, {144, 38}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<reference key="IBUIHighlightedTitleColor" ref="526176308"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleShadowColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
<object class="NSCustomResource" key="IBUINormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">dialog-cancel-button.png</string>
</object>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">2</int>
<double key="pointSize">15</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIActivityIndicatorView" id="349512569">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{228, 207}, {37, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="487496627"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBUIAnimating">YES</bool>
<int key="IBUIStyle">0</int>
</object>
<object class="IBUILabel" id="373673563">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{159, 191}, {27, 60}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="349512569"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<float key="IBUIAlpha">0.0</float>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">:</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
<reference key="NSCustomColorSpace" ref="571003354"/>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">1</int>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="158833828">
<int key="type">1</int>
<double key="pointSize">60</double>
</object>
<object class="NSFont" key="IBUIFont" id="470211166">
<string key="NSName">Helvetica</string>
<double key="NSSize">60</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="487496627">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{309, 191}, {27, 60}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="530053781"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<float key="IBUIAlpha">0.0</float>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<string key="IBUIText">:</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
<reference key="NSCustomColorSpace" ref="571003354"/>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
<float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">1</int>
<reference key="IBUIFontDescription" ref="158833828"/>
<reference key="IBUIFont" ref="470211166"/>
</object>
</array>
<string key="NSFrameSize">{493, 389}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="529036807"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MCAwAA</bytes>
</object>
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
<int key="IBUIInterfaceOrientation">3</int>
<int key="interfaceOrientation">3</int>
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">cancelButton</string>
<reference key="source" ref="191373211"/>
<reference key="destination" ref="386594760"/>
</object>
<int key="connectionID">14</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">hoursLabel</string>
<reference key="source" ref="191373211"/>
<reference key="destination" ref="530053781"/>
</object>
<int key="connectionID">17</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">minutesLabel</string>
<reference key="source" ref="191373211"/>
<reference key="destination" ref="971856847"/>
</object>
<int key="connectionID">18</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">secondsLabel</string>
<reference key="source" ref="191373211"/>
<reference key="destination" ref="1015907800"/>
</object>
<int key="connectionID">19</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">spinner</string>
<reference key="source" ref="191373211"/>
<reference key="destination" ref="349512569"/>
</object>
<int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">rightColon</string>
<reference key="source" ref="191373211"/>
<reference key="destination" ref="487496627"/>
</object>
<int key="connectionID">27</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">leftColon</string>
<reference key="source" ref="191373211"/>
<reference key="destination" ref="373673563"/>
</object>
<int key="connectionID">28</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">cancel:</string>
<reference key="source" ref="386594760"/>
<reference key="destination" ref="191373211"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">13</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1</int>
<reference key="object" ref="191373211"/>
<array class="NSMutableArray" key="children">
<reference ref="529036807"/>
<reference ref="933416565"/>
<reference ref="239275259"/>
<reference ref="530053781"/>
<reference ref="971856847"/>
<reference ref="1015907800"/>
<reference ref="386594760"/>
<reference ref="349512569"/>
<reference ref="373673563"/>
<reference ref="487496627"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="975951072"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="529036807"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">5</int>
<reference key="object" ref="933416565"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="239275259"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="530053781"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="971856847"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="1015907800"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="386594760"/>
<reference key="parent" ref="191373211"/>
<string key="objectName">cancel button</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">16</int>
<reference key="object" ref="349512569"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">22</int>
<reference key="object" ref="373673563"/>
<reference key="parent" ref="191373211"/>
<string key="objectName">left colon</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">23</int>
<reference key="object" ref="487496627"/>
<reference key="parent" ref="191373211"/>
<string key="objectName">right colon</string>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="1.CustomClassName">CountdownView</string>
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="9.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">28</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">CountdownView</string>
<string key="superclassName">UIView</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">cancel:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">cancel:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">cancel:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="cancelButton">UIButton</string>
<string key="hoursLabel">UILabel</string>
<string key="leftColon">UILabel</string>
<string key="minutesLabel">UILabel</string>
<string key="rightColon">UILabel</string>
<string key="secondsLabel">UILabel</string>
<string key="spinner">UIActivityIndicatorView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="cancelButton">
<string key="name">cancelButton</string>
<string key="candidateClassName">UIButton</string>
</object>
<object class="IBToOneOutletInfo" key="hoursLabel">
<string key="name">hoursLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="leftColon">
<string key="name">leftColon</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="minutesLabel">
<string key="name">minutesLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="rightColon">
<string key="name">rightColon</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="secondsLabel">
<string key="name">secondsLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="spinner">
<string key="name">spinner</string>
<string key="candidateClassName">UIActivityIndicatorView</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/CountdownView.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1072" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="dialog-bg.png">{493, 389}</string>
<string key="dialog-cancel-button.png">{144, 38}</string>
<string key="dialog-debate-begins-in.png">{160, 33}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">933</string>
</data>
</archive>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment