Skip to content

Commit

Permalink
Merge pull request #1 from dmitry-yudakov/fixedJumpingEffectReachingM…
Browse files Browse the repository at this point in the history
…inSize

Fixed jumping effect reaching min size
  • Loading branch information
Martin Kluska committed Apr 14, 2016
2 parents 9f419d2 + b0439f9 commit 1fe798a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SPUserResizableView+Pion.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'SPUserResizableView+Pion'
s.version = '0.5.3'
s.version = '0.5.4'
s.license = 'MIT'
s.homepage = 'https://github.com/pionl/SPUserResizableView'
s.authors = 'Stephen Poletto'
s.summary = 'A forked (originaly from STephen Poletto) SPUserResizableView is a user-resizable, user-repositionable UIView subclass. '

# Source Info
s.platform = :ios, '5.0'
s.source = {:git => 'https://github.com/pionl/SPUserResizableView.git', :tag => '0.5.3'}
s.source = {:git => 'https://github.com/pionl/SPUserResizableView.git', :tag => '0.5.4'}
s.source_files = 'SPUserResizableView/SPUserResizableView.{h,m}'
s.requires_arc = true

Expand Down
4 changes: 4 additions & 0 deletions SPUserResizableView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_BITCODE = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -216,8 +218,10 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_BITCODE = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
Expand Down
4 changes: 2 additions & 2 deletions SPUserResizableView/SPUserResizableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,12 @@ - (void)resizeUsingTouchLocation:(CGPoint)touchPoint {

// (4) If the new frame is too small, cancel the changes.
if (newWidth < self.minWidth) {
newX -= anchorPoint.adjustsX * (self.minWidth - newWidth);
newWidth = self.minWidth;
newX = self.frame.origin.x;
}
if (newHeight < self.minHeight) {
newY -= anchorPoint.adjustsY * (self.minHeight - newHeight);
newHeight = self.minHeight;
newY = self.frame.origin.y;
}

// (5) Ensure the resize won't cause the view to move offscreen.
Expand Down

0 comments on commit 1fe798a

Please sign in to comment.