forked from shaps80/iMessageStyleReveal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2b3732
commit 22f318b
Showing
8 changed files
with
162 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Purpose | ||
-------------- | ||
|
||
SPXMasking is category on CALayer that allows you to specify different a corner radius for each corner of a CALayer. | ||
I recenty 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 | ||
----------------------------- | ||
|
||
* Supported build target - iOS 6.0 | ||
* Earliest supported deployment target - iOS 6.0 | ||
|
||
|
||
ARC Compatibility | ||
------------------ | ||
|
||
The category will work correctly ONLY with ARC enabled. | ||
|
||
|
||
Installation | ||
-------------- | ||
|
||
To install, either copy the category into your project or add it to your podfile. | ||
|
||
pod 'SPXRevealableView' | ||
|
||
|
||
Usage | ||
------- | ||
|
||
Using this component is almost completely drop in, just follow a few simple steps: | ||
|
||
1. #import "UITableView+SPXRevealAdditions.h" | ||
2. [self.tableView enableRevealableViewForDirection:SPXRevealableViewGestureDirectionLeft]; (e.g. in viewDidLoad) | ||
3. cell.revealableView = timestampView; | ||
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. | ||
|
||
|
||
Feel free to use in any way you see fit. Please try and reference me somewhere in your app if you use this in a production app and maybe even tell me about it via Twitter @shaps ;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
iMessageStyleReveal.xcworkspace/xcuserdata/Shaps.xcuserdatad/WorkspaceSettings.xcsettings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?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>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key> | ||
<true/> | ||
<key>SnapshotAutomaticallyBeforeSignificantChanges</key> | ||
<false/> | ||
</dict> | ||
</plist> |
5 changes: 5 additions & 0 deletions
5
...StyleReveal.xcworkspace/xcuserdata/Shaps.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Bucket | ||
type = "0" | ||
version = "2.0"> | ||
</Bucket> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.