summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-07-14 19:35:36 -0600
committermo khan <mo@mokhan.ca>2013-07-14 19:35:36 -0600
commit90802b2907eba61711a3f4500c6873c7219de0b9 (patch)
tree435b44e3fc09a8a5dd4cdbbb3bb1f175f248955b
parentb53a35dfe26af9be8231a0d4378c1fa379911de2 (diff)
display loading cell when fetching the latest creations
-rw-r--r--cakeside-ios/controllers/CreationsTableViewController.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/cakeside-ios/controllers/CreationsTableViewController.m b/cakeside-ios/controllers/CreationsTableViewController.m
index 0bc3052..61c9c38 100644
--- a/cakeside-ios/controllers/CreationsTableViewController.m
+++ b/cakeside-ios/controllers/CreationsTableViewController.m
@@ -92,7 +92,7 @@
{
if (!self.data || self.data.count == 0)
{
- return 0;
+ return 1;
}
else
{
@@ -102,6 +102,17 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
+ if(!self.data || self.data.count == 0)
+ {
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LoadingCell"];
+ if (cell == nil)
+ {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"LoadingCell"];
+ }
+ cell.textLabel.text = @"Loading...";
+ return cell;
+ }
+
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CakeCell"];
if (cell == nil)
{