From 58e4a907e3c8f4fa5f20aa29f330004598477158 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Mon, 11 Sep 2017 15:32:44 +0200 Subject: [PATCH] - Fix width cover --- PNTwitterCover.podspec | 2 +- PNTwitterCover/Classes/UIScrollView+PNTwitterCover.h | 2 +- PNTwitterCover/Classes/UIScrollView+PNTwitterCover.m | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PNTwitterCover.podspec b/PNTwitterCover.podspec index 90cff91..fad41fa 100644 --- a/PNTwitterCover.podspec +++ b/PNTwitterCover.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'PNTwitterCover' - s.version = '1.0.0' + s.version = '1.0.1' s.summary = 'PNTwitterCover is a UUIscrollView Category to add blur and zoom during scroll bounce' # This description is used to generate tags and improve search results. diff --git a/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.h b/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.h index 3697866..4b9687f 100644 --- a/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.h +++ b/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.h @@ -16,7 +16,7 @@ - (void)addTwitterCoverWithImage:(UIImage*)image; - (void)addTwitterCoverWithImage:(UIImage*)image withTopView:(UIView*)topView; -- (void)addTwitterCoverWithImage:(UIImage*)image withTopView:(UIView*)topView andHeight:(CGFloat) height; +- (void)addTwitterCoverWithImage:(UIImage*)image withTopView:(UIView*)topView width:(CGFloat) width andHeight:(CGFloat) height; - (void)removeTwitterCoverView; @end diff --git a/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.m b/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.m index 093519d..2ee9ff5 100644 --- a/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.m +++ b/PNTwitterCover/Classes/UIScrollView+PNTwitterCover.m @@ -31,12 +31,12 @@ static char UIScrollViewTwitterCover; [self addTwitterCoverWithImage:image withTopView:nil]; } - (void)addTwitterCoverWithImage:(UIImage*)image withTopView:(UIView*)topView { - [self addTwitterCoverWithImage:image withTopView:topView andHeight:DefaultTwitterCoverViewHeight]; + [self addTwitterCoverWithImage:image withTopView:topView width:[UIScreen mainScreen].bounds.size.width andHeight:DefaultTwitterCoverViewHeight]; } -- (void)addTwitterCoverWithImage:(UIImage*)image withTopView:(UIView*)topView andHeight:(CGFloat) height +- (void)addTwitterCoverWithImage:(UIImage*)image withTopView:(UIView*)topView width:(CGFloat) width andHeight:(CGFloat) height { - PNTwitterCoverView *view = [[PNTwitterCoverView alloc] initWithFrame:CGRectMake(0,0, 320, height) andContentTopView:topView]; + PNTwitterCoverView *view = [[PNTwitterCoverView alloc] initWithFrame:CGRectMake(0,0, width, height) andContentTopView:topView]; view.backgroundColor = [UIColor clearColor]; view.image = image;