Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
test for #109
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Sep 26, 2013
1 parent 842e269 commit e7a471e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
14 changes: 12 additions & 2 deletions UI7KitCatalog/Catalog.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4504" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="gKB-bc-ee5">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="gKB-bc-ee5">
<dependencies>
<deployment version="1536" defaultVersion="1280" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3734.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
Expand Down Expand Up @@ -1112,6 +1112,16 @@ Builder</string>
<action selector="toggleShowIndicator:" destination="QVP-Gb-Hwr" eventType="touchUpInside" id="uzm-hc-g8K"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5xI-Lz-Pin">
<rect key="frame" x="40" y="228" width="241" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Select Today">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="selectToday:" destination="QVP-Gb-Hwr" eventType="touchUpInside" id="bJQ-S3-FdN"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
Expand Down
1 change: 1 addition & 0 deletions UI7KitCatalog/UICPickerViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

@property(nonatomic,retain) IBOutlet UIPickerView *pickerView;
- (IBAction)toggleShowIndicator:(id)sender;
- (IBAction)selectToday:(id)sender;

@end
7 changes: 7 additions & 0 deletions UI7KitCatalog/UICPickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ - (void)toggleShowIndicator:(id)sender {
self.pickerView.showsSelectionIndicator = !self.pickerView.showsSelectionIndicator;
}

- (void)selectToday:(id)sender {
NSDate *date = [NSDate date];
[self.pickerView selectRow:date.components.year - 2000 inComponent:0 animated:YES];
[self.pickerView selectRow:date.components.month inComponent:1 animated:YES];
[self.pickerView selectRow:date.components.day inComponent:2 animated:YES];
}

#pragma mark

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView {
Expand Down

0 comments on commit e7a471e

Please sign in to comment.