Skip to content

Commit

Permalink
some fixes..AuthNet
Browse files Browse the repository at this point in the history
  • Loading branch information
jovhenni19 committed Dec 16, 2013
1 parent ddc71eb commit 8aebbac
Show file tree
Hide file tree
Showing 17 changed files with 308 additions and 56 deletions.
52 changes: 50 additions & 2 deletions AgentBridge.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
6EEF58821833857B00C3214E /* ABridge_LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EEF58811833857B00C3214E /* ABridge_LoginViewController.m */; };
6EF61754185054B900DC37F5 /* Activity.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EF61753185054B900DC37F5 /* Activity.m */; };
6EF741181845FE910021603D /* ABridge_BuyerPopsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EF741171845FE910021603D /* ABridge_BuyerPopsViewController.m */; };
6EF948A4185ED7AF00460878 /* ABridge_TabBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EF948A3185ED7AE00460878 /* ABridge_TabBarViewController.m */; };
6EF94F23185EDA9400460878 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E80BC41185EB145005F52C9 /* libxml2.dylib */; };
6EFCFC611846F053004EB0B7 /* ABridge_AccountSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EFCFC601846F053004EB0B7 /* ABridge_AccountSettingsViewController.m */; };
6EFCFC641846F8AD004EB0B7 /* ABridge_AboutMeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EFCFC631846F8AD004EB0B7 /* ABridge_AboutMeViewController.m */; };
6EFCFC671846FA26004EB0B7 /* ABridge_AddressViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EFCFC661846FA26004EB0B7 /* ABridge_AddressViewController.m */; };
Expand Down Expand Up @@ -112,6 +114,7 @@
6E6D0A77185AF5C400D02B92 /* ABridge_ActivityAgentPOPsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABridge_ActivityAgentPOPsViewController.m; sourceTree = "<group>"; };
6E791B47183CD28200BB76B3 /* Referral.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Referral.h; sourceTree = "<group>"; };
6E791B48183CD28200BB76B3 /* Referral.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Referral.m; sourceTree = "<group>"; };
6E80BC41185EB145005F52C9 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
6EA551031844525E00702E94 /* OpenSans-Regular-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenSans-Regular-webfont.ttf"; sourceTree = "<group>"; };
6EB327BD185ABDC700284E7E /* ABridge_ActivityAgentProfileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABridge_ActivityAgentProfileViewController.h; sourceTree = "<group>"; };
6EB327BE185ABDC700284E7E /* ABridge_ActivityAgentProfileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABridge_ActivityAgentProfileViewController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -176,6 +179,9 @@
6EF61753185054B900DC37F5 /* Activity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Activity.m; sourceTree = "<group>"; };
6EF741161845FE910021603D /* ABridge_BuyerPopsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABridge_BuyerPopsViewController.h; sourceTree = "<group>"; };
6EF741171845FE910021603D /* ABridge_BuyerPopsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABridge_BuyerPopsViewController.m; sourceTree = "<group>"; };
6EF948A2185ED7AE00460878 /* ABridge_TabBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABridge_TabBarViewController.h; sourceTree = "<group>"; };
6EF948A3185ED7AE00460878 /* ABridge_TabBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABridge_TabBarViewController.m; sourceTree = "<group>"; };
6EF94F24185EDEB900460878 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
6EFCFC5F1846F053004EB0B7 /* ABridge_AccountSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABridge_AccountSettingsViewController.h; sourceTree = "<group>"; };
6EFCFC601846F053004EB0B7 /* ABridge_AccountSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ABridge_AccountSettingsViewController.m; sourceTree = "<group>"; };
6EFCFC621846F8AD004EB0B7 /* ABridge_AboutMeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABridge_AboutMeViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -227,6 +233,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6EF94F23185EDA9400460878 /* libxml2.dylib in Frameworks */,
6EFF61501851BBBC00A5A86A /* libz.dylib in Frameworks */,
6EFF614E1851BBAF00A5A86A /* MobileCoreServices.framework in Frameworks */,
6EFF614C1851BBA700A5A86A /* SystemConfiguration.framework in Frameworks */,
Expand Down Expand Up @@ -372,6 +379,8 @@
6EEF583318337E4000C3214E /* Frameworks */ = {
isa = PBXGroup;
children = (
6EF94F24185EDEB900460878 /* SenTestingKit.framework */,
6E80BC41185EB145005F52C9 /* libxml2.dylib */,
6EFF614F1851BBBC00A5A86A /* libz.dylib */,
6EFF614D1851BBAF00A5A86A /* MobileCoreServices.framework */,
6EFF614B1851BBA700A5A86A /* SystemConfiguration.framework */,
Expand Down Expand Up @@ -403,6 +412,8 @@
6EEF584B18337E4000C3214E /* Images.xcassets */,
6EEF587A1833837600C3214E /* ABridge_ParentViewController.h */,
6EEF587B1833837600C3214E /* ABridge_ParentViewController.m */,
6EF948A2185ED7AE00460878 /* ABridge_TabBarViewController.h */,
6EF948A3185ED7AE00460878 /* ABridge_TabBarViewController.m */,
6EB32BDC1848328C00F291AF /* HTTPURLConnection.h */,
6EB32BDD1848328C00F291AF /* HTTPURLConnection.m */,
6EEF586918337E6B00C3214E /* Main.storyboard */,
Expand Down Expand Up @@ -667,6 +678,7 @@
buildActionMask = 2147483647;
files = (
6EBBD7631834A56800166D63 /* ABridge_ReferralViewController.m in Sources */,
6EF948A4185ED7AF00460878 /* ABridge_TabBarViewController.m in Sources */,
6EBBD75A183498CC00166D63 /* ABridge_BuyerViewController.m in Sources */,
6EFF61421851BB5700A5A86A /* ASIHTTPRequest.m in Sources */,
6EEF5877183382BD00C3214E /* ABridge_SearchViewController.m in Sources */,
Expand Down Expand Up @@ -761,7 +773,7 @@
6EEF586118337E4000C3214E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -792,8 +804,15 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SDKROOT)/usr/include/libxml2/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/ANMobilePaymentLib";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "-lxml2";
PROVISIONING_PROFILE = "1761CBF8-909C-436E-AEE3-65640094A91B";
SDKROOT = iphoneos;
};
Expand All @@ -802,7 +821,7 @@
6EEF586218337E4000C3214E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand All @@ -827,7 +846,14 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SDKROOT)/usr/include/libxml2/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/ANMobilePaymentLib";
OTHER_LDFLAGS = "-lxml2";
PROVISIONING_PROFILE = "1761CBF8-909C-436E-AEE3-65640094A91B";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand All @@ -841,10 +867,21 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer: Damian Want (H352635WJ8)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Damian Want (H352635WJ8)";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AgentBridge/AgentBridge-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"/usr/include/libxml2/**",
);
INFOPLIST_FILE = "AgentBridge/AgentBridge-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/ANMobilePaymentLib";
OTHER_LDFLAGS = "-lxml2";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "A0B45F01-E255-48AC-A173-070ED095A2FF";
TARGETED_DEVICE_FAMILY = 1;
Expand All @@ -859,10 +896,21 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer: Damian Want (H352635WJ8)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Damian Want (H352635WJ8)";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AgentBridge/AgentBridge-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"/usr/include/libxml2/**",
);
INFOPLIST_FILE = "AgentBridge/AgentBridge-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LIBRARY_SEARCH_PATHS = "$(SRCROOT)/ANMobilePaymentLib";
OTHER_LDFLAGS = "-lxml2";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "A0B45F01-E255-48AC-A173-070ED095A2FF";
TARGETED_DEVICE_FAMILY = 1;
Expand Down
Binary file not shown.
11 changes: 11 additions & 0 deletions AgentBridge/ABridge_ActivityPagesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ @interface ABridge_ActivityPagesViewController ()
@property (weak, nonatomic) IBOutlet UILabel *labelDescription;
@property (weak, nonatomic) IBOutlet UIButton *buttonDescription;
@property (strong, nonatomic) LoginDetails * loginDetail;
- (IBAction)buttonActionPressed:(id)sender;
@end

@implementation ABridge_ActivityPagesViewController
Expand Down Expand Up @@ -803,4 +804,14 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
// Do something with responseData
}

- (IBAction)buttonActionPressed:(id)sender {
switch ([((UIButton*)sender) tag]) {
case 1001:{

break;
}
default:
break;
}
}
@end
1 change: 1 addition & 0 deletions AgentBridge/ABridge_ActivityViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ - (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view.


self.labelNumberOfActivity.font = FONT_OPENSANS_REGULAR(FONT_SIZE_TITLE);
self.labelNumberOfActivity.text = @"My Activity";
[self.labelNumberOfActivity sizeToFit];
Expand Down
12 changes: 10 additions & 2 deletions AgentBridge/ABridge_AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ @implementation ABridge_AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
_initalStoryboard = self.window.rootViewController.storyboard;

UIImage *tabBackground = [[UIImage imageNamed:@"nav_bg.png"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];

Expand All @@ -29,6 +27,16 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[[UITabBar appearance] setBackgroundImage:tabBackground];
[[UITabBar appearance] setSelectionIndicatorImage:tabBackgroundSelected];

[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], UITextAttributeTextColor,
nil] forState:UIControlStateNormal];
UIColor *titleHighlightedColor = [UIColor colorWithRed:44.0f/255.0 green:153.0f/255.0 blue:206.0f/255.0 alpha:1.0];
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
titleHighlightedColor, UITextAttributeTextColor,
nil] forState:UIControlStateSelected];

_initalStoryboard = self.window.rootViewController.storyboard;

return YES;
}

Expand Down
10 changes: 10 additions & 0 deletions AgentBridge/ABridge_BrokerageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ @interface ABridge_BrokerageViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *scrollViewDesignations;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorMain;
@property (weak, nonatomic) IBOutlet UILabel *labelNoneSpecified;
@property (strong, nonatomic) NSURLConnection *urlConnectionDesignation;
@property (strong, nonatomic) NSMutableData *dataReceived;
@property (strong, nonatomic) NSMutableArray *arrayOfDesignation;
Expand Down Expand Up @@ -218,6 +219,15 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
self.scrollViewDesignations.contentSize = CGSizeMake(0.0f, yOffset);
}

if ([self.arrayOfDesignation count] == 0) {
self.labelNoneSpecified.hidden = NO;
[self.activityIndicator stopAnimating];
self.activityIndicator.hidden = YES;
}
else {
self.labelNoneSpecified.hidden = YES;
}

UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0.0f, yOffset, 280.0f, 30.0f)];
textField.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
[self addPaddingAndBorder:textField color:[UIColor colorWithRed:178.0f/255.0f green:178.0f/255.0f blue:178.0f/255.0f alpha:1.0f]];
Expand Down
2 changes: 1 addition & 1 deletion AgentBridge/ABridge_ReferralPagesViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import "Referral.h"
#import "ASIHTTPRequest.h"

@interface ABridge_ReferralPagesViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate>
@interface ABridge_ReferralPagesViewController : UIViewController <UIPickerViewDataSource, UIPickerViewDelegate, UITextViewDelegate>

@property (assign, nonatomic) NSInteger index;
@property (strong, nonatomic) Referral *referralDetails;
Expand Down
74 changes: 67 additions & 7 deletions AgentBridge/ABridge_ReferralPagesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ @interface ABridge_ReferralPagesViewController ()
@property (weak, nonatomic) IBOutlet UILabel *labelNote;
@property (weak, nonatomic) IBOutlet UIButton *buttonSubmit;
@property (weak, nonatomic) IBOutlet UIButton *buttonCancel;
@property (weak, nonatomic) IBOutlet UIView *viewForButtons;
@property (strong, nonatomic) LoginDetails *loginDetail;
@property (strong, nonatomic) NSArray *arrayOfStatus;
@property (strong, nonatomic) NSString *urlStringStatusChange;
Expand Down Expand Up @@ -221,6 +222,19 @@ - (void)viewDidLoad
}
}

- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];

// [UIView animateWithDuration:1 animations:^{
// [self.textViewNote resignFirstResponder];
// CGRect frame = self.viewChangeStatus.frame;
// frame.origin.y = 0.0f;
// self.viewChangeStatus.frame = frame;
// } completion:^(BOOL finished) {
// self.viewChangeStatus.hidden = YES;
// }];
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
Expand Down Expand Up @@ -270,7 +284,7 @@ - (IBAction)changeStatus:(id)sender {
self.arrayOfStatus = [NSArray arrayWithObjects:nil];
break;
case REFERRAL_STATUS_NEEDHELP:
self.arrayOfStatus = [NSArray arrayWithObjects:nil];
self.arrayOfStatus = [NSArray arrayWithObjects:@"Active", @"Under Contract", @"No Go",nil];
break;
case REFERRAL_STATUS_PENDING:
self.arrayOfStatus = [NSArray arrayWithObjects:@"Active", @"No Go", @"Need Help", nil];
Expand Down Expand Up @@ -477,17 +491,39 @@ - (void) generateURLString:(NSInteger)row {
NSString *status_type = @"";
NSString *note_text = @"";
if ([[self.arrayOfStatus objectAtIndex:row] isEqualToString:@"Need Help"]) {
self.labelNote.alpha = 1.0f;
self.textViewNote.alpha = 1.0f;
self.textViewNote.userInteractionEnabled = YES;

[UIView animateWithDuration:1 animations:^{
CGRect frame = self.viewForButtons.frame;
frame.origin.y = 269.0f;
self.viewForButtons.frame = frame;

frame = self.viewChangeStatus.frame;
frame.size.height = 331.0f;
self.viewChangeStatus.frame = frame;
} completion:^(BOOL finished) {
self.labelNote.alpha = 1.0f;
self.textViewNote.alpha = 1.0f;
self.textViewNote.userInteractionEnabled = YES;
}];

status_type = @"6";
note_text = self.textViewNote.text;
}
else {
self.labelNote.alpha = 0.3f;
self.textViewNote.alpha = 0.3f;
self.textViewNote.userInteractionEnabled = NO;
[UIView animateWithDuration:1 animations:^{
CGRect frame = self.viewForButtons.frame;
frame.origin.y = 162.0f;
self.viewForButtons.frame = frame;

frame = self.viewChangeStatus.frame;
frame.size.height = 217.0f;
self.viewChangeStatus.frame = frame;
} completion:^(BOOL finished) {
self.labelNote.alpha = 0.3f;
self.textViewNote.alpha = 0.3f;
self.textViewNote.userInteractionEnabled = NO;
}];

note_text = @"";

if ([[self.arrayOfStatus objectAtIndex:row] isEqualToString:@"Active"]) {
Expand All @@ -514,4 +550,28 @@ - (void) generateURLString:(NSInteger)row {
self.urlStringStatusChange = [NSString stringWithFormat:@"http://keydiscoveryinc.com/agent_bridge/webservice/change_status.php%@", parameters];
}

- (void)textViewDidBeginEditing:(UITextView *)textView {
[UIView animateWithDuration:0.2 animations:^{
CGRect frame = self.viewChangeStatus.frame;
frame.origin.y = -165.0f;
self.viewChangeStatus.frame = frame;
} completion:^(BOOL finished) {
}];
}

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
if ([text isEqualToString:@"\n"]) {
[UIView animateWithDuration:1 animations:^{
[textView resignFirstResponder];
CGRect frame = self.viewChangeStatus.frame;
frame.origin.y = 0.0f;
self.viewChangeStatus.frame = frame;
} completion:^(BOOL finished) {

}];
return NO;
}
return YES;
}

@end
Loading

0 comments on commit 8aebbac

Please sign in to comment.