Permalink
Browse files

Mid page 151

  • Loading branch information...
1 parent 60a8aac commit c12a58244cc1f9c21bf7818b954597a73b9d86e5 Tammer Saleh committed Jul 22, 2009
View
124 Pickers/Classes/DatePickerView.xib
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
+ <integer value="4"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -39,6 +39,80 @@
<object class="IBUIView" id="31135827">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIDatePicker" id="205755921">
+ <reference key="NSNextResponder" ref="31135827"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 216}</string>
+ <reference key="NSSuperview" ref="31135827"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <object class="NSLocale" key="IBUILocale">
+ <string key="NS.identifier">en_US</string>
+ </object>
+ <object class="NSTimeZone" key="IBUITimeZone">
+ <string key="NS.name">America/Los_Angeles</string>
+ <object class="NSMutableData" key="NS.data">
+ <bytes key="NS.bytes">VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
+y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
+5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
+8n/B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//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA</bytes>
+ </object>
+ </object>
+ <object class="NSDate" key="IBUIDate">
+ <double key="NS.time">2.699987e+08</double>
+ </object>
+ <int key="IBUIMinuteInterval">5</int>
+ <bool key="IBUIHasMinimumDate">YES</bool>
+ <bool key="IBUIHasMaximumDate">YES</bool>
+ </object>
+ <object class="IBUIButton" id="97520859">
+ <reference key="NSNextResponder" ref="31135827"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{119, 308}, {72, 37}}</string>
+ <reference key="NSSuperview" ref="31135827"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">1.500000e+01</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Select</string>
+ <object class="NSColor" key="IBUIHighlightedTitleColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ </object>
+ </object>
<string key="NSFrameSize">{320, 411}</string>
<reference key="NSSuperview" ref="191373211"/>
<object class="NSColor" key="IBUIBackgroundColor">
@@ -72,6 +146,23 @@
</object>
<int key="connectionID">3</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">buttonPressed</string>
+ <reference key="source" ref="97520859"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">datePicker</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="205755921"/>
+ </object>
+ <int key="connectionID">8</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -107,8 +198,23 @@
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="31135827"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="205755921"/>
+ <reference ref="97520859"/>
+ </object>
<reference key="parent" ref="191373211"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="205755921"/>
+ <reference key="parent" ref="31135827"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="97520859"/>
+ <reference key="parent" ref="31135827"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -120,12 +226,16 @@
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
+ <string>5.IBPluginDependency</string>
+ <string>6.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>DatePickerViewController</string>
<string>UIResponder</string>
- <string>{{258, 33}, {320, 480}}</string>
+ <string>{{140, 34}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
@@ -150,14 +260,22 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">4</int>
+ <int key="maxID">8</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">DatePickerViewController</string>
<string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">buttonPressed</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">datePicker</string>
+ <string key="NS.object.0">UIDatePicker</string>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Classes/DatePickerViewController.h</string>
View
5 Pickers/Classes/DatePickerViewController.h
@@ -10,7 +10,10 @@
@interface DatePickerViewController : UIViewController {
-
+ IBOutlet UIDatePicker *datePicker;
}
+@property (nonatomic, retain) UIDatePicker *datePicker;
+-(IBAction)buttonPressed;
+
@end
View
21 Pickers/Classes/DatePickerViewController.m
@@ -11,6 +11,19 @@
@implementation DatePickerViewController
+-(IBAction)buttonPressed {
+ NSDate *selected = [datePicker date];
+ NSString *message = [[NSString alloc] initWithFormat:@"The date and time you selected is: %@", selected];
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Date and Time Selected"
+ message:message
+ delegate:nil
+ cancelButtonTitle:@"Yes, I did."
+ otherButtonTitles:nil];
+ [alert show];
+ [alert release];
+ [message release];
+}
+
/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
@@ -21,12 +34,15 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
}
*/
-/*
+
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
+ NSDate *now = [[NSDate alloc] init];
+ [datePicker setDate:now animated:YES];
+ [now release];
[super viewDidLoad];
}
-*/
+
/*
// Override to allow orientations other than the default portrait orientation.
@@ -50,6 +66,7 @@ - (void)viewDidUnload {
- (void)dealloc {
+ [datePicker release];
[super dealloc];
}

0 comments on commit c12a582

Please sign in to comment.