Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Commit

Permalink
Merge pull request TimCinel#46 from skywinder/travis-updates
Browse files Browse the repository at this point in the history
update badge
  • Loading branch information
skywinder committed Sep 18, 2014
2 parents a35870b + e34f5dd commit 37629cd
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 132 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
language: objective-c
# script: xcodebuild -workspace ActionSheetPicker.xcworkspace -scheme ActionSheetPicker -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
# xcode_project: ActionSheetPicker.xcodeproj # path to your xcodeproj folder
# xcode_scheme: ActionSheetPickerTests
# xcode_sdk: iphonesimulator

script:
- xctool clean build test -project ActionSheetPicker.xcodeproj -scheme ActionSheetPicker -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch),OS=7.1'
16 changes: 8 additions & 8 deletions ActionSheetPicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
1C6EE732192BB4F600A27994 /* DistancePickerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DistancePickerView.m; sourceTree = "<group>"; };
1C7A57A8199DEDD5007B9B70 /* cancel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cancel.png; sourceTree = "<group>"; };
1C7A57AB199DF30B007B9B70 /* ok.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ok.png; sourceTree = "<group>"; };
1C9444B5197B1C2F005F495B /* ActionSheetPicker Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ActionSheetPicker Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
1C9444B5197B1C2F005F495B /* ActionSheetPickerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ActionSheetPickerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
1C9444B6197B1C2F005F495B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
1C9444BC197B1C2F005F495B /* ActionSheetPicker Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ActionSheetPicker Tests-Info.plist"; sourceTree = "<group>"; };
1C9444BE197B1C2F005F495B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -237,7 +237,7 @@
isa = PBXGroup;
children = (
1CD15A2F192C7A0A00B28881 /* ActionSheetPicker.app */,
1C9444B5197B1C2F005F495B /* ActionSheetPicker Tests.xctest */,
1C9444B5197B1C2F005F495B /* ActionSheetPickerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -279,9 +279,9 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
1C9444B4197B1C2F005F495B /* ActionSheetPicker Tests */ = {
1C9444B4197B1C2F005F495B /* ActionSheetPickerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1C9444C7197B1C2F005F495B /* Build configuration list for PBXNativeTarget "ActionSheetPicker Tests" */;
buildConfigurationList = 1C9444C7197B1C2F005F495B /* Build configuration list for PBXNativeTarget "ActionSheetPickerTests" */;
buildPhases = (
1C9444B1197B1C2F005F495B /* Sources */,
1C9444B2197B1C2F005F495B /* Frameworks */,
Expand All @@ -292,9 +292,9 @@
dependencies = (
1C9444C4197B1C2F005F495B /* PBXTargetDependency */,
);
name = "ActionSheetPicker Tests";
name = ActionSheetPickerTests;
productName = "ActionSheetPicker Tests";
productReference = 1C9444B5197B1C2F005F495B /* ActionSheetPicker Tests.xctest */;
productReference = 1C9444B5197B1C2F005F495B /* ActionSheetPickerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
1D6058900D05DD3D006BFB54 /* ActionSheetPicker */ = {
Expand Down Expand Up @@ -344,7 +344,7 @@
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* ActionSheetPicker */,
1C9444B4197B1C2F005F495B /* ActionSheetPicker Tests */,
1C9444B4197B1C2F005F495B /* ActionSheetPickerTests */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -596,7 +596,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
1C9444C7197B1C2F005F495B /* Build configuration list for PBXNativeTarget "ActionSheetPicker Tests" */ = {
1C9444C7197B1C2F005F495B /* Build configuration list for PBXNativeTarget "ActionSheetPickerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1C9444C5197B1C2F005F495B /* Debug */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -15,8 +15,8 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9444B4197B1C2F005F495B"
BuildableName = "ActionSheetPicker Tests.xctest"
BlueprintName = "ActionSheetPicker Tests"
BuildableName = "ActionSheetPickerTests.xctest"
BlueprintName = "ActionSheetPickerTests"
ReferencedContainer = "container:ActionSheetPicker.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -33,18 +33,22 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9444B4197B1C2F005F495B"
BuildableName = "ActionSheetPicker Tests.xctest"
BlueprintName = "ActionSheetPicker Tests"
BuildableName = "ActionSheetPickerTests.xctest"
BlueprintName = "ActionSheetPickerTests"
ReferencedContainer = "container:ActionSheetPicker.xcodeproj">
</BuildableReference>
<LocationScenarioReference
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
referenceType = "1">
</LocationScenarioReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9444B4197B1C2F005F495B"
BuildableName = "ActionSheetPicker Tests.xctest"
BlueprintName = "ActionSheetPicker Tests"
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
BuildableName = "ActionSheetPicker.app"
BlueprintName = "ActionSheetPicker"
ReferencedContainer = "container:ActionSheetPicker.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -58,15 +62,6 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9444B4197B1C2F005F495B"
BuildableName = "ActionSheetPicker Tests.xctest"
BlueprintName = "ActionSheetPicker Tests"
ReferencedContainer = "container:ActionSheetPicker.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand All @@ -76,15 +71,6 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1C9444B4197B1C2F005F495B"
BuildableName = "ActionSheetPicker Tests.xctest"
BlueprintName = "ActionSheetPicker Tests"
ReferencedContainer = "container:ActionSheetPicker.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
20 changes: 10 additions & 10 deletions Example/Classes/TestTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
UILabel * sender = cell.detailTextLabel;
ActionStringDoneBlock done = ^(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue) {
if ([sender respondsToSelector:@selector(setText:)]) {
[sender performSelector:@selector(setText:) withObject:selectedValue];
}
};
ActionStringCancelBlock cancel = ^(ActionSheetStringPicker *picker) {
NSLog(@"Block Picker Canceled");
};
NSArray *colors = @[@"Red", @"Green", @"Blue", @"Orange"];
// ActionStringDoneBlock done = ^(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue) {
// if ([sender respondsToSelector:@selector(setText:)]) {
// [sender performSelector:@selector(setText:) withObject:selectedValue];
// }
// };
// ActionStringCancelBlock cancel = ^(ActionSheetStringPicker *picker) {
// NSLog(@"Block Picker Canceled");
// };
// NSArray *colors = @[@"Red", @"Green", @"Blue", @"Orange"];
// [ActionSheetStringPicker showPickerWithTitle:@"Select a Block" rows:colors initialSelection:0 doneBlock:done cancelBlock:cancel origin:sender];
ActionSheetDatePicker *datePicker = [[ActionSheetDatePicker alloc] initWithTitle:@"Select a time" datePickerMode:UIDatePickerModeTime selectedDate:[NSDate date] target:self action:@selector(timeWasSelected:element:) origin:sender];
datePicker.minuteInterval = 5;
[datePicker showActionSheetPicker];
// [ActionSheetStringPicker showPickerWithTitle:@"Select a Block" rows:colors initialSelection:0 doneBlock:done cancelBlock:cancel origin:sender];
}

-(void)timeWasSelected:(NSDate *)selectedTime element:(id)element {
Expand Down
6 changes: 6 additions & 0 deletions Pickers/AbstractActionSheetPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ - (CGSize)viewSize
return CGSizeMake(320, 320);
}

#if defined(__IPHONE_8_0)
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) {
//iOS 7.1 or earlier
if ( [self isViewPortrait] )
Expand All @@ -401,6 +402,11 @@ - (CGSize)viewSize
//iOS 8 or later
return [[UIScreen mainScreen] bounds].size;
}
#else
if ( [self isViewPortrait] )
return CGSizeMake(320 , IS_WIDESCREEN ? 568 : 480);
return CGSizeMake(IS_WIDESCREEN ? 568 : 480, 320);
#endif
}

- (BOOL)isViewPortrait
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![Build Status](https://travis-ci.org/travis-ci/travis-web.svg)](https://travis-ci.org/travis-ci/travis-web)
[![Version](http://img.shields.io/cocoapods/v/ActionSheetPicker-3.0.svg)](http://cocoadocs.org/docsets/ActionSheetPicker-3.0)
[![Coverage Status](https://img.shields.io/coveralls/skywinder/ActionSheetPicker-3.0.svg)](https://coveralls.io/r/skywinder/ActionSheetPicker-3.0)
[![Build Status](https://travis-ci.org/skywinder/ActionSheetPicker-3.0.svg?branch=master)](https://travis-ci.org/skywinder/ActionSheetPicker-3.0)
[![License](https://img.shields.io/cocoapods/l/ActionSheetPicker-3.0.svg)](http://cocoadocs.org/docsets/ActionSheetPicker-3.0)
[![Platform](https://img.shields.io/cocoapods/p/ActionSheetPicker-3.0.svg)](http://cocoadocs.org/docsets/ActionSheetPicker-3.0)
[![Issues](http://img.shields.io/github/issues/skywinder/ActionSheetPicker-3.0.svg)](https://github.com/skywinder/ActionSheetPicker-3.0/issues?state=open)
Expand Down
Loading

0 comments on commit 37629cd

Please sign in to comment.