Skip to content

Commit

Permalink
Merge pull request #2 from vetri02/revert-1-master
Browse files Browse the repository at this point in the history
Revert "Updates"
  • Loading branch information
vetri02 committed Jun 15, 2015
2 parents d28d113 + 4c47814 commit 8f9d467
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 177 deletions.
Binary file removed .DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Cocoa Pods

Pods
*.xcworkspace
.DS_Store

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions HackerNews.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions HackerNews.xcworkspace/xcshareddata/HackerNews.xccheckout
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>4F2AC62E-4459-4854-9900-A521830ABE07</string>
<string>97AB5BB3-A2A0-4532-AF62-D2D7874E1601</string>
<key>IDESourceControlProjectName</key>
<string>HackerNews</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>EA968A234A6F0CCDD81314EBF74145CD4C9C0ECC</key>
<string>https://github.com/Lumenela/HackerNews.git</string>
<string>https://github.com/vetri02/HackerNews.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>HackerNews.xcworkspace</string>
Expand All @@ -21,7 +21,7 @@
<string>..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/Lumenela/HackerNews.git</string>
<string>https://github.com/vetri02/HackerNews.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
Expand All @@ -34,7 +34,7 @@
<key>IDESourceControlWCCIdentifierKey</key>
<string>EA968A234A6F0CCDD81314EBF74145CD4C9C0ECC</string>
<key>IDESourceControlWCCName</key>
<string>HackerNews-master</string>
<string>HackerNews</string>
</dict>
</array>
</dict>
Expand Down
Binary file not shown.
32 changes: 17 additions & 15 deletions HackerNews/HomeTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,22 @@

@interface HomeTableViewController ()

@property (nonatomic, strong) NSMutableArray *temporaryTop500StoriesIds;
@property (nonatomic, strong) NSMutableArray *storyEventRefs;
@property (nonatomic, strong) NSMutableArray *dataArr;
@property (nonatomic, strong) NSMutableArray *heights;
@property NSMutableArray *temporaryTop500StoriesIds;
@property NSMutableArray *storyEventRefs;
@property NSMutableArray *dataArr;
@property NSMutableArray *heights;
@property (nonatomic, assign) NSInteger counter;
@property (nonatomic, strong) StoryTableViewCell *prototypeCell;

@end




@end

@implementation HomeTableViewController

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
self.datasourceName = @"topstories";
self.loadMsg = @"Fetching Top Stories";
self.navTitle = @"Top Stories";
return self;
}



#pragma mark - FireBase API
Expand Down Expand Up @@ -114,7 +111,7 @@ - (void)getStoryDataOfItem:(NSNumber *)itemNumber usingNewIDs:(BOOL)usingNewIDs{

//NSDictionary *responseDictionary = snapshot.value;

// NSLog(@"%@", snapshot.value);
NSLog(@"%@", snapshot.value);
if(snapshot.value != [NSNull null]){
[self.tableView beginUpdates];
[self.storiesArray addObject:snapshot.value];
Expand Down Expand Up @@ -144,7 +141,12 @@ - (void)viewDidLoad {
// Initialize array that will store stories.
self.storiesArray = [[NSMutableArray alloc] init];
self.heights = [[NSMutableArray alloc] init];
self.datasourceName = @"topstories";
self.loadMsg = @"Fetching Top Stories";
self.navTitle = @"Top Stories";



self.navigationController.navigationBar.topItem.title = self.navTitle;


Expand Down Expand Up @@ -174,8 +176,8 @@ - (void)viewDidLoad {

}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
-(void) viewWillAppear {
self.navTitle = @"Top Stories";
self.navigationController.navigationBar.topItem.title = self.navTitle;
self.title = self.navTitle;
}
Expand Down
23 changes: 15 additions & 8 deletions HackerNews/JobsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,26 @@ @interface JobsTableViewController ()

@implementation JobsTableViewController

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
self.datasourceName = @"jobstories";
self.loadMsg = @"Fetching Jobs";
self.navTitle = @"Jobs";
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}

- (NSString *)datasourceName {

return @"jobstories";
}

- (NSString *)loadMsg {

return @"Fetching Jobs";
}

- (NSString *)navTitle {

return @"Jobs";
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *story = [self.storiesArray objectAtIndex:indexPath.row];
Expand Down
25 changes: 17 additions & 8 deletions HackerNews/LatestTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ @interface LatestTableViewController ()

@implementation LatestTableViewController

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
self.datasourceName = @"newstories";
self.loadMsg = @"Fetching Latest";
self.navTitle = @"Latest Stories";
return self;
}

- (void)viewDidLoad {


Expand All @@ -39,6 +31,23 @@ - (void)viewDidLoad {
// Do any additional setup after loading the view.
}


- (NSString *)datasourceName {

return @"newstories";
}

- (NSString *)loadMsg {

return @"Fetching Latest";
}


- (NSString *)navTitle {

return @"Latest Stories";
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *story = [self.storiesArray objectAtIndex:indexPath.row];
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ SPEC CHECKSUMS:
NSDate+TimeAgo: 416f55d2696d3744c313091c5a9280d47f8238fe
TPKeyboardAvoiding: ee4dd35e3bb7bb64bfbda47e7cc9ba872ff10f77

COCOAPODS: 0.37.0
COCOAPODS: 0.35.0

0 comments on commit 8f9d467

Please sign in to comment.