Skip to content

Commit

Permalink
Merge pull request #6 from ClementPadovani/develop
Browse files Browse the repository at this point in the history
1.0.1
  • Loading branch information
clementpadovani authored Oct 9, 2016
2 parents 7dcd3e4 + b9b0aeb commit 0ca011e
Show file tree
Hide file tree
Showing 26 changed files with 431 additions and 299 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ before_install:
- pod repo update --silent
- pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -workspace Example/CPSegmentedScrollView.xcworkspace -scheme CPSegmentedScrollView-Example -sdk iphonesimulator10.0 -destination "platform=iOS Simulator,name=iPhone 5s,OS=10.0" | xcpretty
- set -o pipefail && xcodebuild test -workspace Example/CPSegmentedScrollView.xcworkspace -scheme CPSegmentedScrollView-Example -sdk iphonesimulator -destination "name=iPhone SE" | xcpretty
- pod lib lint
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change Log

## [1.0.1](https://github.com/ClementPadovani/CPSegmentedScrollView/releases/tag/1.0.1)

### Added

- Documentation

## [1.0.0](https://github.com/ClementPadovani/CPSegmentedScrollView/releases/tag/1.0.0) (10/08/2016)

- Initial release
20 changes: 11 additions & 9 deletions CPSegmentedScrollView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,26 @@

Pod::Spec.new do |s|
s.name = 'CPSegmentedScrollView'
s.version = '1.0.0'
s.version = '1.0.1'
s.summary = 'CPSegmentedScrollView is a consul to animate a segmented control when paired with a scroll view.'

s.homepage = 'https://github.com/ClementPadovani/CPSegmentedScrollView'
s.screenshots = 'https://raw.githubusercontent.com/ClementPadovani/CPSegmentedScrollView/master/CPSegmentedScrollView.gif'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Clément Padovani' => '[email protected].com' }
s.author = { 'Clément Padovani' => 'clement.padovani@gmail.com' }
s.source = { :git => 'https://github.com/ClementPadovani/CPSegmentedScrollView.git', :tag => s.version.to_s }

s.platform = :ios

s.requires_arc = true

s.ios.deployment_target = '8.0'

s.source_files = 'CPSegmentedScrollView/Classes/**/*'

# s.resource_bundles = {
# 'CPSegmentedScrollView' => ['CPSegmentedScrollView/Assets/*.png']
# }

# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
s.public_header_files = 'CPSegmentedScrollView/Classes/Public/*.h'

s.private_header_files = 'CPSegmentedScrollView/Classes/Private/*.h'

s.frameworks = 'UIKit', 'Foundation'
end

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,28 @@ NS_ASSUME_NONNULL_BEGIN

@interface CLPScrollViewProxy : NSProxy

/**
Creates a new proxy to send messages to `consul` and `scrollViewDelegate`.
@param consul The consul
@param scrollViewDelegate The scroll view’s original delegate
@throws NSInvalidArgumentException Throws if:
- `consul` is `nil`
- `scrollViewDelegate` is nil
@return The newly created proxy
*/
- (instancetype) initWithConsul: (CLPScrollViewSegmentedControlConsul <UIScrollViewDelegate> *) consul withScrollViewDelegate: (__kindof NSObject <UIScrollViewDelegate> *) scrollViewDelegate;

/**
An instance of `CLPScrollViewSegmentedControlConsul` that acts as the consul between an instance of `UIScrollView` and another instance of `UISegmentedControl`
*/
@property (nonatomic, weak, readonly) CLPScrollViewSegmentedControlConsul <UIScrollViewDelegate> *consul;

/**
The scroll view’s original delegate, an object who conforms to the `UIScrollViewDelegate` protocol
*/
@property (nonatomic, weak, readonly) __kindof NSObject <UIScrollViewDelegate> * scrollViewDelegate;

@end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//
// CLPScrollViewSegmentedControlConsul.h
// Segmented Test
//
// Created by Clément Padovani on 10/2/16.
// Copyright (c) 2016 Clement Padovani. All rights reserved.
//

@import Foundation;
@import UIKit;

NS_ASSUME_NONNULL_BEGIN

@interface CLPScrollViewSegmentedControlConsul : NSObject

/**
Create a new consul to manage the transition between pages of `scrollView` in coordination with `segmentedControl`
@param segmentedControl An instance of `UISegmentedControl` with the same number of segments as the number of `scrollView`’s number of pages.
@param scrollView An instance of `UIScrollView`, with a pre-existing delegate, whose number of pages is the same as `segmentedControl`’s number of segments
@exception NSInvalidArgumentException Throws if:
- `scrollView` or `segmentedControl` is `nil`
- `scrollView`’s `delegate` is nil
- `scrollView` or `segmentedControl`’s number of pages/segments is less than 2
- `scrollView` and `segmentedControl`’s number of pages/segments differ
- `scrollView` has paging disabled
- `segmentedControl` is a momentary segmented control (`[UISegmentedControl isMomentary]`)
@return An instance of `CLPScrollViewSegmentedControlConsul` that manages the transitions
*/
+ (instancetype) consulWithSegmentedControl: (UISegmentedControl *) segmentedControl withScrollView: (UIScrollView *) scrollView;

- (instancetype) init NS_UNAVAILABLE;

+ (instancetype) alloc NS_UNAVAILABLE;

+ (instancetype) new NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END
22 changes: 19 additions & 3 deletions Example/CPSegmentedScrollView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@
592CBAAA1DA92D6B008E64CF /* Frameworks */,
592CBAAB1DA92D6B008E64CF /* Resources */,
00903016B2B6280C8DD3AABB /* [CP] Copy Pods Resources */,
87AD9ED734B334386F35657F /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -416,7 +417,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
4A93CE72EC738F4633E9705E /* [CP] Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -461,7 +462,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
87AD9ED734B334386F35657F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CPSegmentedScrollView_ExampleUITests/Pods-CPSegmentedScrollView_ExampleUITests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
94F389F651F85449E0044E74 /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -476,7 +492,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
B32D286E76DBAE6E657DD263 /* [CP] Copy Pods Resources */ = {
Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- CPSegmentedScrollView (1.0.0)
- CPSegmentedScrollView (1.0.1)
- OCHamcrest (6.0.0)
- OCMockito (4.0.1):
- OCHamcrest (~> 6.0)
Expand All @@ -13,10 +13,10 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
CPSegmentedScrollView: ad59faf95ee1e33ad2f172d418e6f6c4b92247d2
CPSegmentedScrollView: 2ad3c79ed0140c5a43576b98c8f5b39deb67aac9
OCHamcrest: fc8ab38149b97df8db8029a3f2157c951bf9081d
OCMockito: 62ddc6afff6a883f2864d51224b1dfdc0e9a7df7

PODFILE CHECKSUM: ac8b195460653b1679798d8458d250207ae302e1

COCOAPODS: 1.0.1
COCOAPODS: 1.1.0.rc.2
17 changes: 12 additions & 5 deletions Example/Pods/Local Podspecs/CPSegmentedScrollView.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0ca011e

Please sign in to comment.