appjam 0.1.8.8 → 0.1.8.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +22 -62
- data/lib/appjam/generators/gist.yml +1 -1
- data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.pbxproj +1166 -482
- data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication-Prefix.pch.tt +26 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenu.h +52 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenu.m +412 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenuItem.h +44 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenuItem.m +97 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/CMPopTipView/CMPopTipView.h +167 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/CMPopTipView/CMPopTipView.m +639 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/FXLabel/FXLabel.h +97 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/FXLabel/FXLabel.m +1080 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MBProgressHUD/MBProgressHUD.h +451 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MBProgressHUD/MBProgressHUD.m +865 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FacingView.h +42 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FacingView.m +56 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FoldView.h +90 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FoldView.m +316 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/MultiFoldView.h +104 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/MultiFoldView.m +516 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldConstants.h +49 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldNavigationController.h +18 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldNavigationController.m +88 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldSwipeHintView.h +25 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldSwipeHintView.m +76 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldView.h +131 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldView.m +941 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide.psd +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide2.psd +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/ShadowView.h +46 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/ShadowView.m +82 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/TouchThroughUIView.h +39 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/TouchThroughUIView.m +72 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/UIView+Screenshot.h +42 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/UIView+Screenshot.m +100 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/NSBubbleData.h +34 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/NSBubbleData.m +140 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.h +17 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.m +57 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableView.h +30 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableView.m +233 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewCell.h +19 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewCell.m +122 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewDataSource.h +24 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.h +20 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.m +56 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIGlossyButton.h +124 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIGlossyButton.m +545 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.h +22 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.m +32 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFIncrementalStore.h +344 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFIncrementalStore.m +848 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFRESTClient.h +135 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFRESTClient.m +441 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.h +40 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.m +36 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/TTTStringInflector.h +76 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/TTTStringInflector.m +270 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/MKAnnotationView+WebCache.h +95 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/MKAnnotationView+WebCache.m +78 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDImageCache.h +144 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDImageCache.m +311 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.h +40 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.m +54 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDecoder.h +18 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDecoder.m +70 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloader.h +102 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloader.m +226 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloaderOperation.h +25 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloaderOperation.m +339 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageManager.h +167 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageManager.m +244 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageOperation.h +15 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImagePrefetcher.h +58 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImagePrefetcher.m +127 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIButton+WebCache.h +173 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIButton+WebCache.m +129 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIImageView+WebCache.h +140 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIImageView+WebCache.m +84 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationProgram.h +28 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationSequence.h +28 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationStep.h +49 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationProgram.m +100 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationSequence.m +85 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationStep.m +122 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaAsyncSocket/GCDAsyncSocket.h +1074 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaAsyncSocket/GCDAsyncSocket.m +7430 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDData.h +14 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDData.m +158 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.h +12 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.m +88 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDRange.h +56 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDRange.m +104 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h +45 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPAuthenticationRequest.m +195 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPConnection.h +119 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPConnection.m +2708 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPLogging.h +136 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPMessage.h +48 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPMessage.m +113 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPResponse.h +149 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPServer.h +205 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPServer.m +772 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.h +65 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.m +529 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.h +33 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.m +86 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.h +23 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.m +211 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.h +75 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.m +405 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h +13 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m +79 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h +52 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.m +292 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.h +9 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.m +38 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h +25 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPFileResponse.m +237 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h +12 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m +73 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/WebSocket.h +105 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/WebSocket.m +791 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h +7 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.m +160 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h +11 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.m +372 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h +7 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m +49 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h +8 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m +69 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHpple.h +54 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHpple.m +102 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHppleElement.h +103 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHppleElement.m +200 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/XPathQuery.h +10 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/XPathQuery.m +197 -0
- data/lib/appjam/version.rb +1 -1
- metadata +164 -3
@@ -0,0 +1,17 @@
|
|
1
|
+
//
|
2
|
+
// UIBubbleHeaderTableViewCell.h
|
3
|
+
// UIBubbleTableViewExample
|
4
|
+
//
|
5
|
+
// Created by Александр Баринов on 10/7/12.
|
6
|
+
// Copyright (c) 2012 Stex Group. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <UIKit/UIKit.h>
|
10
|
+
|
11
|
+
@interface UIBubbleHeaderTableViewCell : UITableViewCell
|
12
|
+
|
13
|
+
+ (CGFloat)height;
|
14
|
+
|
15
|
+
@property (nonatomic, strong) NSDate *date;
|
16
|
+
|
17
|
+
@end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
//
|
2
|
+
// UIBubbleHeaderTableViewCell.m
|
3
|
+
// UIBubbleTableViewExample
|
4
|
+
//
|
5
|
+
// Created by Александр Баринов on 10/7/12.
|
6
|
+
// Copyright (c) 2012 Stex Group. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "UIBubbleHeaderTableViewCell.h"
|
10
|
+
|
11
|
+
@interface UIBubbleHeaderTableViewCell ()
|
12
|
+
|
13
|
+
@property (nonatomic, retain) UILabel *label;
|
14
|
+
|
15
|
+
@end
|
16
|
+
|
17
|
+
@implementation UIBubbleHeaderTableViewCell
|
18
|
+
|
19
|
+
@synthesize label = _label;
|
20
|
+
@synthesize date = _date;
|
21
|
+
|
22
|
+
+ (CGFloat)height
|
23
|
+
{
|
24
|
+
return 28.0;
|
25
|
+
}
|
26
|
+
|
27
|
+
- (void)setDate:(NSDate *)value
|
28
|
+
{
|
29
|
+
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
30
|
+
[dateFormatter setDateStyle:NSDateFormatterMediumStyle];
|
31
|
+
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
|
32
|
+
NSString *text = [dateFormatter stringFromDate:value];
|
33
|
+
#if !__has_feature(objc_arc)
|
34
|
+
[dateFormatter release];
|
35
|
+
#endif
|
36
|
+
|
37
|
+
if (self.label)
|
38
|
+
{
|
39
|
+
self.label.text = text;
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
|
43
|
+
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
44
|
+
self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, [UIBubbleHeaderTableViewCell height])];
|
45
|
+
self.label.text = text;
|
46
|
+
self.label.font = [UIFont boldSystemFontOfSize:12];
|
47
|
+
self.label.textAlignment = NSTextAlignmentCenter;
|
48
|
+
self.label.shadowOffset = CGSizeMake(0, 1);
|
49
|
+
self.label.shadowColor = [UIColor whiteColor];
|
50
|
+
self.label.textColor = [UIColor darkGrayColor];
|
51
|
+
self.label.backgroundColor = [UIColor clearColor];
|
52
|
+
[self addSubview:self.label];
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
@end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
//
|
2
|
+
// UIBubbleTableView.h
|
3
|
+
//
|
4
|
+
// Created by Alex Barinov
|
5
|
+
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
|
6
|
+
//
|
7
|
+
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
8
|
+
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
|
9
|
+
//
|
10
|
+
|
11
|
+
#import <UIKit/UIKit.h>
|
12
|
+
|
13
|
+
#import "UIBubbleTableViewDataSource.h"
|
14
|
+
#import "UIBubbleTableViewCell.h"
|
15
|
+
|
16
|
+
typedef enum _NSBubbleTypingType
|
17
|
+
{
|
18
|
+
NSBubbleTypingTypeNobody = 0,
|
19
|
+
NSBubbleTypingTypeMe = 1,
|
20
|
+
NSBubbleTypingTypeSomebody = 2
|
21
|
+
} NSBubbleTypingType;
|
22
|
+
|
23
|
+
@interface UIBubbleTableView : UITableView <UITableViewDelegate, UITableViewDataSource>
|
24
|
+
|
25
|
+
@property (nonatomic, assign) IBOutlet id<UIBubbleTableViewDataSource> bubbleDataSource;
|
26
|
+
@property (nonatomic) NSTimeInterval snapInterval;
|
27
|
+
@property (nonatomic) NSBubbleTypingType typingBubble;
|
28
|
+
@property (nonatomic) BOOL showAvatars;
|
29
|
+
|
30
|
+
@end
|
@@ -0,0 +1,233 @@
|
|
1
|
+
//
|
2
|
+
// UIBubbleTableView.m
|
3
|
+
//
|
4
|
+
// Created by Alex Barinov
|
5
|
+
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
|
6
|
+
//
|
7
|
+
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
8
|
+
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
|
9
|
+
//
|
10
|
+
|
11
|
+
#import "UIBubbleTableView.h"
|
12
|
+
#import "NSBubbleData.h"
|
13
|
+
#import "UIBubbleHeaderTableViewCell.h"
|
14
|
+
#import "UIBubbleTypingTableViewCell.h"
|
15
|
+
|
16
|
+
@interface UIBubbleTableView ()
|
17
|
+
|
18
|
+
@property (nonatomic, retain) NSMutableArray *bubbleSection;
|
19
|
+
|
20
|
+
@end
|
21
|
+
|
22
|
+
@implementation UIBubbleTableView
|
23
|
+
|
24
|
+
@synthesize bubbleDataSource = _bubbleDataSource;
|
25
|
+
@synthesize snapInterval = _snapInterval;
|
26
|
+
@synthesize bubbleSection = _bubbleSection;
|
27
|
+
@synthesize typingBubble = _typingBubble;
|
28
|
+
@synthesize showAvatars = _showAvatars;
|
29
|
+
|
30
|
+
#pragma mark - Initializators
|
31
|
+
|
32
|
+
- (void)initializator
|
33
|
+
{
|
34
|
+
// UITableView properties
|
35
|
+
|
36
|
+
self.backgroundColor = [UIColor clearColor];
|
37
|
+
self.separatorStyle = UITableViewCellSeparatorStyleNone;
|
38
|
+
assert(self.style == UITableViewStylePlain);
|
39
|
+
|
40
|
+
self.delegate = self;
|
41
|
+
self.dataSource = self;
|
42
|
+
|
43
|
+
// UIBubbleTableView default properties
|
44
|
+
|
45
|
+
self.snapInterval = 120;
|
46
|
+
self.typingBubble = NSBubbleTypingTypeNobody;
|
47
|
+
}
|
48
|
+
|
49
|
+
- (id)init
|
50
|
+
{
|
51
|
+
self = [super init];
|
52
|
+
if (self) [self initializator];
|
53
|
+
return self;
|
54
|
+
}
|
55
|
+
|
56
|
+
- (id)initWithCoder:(NSCoder *)aDecoder
|
57
|
+
{
|
58
|
+
self = [super initWithCoder:aDecoder];
|
59
|
+
if (self) [self initializator];
|
60
|
+
return self;
|
61
|
+
}
|
62
|
+
|
63
|
+
- (id)initWithFrame:(CGRect)frame
|
64
|
+
{
|
65
|
+
self = [super initWithFrame:frame];
|
66
|
+
if (self) [self initializator];
|
67
|
+
return self;
|
68
|
+
}
|
69
|
+
|
70
|
+
- (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style
|
71
|
+
{
|
72
|
+
self = [super initWithFrame:frame style:UITableViewStylePlain];
|
73
|
+
if (self) [self initializator];
|
74
|
+
return self;
|
75
|
+
}
|
76
|
+
|
77
|
+
#if !__has_feature(objc_arc)
|
78
|
+
- (void)dealloc
|
79
|
+
{
|
80
|
+
[_bubbleSection release];
|
81
|
+
_bubbleSection = nil;
|
82
|
+
_bubbleDataSource = nil;
|
83
|
+
[super dealloc];
|
84
|
+
}
|
85
|
+
#endif
|
86
|
+
|
87
|
+
#pragma mark - Override
|
88
|
+
|
89
|
+
- (void)reloadData
|
90
|
+
{
|
91
|
+
self.showsVerticalScrollIndicator = NO;
|
92
|
+
self.showsHorizontalScrollIndicator = NO;
|
93
|
+
|
94
|
+
// Cleaning up
|
95
|
+
self.bubbleSection = nil;
|
96
|
+
|
97
|
+
// Loading new data
|
98
|
+
int count = 0;
|
99
|
+
#if !__has_feature(objc_arc)
|
100
|
+
self.bubbleSection = [[[NSMutableArray alloc] init] autorelease];
|
101
|
+
#else
|
102
|
+
self.bubbleSection = [[NSMutableArray alloc] init];
|
103
|
+
#endif
|
104
|
+
|
105
|
+
if (self.bubbleDataSource && (count = [self.bubbleDataSource rowsForBubbleTable:self]) > 0)
|
106
|
+
{
|
107
|
+
#if !__has_feature(objc_arc)
|
108
|
+
NSMutableArray *bubbleData = [[[NSMutableArray alloc] initWithCapacity:count] autorelease];
|
109
|
+
#else
|
110
|
+
NSMutableArray *bubbleData = [[NSMutableArray alloc] initWithCapacity:count];
|
111
|
+
#endif
|
112
|
+
|
113
|
+
for (int i = 0; i < count; i++)
|
114
|
+
{
|
115
|
+
NSObject *object = [self.bubbleDataSource bubbleTableView:self dataForRow:i];
|
116
|
+
assert([object isKindOfClass:[NSBubbleData class]]);
|
117
|
+
[bubbleData addObject:object];
|
118
|
+
}
|
119
|
+
|
120
|
+
[bubbleData sortUsingComparator:^NSComparisonResult(id obj1, id obj2)
|
121
|
+
{
|
122
|
+
NSBubbleData *bubbleData1 = (NSBubbleData *)obj1;
|
123
|
+
NSBubbleData *bubbleData2 = (NSBubbleData *)obj2;
|
124
|
+
|
125
|
+
return [bubbleData1.date compare:bubbleData2.date];
|
126
|
+
}];
|
127
|
+
|
128
|
+
NSDate *last = [NSDate dateWithTimeIntervalSince1970:0];
|
129
|
+
NSMutableArray *currentSection = nil;
|
130
|
+
|
131
|
+
for (int i = 0; i < count; i++)
|
132
|
+
{
|
133
|
+
NSBubbleData *data = (NSBubbleData *)[bubbleData objectAtIndex:i];
|
134
|
+
|
135
|
+
if ([data.date timeIntervalSinceDate:last] > self.snapInterval)
|
136
|
+
{
|
137
|
+
#if !__has_feature(objc_arc)
|
138
|
+
currentSection = [[[NSMutableArray alloc] init] autorelease];
|
139
|
+
#else
|
140
|
+
currentSection = [[NSMutableArray alloc] init];
|
141
|
+
#endif
|
142
|
+
[self.bubbleSection addObject:currentSection];
|
143
|
+
}
|
144
|
+
|
145
|
+
[currentSection addObject:data];
|
146
|
+
last = data.date;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
[super reloadData];
|
151
|
+
}
|
152
|
+
|
153
|
+
#pragma mark - UITableViewDelegate implementation
|
154
|
+
|
155
|
+
#pragma mark - UITableViewDataSource implementation
|
156
|
+
|
157
|
+
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
158
|
+
{
|
159
|
+
int result = [self.bubbleSection count];
|
160
|
+
if (self.typingBubble != NSBubbleTypingTypeNobody) result++;
|
161
|
+
return result;
|
162
|
+
}
|
163
|
+
|
164
|
+
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
165
|
+
{
|
166
|
+
// This is for now typing bubble
|
167
|
+
if (section >= [self.bubbleSection count]) return 1;
|
168
|
+
|
169
|
+
return [[self.bubbleSection objectAtIndex:section] count] + 1;
|
170
|
+
}
|
171
|
+
|
172
|
+
- (float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
173
|
+
{
|
174
|
+
// Now typing
|
175
|
+
if (indexPath.section >= [self.bubbleSection count])
|
176
|
+
{
|
177
|
+
return MAX([UIBubbleTypingTableViewCell height], self.showAvatars ? 52 : 0);
|
178
|
+
}
|
179
|
+
|
180
|
+
// Header
|
181
|
+
if (indexPath.row == 0)
|
182
|
+
{
|
183
|
+
return [UIBubbleHeaderTableViewCell height];
|
184
|
+
}
|
185
|
+
|
186
|
+
NSBubbleData *data = [[self.bubbleSection objectAtIndex:indexPath.section] objectAtIndex:indexPath.row - 1];
|
187
|
+
return MAX(data.insets.top + data.view.frame.size.height + data.insets.bottom, self.showAvatars ? 52 : 0);
|
188
|
+
}
|
189
|
+
|
190
|
+
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
191
|
+
{
|
192
|
+
// Now typing
|
193
|
+
if (indexPath.section >= [self.bubbleSection count])
|
194
|
+
{
|
195
|
+
static NSString *cellId = @"tblBubbleTypingCell";
|
196
|
+
UIBubbleTypingTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
197
|
+
|
198
|
+
if (cell == nil) cell = [[UIBubbleTypingTableViewCell alloc] init];
|
199
|
+
|
200
|
+
cell.type = self.typingBubble;
|
201
|
+
cell.showAvatar = self.showAvatars;
|
202
|
+
|
203
|
+
return cell;
|
204
|
+
}
|
205
|
+
|
206
|
+
// Header with date and time
|
207
|
+
if (indexPath.row == 0)
|
208
|
+
{
|
209
|
+
static NSString *cellId = @"tblBubbleHeaderCell";
|
210
|
+
UIBubbleHeaderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
211
|
+
NSBubbleData *data = [[self.bubbleSection objectAtIndex:indexPath.section] objectAtIndex:0];
|
212
|
+
|
213
|
+
if (cell == nil) cell = [[UIBubbleHeaderTableViewCell alloc] init];
|
214
|
+
|
215
|
+
cell.date = data.date;
|
216
|
+
|
217
|
+
return cell;
|
218
|
+
}
|
219
|
+
|
220
|
+
// Standard bubble
|
221
|
+
static NSString *cellId = @"tblBubbleCell";
|
222
|
+
UIBubbleTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
|
223
|
+
NSBubbleData *data = [[self.bubbleSection objectAtIndex:indexPath.section] objectAtIndex:indexPath.row - 1];
|
224
|
+
|
225
|
+
if (cell == nil) cell = [[UIBubbleTableViewCell alloc] init];
|
226
|
+
|
227
|
+
cell.data = data;
|
228
|
+
cell.showAvatar = self.showAvatars;
|
229
|
+
|
230
|
+
return cell;
|
231
|
+
}
|
232
|
+
|
233
|
+
@end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
//
|
2
|
+
// UIBubbleTableViewCell.h
|
3
|
+
//
|
4
|
+
// Created by Alex Barinov
|
5
|
+
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
|
6
|
+
//
|
7
|
+
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
8
|
+
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
|
9
|
+
//
|
10
|
+
|
11
|
+
#import <UIKit/UIKit.h>
|
12
|
+
#import "NSBubbleData.h"
|
13
|
+
|
14
|
+
@interface UIBubbleTableViewCell : UITableViewCell
|
15
|
+
|
16
|
+
@property (nonatomic, strong) NSBubbleData *data;
|
17
|
+
@property (nonatomic) BOOL showAvatar;
|
18
|
+
|
19
|
+
@end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
//
|
2
|
+
// UIBubbleTableViewCell.m
|
3
|
+
//
|
4
|
+
// Created by Alex Barinov
|
5
|
+
// Project home page: http://alexbarinov.github.com/UIBubbleTableView/
|
6
|
+
//
|
7
|
+
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
8
|
+
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/
|
9
|
+
//
|
10
|
+
|
11
|
+
#import <QuartzCore/QuartzCore.h>
|
12
|
+
#import "UIBubbleTableViewCell.h"
|
13
|
+
#import "NSBubbleData.h"
|
14
|
+
|
15
|
+
@interface UIBubbleTableViewCell ()
|
16
|
+
|
17
|
+
@property (nonatomic, retain) UIView *customView;
|
18
|
+
@property (nonatomic, retain) UIImageView *bubbleImage;
|
19
|
+
@property (nonatomic, retain) UIImageView *avatarImage;
|
20
|
+
|
21
|
+
- (void) setupInternalData;
|
22
|
+
|
23
|
+
@end
|
24
|
+
|
25
|
+
@implementation UIBubbleTableViewCell
|
26
|
+
|
27
|
+
@synthesize data = _data;
|
28
|
+
@synthesize customView = _customView;
|
29
|
+
@synthesize bubbleImage = _bubbleImage;
|
30
|
+
@synthesize showAvatar = _showAvatar;
|
31
|
+
@synthesize avatarImage = _avatarImage;
|
32
|
+
|
33
|
+
- (void)setFrame:(CGRect)frame
|
34
|
+
{
|
35
|
+
[super setFrame:frame];
|
36
|
+
[self setupInternalData];
|
37
|
+
}
|
38
|
+
|
39
|
+
#if !__has_feature(objc_arc)
|
40
|
+
- (void) dealloc
|
41
|
+
{
|
42
|
+
self.data = nil;
|
43
|
+
self.customView = nil;
|
44
|
+
self.bubbleImage = nil;
|
45
|
+
self.avatarImage = nil;
|
46
|
+
[super dealloc];
|
47
|
+
}
|
48
|
+
#endif
|
49
|
+
|
50
|
+
- (void)setDataInternal:(NSBubbleData *)value
|
51
|
+
{
|
52
|
+
self.data = value;
|
53
|
+
[self setupInternalData];
|
54
|
+
}
|
55
|
+
|
56
|
+
- (void) setupInternalData
|
57
|
+
{
|
58
|
+
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
59
|
+
|
60
|
+
if (!self.bubbleImage)
|
61
|
+
{
|
62
|
+
#if !__has_feature(objc_arc)
|
63
|
+
self.bubbleImage = [[[UIImageView alloc] init] autorelease];
|
64
|
+
#else
|
65
|
+
self.bubbleImage = [[UIImageView alloc] init];
|
66
|
+
#endif
|
67
|
+
[self addSubview:self.bubbleImage];
|
68
|
+
}
|
69
|
+
|
70
|
+
NSBubbleType type = self.data.type;
|
71
|
+
|
72
|
+
CGFloat width = self.data.view.frame.size.width;
|
73
|
+
CGFloat height = self.data.view.frame.size.height;
|
74
|
+
|
75
|
+
CGFloat x = (type == BubbleTypeSomeoneElse) ? 0 : self.frame.size.width - width - self.data.insets.left - self.data.insets.right;
|
76
|
+
CGFloat y = 0;
|
77
|
+
|
78
|
+
// Adjusting the x coordinate for avatar
|
79
|
+
if (self.showAvatar)
|
80
|
+
{
|
81
|
+
[self.avatarImage removeFromSuperview];
|
82
|
+
#if !__has_feature(objc_arc)
|
83
|
+
self.avatarImage = [[[UIImageView alloc] initWithImage:(self.data.avatar ? self.data.avatar : [UIImage imageNamed:@"missingAvatar.png"])] autorelease];
|
84
|
+
#else
|
85
|
+
self.avatarImage = [[UIImageView alloc] initWithImage:(self.data.avatar ? self.data.avatar : [UIImage imageNamed:@"missingAvatar.png"])];
|
86
|
+
#endif
|
87
|
+
self.avatarImage.layer.cornerRadius = 9.0;
|
88
|
+
self.avatarImage.layer.masksToBounds = YES;
|
89
|
+
self.avatarImage.layer.borderColor = [UIColor colorWithWhite:0.0 alpha:0.2].CGColor;
|
90
|
+
self.avatarImage.layer.borderWidth = 1.0;
|
91
|
+
|
92
|
+
CGFloat avatarX = (type == BubbleTypeSomeoneElse) ? 2 : self.frame.size.width - 52;
|
93
|
+
CGFloat avatarY = self.frame.size.height - 50;
|
94
|
+
|
95
|
+
self.avatarImage.frame = CGRectMake(avatarX, avatarY, 50, 50);
|
96
|
+
[self addSubview:self.avatarImage];
|
97
|
+
|
98
|
+
CGFloat delta = self.frame.size.height - (self.data.insets.top + self.data.insets.bottom + self.data.view.frame.size.height);
|
99
|
+
if (delta > 0) y = delta;
|
100
|
+
|
101
|
+
if (type == BubbleTypeSomeoneElse) x += 54;
|
102
|
+
if (type == BubbleTypeMine) x -= 54;
|
103
|
+
}
|
104
|
+
|
105
|
+
[self.customView removeFromSuperview];
|
106
|
+
self.customView = self.data.view;
|
107
|
+
self.customView.frame = CGRectMake(x + self.data.insets.left, y + self.data.insets.top, width, height);
|
108
|
+
[self.contentView addSubview:self.customView];
|
109
|
+
|
110
|
+
if (type == BubbleTypeSomeoneElse)
|
111
|
+
{
|
112
|
+
self.bubbleImage.image = [[UIImage imageNamed:@"bubbleSomeone.png"] stretchableImageWithLeftCapWidth:21 topCapHeight:14];
|
113
|
+
|
114
|
+
}
|
115
|
+
else {
|
116
|
+
self.bubbleImage.image = [[UIImage imageNamed:@"bubbleMine.png"] stretchableImageWithLeftCapWidth:15 topCapHeight:14];
|
117
|
+
}
|
118
|
+
|
119
|
+
self.bubbleImage.frame = CGRectMake(x, y, width + self.data.insets.left + self.data.insets.right, height + self.data.insets.top + self.data.insets.bottom);
|
120
|
+
}
|
121
|
+
|
122
|
+
@end
|