Skip to content

Commit

Permalink
Updated project
Browse files Browse the repository at this point in the history
  • Loading branch information
shaps-test committed Apr 5, 2014
1 parent 8163854 commit 9335ef4
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Purpose
--------------

I recenty needed to build the iMessage style pull-to-reveal timestamps feature for a personal project and decided to open source the category. :)
I recently needed to build the iMessage style pull-to-reveal timestamps feature for a personal project and decided to open source the category. :)


Supported OS & SDK Versions
Expand Down Expand Up @@ -36,6 +36,8 @@ Using this component is almost completely drop in, just follow a few simple step
You should call enable at a fairly early stage in your UITableView's lifecycle, ideally in `-viewDidLoad`

The revealableView size is based on the XIB it was loaded from. The height will always match the cell, but the width will be maintained from the views frame ;)

To gain the benefits of reusable cells, I recommended setting the revealableView in your `-awakeFromNib` cell method, but you could declare it directly in your `-cellForRowAtIndexPath` method as is shown in the included demo.

That's it! It will automatically handle inserting the view into the cells, you have a nice property on each cell to make it simple to update and all gesture handling is done automatically for you just by including the class.
Expand Down
22 changes: 22 additions & 0 deletions SPXRevealableView.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#

s.name = "SPXRevealableView"
s.version = "0.1"
s.summary = "iMessage style pull-to-reveal timestamps."
s.homepage = "http://shaps.me/imessage-style-reveal/"
s.screenshots = "http://shaps.me/downloads/iMessageStyleReveal.jpg"
s.license = 'MIT'
s.author = { "Shaps Mohsenin" => "shaps80@me.com" }
s.social_media_url = "http://twitter.com/shaps"
s.platform = :ios
s.platform = :ios, '6.0'
s.source = { :git => "https://github.com/shaps80/iMessageStyleReveal.git", :tag => "0.1" }
s.source_files = 'iMessageStyleReveal/SPXRevealableView', '**/*.{h,m}'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>25DF8060-29B2-419F-887B-5D0560FCE7DE</string>
<key>IDESourceControlProjectName</key>
<string>iMessageStyleReveal</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>807DE584-99B9-4C1A-A1C7-522F0CF609FD</key>
<string>ssh://github.com/shaps80/iMessageStyleReveal.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>iMessageStyleReveal.xcworkspace</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>807DE584-99B9-4C1A-A1C7-522F0CF609FD</key>
<string>..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>ssh://github.com/shaps80/iMessageStyleReveal.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>110</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>807DE584-99B9-4C1A-A1C7-522F0CF609FD</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>807DE584-99B9-4C1A-A1C7-522F0CF609FD</string>
<key>IDESourceControlWCCName</key>
<string>iMessageStyleReveal</string>
</dict>
</array>
</dict>
</plist>
4 changes: 2 additions & 2 deletions iMessageStyleReveal/SPXRevealTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import "SPXRevealTableViewController.h"
#import "UITableView+SPXRevealAdditions.h"

#import "LoremIpsum.h"

@implementation SPXRevealTableViewController

Expand All @@ -21,7 +21,7 @@ - (void)viewDidLoad
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
cell.textLabel.text = [NSString stringWithFormat:@"Section %zd : Item %zd", indexPath.section, indexPath.row];
cell.textLabel.text = [LoremIpsum name];
cell.revealableView = [[UINib nibWithNibName:@"TimestampView" bundle:nil] instantiateWithOwner:nil options:nil].firstObject;
return cell;
}
Expand Down

0 comments on commit 9335ef4

Please sign in to comment.