Skip to content

Commit

Permalink
Merge pull request #55 from urbn/exposeCropImage
Browse files Browse the repository at this point in the history
Extracts and exposes some internal methods for subclasses.
  • Loading branch information
ruslanskorb committed Jun 11, 2015
2 parents 1b810ed + d5dd4f5 commit 8d03fcc
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ DEPENDENCIES:
- Specta (= 0.4.0)

SPEC CHECKSUMS:
Expecta: ee641011fe10aa1855d487b40e4976dac50ec342
Expecta+Snapshots: 4a56b9411c6ed156987072e52c39de67d864015a
FBSnapshotTestCase: e2914fbaabccea1dcc773d6a16b1c24540642488
OCMock: 6db79185520e24f9f299548f2b8b07e41d881bd5
Specta: 1df326d6ec48603c77f507a0ab1f89ad2df1c582
Expecta: 8c507baf13211207b1e9d0a741480600e6b4ed15
Expecta+Snapshots: 4a0b46d3ba755bd43dffa7d53e4585fc6cbfe8cd
FBSnapshotTestCase: 26f32d8fa9eb30e9f09712ecfb097808bc79b898
OCMock: a6a7dc0e3997fb9f35d99f72528698ebf60d64f2
Specta: a353759f073ffcc0a365b782fe4aaeac064c03c6

COCOAPODS: 0.36.0
COCOAPODS: 0.36.3
2 changes: 2 additions & 0 deletions Example/RSKImageCropperExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
46AAEE5D1B29155700E10C42 /* RSKImageCropViewController+Protected.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RSKImageCropViewController+Protected.h"; sourceTree = "<group>"; };
57E1277B2ACCBFB99F6EC92E /* Pods-RSKImageCropperExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RSKImageCropperExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RSKImageCropperExampleTests/Pods-RSKImageCropperExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
74203A87984840A534E55F6C /* libPods-RSKImageCropperExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RSKImageCropperExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
B803F69C1AAB0A1F004141CF /* CGGeometry+RSKImageCropper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CGGeometry+RSKImageCropper.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -218,6 +219,7 @@
B8B3824B1AC721A7004C55F0 /* UIApplication+RSKImageCropper.m */,
B87A9A2A19A4D39800D12CD4 /* UIImage+RSKImageCropper.h */,
B87A9A2B19A4D39800D12CD4 /* UIImage+RSKImageCropper.m */,
46AAEE5D1B29155700E10C42 /* RSKImageCropViewController+Protected.h */,
);
name = RSKImageCropper;
path = ../RSKImageCropper;
Expand Down
44 changes: 44 additions & 0 deletions RSKImageCropper/RSKImageCropViewController+Protected.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// RSKTouchView.h
//
// Copyright (c) 2014 Ruslan Skorb, http://ruslanskorb.com/
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

@interface RSKImageCropViewController (Protected)

/**
* Asynchronously crops the original image in accordance with the current settings
*/
- (void)cropImage;

/**
* Method that invokes the protocol method imageCropViewControllerDidCancelCrop:
*/
- (void)cancelCrop;

/**
* Method that resets the image to its original position in the scroll view.
*
* @param animated BOOL
*/
- (void)reset:(BOOL)animated;

@end

0 comments on commit 8d03fcc

Please sign in to comment.