LuxChat  2.0
Instant messenger for iOS
PFQueryTableViewController.h
1 /*
2  * Copyright (c) 2014, Parse, LLC. All rights reserved.
3  *
4  * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5  * copy, modify, and distribute this software in source code or binary form for use
6  * in connection with the web services and APIs provided by Parse.
7  *
8  * As with any software that integrates with the Parse platform, your use of
9  * this software is subject to the Parse Terms of Service
10  * [https://www.parse.com/about/terms]. This copyright notice shall be
11  * included in all copies or substantial portions of the software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19  *
20  */
21 
22 #import <UIKit/UIKit.h>
23 
24 #import <Parse/PFConstants.h>
25 #import <ParseUI/ParseUIConstants.h>
26 
27 NS_ASSUME_NONNULL_BEGIN
28 
30 @class PFObject;
31 @class PFQuery;
32 @class PFTableViewCell;
33 
47 @interface PFQueryTableViewController : UITableViewController <UITableViewDataSource, UITableViewDelegate>
48 
52 
61 - (instancetype)initWithStyle:(UITableViewStyle)style
62  className:(nullable NSString *)className NS_DESIGNATED_INITIALIZER;
63 
71 - (instancetype)initWithClassName:(nullable NSString *)className;
72 
76 
80 @property (nullable, nonatomic, copy) IBInspectable NSString *parseClassName;
81 
87 @property (nullable, nonatomic, copy) IBInspectable NSString *textKey;
88 
94 @property (nullable, nonatomic, copy) IBInspectable NSString *imageKey;
95 
101 @property (nullable, nonatomic, strong) IBInspectable UIImage *placeholderImage;
102 
106 @property (nonatomic, assign) IBInspectable BOOL loadingViewEnabled;
107 
111 @property (nonatomic, assign) IBInspectable BOOL pullToRefreshEnabled;
112 
116 @property (nonatomic, assign) IBInspectable BOOL paginationEnabled;
117 
121 @property (nonatomic, assign) IBInspectable NSUInteger objectsPerPage;
122 
126 @property (nonatomic, assign, getter=isLoading) BOOL loading;
127 
131 
136 - (void)objectsWillLoad;
137 
143 - (void)objectsDidLoad:(nullable NSError *)error;
144 
148 
152 @property (nullable, nonatomic, copy, readonly) NSArray<__kindof PFObject *> *objects;
153 
164 - (nullable PFObject *)objectAtIndexPath:(nullable NSIndexPath *)indexPath;
165 
169 - (void)removeObjectAtIndexPath:(nullable NSIndexPath *)indexPath;
170 
174 - (void)removeObjectAtIndexPath:(nullable NSIndexPath *)indexPath animated:(BOOL)animated;
175 
179 - (void)removeObjectsAtIndexPaths:(nullable NSArray<NSIndexPath *> *)indexPaths;
180 
184 - (void)removeObjectsAtIndexPaths:(nullable NSArray<NSIndexPath *> *)indexPaths animated:(BOOL)animated;
185 
189 - (void)clear;
190 
196 - (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects;
197 
207 - (BFTask<NSArray<__kindof PFObject *> *> *)loadObjects:(NSInteger)page clear:(BOOL)clear;
208 
212 - (void)loadNextPage;
213 
217 
222 - (PFQuery *)queryForTable;
223 
227 
242 - (nullable PFTableViewCell *)tableView:(UITableView *)tableView
243  cellForRowAtIndexPath:(NSIndexPath *)indexPath
244  object:(nullable PFObject *)object;
245 
255 - (nullable PFTableViewCell *)tableView:(UITableView *)tableView cellForNextPageAtIndexPath:(NSIndexPath *)indexPath;
256 
257 @end
258 
259 NS_ASSUME_NONNULL_END
Definition: PFObject+Subclass.h:14
Definition: PFObject.h:32
Definition: PFTableViewCell.h:35
Definition: PFImageView.h:32