Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding awake from nib method #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ZKRevealingTableViewCell.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Pod::Spec.new do |s|
s.name = 'ZKRevealingTableViewCell'
s.version = '0.0.3'
s.license = 'MIT'
s.summary = 'A Sparrow-style Implementation of Swipe-To-Reveal.'
s.homepage = 'https://github.com/alexzielenski/ZKRevealingTableViewCell'
s.author = { 'Alex Zielenski' => '[email protected]' }
s.source = { :git => 'https://github.com/appbuilder360/ZKRevealingTableViewCell.git', :commit => '03242a4233b0487fc06ad4d78d2ad4d618c2621a' }
s.description = 'A different kind of swipe-to-reveal that pans with your finger and works left and right to reveal a background view.'
s.platform = :ios
s.source_files = 'vendor'

s.framework = 'QuartzCore'
end
18 changes: 18 additions & 0 deletions vendor/ZKRevealingTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,24 @@ - (id)initWithCoder:(NSCoder *)aDecoder
return self;
}


-(void)awakeFromNib {
self.direction = ZKRevealingTableViewCellDirectionBoth;
self.shouldBounce = YES;
self.pixelsToReveal = 0;

self._panGesture = [[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(_pan:)] autorelease];
self._panGesture.delegate = self;

[self addGestureRecognizer:self._panGesture];

self.contentView.backgroundColor = [UIColor clearColor];

UIView *backgroundView = [[[UIView alloc] initWithFrame:self.contentView.frame] autorelease];
backgroundView.backgroundColor = [UIColor clearColor];
self.backView = backgroundView;
}

- (void)dealloc
{
self._panGesture = nil;
Expand Down