Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: trivektor/Gitos-iPad
base: 6c7ed05ba3
...
head fork: trivektor/Gitos-iPad
compare: 1d6e3767a7
  • 4 commits
  • 25 files changed
  • 0 commit comments
  • 1 contributor
Showing with 486 additions and 388 deletions.
  1. +1 −17 Gitos-iPad.xcodeproj/project.pbxproj
  2. BIN  Gitos-iPad.xcodeproj/project.xcworkspace/xcuserdata/trivuong.xcuserdatad/UserInterfaceState.xcuserstate
  3. +10 −0 Gitos-iPad.xcodeproj/project.xcworkspace/xcuserdata/trivuong.xcuserdatad/WorkspaceSettings.xcsettings
  4. +1 −1  Gitos-iPad.xcodeproj/xcuserdata/trivuong.xcuserdatad/xcschemes/Gitos-iPad.xcscheme
  5. +2 −0  Gitos-iPad/Classes/GitosConstants.h
  6. +2 −0  Gitos-iPad/Classes/GitosConstants.m
  7. +0 −18 Gitos-iPad/Classes/SpinnerView.h
  8. +0 −90 Gitos-iPad/Classes/SpinnerView.m
  9. +1 −1  Gitos-iPad/Controllers/CommitsViewController.m
  10. +9 −5 Gitos-iPad/Controllers/FeedbackViewController.h
  11. +49 −53 Gitos-iPad/Controllers/FeedbackViewController.m
  12. +329 −108 Gitos-iPad/Controllers/FeedbackViewController.xib
  13. +5 −9 Gitos-iPad/Controllers/GistViewController.m
  14. +2 −2 Gitos-iPad/Controllers/LoginViewController.h
  15. +15 −19 Gitos-iPad/Controllers/LoginViewController.m
  16. +1 −1  Gitos-iPad/Controllers/NewsfeedDetailsViewController.m
  17. +1 −1  Gitos-iPad/Controllers/NewsfeedViewController.m
  18. +1 −1  Gitos-iPad/Controllers/NotificationsViewController.m
  19. +11 −11 Gitos-iPad/Controllers/ProfileViewController.m
  20. +1 −2  Gitos-iPad/Controllers/RepoTreeViewController.h
  21. +9 −10 Gitos-iPad/Controllers/RepoTreeViewController.m
  22. +5 −9 Gitos-iPad/Controllers/RepoViewController.m
  23. +7 −5 Gitos-iPad/Controllers/ReposViewController.m
  24. +16 −13 Gitos-iPad/Controllers/SearchViewController.m
  25. +8 −12 Gitos-iPad/Controllers/StarredViewController.m
View
18 Gitos-iPad.xcodeproj/project.pbxproj
@@ -161,7 +161,6 @@
B54F69DB16D2C5CA00978DD9 /* 04-squiggle.png in Resources */ = {isa = PBXBuildFile; fileRef = B54F69D916D2C5CA00978DD9 /* 04-squiggle.png */; };
B54F69DC16D2C5CA00978DD9 /* 04-squiggle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B54F69DA16D2C5CA00978DD9 /* 04-squiggle@2x.png */; };
B54F69DE16D2DF1E00978DD9 /* avatar-placeholder.png in Resources */ = {isa = PBXBuildFile; fileRef = B54F69DD16D2DF1E00978DD9 /* avatar-placeholder.png */; };
- B54F69E016D2E94800978DD9 /* avatar-placeholder.png in Resources */ = {isa = PBXBuildFile; fileRef = B54F69DF16D2E94800978DD9 /* avatar-placeholder.png */; };
B54F69E316D2F69C00978DD9 /* Notification.m in Sources */ = {isa = PBXBuildFile; fileRef = B54F69E216D2F69C00978DD9 /* Notification.m */; };
B54F69E716D2F88C00978DD9 /* NotificationsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B54F69E516D2F88A00978DD9 /* NotificationsViewController.m */; };
B54F69E816D2F88C00978DD9 /* NotificationsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B54F69E616D2F88B00978DD9 /* NotificationsViewController.xib */; };
@@ -228,7 +227,6 @@
B55D910716B7AD2B009CB90F /* RelativeDateDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = B55D910616B7AD2B009CB90F /* RelativeDateDescriptor.m */; };
B55D910A16B7AD47009CB90F /* Repo.m in Sources */ = {isa = PBXBuildFile; fileRef = B55D910916B7AD46009CB90F /* Repo.m */; };
B55D910D16B7AD79009CB90F /* RepoTreeNode.m in Sources */ = {isa = PBXBuildFile; fileRef = B55D910C16B7AD78009CB90F /* RepoTreeNode.m */; };
- B55D911016B7ADAA009CB90F /* SpinnerView.m in Sources */ = {isa = PBXBuildFile; fileRef = B55D910F16B7ADA9009CB90F /* SpinnerView.m */; };
B55D911316B7ADCE009CB90F /* TimelineEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = B55D911216B7ADCD009CB90F /* TimelineEvent.m */; };
B55D911616B7ADF0009CB90F /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = B55D911516B7ADEE009CB90F /* User.m */; };
B55D911D16B7AE48009CB90F /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B55D911B16B7AE48009CB90F /* LoginViewController.m */; };
@@ -279,10 +277,6 @@
B569D0C516FE6496002216DD /* glyphicons_078_warning_sign@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B569D0C116FE6496002216DD /* glyphicons_078_warning_sign@2x.png */; };
B569D0C616FE6496002216DD /* glyphicons_198_ok.png in Resources */ = {isa = PBXBuildFile; fileRef = B569D0C216FE6496002216DD /* glyphicons_198_ok.png */; };
B569D0C716FE6496002216DD /* glyphicons_198_ok@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B569D0C316FE6496002216DD /* glyphicons_198_ok@2x.png */; };
- B569D0CC16FE6861002216DD /* glyphicons_078_warning_sign.png in Resources */ = {isa = PBXBuildFile; fileRef = B569D0C816FE6861002216DD /* glyphicons_078_warning_sign.png */; };
- B569D0CD16FE6861002216DD /* glyphicons_078_warning_sign@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B569D0C916FE6861002216DD /* glyphicons_078_warning_sign@2x.png */; };
- B569D0CE16FE6861002216DD /* glyphicons_198_ok.png in Resources */ = {isa = PBXBuildFile; fileRef = B569D0CA16FE6861002216DD /* glyphicons_198_ok.png */; };
- B569D0CF16FE6861002216DD /* glyphicons_198_ok@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B569D0CB16FE6861002216DD /* glyphicons_198_ok@2x.png */; };
B569D0D216FE6F0F002216DD /* Authorization.m in Sources */ = {isa = PBXBuildFile; fileRef = B569D0D116FE6F0F002216DD /* Authorization.m */; };
B569D0D516FE7923002216DD /* GitosConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = B569D0D416FE7923002216DD /* GitosConstants.m */; };
B57E39AA16FE5CBB006C2BD1 /* YRDropdownView.m in Sources */ = {isa = PBXBuildFile; fileRef = B57E39A916FE5CBB006C2BD1 /* YRDropdownView.m */; };
@@ -599,8 +593,6 @@
B55D910916B7AD46009CB90F /* Repo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Repo.m; sourceTree = "<group>"; };
B55D910B16B7AD77009CB90F /* RepoTreeNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RepoTreeNode.h; sourceTree = "<group>"; };
B55D910C16B7AD78009CB90F /* RepoTreeNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RepoTreeNode.m; sourceTree = "<group>"; };
- B55D910E16B7ADA8009CB90F /* SpinnerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpinnerView.h; sourceTree = "<group>"; };
- B55D910F16B7ADA9009CB90F /* SpinnerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpinnerView.m; sourceTree = "<group>"; };
B55D911116B7ADCC009CB90F /* TimelineEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineEvent.h; sourceTree = "<group>"; };
B55D911216B7ADCD009CB90F /* TimelineEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TimelineEvent.m; sourceTree = "<group>"; };
B55D911416B7ADED009CB90F /* User.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = "<group>"; };
@@ -1152,8 +1144,6 @@
B55D910916B7AD46009CB90F /* Repo.m */,
B55D910B16B7AD77009CB90F /* RepoTreeNode.h */,
B55D910C16B7AD78009CB90F /* RepoTreeNode.m */,
- B55D910E16B7ADA8009CB90F /* SpinnerView.h */,
- B55D910F16B7ADA9009CB90F /* SpinnerView.m */,
B55D911116B7ADCC009CB90F /* TimelineEvent.h */,
B55D911216B7ADCD009CB90F /* TimelineEvent.m */,
B55D911416B7ADED009CB90F /* User.h */,
@@ -1284,7 +1274,7 @@
B55D909116B7AA27009CB90F /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0450;
+ LastUpgradeCheck = 0460;
ORGANIZATIONNAME = "Crafted By Tri";
};
buildConfigurationList = B55D909416B7AA27009CB90F /* Build configuration list for PBXProject "Gitos-iPad" */;
@@ -1468,7 +1458,6 @@
B54F69DB16D2C5CA00978DD9 /* 04-squiggle.png in Resources */,
B54F69DC16D2C5CA00978DD9 /* 04-squiggle@2x.png in Resources */,
B54F69DE16D2DF1E00978DD9 /* avatar-placeholder.png in Resources */,
- B54F69E016D2E94800978DD9 /* avatar-placeholder.png in Resources */,
B54F69E816D2F88C00978DD9 /* NotificationsViewController.xib in Resources */,
B54F69ED16D2FB4400978DD9 /* NotificationCell.xib in Resources */,
B54F6A1A16D3605C00978DD9 /* FeedbackViewController.xib in Resources */,
@@ -1483,10 +1472,6 @@
B569D0C516FE6496002216DD /* glyphicons_078_warning_sign@2x.png in Resources */,
B569D0C616FE6496002216DD /* glyphicons_198_ok.png in Resources */,
B569D0C716FE6496002216DD /* glyphicons_198_ok@2x.png in Resources */,
- B569D0CC16FE6861002216DD /* glyphicons_078_warning_sign.png in Resources */,
- B569D0CD16FE6861002216DD /* glyphicons_078_warning_sign@2x.png in Resources */,
- B569D0CE16FE6861002216DD /* glyphicons_198_ok.png in Resources */,
- B569D0CF16FE6861002216DD /* glyphicons_198_ok@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1520,7 +1505,6 @@
B55D910716B7AD2B009CB90F /* RelativeDateDescriptor.m in Sources */,
B55D910A16B7AD47009CB90F /* Repo.m in Sources */,
B55D910D16B7AD79009CB90F /* RepoTreeNode.m in Sources */,
- B55D911016B7ADAA009CB90F /* SpinnerView.m in Sources */,
B55D911316B7ADCE009CB90F /* TimelineEvent.m in Sources */,
B55D911616B7ADF0009CB90F /* User.m in Sources */,
B55D911D16B7AE48009CB90F /* LoginViewController.m in Sources */,
View
BIN  ...deproj/project.xcworkspace/xcuserdata/trivuong.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
10 ...codeproj/project.xcworkspace/xcuserdata/trivuong.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+ <true/>
+ <key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <true/>
+</dict>
+</plist>
View
2  Gitos-iPad.xcodeproj/xcuserdata/trivuong.xcuserdatad/xcschemes/Gitos-iPad.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0450"
+ LastUpgradeVersion = "0460"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
View
2  Gitos-iPad/Classes/GitosConstants.h
@@ -12,5 +12,7 @@
extern const NSString *CLIENT_ID;
extern const NSString *CLIENT_SECRET;
+extern NSString * const LOADING_MESSAGE;
+extern const float HIDE_AFTER;
@end
View
2  Gitos-iPad/Classes/GitosConstants.m
@@ -12,5 +12,7 @@ @implementation GitosConstants
const NSString *CLIENT_ID = @"75f198a854031c317e62";
const NSString *CLIENT_SECRET = @"07d3e053d06132245799f4afe45b90d2780a89a8";
+NSString * const LOADING_MESSAGE = @"Loading";
+const float HIDE_AFTER = 2.0f;
@end
View
18 Gitos-iPad/Classes/SpinnerView.h
@@ -1,18 +0,0 @@
-//
-// SpinnerView.h
-// Gitos-iPad
-//
-// Created by Tri Vuong on 1/28/13.
-// Copyright (c) 2013 Crafted By Tri. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import <QuartzCore/QuartzCore.h>
-
-@interface SpinnerView : UIView
-
-+ (SpinnerView *)loadSpinnerIntoView:(UIView *)superView;
-- (UIImage *)addBackground;
-- (void)removeSpinner;
-
-@end
View
90 Gitos-iPad/Classes/SpinnerView.m
@@ -1,90 +0,0 @@
-//
-// SpinnerView.m
-// Gitos-iPad
-//
-// Created by Tri Vuong on 1/28/13.
-// Copyright (c) 2013 Crafted By Tri. All rights reserved.
-//
-
-#import "SpinnerView.h"
-
-@implementation SpinnerView
-
-- (id)initWithFrame:(CGRect)frame
-{
- self = [super initWithFrame:frame];
- if (self) {
- // Initialization code
- }
- return self;
-}
-
-/*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect
- {
- // Drawing code
- }
- */
-
-+ (SpinnerView *)loadSpinnerIntoView:(UIView *)superView{
- CGRect frame = CGRectMake(superView.frame.size.width/2 - 30, 250, 60, 60);
- // Create a new view with the same frame size as the superView
- SpinnerView *spinnerView = [[SpinnerView alloc] initWithFrame:frame];
- // If something's gone wrong, abort!
- if(!spinnerView){ return nil; }
-
- UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
- indicator.autoresizingMask =
- UIViewAutoresizingFlexibleTopMargin|
- UIViewAutoresizingFlexibleRightMargin|
- UIViewAutoresizingFlexibleLeftMargin|
- UIViewAutoresizingFlexibleBottomMargin;
- [spinnerView addSubview:indicator];
- [indicator setCenter:CGPointMake(30, 30)];
- [indicator startAnimating];
-
- // Just to show we've done something, let's make the background black
- spinnerView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7];
- spinnerView.layer.cornerRadius = 4.0;
- spinnerView.layer.masksToBounds = YES;
- [superView addSubview:spinnerView];
- return spinnerView;
-}
-
-- (UIImage *)addBackground
-{
- // Create an image context (think of this as a canvas for our masterpiece) the same size as the view
- UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 1);
- // Our gradient only has two locations - start and finish. More complex gradients might have more colours
- size_t num_locations = 2;
- // The location of the colors is at the start and end
- CGFloat locations[2] = { 0.0, 1.0 };
- // These are the colors! That's two RBGA values
- CGFloat components[8] = {
- 0.4,0.4,0.4, 0.8,
- 0.1,0.1,0.1, 0.5 };
- // Create a color space
- CGColorSpaceRef myColorspace = CGColorSpaceCreateDeviceRGB();
- // Create a gradient with the values we've set up
- CGGradientRef myGradient = CGGradientCreateWithColorComponents (myColorspace, components, locations, num_locations);
- // Set the radius to a nice size, 80% of the width. You can adjust this
- float myRadius = (self.bounds.size.width*.8)/2;
- // Now we draw the gradient into the context. Think painting onto the canvas
- CGContextDrawRadialGradient (UIGraphicsGetCurrentContext(), myGradient, self.center, 0, self.center, myRadius, kCGGradientDrawsAfterEndLocation);
- // Rip the 'canvas' into a UIImage object
- UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
- // And release memory
- CGColorSpaceRelease(myColorspace);
- CGGradientRelease(myGradient);
- UIGraphicsEndImageContext();
- // … obvious.
- return image;
-}
-
-- (void)removeSpinner
-{
- [super removeFromSuperview];
-}
-@end
View
2  Gitos-iPad/Controllers/CommitsViewController.m
@@ -47,7 +47,7 @@ - (void)performHouseKeepingTasks
self.navigationItem.title = @"Commits";
self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+ self.hud.labelText = LOADING_MESSAGE;
}
- (void)registerNib
View
14 Gitos-iPad/Controllers/FeedbackViewController.h
@@ -9,15 +9,19 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
-@interface FeedbackViewController : UIViewController <UIWebViewDelegate>
+@interface FeedbackViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
-@property (nonatomic, strong) IBOutlet UITextField *nameField;
-@property (nonatomic, strong) IBOutlet UITextField *emailField;
-@property (nonatomic, strong) IBOutlet UITextView *messageField;
@property (nonatomic, strong) MBProgressHUD *hud;
+@property (weak, nonatomic) IBOutlet UITableView *feedbackTable;
+@property (weak, nonatomic) IBOutlet UITableViewCell *nameCell;
+@property (weak, nonatomic) IBOutlet UITableViewCell *emailCell;
+@property (weak, nonatomic) IBOutlet UITableViewCell *messageCell;
+@property (weak, nonatomic) IBOutlet UITextField *nameField;
+@property (weak, nonatomic) IBOutlet UITextField *emailField;
+@property (weak, nonatomic) IBOutlet UITextView *messageField;
+
- (void)performHouseKeepingTasks;
-- (void)applyCustomStyling;
- (void)sendFeedback;
@end
View
102 Gitos-iPad/Controllers/FeedbackViewController.m
@@ -12,22 +12,10 @@ @interface FeedbackViewController ()
@end
-@implementation CustomUITextField
-
-@synthesize horizontalPadding, verticalPadding;
-
-- (CGRect)textRectForBounds:(CGRect)bounds {
- return CGRectMake(bounds.origin.x + horizontalPadding, bounds.origin.y + verticalPadding, bounds.size.width - horizontalPadding*2, bounds.size.height - verticalPadding*2);
-}
-
-- (CGRect)editingRectForBounds:(CGRect)bounds {
- return [self textRectForBounds:bounds];
-}
-
-@end
-
@implementation FeedbackViewController
+@synthesize feedbackTable, nameCell, emailCell, messageCell, hud, nameField, emailField, messageField;
+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
@@ -42,7 +30,6 @@ - (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
[self performHouseKeepingTasks];
- [self applyCustomStyling];
UIBarButtonItem *submitButton = [[UIBarButtonItem alloc] initWithTitle:@"Submit" style:UIBarButtonItemStyleBordered target:self action:@selector(sendFeedback)];
[self.navigationItem setRightBarButtonItem:submitButton];
@@ -53,58 +40,37 @@ - (void)performHouseKeepingTasks
self.navigationItem.title = @"Feedback";
self.navigationItem.hidesBackButton = YES;
- self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- self.hud.hidden = YES;
- self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
-}
-
-- (void)applyCustomStyling
-{
- NSArray *fields = @[self.nameField, self.emailField];
-
- UIView *namePaddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)];
- UIView *emailPaddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)];
-
- self.nameField.leftView = namePaddingView;
- self.nameField.leftViewMode = UITextFieldViewModeAlways;
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
+ [hud hide:YES];
- self.emailField.leftView = emailPaddingView;
- self.emailField.leftViewMode = UITextFieldViewModeAlways;
-
- for (UITextField *f in fields) {
- f.layer.borderColor = [[UIColor colorWithRed:204/255.0 green:204/255.0 blue:204/255.0 alpha:1.0] CGColor];
- f.layer.borderWidth = 1.0f;
- f.layer.cornerRadius = 4.0f;
- f.layer.masksToBounds = YES;
- }
-
- self.messageField.layer.borderColor = [[UIColor colorWithRed:204/255.0 green:204/255.0 blue:204/255.0 alpha:1.0] CGColor];
- self.messageField.layer.borderWidth = 1.0f;
- self.messageField.layer.cornerRadius = 4.0f;
- self.messageField.layer.masksToBounds = YES;
+ [feedbackTable setBackgroundView:nil];
+ [feedbackTable setScrollEnabled:NO];
+ [feedbackTable setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine];
+ [feedbackTable setSeparatorColor:[UIColor colorWithRed:206/255.0 green:206/255.0 blue:206/255.0 alpha:0.8]];
}
- (void)sendFeedback
{
- NSString *name = self.nameField.text;
- NSString *email = self.emailField.text;
- NSString *message = self.messageField.text;
+ NSString *name = nameField.text;
+ NSString *email = emailField.text;
+ NSString *message = messageField.text;
if (name.length == 0 || email.length == 0 || message.length == 0) {
[YRDropdownView showDropdownInView:self.view
title:@"Error"
detail:@"All fields are required"
image:[UIImage imageNamed:@"glyphicons_078_warning_sign.png"]
- textColor:[UIColor whiteColor]
- backgroundColor:[UIColor colorWithRed:202/255.0 green:36/255.0 blue:36/255.0 alpha:1.0]
+ textColor:[UIColor colorWithRed:186/255.0 green:12/255.0 blue:12/255.0 alpha:1.0]
+ backgroundColor:[UIColor whiteColor]
animated:YES
- hideAfter:2.0f];
+ hideAfter:HIDE_AFTER];
return;
}
- if ([self.messageField isFirstResponder]) {
- [self.messageField resignFirstResponder];
+ if ([messageField isFirstResponder]) {
+ [messageField resignFirstResponder];
}
NSURL *url = [NSURL URLWithString:[AppConfig getConfigValue:@"GitosHost"]];
@@ -136,7 +102,7 @@ - (void)sendFeedback
textColor:[UIColor whiteColor]
backgroundColor:[UIColor colorWithRed:87/255.0 green:153/255.0 blue:38/255.0 alpha:1.0]
animated:YES
- hideAfter:2.0f];
+ hideAfter:HIDE_AFTER];
}
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
@@ -148,6 +114,36 @@ - (void)sendFeedback
[self.hud setHidden:NO];
}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+ return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+ return 3;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ if (indexPath.row == 2) {
+ return 157;
+ } else {
+ return 44;
+ }
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+ if (indexPath.row == 0) {
+ return nameCell;
+ } else if (indexPath.row == 1) {
+ return emailCell;
+ } else {
+ return messageCell;
+ }
+}
+
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
View
437 Gitos-iPad/Controllers/FeedbackViewController.xib
@@ -12,6 +12,8 @@
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBProxyObject</string>
+ <string>IBUITableView</string>
+ <string>IBUITableViewCell</string>
<string>IBUITextField</string>
<string>IBUITextView</string>
<string>IBUIView</string>
@@ -36,108 +38,40 @@
<reference key="NSNextResponder"/>
<int key="NSvFlags">292</int>
<array class="NSMutableArray" key="NSSubviews">
- <object class="IBUITextField" id="699852808">
+ <object class="IBUITableView" id="972979255">
<reference key="NSNextResponder" ref="766721923"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{28, 20}, {646, 36}}</string>
- <reference key="NSSuperview" ref="766721923"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="1009432364"/>
- <string key="NSReuseIdentifierKey">_NS:9</string>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
- <string key="targetRuntimeIdentifier">IBIPadFramework</string>
- <int key="IBUIContentVerticalAlignment">0</int>
- <string key="IBUIText"/>
- <int key="IBUIBorderStyle">1</int>
- <string key="IBUIPlaceholder">Name</string>
- <object class="NSColor" key="IBUITextColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace" id="627722621">
- <int key="NSID">2</int>
- </object>
- </object>
- <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
- <float key="IBUIMinimumFontSize">17</float>
- <object class="IBUITextInputTraits" key="IBUITextInputTraits">
- <int key="IBUIAutocorrectionType">1</int>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIFontDescription" key="IBUIFontDescription" id="437837318">
- <string key="name">ArialMT</string>
- <string key="family">Arial</string>
- <int key="traits">0</int>
- <double key="pointSize">14</double>
- </object>
- <object class="NSFont" key="IBUIFont" id="642471603">
- <string key="NSName">ArialMT</string>
- <double key="NSSize">14</double>
- <int key="NSfFlags">16</int>
- </object>
- </object>
- <object class="IBUITextField" id="1009432364">
- <reference key="NSNextResponder" ref="766721923"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{28, 70}, {646, 36}}</string>
- <reference key="NSSuperview" ref="766721923"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="425938859"/>
- <string key="NSReuseIdentifierKey">_NS:9</string>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
- <string key="targetRuntimeIdentifier">IBIPadFramework</string>
- <int key="IBUIContentVerticalAlignment">0</int>
- <string key="IBUIText"/>
- <int key="IBUIBorderStyle">1</int>
- <string key="IBUIPlaceholder">Email</string>
- <object class="NSColor" key="IBUITextColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- <reference key="NSCustomColorSpace" ref="627722621"/>
- </object>
- <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
- <float key="IBUIMinimumFontSize">17</float>
- <object class="IBUITextInputTraits" key="IBUITextInputTraits">
- <int key="IBUIAutocorrectionType">1</int>
- <int key="IBUIKeyboardType">7</int>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <reference key="IBUIFontDescription" ref="437837318"/>
- <reference key="IBUIFont" ref="642471603"/>
- </object>
- <object class="IBUITextView" id="425938859">
- <reference key="NSNextResponder" ref="766721923"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{28, 121}, {646, 128}}</string>
+ <string key="NSFrameSize">{703, 748}</string>
<reference key="NSSuperview" ref="766721923"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MSAxIDEAA</bytes>
+ <bytes key="NSRGB">MCAwIDAgMAA</bytes>
+ <string key="IBUIColorCocoaTouchKeyPath">groupTableViewBackgroundColor</string>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
- <bool key="IBUIMultipleTouchEnabled">YES</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
- <bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
- <string key="IBUIText"/>
- <object class="IBUITextInputTraits" key="IBUITextInputTraits">
- <int key="IBUIAutocorrectionType">1</int>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <reference key="IBUIFontDescription" ref="437837318"/>
- <reference key="IBUIFont" ref="642471603"/>
+ <bool key="IBUIAlwaysBounceVertical">YES</bool>
+ <int key="IBUIStyle">1</int>
+ <int key="IBUISeparatorStyle">2</int>
+ <int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
+ <bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
+ <float key="IBUIRowHeight">44</float>
+ <float key="IBUISectionHeaderHeight">10</float>
+ <float key="IBUISectionFooterHeight">10</float>
</object>
</array>
<string key="NSFrame">{{0, 20}, {703, 748}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="699852808"/>
+ <reference key="NSNextKeyView" ref="972979255"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
- <reference key="NSCustomColorSpace" ref="627722621"/>
+ <object class="NSColorSpace" key="NSCustomColorSpace" id="627722621">
+ <int key="NSID">2</int>
+ </object>
</object>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
@@ -170,6 +104,196 @@
</object>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
</object>
+ <object class="IBUITableViewCell" id="556096163">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUIView" id="392367718">
+ <reference key="NSNextResponder" ref="556096163"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUITextField" id="771496426">
+ <reference key="NSNextResponder" ref="392367718"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 7}, {663, 30}}</string>
+ <reference key="NSSuperview" ref="392367718"/>
+ <reference key="NSWindow"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <string key="IBUIText"/>
+ <string key="IBUIPlaceholder">Name</string>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ <reference key="NSCustomColorSpace" ref="627722621"/>
+ </object>
+ <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+ <float key="IBUIMinimumFontSize">17</float>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocorrectionType">1</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="437837318">
+ <string key="name">ArialMT</string>
+ <string key="family">Arial</string>
+ <int key="traits">0</int>
+ <double key="pointSize">14</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="257405558">
+ <string key="NSName">ArialMT</string>
+ <double key="NSSize">14</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrameSize">{703, 43}</string>
+ <reference key="NSSuperview" ref="556096163"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="771496426"/>
+ <string key="NSReuseIdentifierKey">_NS:11</string>
+ <object class="NSColor" key="IBUIBackgroundColor" id="209234782">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">4</int>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <string key="NSFrameSize">{703, 44}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="392367718"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <object class="NSColor" key="IBUIBackgroundColor" id="744935515">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <int key="IBUISelectionStyle">0</int>
+ <reference key="IBUIContentView" ref="392367718"/>
+ </object>
+ <object class="IBUITableViewCell" id="822790127">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUIView" id="569345586">
+ <reference key="NSNextResponder" ref="822790127"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUITextField" id="367206883">
+ <reference key="NSNextResponder" ref="569345586"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 7}, {663, 30}}</string>
+ <reference key="NSSuperview" ref="569345586"/>
+ <reference key="NSWindow"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <string key="IBUIText"/>
+ <string key="IBUIPlaceholder">Email</string>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ <reference key="NSCustomColorSpace" ref="627722621"/>
+ </object>
+ <bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+ <float key="IBUIMinimumFontSize">17</float>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocorrectionType">1</int>
+ <int key="IBUIKeyboardType">7</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIFontDescription" ref="437837318"/>
+ <reference key="IBUIFont" ref="257405558"/>
+ </object>
+ </array>
+ <string key="NSFrameSize">{703, 43}</string>
+ <reference key="NSSuperview" ref="822790127"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="367206883"/>
+ <string key="NSReuseIdentifierKey">_NS:11</string>
+ <reference key="IBUIBackgroundColor" ref="209234782"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">4</int>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <string key="NSFrameSize">{703, 44}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="569345586"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <reference key="IBUIBackgroundColor" ref="744935515"/>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <int key="IBUISelectionStyle">0</int>
+ <reference key="IBUIContentView" ref="569345586"/>
+ </object>
+ <object class="IBUITableViewCell" id="380838466">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUIView" id="14843880">
+ <reference key="NSNextResponder" ref="380838466"/>
+ <int key="NSvFlags">256</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUITextView" id="138944259">
+ <reference key="NSNextResponder" ref="14843880"/>
+ <int key="NSvFlags">290</int>
+ <string key="NSFrame">{{9, 8}, {684, 142}}</string>
+ <reference key="NSSuperview" ref="14843880"/>
+ <reference key="NSWindow"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
+ <string key="IBUIText"/>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocapitalizationType">2</int>
+ <int key="IBUIAutocorrectionType">1</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIFontDescription" ref="437837318"/>
+ <reference key="IBUIFont" ref="257405558"/>
+ </object>
+ </array>
+ <string key="NSFrameSize">{703, 156}</string>
+ <reference key="NSSuperview" ref="380838466"/>
+ <reference key="NSWindow"/>
+ <string key="NSReuseIdentifierKey">_NS:11</string>
+ <reference key="IBUIBackgroundColor" ref="209234782"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">4</int>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <string key="NSFrameSize">{703, 157}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="14843880"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <reference key="IBUIBackgroundColor" ref="744935515"/>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <int key="IBUISelectionStyle">0</int>
+ <reference key="IBUIContentView" ref="14843880"/>
+ <real value="157" key="IBUIRowHeight"/>
+ </object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
@@ -183,27 +307,75 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">nameCell</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="556096163"/>
+ </object>
+ <int key="connectionID">25</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">emailCell</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="822790127"/>
+ </object>
+ <int key="connectionID">26</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">messageCell</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="380838466"/>
+ </object>
+ <int key="connectionID">27</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">nameField</string>
<reference key="source" ref="841351856"/>
- <reference key="destination" ref="699852808"/>
+ <reference key="destination" ref="771496426"/>
+ </object>
+ <int key="connectionID">32</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">emailField</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="367206883"/>
</object>
- <int key="connectionID">11</int>
+ <int key="connectionID">33</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">messageField</string>
<reference key="source" ref="841351856"/>
- <reference key="destination" ref="425938859"/>
+ <reference key="destination" ref="138944259"/>
</object>
- <int key="connectionID">13</int>
+ <int key="connectionID">34</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">emailField</string>
+ <string key="label">feedbackTable</string>
<reference key="source" ref="841351856"/>
- <reference key="destination" ref="1009432364"/>
+ <reference key="destination" ref="972979255"/>
</object>
- <int key="connectionID">14</int>
+ <int key="connectionID">35</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="972979255"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="972979255"/>
+ <reference key="destination" ref="841351856"/>
+ </object>
+ <int key="connectionID">18</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -229,26 +401,53 @@
<int key="objectID">2</int>
<reference key="object" ref="766721923"/>
<array class="NSMutableArray" key="children">
- <reference ref="699852808"/>
- <reference ref="1009432364"/>
- <reference ref="425938859"/>
+ <reference ref="972979255"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">7</int>
- <reference key="object" ref="699852808"/>
+ <int key="objectID">15</int>
+ <reference key="object" ref="972979255"/>
<reference key="parent" ref="766721923"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">8</int>
- <reference key="object" ref="1009432364"/>
- <reference key="parent" ref="766721923"/>
+ <int key="objectID">19</int>
+ <reference key="object" ref="556096163"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="771496426"/>
+ </array>
+ <reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">9</int>
- <reference key="object" ref="425938859"/>
- <reference key="parent" ref="766721923"/>
+ <int key="objectID">20</int>
+ <reference key="object" ref="822790127"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="367206883"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">21</int>
+ <reference key="object" ref="380838466"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="138944259"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">28</int>
+ <reference key="object" ref="771496426"/>
+ <reference key="parent" ref="556096163"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">29</int>
+ <reference key="object" ref="367206883"/>
+ <reference key="parent" ref="822790127"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">30</int>
+ <reference key="object" ref="138944259"/>
+ <reference key="parent" ref="380838466"/>
</object>
</array>
</object>
@@ -257,18 +456,20 @@
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="-2.CustomClassName">UIResponder</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="15.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <dictionary class="NSMutableDictionary" key="7.IBAttributePlaceholdersKey"/>
- <string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <dictionary class="NSMutableDictionary" key="8.IBAttributePlaceholdersKey"/>
- <string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="20.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="21.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="28.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="30.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">14</int>
+ <int key="maxID">35</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -276,19 +477,39 @@
<string key="className">FeedbackViewController</string>
<string key="superclassName">UIViewController</string>
<dictionary class="NSMutableDictionary" key="outlets">
+ <string key="emailCell">UITableViewCell</string>
<string key="emailField">UITextField</string>
+ <string key="feedbackTable">UITableView</string>
+ <string key="messageCell">UITableViewCell</string>
<string key="messageField">UITextView</string>
+ <string key="nameCell">UITableViewCell</string>
<string key="nameField">UITextField</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <object class="IBToOneOutletInfo" key="emailCell">
+ <string key="name">emailCell</string>
+ <string key="candidateClassName">UITableViewCell</string>
+ </object>
<object class="IBToOneOutletInfo" key="emailField">
<string key="name">emailField</string>
<string key="candidateClassName">UITextField</string>
</object>
+ <object class="IBToOneOutletInfo" key="feedbackTable">
+ <string key="name">feedbackTable</string>
+ <string key="candidateClassName">UITableView</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="messageCell">
+ <string key="name">messageCell</string>
+ <string key="candidateClassName">UITableViewCell</string>
+ </object>
<object class="IBToOneOutletInfo" key="messageField">
<string key="name">messageField</string>
<string key="candidateClassName">UITextView</string>
</object>
+ <object class="IBToOneOutletInfo" key="nameCell">
+ <string key="name">nameCell</string>
+ <string key="candidateClassName">UITableViewCell</string>
+ </object>
<object class="IBToOneOutletInfo" key="nameField">
<string key="name">nameField</string>
<string key="candidateClassName">UITextField</string>
View
14 Gitos-iPad/Controllers/GistViewController.m
@@ -8,10 +8,6 @@
#import "GistViewController.h"
#import "GistDetailsCell.h"
-#import "AFHTTPClient.h"
-#import "AFHTTPRequestOperation.h"
-#import "SSKeychain.h"
-#import "AppConfig.h"
#import "GistFile.h"
#import "GistRawFileViewController.h"
@@ -50,9 +46,9 @@ - (void)viewDidLoad
- (void)performHouseKeepingTasks
{
[self registerNib];
- self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
}
- (void)registerNib
@@ -93,10 +89,10 @@ - (void)getGistStats
[self setGistStats:json];
[detailsTable reloadData];
- [self.hud hide:YES];
+ [hud hide:YES];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
}
View
4 Gitos-iPad/Controllers/LoginViewController.h
@@ -8,7 +8,6 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
-#import "SpinnerView.h"
@interface LoginViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate>
{
@@ -19,7 +18,8 @@
@property(nonatomic, strong) IBOutlet UITableViewCell *usernameCell;
@property(nonatomic, strong) IBOutlet UITableViewCell *passwordCell;
-@property(nonatomic, strong) SpinnerView *spinnerView;
+@property(nonatomic, strong) MBProgressHUD *hud;
+@property(nonatomic, strong) NSMutableDictionary *oauthParams;
- (void)performHousekeepingTasks;
- (void)authenticate;
View
34 Gitos-iPad/Controllers/LoginViewController.m
@@ -16,13 +16,18 @@ @interface LoginViewController ()
@implementation LoginViewController
-@synthesize usernameCell, passwordCell, spinnerView;
+@synthesize usernameCell, passwordCell, oauthParams, hud;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
+ oauthParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+ [Authorization appScopes], @"scopes",
+ CLIENT_ID, @"client_id",
+ CLIENT_SECRET, @"client_secret",
+ nil];
}
return self;
}
@@ -43,9 +48,11 @@ - (void)didReceiveMemoryWarning
- (void)performHousekeepingTasks
{
- self.spinnerView = [SpinnerView loadSpinnerIntoView:self.view];
- [self.spinnerView setHidden:YES];
-
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = @"Loading";
+ hud.hidden = YES;
+
[self.navigationItem setTitle:@"Login to Github"];
UIBarButtonItem *submitButton = [[UIBarButtonItem alloc] initWithTitle:@"Submit" style:UIBarButtonItemStyleBordered target:self action:@selector(deleteExistingAuthorizations)];
@@ -88,12 +95,6 @@ - (void)authenticate
NSString *password = [passwordField text];
NSURL *url = [NSURL URLWithString:[AppConfig getConfigValue:@"GithubApiHost"]];
-
- NSMutableDictionary *oauthParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
- [Authorization appScopes], @"scopes",
- CLIENT_ID, @"client_id",
- CLIENT_SECRET, @"client_secret",
- nil];
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];
[httpClient setParameterEncoding:AFJSONParameterEncoding];
@@ -105,7 +106,7 @@ - (void)authenticate
[operation setCompletionBlockWithSuccess:
^(AFHTTPRequestOperation *operation, id responseObject) {
- [self.spinnerView setHidden:NO];
+ [hud setHidden:NO];
NSString *response = [operation responseString];
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:[response dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil];
@@ -121,7 +122,7 @@ - (void)authenticate
[AppInitialization run:self.view.window];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self.spinnerView setHidden:YES];
+ [hud setHidden:YES];
NSString *response = [operation responseString];
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:[response dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil];
@@ -144,16 +145,11 @@ - (void)deleteExistingAuthorizations
// Prompt if username of password was blank
if (username.length == 0 || password.length == 0) {
- [YRDropdownView showDropdownInView:self.view title:@"Error" detail:@"Please enter your username and password" image:[UIImage imageNamed:@"glyphicons_078_warning_sign.png"] textColor:[UIColor colorWithRed:186/255.0 green:12/255.0 blue:12/255.0 alpha:1.0] backgroundColor:[UIColor whiteColor] animated:YES hideAfter:2.0f];
+ [YRDropdownView showDropdownInView:self.view title:@"Error" detail:@"Please enter your username and password" image:[UIImage imageNamed:@"glyphicons_078_warning_sign.png"] textColor:[UIColor colorWithRed:186/255.0 green:12/255.0 blue:12/255.0 alpha:1.0] backgroundColor:[UIColor whiteColor] animated:YES hideAfter:HIDE_AFTER];
return;
}
NSURL *url = [NSURL URLWithString:[AppConfig getConfigValue:@"GithubApiHost"]];
-
- NSMutableDictionary *oauthParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
- @"75f198a854031c317e62", @"client_id",
- @"07d3e053d06132245799f4afe45b90d2780a89a8", @"client_secret",
- nil];
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];
[httpClient setParameterEncoding:AFJSONParameterEncoding];
@@ -187,7 +183,7 @@ - (void)deleteExistingAuthorizations
NSLog(@"%@", error);
}];
[deleteOperation start];
- [self.spinnerView setHidden:NO];
+ [hud setHidden:NO];
return;
}
}
View
2  Gitos-iPad/Controllers/NewsfeedDetailsViewController.m
@@ -53,7 +53,7 @@ - (void)performHouseKeepingTasks
self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+ self.hud.labelText = LOADING_MESSAGE;
}
- (void)loadNewsfeedDetails
View
2  Gitos-iPad/Controllers/NewsfeedViewController.m
@@ -75,7 +75,7 @@ - (void)performHouseKeepingTasks
self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+ self.hud.labelText = LOADING_MESSAGE;
}
- (void)prepareTableView
View
2  Gitos-iPad/Controllers/NotificationsViewController.m
@@ -45,7 +45,7 @@ - (void)performHouseKeepingTasks
self.navigationItem.title = @"Notifications";
self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+ self.hud.labelText = LOADING_MESSAGE;
}
- (void)registerNib
View
22 Gitos-iPad/Controllers/ProfileViewController.m
@@ -57,9 +57,9 @@ - (void)performHouseKeepingTasks
{
[scrollView setContentSize:self.view.frame.size];
[self adjustFrameHeight];
- self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
}
- (void)addOptionsButton
@@ -129,11 +129,11 @@ - (void)getUserInfo
if (!self.hideOptionsButton) {
[self addOptionsButton];
}
- [self.hud hide:YES];
+ [hud hide:YES];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
@@ -254,7 +254,7 @@ - (void)showProfileOptions
// self.isFollowing = true;
// [self displayFollowOptions];
// }
-// [self.hud hide:YES];
+// [hud hide:YES];
// }
// failure:^(AFHTTPRequestOperation *operation, NSError *error) {
// NSLog(@"%@", error);
@@ -262,7 +262,7 @@ - (void)showProfileOptions
// self.isFollowing = false;
// [self displayFollowOptions];
// }
-// [self.hud hide:YES];
+// [hud hide:YES];
// }];
//
// [operation start];
@@ -300,13 +300,13 @@ - (void)follow
[operation setCompletionBlockWithSuccess:
^(AFHTTPRequestOperation *operation, id responseObject){
self.isFollowing = true;
- [self.hud hide:YES];
+ [hud hide:YES];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:[NSString stringWithFormat:@"You are now following %@", [self.user getLogin]] delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
[alert show];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
@@ -326,13 +326,13 @@ - (void)unfollow
[operation setCompletionBlockWithSuccess:
^(AFHTTPRequestOperation *operation, id responseObject){
self.isFollowing = true;
- [self.hud hide:YES];
+ [hud hide:YES];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:[NSString stringWithFormat:@"You are now following %@", [self.user getLogin]] delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
[alert show];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
View
3  Gitos-iPad/Controllers/RepoTreeViewController.h
@@ -10,7 +10,6 @@
#import "Branch.h"
#import "Repo.h"
#import "RepoTreeNode.h"
-#import "SpinnerView.h"
@interface RepoTreeViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
@@ -22,7 +21,7 @@
@property (nonatomic, strong) Branch *branch;
@property (nonatomic, strong) Repo *repo;
@property (nonatomic, strong) RepoTreeNode *node;
-@property (nonatomic, strong) SpinnerView *spinnerView;
+@property (nonatomic, strong) MBProgressHUD *hud;
- (void)performHouseKeepingTasks;
- (void)fetchData;
View
19 Gitos-iPad/Controllers/RepoTreeViewController.m
@@ -10,10 +10,6 @@
#import "RawFileViewController.h"
#import "CommitsViewController.h"
#import "RepoTreeCell.h"
-#import "AppConfig.h"
-#import "SSKeychain.h"
-#import "AFHTTPClient.h"
-#import "AFHTTPRequestOperation.h"
#import "RepoTreeNode.h"
#import "RepoTreeCell.h"
@@ -23,7 +19,7 @@ @interface RepoTreeViewController ()
@implementation RepoTreeViewController
-@synthesize accessToken, accessTokenParams, treeTable, repo, node;
+@synthesize accessToken, accessTokenParams, treeTable, repo, node, hud;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
@@ -55,7 +51,10 @@ - (void)performHouseKeepingTasks
} else if ([self.node isTree]) {
self.navigationItem.title = self.node.path;
}
- self.spinnerView = [SpinnerView loadSpinnerIntoView:self.view];
+
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
UIBarButtonItem *commitButton = [[UIBarButtonItem alloc] initWithTitle:@"Commits" style:UIBarButtonItemStyleBordered target:self action:@selector(showCommitForBranch)];
[self.navigationItem setRightBarButtonItem:commitButton];
@@ -97,11 +96,11 @@ - (void)fetchTopLayer
[self.treeNodes addObject:treeNode];
}
[treeTable reloadData];
- [self.spinnerView setHidden:YES];
+ [hud setHidden:YES];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.spinnerView setHidden:YES];
+ [hud setHidden:YES];
}];
[operation start];
@@ -132,11 +131,11 @@ - (void)fetchTree
[self.treeNodes addObject:treeNode];
}
[treeTable reloadData];
- [self.spinnerView setHidden:YES];
+ [hud setHidden:YES];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.spinnerView setHidden:YES];
+ [hud setHidden:YES];
}];
[operation start];
View
14 Gitos-iPad/Controllers/RepoViewController.m
@@ -10,10 +10,6 @@
#import "WebsiteViewController.h"
#import "IssuesViewController.h"
#import "RepoDetailsCell.h"
-#import "AppConfig.h"
-#import "AFHTTPClient.h"
-#import "AFHTTPRequestOperation.h"
-#import "SSKeychain.h"
#import "RepoTreeViewController.h"
#import "Branch.h"
@@ -66,9 +62,9 @@ - (void)didReceiveMemoryWarning
- (void)performHouseKeepingTasks
{
- self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
[self registerNib];
}
@@ -203,12 +199,12 @@ - (void)getRepoBranches
[branchesTable setFrame:CGRectMake(0, self.detailsTable.frame.size.height + 46, self.view.frame.size.width, [self.repoBranches count]*44 + 155)];
[branchesTable reloadData];
- [self.hud hide:YES];
+ [hud hide:YES];
[self adjustFrameHeight];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
}
View
12 Gitos-iPad/Controllers/ReposViewController.m
@@ -34,9 +34,11 @@ - (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.navigationItem.title = @"Repositories";
- self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
+
[self registerNib];
[self getUserInfoAndRepos];
}
@@ -122,9 +124,9 @@ - (void)getUserRepos
}
[reposTable reloadData];
- [self.hud hide:YES];
+ [hud hide:YES];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self.hud hide:YES];
+ [hud hide:YES];
NSLog(@"%@", error);
}];
View
29 Gitos-iPad/Controllers/SearchViewController.m
@@ -20,6 +20,8 @@ @interface SearchViewController ()
@implementation SearchViewController
+@synthesize hud;
+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
@@ -37,10 +39,11 @@ - (void)viewDidLoad
// Do any additional setup after loading the view from its nib.
[self performHouseKeepingTasks];
[self prepareSearchBar];
- self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
- [self.hud hide:YES];
+
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
+ [hud hide:YES];
}
- (void)viewWillAppear:(BOOL)animated
@@ -140,7 +143,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
[searchBar resignFirstResponder];
- [self.hud show:YES];
+ [hud show:YES];
NSString *term = [searchBar text];
@@ -184,11 +187,11 @@ - (void)searchUsers:(NSString *)term
[self.resultsTable reloadData];
[self.searchBar resignFirstResponder];
- [self.hud hide:YES];
+ [hud hide:YES];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
@@ -228,11 +231,11 @@ - (void)searchRepos:(NSString *)term
[self.resultsTable reloadData];
[self.searchBar resignFirstResponder];
- [self.hud hide:YES];
+ [hud hide:YES];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
@@ -282,7 +285,7 @@ - (void)fetchRepoAtIndexPath:(NSIndexPath *)indexPath
[operation setCompletionBlockWithSuccess:
^(AFHTTPRequestOperation *operation, id responseObject){
- [self.hud hide:YES];
+ [hud hide:YES];
NSString *response = [operation responseString];
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:[response dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil];
@@ -293,7 +296,7 @@ - (void)fetchRepoAtIndexPath:(NSIndexPath *)indexPath
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
@@ -319,7 +322,7 @@ - (void)fetchUserAtIndexPath:(NSIndexPath *)indexPath
[operation setCompletionBlockWithSuccess:
^(AFHTTPRequestOperation *operation, id responseObject){
- [self.hud hide:YES];
+ [hud hide:YES];
NSString *response = [operation responseString];
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:[response dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingMutableContainers error:nil];
@@ -330,7 +333,7 @@ - (void)fetchUserAtIndexPath:(NSIndexPath *)indexPath
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
- [self.hud hide:YES];
+ [hud hide:YES];
}];
[operation start];
View
20 Gitos-iPad/Controllers/StarredViewController.m
@@ -7,15 +7,9 @@
//
#import "StarredViewController.h"
-#import "AFHTTPClient.h"
-#import "AFHTTPRequestOperation.h"
-#import "SSKeychain.h"
#import "RepoCell.h"
-#import "SpinnerView.h"
-#import "SVPullToRefresh.h"
#import "Repo.h"
#import "RepoViewController.h"
-#import "AppConfig.h"
@interface StarredViewController ()
@@ -42,9 +36,11 @@ - (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
[self.navigationItem setTitle:@"Starred Repositories"];
- self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
- self.hud.mode = MBProgressHUDAnimationFade;
- self.hud.labelText = @"Loading";
+
+ hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
+ hud.mode = MBProgressHUDAnimationFade;
+ hud.labelText = LOADING_MESSAGE;
+
[self registerNib];
[self setupPullToRefresh];
[self getUserInfo];
@@ -134,10 +130,10 @@ - (void)getStarredReposForPage:(NSInteger)page
[starredReposTable.pullToRefreshView stopAnimating];
[starredReposTable reloadData];
- [self.hud hide:YES];
+ [hud hide:YES];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
- [self.hud hide:YES];
+ [hud hide:YES];
NSLog(@"%@", error);
}];
@@ -187,7 +183,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
if (([scrollView contentOffset].y + scrollView.frame.size.height) == scrollView.contentSize.height) {
- [self.hud show:YES];
+ [hud show:YES];
[self getStarredReposForPage:self.currentPage++];
}
}

No commit comments for this range

Something went wrong with that request. Please try again.