- #import "SubCategoryViewController.h"
- #import "UIImageView+AFNetworking.h"
- #import "ProgressHUD.h"
- #import <SDWebImage/UIImageView+WebCache.h>
- #import "GAI.h"
- #import "GAIFields.h"
- #import "GAIDictionaryBuilder.h"
- #import "SubcategoryTableViewCell.h"
- @interface SubCategoryViewController () <UIScrollViewDelegate>
- {
- UIRefreshControl *refreshControl;
- };
- @end
- @implementation SubCategoryViewController
- #pragma mark
- // -------------------------------------------------------------------------------
- // viewDidLoad
- // -------------------------------------------------------------------------------
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
- }
- - (void)viewDidAppear:(BOOL)animated
- {
- }
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
- {
- return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- NSUInteger count = [self.entries count];
- return count;
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- NSString *reuseIdentifier = [NSString stringWithFormat:@"cell_%ld",(long)indexPath.row];
- SubcategoryTableViewCell * sctvCell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
- if (sctvCell == nil) {
- sctvCell= [[SubcategoryTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
- }
- NSUInteger nodeCount = [self.entries count];
- sctvCell.contentView.translatesAutoresizingMaskIntoConstraints = NO;
- if (nodeCount > 0)
- {
- sctvCell.label.hidden = false;
- [sctvCell.label setText:appRecord.title];
- }
- return sctvCell;
- }
- - (void)viewWillAppear:(BOOL)animated
- {
- [super viewWillAppear:animated];
- }
- -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- return 170;
- }
- - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
- {
- }
- @end