Skip to content

Commit ec85171

Browse files
committed
change renamed classes in other files, break swift sample
1 parent c61d81c commit ec85171

26 files changed

+226
-286
lines changed

FirebaseDatabaseUI/FUIArray.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
4141
@end
4242

4343
/**
44-
* FirebaseArray provides an array structure that is synchronized with a Firebase reference or
44+
* FUIArray provides an array structure that is synchronized with a Firebase reference or
4545
* query. It is useful for building custom data structures or sources, and provides the base for
4646
* FirebaseDataSource.
4747
*/
@@ -54,37 +54,39 @@ NS_ASSUME_NONNULL_BEGIN
5454
@property(weak, nonatomic, nullable) id<FUIArrayDelegate> delegate;
5555

5656
/**
57-
* The query on a Firebase reference that provides data to populate the instance of FirebaseArray.
57+
* The query on a Firebase reference that provides data to populate the array.
5858
*/
5959
@property(strong, nonatomic) id<FIRDataObservable> query;
6060

6161
/**
62-
* The number of objects in the FirebaseArray.
62+
* The number of objects in the array.
6363
*/
6464
@property(nonatomic, readonly) NSUInteger count;
6565

6666
/**
67-
* The items currently in the FirebaseArray.
67+
* The items currently in the array.
6868
*/
6969
@property(nonatomic, readonly, copy) NSArray *items;
7070

7171
#pragma mark - Initializer methods
7272

7373
/**
74-
* Initalizes FirebaseArray with a Firebase query (FIRDatabaseQuery) or database reference
74+
* Initalizes an FUIArray with a Firebase query (FIRDatabaseQuery) or database reference
7575
* (FIRDatabaseReference).
7676
* @param query A query or Firebase database reference
7777
* @param delegate An object conforming to FirebaseArrayDelegate that should receive delegate messages.
7878
* @return A FirebaseArray instance
7979
*/
8080
- (instancetype)initWithQuery:(id<FIRDataObservable>)query
81-
delegate:(nullable id<FirebaseArrayDelegate>)delegate NS_DESIGNATED_INITIALIZER;
81+
delegate:(nullable id<FUIArrayDelegate>)delegate NS_DESIGNATED_INITIALIZER;
8282

8383
/**
8484
* Initalizes FirebaseArray with a Firebase query (FIRDatabaseQuery) or database reference
8585
* (FIRDatabaseReference).
86-
* @param query A query or Firebase database reference
86+
* @param query A query or Firebase database reference
8787
* @return A FirebaseArray instance
88+
* @param query A query or Firebase database reference
89+
* @return An FUIArray instance
8890
*/
8991
- (instancetype)initWithQuery:(id<FIRDataObservable>)query;
9092

@@ -98,14 +100,14 @@ NS_ASSUME_NONNULL_BEGIN
98100
#pragma mark - Public API methods
99101

100102
/**
101-
* Returns an object at a specific index in the FirebaseArray.
103+
* Returns an object at a specific index in the array.
102104
* @param index The index of the item to retrieve
103105
* @return The object at the given index
104106
*/
105107
- (id)objectAtIndex:(NSUInteger)index;
106108

107109
/**
108-
* Returns a Firebase reference for an object at a specific index in the FirebaseArray.
110+
* Returns a Firebase reference for an object at a specific index in the array.
109111
* @param index The index of the item to retrieve a reference for
110112
* @return A Firebase reference for the object at the given index
111113
*/

FirebaseDatabaseUI/FUIArray.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@interface FUIArray ()
2424

2525
/**
26-
* The backing collection that holds all of the FirebaseArray's data.
26+
* The backing collection that holds all of the array's data.
2727
*/
2828
@property(strong, nonatomic) NSMutableArray<FIRDataSnapshot *> *snapshots;
2929

@@ -39,7 +39,7 @@ @implementation FUIArray
3939

4040
#pragma mark - Initializer methods
4141

42-
- (instancetype)initWithQuery:(FIRDatabaseQuery *)query delegate:(id<FirebaseArrayDelegate>)delegate {
42+
- (instancetype)initWithQuery:(FIRDatabaseQuery *)query delegate:(id<FUIArrayDelegate>)delegate {
4343
NSParameterAssert(query != nil);
4444
self = [super init];
4545
if (self) {

FirebaseDatabaseUI/FUIArrayDelegate.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,45 @@
2121
@class FUIArray;
2222

2323
/**
24-
* A protocol to allow instances of FirebaseArray to raise events through a
25-
* delegate. Raises all Firebase events except @c FIRDataEventTypeValue.
24+
* A protocol to allow instances of FUIArray to raise events through a
25+
* delegate. Raises all Firebase events except FIRDataEventTypeValue.
2626
*/
2727
@protocol FUIArrayDelegate<NSObject>
2828

2929
@optional
3030

3131
/**
32-
* Delegate method which is called whenever an object is added to a
33-
* FirebaseArray. On a FirebaseArray synchronized to a Firebase reference,
34-
* this corresponds to a @c FIRDataEventTypeChildAdded event being raised.
35-
* @param object The object added to the FirebaseArray
32+
* Delegate method which is called whenever an object is added to an FUIArray.
33+
* On a FUIArray synchronized to a Firebase reference, this corresponds to a
34+
* @c FIRDataEventTypeChildAdded event being raised.
35+
* @param object The object added to the FUIArray
3636
* @param index The index the child was added at
3737
*/
3838
- (void)array:(FUIArray *)array didAddObject:(id)object atIndex:(NSUInteger)index;
3939

4040
/**
41-
* Delegate method which is called whenever an object is changed in a
42-
* FirebaseArray. On a FirebaseArray synchronized to a Firebase reference,
43-
* this corresponds to a @c FIRDataEventTypeChildChanged event being raised.
44-
* @param object The object that changed in the FirebaseArray
41+
* Delegate method which is called whenever an object is changed in an
42+
* FUIArray. On a FUIArray synchronized to a Firebase reference, this
43+
* corresponds to a @c FIRDataEventTypeChildChanged event being raised.
44+
* @param object The object that changed in the FUIArray
4545
* @param index The index the child was changed at
4646
*/
4747
- (void)array:(FUIArray *)array didChangeObject:(id)object atIndex:(NSUInteger)index;
4848

4949
/**
50-
* Delegate method which is called whenever an object is removed from a
51-
* FirebaseArray. On a FirebaseArray synchronized to a Firebase reference,
52-
* this corresponds to a @c FIRDataEventTypeChildRemoved event being raised.
53-
* @param object The object removed from the FirebaseArray
50+
* Delegate method which is called whenever an object is removed from an
51+
* FUIArray. On a FUIArray synchronized to a Firebase reference, this
52+
* corresponds to a @c FIRDataEventTypeChildRemoved event being raised.
53+
* @param object The object removed from the FUIArray
5454
* @param index The index the child was removed at
5555
*/
5656
- (void)array:(FUIArray *)array didRemoveObject:(id)object atIndex:(NSUInteger)index;
5757

5858
/**
5959
* Delegate method which is called whenever an object is moved within a
60-
* FirebaseArray. On a FirebaseArray synchronized to a Firebase reference,
61-
* this corresponds to a @c FIRDataEventTypeChildMoved event being raised.
62-
* @param object The object that has moved locations in the FirebaseArray
60+
* FUIArray. On a FUIArray synchronized to a Firebase reference, this
61+
* corresponds to a @c FIRDataEventTypeChildMoved event being raised.
62+
* @param object The object that has moved locations in the FUIArray
6363
* @param fromIndex The index the child is being moved from
6464
* @param toIndex The index the child is being moved to
6565
*/

FirebaseDatabaseUI/FUICollectionViewDataSource.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ NS_ASSUME_NONNULL_BEGIN
8585
* view is in use.
8686
*/
8787
- (FUICollectionViewDataSource *)bindToQuery:(FIRDatabaseQuery *)query
88-
populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView,
89-
NSIndexPath *indexPath,
90-
FIRDataSnapshot *object))populateCell __attribute__((warn_unused_result));
88+
populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView,
89+
NSIndexPath *indexPath,
90+
FIRDataSnapshot *object))populateCell __attribute__((warn_unused_result));
9191

9292
@end
9393

FirebaseDatabaseUI/FUICollectionViewDataSource.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ - (NSInteger)collectionView:(nonnull UICollectionView *)collectionView
8888
@implementation UICollectionView (FUICollectionViewDataSource)
8989

9090
- (FUICollectionViewDataSource *)bindToQuery:(FIRDatabaseQuery *)query
91-
populateCell:(UICollectionViewCell *(^)(UICollectionView *,
92-
NSIndexPath *,
93-
FIRDataSnapshot *))populateCell {
91+
populateCell:(UICollectionViewCell *(^)(UICollectionView *,
92+
NSIndexPath *,
93+
FIRDataSnapshot *))populateCell {
9494
FUICollectionViewDataSource *dataSource =
9595
[[FUICollectionViewDataSource alloc] initWithQuery:query view:self populateCell:populateCell];
9696
self.dataSource = dataSource;

FirebaseDatabaseUI/FUIDataSource.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
@property (nonatomic, readonly) NSUInteger count;
4646

4747
- (instancetype)initWithArray:(FUIArray *)array NS_DESIGNATED_INITIALIZER;
48+
4849
- (instancetype)init NS_UNAVAILABLE;
4950

5051
/**

FirebaseDatabaseUI/FUITableViewDataSource.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ NS_ASSUME_NONNULL_BEGIN
8181
* view is in use.
8282
*/
8383
- (FUITableViewDataSource *)bindToQuery:(FIRDatabaseQuery *)query
84-
populateCell:(UITableViewCell *(^)(UITableView *tableView,
85-
NSIndexPath *indexPath,
86-
FIRDataSnapshot *object))populateCell __attribute__((warn_unused_result));
84+
populateCell:(UITableViewCell *(^)(UITableView *tableView,
85+
NSIndexPath *indexPath,
86+
FIRDataSnapshot *object))populateCell __attribute__((warn_unused_result));
8787

8888
@end
8989

FirebaseDatabaseUI/FUITableViewDataSource.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
9898
@implementation UITableView (FUITableViewDataSource)
9999

100100
- (FUITableViewDataSource *)bindToQuery:(FIRDatabaseQuery *)query
101-
populateCell:(UITableViewCell *(^)(UITableView *tableView,
102-
NSIndexPath *indexPath,
103-
FIRDataSnapshot *snap))populateCell {
101+
populateCell:(UITableViewCell *(^)(UITableView *tableView,
102+
NSIndexPath *indexPath,
103+
FIRDataSnapshot *snap))populateCell {
104104
FUITableViewDataSource *dataSource =
105105
[[FUITableViewDataSource alloc] initWithQuery:query view:self populateCell:populateCell];
106106
self.dataSource = dataSource;

FirebaseDatabaseUI/FirebaseIndexArray.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// clang-format on
2020

21-
#import "FirebaseArray.h"
21+
#import "FUIArray.h"
2222

2323
NS_ASSUME_NONNULL_BEGIN
2424

FirebaseDatabaseUI/FirebaseIndexArray.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
#import "FirebaseIndexArray.h"
2222
#import "FirebaseQueryObserver.h"
2323

24-
@interface FirebaseIndexArray () <FirebaseArrayDelegate>
24+
@interface FirebaseIndexArray () <FUIArrayDelegate>
2525

2626
@property (nonatomic, readonly) id<FIRDataObservable> index;
2727
@property (nonatomic, readonly) id<FIRDataObservable> data;
2828

29-
@property (nonatomic, readonly) FirebaseArray *indexArray;
29+
@property (nonatomic, readonly) FUIArray *indexArray;
3030

3131
@property (nonatomic, readonly) NSMutableArray<FirebaseQueryObserver *> *observers;
3232

@@ -70,7 +70,7 @@ - (instancetype)initWithIndex:(id<FIRDataObservable>)index
7070
}
7171

7272
- (void)observeQueries {
73-
_indexArray = [[FirebaseArray alloc] initWithQuery:self.index delegate:self];
73+
_indexArray = [[FUIArray alloc] initWithQuery:self.index delegate:self];
7474
}
7575

7676
- (NSArray <FIRDataSnapshot *> *)items {
@@ -125,7 +125,7 @@ - (void)observer:(FirebaseQueryObserver *)obs
125125
}
126126
}
127127

128-
- (void)array:(FirebaseArray *)array
128+
- (void)array:(FUIArray *)array
129129
didAddObject:(FIRDataSnapshot *)object
130130
atIndex:(NSUInteger)index {
131131
NSParameterAssert([object.key isKindOfClass:[NSString class]]);
@@ -144,7 +144,7 @@ - (void)array:(FirebaseArray *)array
144144
}
145145
}
146146

147-
- (void)array:(FirebaseArray *)array
147+
- (void)array:(FUIArray *)array
148148
didMoveObject:(FIRDataSnapshot *)object
149149
fromIndex:(NSUInteger)fromIndex
150150
toIndex:(NSUInteger)toIndex {
@@ -159,7 +159,7 @@ - (void)array:(FirebaseArray *)array
159159
}
160160
}
161161

162-
- (void)array:(FirebaseArray *)array
162+
- (void)array:(FUIArray *)array
163163
didChangeObject:(FIRDataSnapshot *)object
164164
atIndex:(NSUInteger)index {
165165
NSParameterAssert([object.key isKindOfClass:[NSString class]]);
@@ -183,7 +183,7 @@ - (void)array:(FirebaseArray *)array
183183
}
184184
}
185185

186-
- (void)array:(FirebaseArray *)array
186+
- (void)array:(FUIArray *)array
187187
didRemoveObject:(FIRDataSnapshot *)object
188188
atIndex:(NSUInteger)index {
189189
// Cancel loads on old observer
@@ -197,7 +197,7 @@ - (void)array:(FirebaseArray *)array
197197
}
198198
}
199199

200-
- (void)array:(FirebaseArray *)array queryCancelledWithError:(NSError *)error {
200+
- (void)array:(FUIArray *)array queryCancelledWithError:(NSError *)error {
201201
[self invalidate];
202202
if ([self.delegate respondsToSelector:@selector(array:queryCancelledWithError:)]) {
203203
[self.delegate array:self queryCancelledWithError:error];

0 commit comments

Comments
 (0)