Skip to content
Browse files

paymend pdf, membership, pops view

  • Loading branch information...
1 parent b32dcd4 commit fe1861813ac83b7e38ecb839459687d97b024d4b @jovhenni19 committed Feb 14, 2014
View
BIN ...j/project.xcworkspace/xcuserdata/host24_iosdev.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
4 AgentBridge/ABridge_ActivityAgentPOPsViewController.m
@@ -292,6 +292,10 @@ - (ABridge_PropertyPagesViewController *)viewControllerAtIndex:(NSUInteger)index
pagesViewController.index = index;
pagesViewController.propertyDetails = (Property*)[self.arrayOfProperty objectAtIndex:index];
pagesViewController.delegate = self;
+ if (self.fromSearch) {
+ pagesViewController.buyers_view = YES;
+ pagesViewController.fromSearch = YES;
+ }
return pagesViewController;
View
123 AgentBridge/ABridge_FeeCollectionViewController.m
@@ -197,6 +197,7 @@ - (void)viewDidLoad
// self.slidingViewController.underRightViewController = nil;
+
self.labelGrossComission.font = FONT_OPENSANS_BOLD(FONT_SIZE_REGULAR);
self.textFieldGrossComission.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
self.buttonCancel.titleLabel.font = FONT_OPENSANS_BOLD(FONT_SIZE_SMALL);
@@ -1804,6 +1805,33 @@ - (void) createInvoicePDF {
- (void) createPaymentPDF {
+ __block NSDictionary *agent_a_details;
+ __block NSDictionary *agent_b_details;
+
+ NSString *urlStringTest = [NSString stringWithFormat:@"http://keydiscoveryinc.com/agent_bridge/webservice/referral_data_payment.php?referral_id=%@", self.referral_id];
+// NSLog(@"urlString:%@",urlStringTest);
+ __block NSError *errorDataTest = nil;
+ __weak ASIHTTPRequest *requestTest = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:urlStringTest]];
+ [requestTest setCompletionBlock:^{
+ // Use when fetching text data
+ // NSString *responseString = [request responseString];
+ // Use when fetching binary data
+ NSData *responseData = [requestTest responseData];
+ NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingAllowFragments error:&errorDataTest];
+ NSLog(@"json:%@",json);
+ NSDictionary *values = [[json objectForKey:@"data"] objectForKey:@"values"];
+
+ agent_a_details = [NSDictionary dictionaryWithObjectsAndKeys:[values objectForKey:@"referring_user_id"],@"user_id",[values objectForKey:@"referring_name"],@"name",[values objectForKey:@"referring_email"],@"email",[[json objectForKey:@"data"] objectForKey:@"referring_agent_license"],@"agent_license",[[json objectForKey:@"data"] objectForKey:@"referring_brokerage_license"],@"brokerage_license", [[json objectForKey:@"data"] objectForKey:@"referring_tax_id"],@"tax_id",[values objectForKey:@"referring_mobile_number"],@"mobile_number",[values objectForKey:@"referring_broker_name"],@"broker_name", [values objectForKey:@"street_address"],@"street_address",[values objectForKey:@"city"],@"city",[values objectForKey:@"state"],@"state",[values objectForKey:@"zip"],@"zip",[values objectForKey:@"country"],@"country", nil];
+
+ agent_b_details = [NSDictionary dictionaryWithObjectsAndKeys:[values objectForKey:@"receiving_user_id"],@"user_id",[values objectForKey:@"receiving_name"],@"name",[values objectForKey:@"receiving_email"],@"email",[[json objectForKey:@"data"] objectForKey:@"receiving_agent_license"],@"agent_license",[[json objectForKey:@"data"] objectForKey:@"receiving_brokerage_license"],@"brokerage_license", [[json objectForKey:@"data"] objectForKey:@"receiving_tax_id"],@"tax_id",[values objectForKey:@"receiving_mobile_number"],@"mobile_number",[values objectForKey:@"receiving_broker_name"],@"broker_name", nil];
+ }];
+ [requestTest setFailedBlock:^{
+ NSError *error = [requestTest error];
+ NSLog(@"error:%@",error);
+ }];
+ [requestTest startAsynchronous];
+
+
NSString *agent_name = [NSString stringWithFormat:@"%@ %@",self.textFieldFirstname.text, self.textFieldLastname.text];
NSDate *today = [NSDate date];
NSCalendar *gregorian = [[NSCalendar alloc]
@@ -1826,7 +1854,100 @@ - (void) createPaymentPDF {
NSString *grossCommissionSale = [formatter stringFromNumber: [NSNumber numberWithDouble:[self.grossCommission doubleValue]]];
- NSString *htmlStringForPDF = [NSString stringWithFormat:HTMLSTRING_PAYMENT, payment_date, self.referral_name, self.loginDetails.user_id, self.profile.broker_name, self.referral_name, self.profile.broker_name,self.textFieldBrokerLicense.text, agent_name, self.textFieldAgentLicense.text, self.textFieldPhoneNumber.text, self.textFieldEmail.text, self.textFieldTaxId.text, self.referral_name, self.client_number, self.client_email, self.client_address, self.client_type, [NSString stringWithFormat:@"%f%%",(self.referral_fee * 100.0f) ], payment_date, grossCommissionSale, [NSString stringWithFormat:@"%f%%",(self.referral_fee * 100.0f) ], referralFeeDetail,self.profile.broker_name, agent_name, self.referral_name, grossCommissionSale,self.profile.broker_name,self.profile.street_address,self.profile.city,self.profile.state_name,self.profile.zip,self.profile.countries_name,agent_name,self.profile.email];
+ NSString *htmlStringForPDF = @"";
+
+ if ([self.loginDetails.user_id integerValue] == [[agent_a_details objectForKey:@"user_id"] integerValue]) {
+
+ htmlStringForPDF = [NSString stringWithFormat:HTMLSTRING_PAYMENT,
+ payment_date,
+ self.referral_name,
+ [agent_a_details objectForKey:@"user_id"],
+ [agent_a_details objectForKey:@"broker_name"],
+ [agent_b_details objectForKey:@"broker_name"],
+ self.referral_name,
+ [agent_a_details objectForKey:@"broker_name"],
+ self.textFieldBrokerLicense.text,
+ agent_name,
+ self.textFieldAgentLicense.text,
+ self.textFieldPhoneNumber.text,
+ self.textFieldEmail.text,
+ self.textFieldTaxId.text,
+ [agent_b_details objectForKey:@"broker_name"],
+ [agent_b_details objectForKey:@"brokerage_license"],
+ [agent_b_details objectForKey:@"name"],
+ [agent_b_details objectForKey:@"agent_license"],
+ [agent_b_details objectForKey:@"mobile_number"],
+ [agent_b_details objectForKey:@"email"],
+ [agent_b_details objectForKey:@"tax_id"],
+ self.referral_name,
+ self.client_number,
+ self.client_email,
+ self.client_address,
+ self.client_type,
+ [NSString stringWithFormat:@"%f%%",(self.referral_fee * 100.0f) ],
+ payment_date,
+ grossCommissionSale,
+ [NSString stringWithFormat:@"%f%%",(self.referral_fee * 100.0f) ],
+ referralFeeDetail,
+ [agent_a_details objectForKey:@"broker_name"],
+ agent_name,
+ self.referral_name,
+ referralFeeDetail,
+ [agent_a_details objectForKey:@"broker_name"],
+ [agent_a_details objectForKey:@"street_address"],
+ [agent_a_details objectForKey:@"city"],
+ [agent_a_details objectForKey:@"state"],
+ [agent_a_details objectForKey:@"zip"],
+ [agent_a_details objectForKey:@"country"],
+ agent_name,
+ self.textFieldEmail.text];
+ }
+ else {
+ htmlStringForPDF = [NSString stringWithFormat:HTMLSTRING_PAYMENT,
+ payment_date,
+ self.referral_name,
+ [agent_a_details objectForKey:@"user_id"],
+ [agent_a_details objectForKey:@"broker_name"],
+ [agent_b_details objectForKey:@"broker_name"],
+ self.referral_name,
+ [agent_a_details objectForKey:@"broker_name"],
+ [agent_a_details objectForKey:@"brokerage_license"],
+ [agent_a_details objectForKey:@"name"],
+ [agent_a_details objectForKey:@"agent_license"],
+ [agent_a_details objectForKey:@"mobile_number"],
+ [agent_a_details objectForKey:@"email"],
+ [agent_a_details objectForKey:@"tax_id"],
+ [agent_b_details objectForKey:@"broker_name"],
+ self.textFieldBrokerLicense.text,
+ agent_name,
+ self.textFieldAgentLicense.text,
+ self.textFieldPhoneNumber.text,
+ self.textFieldEmail.text,
+ self.textFieldTaxId.text,
+ self.referral_name,
+ self.client_number,
+ self.client_email,
+ self.client_address,
+ self.client_type,
+ [NSString stringWithFormat:@"%f%%",(self.referral_fee * 100.0f) ],
+ payment_date,
+ grossCommissionSale,
+ [NSString stringWithFormat:@"%f%%",(self.referral_fee * 100.0f) ],
+ referralFeeDetail,
+ [agent_a_details objectForKey:@"broker_name"],
+ [agent_a_details objectForKey:@"name"],
+ self.referral_name,
+ referralFeeDetail,
+ [agent_a_details objectForKey:@"broker_name"],
+ [agent_a_details objectForKey:@"street_address"],
+ [agent_a_details objectForKey:@"city"],
+ [agent_a_details objectForKey:@"state"],
+ [agent_a_details objectForKey:@"zip"],
+ [agent_a_details objectForKey:@"country"],
+ [agent_a_details objectForKey:@"name"],
+ [agent_a_details objectForKey:@"email"]];
+ }
+
self.payment_id = [NSString stringWithFormat:@"Payment_%@_%@_%@",self.user_id,self.user_id,[date_today stringByReplacingOccurrencesOfString:@"-" withString:@"_"]];
View
151 AgentBridge/ABridge_MembershipViewController.m
@@ -10,48 +10,21 @@
#import "AgentProfile.h"
@interface ABridge_MembershipViewController ()
-@property (weak, nonatomic) IBOutlet UIScrollView *scrollViewPlans;
-@property (weak, nonatomic) IBOutlet UIPageControl *pageControl;
@property (weak, nonatomic) IBOutlet UILabel *labelHeader;
@property (weak, nonatomic) IBOutlet UIButton *buttonMembershipMonthly;
-@property (weak, nonatomic) IBOutlet UILabel *labelMonthlyCurrent;
@property (weak, nonatomic) IBOutlet UILabel *labelMonthlyName;
-@property (weak, nonatomic) IBOutlet UILabel *labelMonthlyCode;
@property (weak, nonatomic) IBOutlet UITableView *tableViewMonthlyBenefits;
-@property (weak, nonatomic) IBOutlet UILabel *labelMonthlyCost;
-@property (weak, nonatomic) IBOutlet UILabel *labelMonthlySave;
-@property (weak, nonatomic) IBOutlet UIButton *buttonMembershipQuarterly;
-@property (weak, nonatomic) IBOutlet UILabel *labelQuarterlyCurrent;
-@property (weak, nonatomic) IBOutlet UILabel *labelQuarterlyName;
-@property (weak, nonatomic) IBOutlet UILabel *labelQuarterlyCode;
-@property (weak, nonatomic) IBOutlet UITableView *tableViewQuarterlyBenefits;
-@property (weak, nonatomic) IBOutlet UILabel *labelQuarterlyCost;
-@property (weak, nonatomic) IBOutlet UILabel *labelQuarterlySave;
-
-@property (weak, nonatomic) IBOutlet UIButton *buttonMembershipAnnual;
-@property (weak, nonatomic) IBOutlet UILabel *labelAnnualCurrent;
-@property (weak, nonatomic) IBOutlet UILabel *labelAnnualName;
-@property (weak, nonatomic) IBOutlet UILabel *labelAnnualCode;
-@property (weak, nonatomic) IBOutlet UITableView *tableViewAnnualBenefits;
-@property (weak, nonatomic) IBOutlet UILabel *labelAnnualCost;
-@property (weak, nonatomic) IBOutlet UILabel *labelAnnualSave;
@property (strong, nonatomic) NSMutableArray *arrayBenefitsMonthly;
-@property (strong, nonatomic) NSMutableArray *arrayBenefitsQuarterly;
-@property (strong, nonatomic) NSMutableArray *arrayBenefitsAnnual;
- (IBAction)buttonMonthlyPressed:(id)sender;
-- (IBAction)buttonQuarterlyPressed:(id)sender;
-- (IBAction)buttonAnnualPressed:(id)sender;
@end
@implementation ABridge_MembershipViewController
@synthesize arrayBenefitsMonthly;
-@synthesize arrayBenefitsQuarterly;
-@synthesize arrayBenefitsAnnual;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
@@ -67,33 +40,12 @@ - (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view.
+ self.slidingViewController.underRightViewController = nil;
self.labelHeader.font = FONT_OPENSANS_BOLD(FONT_SIZE_TITLE);
- self.labelMonthlyCurrent.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
self.labelMonthlyName.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelMonthlyCode.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelMonthlyCost.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelMonthlySave.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
self.buttonMembershipMonthly.titleLabel.font = FONT_OPENSANS_REGULAR(FONT_SIZE_SMALL);
- self.labelQuarterlyCurrent.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelQuarterlyName.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelQuarterlyCode.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelQuarterlyCost.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelQuarterlySave.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.buttonMembershipQuarterly.titleLabel.font = FONT_OPENSANS_REGULAR(FONT_SIZE_SMALL);
-
- self.labelAnnualCurrent.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelAnnualName.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelAnnualCode.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelAnnualCost.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.labelAnnualSave.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
- self.buttonMembershipAnnual.titleLabel.font = FONT_OPENSANS_REGULAR(FONT_SIZE_SMALL);
-
-
- self.labelMonthlyCurrent.hidden = YES;
- self.labelQuarterlyCurrent.hidden = YES;
- self.labelAnnualCurrent.hidden = YES;
//get profile user_id
@@ -139,7 +91,7 @@ - (void)viewDidLoad
NSMutableString *urlString = [NSMutableString stringWithString:@"http://keydiscoveryinc.com/agent_bridge/webservice/get_membership_fee.php"];
[urlString appendString:parameters];
- NSLog(@"url:%@",urlString);
+// NSLog(@"url:%@",urlString);
__block NSError *errorData = nil;
__weak ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:urlString]];
// [self.activityIndicator startAnimating];
@@ -148,13 +100,14 @@ - (void)viewDidLoad
^{
NSData *responseData = [request responseData];
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingAllowFragments error:&errorData];
- NSLog(@"json:%@",json);
+// NSLog(@"json:%@",json);
if ([[json objectForKey:@"data"] count]) {
- self.labelMonthlyName.text = [[[json objectForKey:@"data"] firstObject] objectForKey:@"fee_title"];
+ self.labelMonthlyName.text = [@"Your current plan: " stringByAppendingString:[[[json objectForKey:@"data"] firstObject] objectForKey:@"fee_title"]];
}
else {
+ self.labelMonthlyName.text = @"Your current plan: Charter";
}
[self.searchDisplayController.searchResultsTableView reloadData];
@@ -185,71 +138,14 @@ - (void)viewDidLoad
[self.arrayBenefitsMonthly addObject:dic1];
- [self.arrayBenefitsMonthly addObject:dic2];
- [self.arrayBenefitsMonthly addObject:dic3];
[self.arrayBenefitsMonthly addObject:dic4];
[self.arrayBenefitsMonthly addObject:dic5];
+ [self.arrayBenefitsMonthly addObject:dic2];
+ [self.arrayBenefitsMonthly addObject:dic3];
[self.tableViewMonthlyBenefits reloadData];
}
-
-dummy_data_quarterly:
- {
- if (self.arrayBenefitsQuarterly == nil) {
- self.arrayBenefitsQuarterly = [NSMutableArray array];
- }
-
-
- NSDictionary *dic1 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited AgentBridge International Referrals.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic2 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited POPs™.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic3 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited matches to Buyers.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic4 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Authorization to use AgentBridge marketing materials for self promotion.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic5 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited use of AgentBridge mobile app.", @"description", @"1", @"bool", nil];
-
-
- [self.arrayBenefitsQuarterly addObject:dic1];
- [self.arrayBenefitsQuarterly addObject:dic2];
- [self.arrayBenefitsQuarterly addObject:dic3];
- [self.arrayBenefitsQuarterly addObject:dic4];
- [self.arrayBenefitsQuarterly addObject:dic5];
-
- [self.tableViewQuarterlyBenefits reloadData];
- }
-
-
-dummy_data_annual:
- {
- if (self.arrayBenefitsAnnual == nil) {
- self.arrayBenefitsAnnual = [NSMutableArray array];
- }
-
-
- NSDictionary *dic1 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited AgentBridge International Referrals.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic2 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited POPs™.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic3 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited matches to Buyers.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic4 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Authorization to use AgentBridge marketing materials for self promotion.", @"description", @"1", @"bool", nil];
-
- NSDictionary *dic5 = [[NSDictionary alloc] initWithObjectsAndKeys:@"Unlimited use of AgentBridge mobile app.", @"description", @"1", @"bool", nil];
-
-
- [self.arrayBenefitsAnnual addObject:dic1];
- [self.arrayBenefitsAnnual addObject:dic2];
- [self.arrayBenefitsAnnual addObject:dic3];
- [self.arrayBenefitsAnnual addObject:dic4];
- [self.arrayBenefitsAnnual addObject:dic5];
-
- [self.tableViewAnnualBenefits reloadData];
- }
-
- self.scrollViewPlans.contentSize = CGSizeMake(960.0f, 0.0f);
}
- (void)didReceiveMemoryWarning
@@ -276,15 +172,7 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- if (tableView == self.tableViewMonthlyBenefits) {
return [self.arrayBenefitsMonthly count];
- }
- else if (tableView == self.tableViewQuarterlyBenefits) {
- return [self.arrayBenefitsQuarterly count];
- }
- else {
- return [self.arrayBenefitsAnnual count];
- }
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -295,12 +183,6 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
if (tableView == self.tableViewMonthlyBenefits) {
arrayData = self.arrayBenefitsMonthly;
}
- else if (tableView == self.tableViewQuarterlyBenefits) {
- arrayData = self.arrayBenefitsQuarterly;
- }
- else {
- arrayData = self.arrayBenefitsAnnual;
- }
// if agent search
text = [[arrayData objectAtIndex:[indexPath row]] objectForKey:@"description"];
@@ -330,12 +212,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
if (tableView == self.tableViewMonthlyBenefits) {
arrayData = self.arrayBenefitsMonthly;
}
- else if (tableView == self.tableViewQuarterlyBenefits) {
- arrayData = self.arrayBenefitsQuarterly;
- }
- else {
- arrayData = self.arrayBenefitsAnnual;
- }
cell.textLabel.text = [[arrayData objectAtIndex:[indexPath row]] objectForKey:@"description"];
@@ -350,19 +226,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
return cell;
}
-#pragma
-#pragma mark UIScrollView Delegate
-- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
- if (scrollView.contentOffset.x < 160.0f) {
- [self.pageControl setCurrentPage:0];
- }
- else if (scrollView.contentOffset.x < 480.0f) {
- [self.pageControl setCurrentPage:1];
- }
- else {
- [self.pageControl setCurrentPage:2];
- }
-}
@end
View
1 AgentBridge/ABridge_PropertyPagesViewController.h
@@ -24,6 +24,7 @@
@property (strong, nonatomic) Property *propertyDetails;
@property (assign, nonatomic) id <ABridge_PropertyPagesViewControllerDelegate> delegate;
@property (assign, nonatomic) BOOL buyers_view;
+ @property (assign, nonatomic) BOOL fromSearch;
@property (assign, nonatomic) NSInteger buyer_id;
@property (strong, nonatomic) NSString *buyer_name;
@end
View
919 AgentBridge/ABridge_PropertyPagesViewController.m
@@ -51,6 +51,7 @@ @implementation ABridge_PropertyPagesViewController
@synthesize loginDetail;
@synthesize buyer_id;
@synthesize buyer_name;
+ @synthesize fromSearch;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
@@ -90,57 +91,65 @@ - (void)viewDidLoad
self.textFeatures.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
self.buttonDescription.titleLabel.font = FONT_OPENSANS_BOLD(FONT_SIZE_SMALL);
- self.labelDescription.font = FONT_OPENSANS_REGULAR(FONT_SIZE_SMALL);
+ self.labelDescription.font = FONT_OPENSANS_BOLD(FONT_SIZE_SMALL);
self.labelPage.text = [NSString stringWithFormat:@"%li",(long)self.index+1];
self.labelZip.text = self.propertyDetails.zip;
self.labelPropertyName.text = self.propertyDetails.property_name;
self.labelPropertyType.text = [NSString stringWithFormat:@"%@ - %@",self.propertyDetails.type_name, self.propertyDetails.sub_type_name];
+ UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+ imageView.contentMode = UIViewContentModeCenter;
+ imageView.image = [UIImage imageNamed:[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+
+ [self.scrollImages addSubview:imageView];
+
if (buyers_view) {
- NSString *parameters = [NSString stringWithFormat:@"?user_id=%@&listing_id=%@&buyer_id=%li",self.loginDetail.user_id,self.propertyDetails.listing_id, (long)self.buyer_id];
-
- NSMutableString *urlString = [NSMutableString stringWithString:@"http://keydiscoveryinc.com/agent_bridge/webservice/check_new_if_saved.php"];
- [urlString appendString:parameters];
-// //NSLog(@"url:%@",urlString);
-
-
- if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
- [self.delegate hideSaveButton:YES];
- }
- __block NSError *errorData = nil;
- __weak ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:urlString]];
- // [self.activityIndicator startAnimating];
- // self.activityIndicator.hidden = NO;
- [request setCompletionBlock:
- ^{
- NSData *responseData = [request responseData];
- NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingAllowFragments error:&errorData];
-
-// //NSLog(@"json:%@",json);
- if ([[json objectForKey:@"status"] integerValue] == 1) {
- if ([self.delegate respondsToSelector:@selector(replaceSaveWithText:)]) {
- [self.delegate replaceSaveWithText:[NSString stringWithFormat:@"Saved to %@",self.buyer_name]];
- }
- }
- else {
-// //NSLog(@"Failed");
+ if (!self.fromSearch) {
+ NSString *parameters = [NSString stringWithFormat:@"?user_id=%@&listing_id=%@&buyer_id=%li",self.loginDetail.user_id,self.propertyDetails.listing_id, (long)self.buyer_id];
+
+ NSMutableString *urlString = [NSMutableString stringWithString:@"http://keydiscoveryinc.com/agent_bridge/webservice/check_new_if_saved.php"];
+ [urlString appendString:parameters];
+ // //NSLog(@"url:%@",urlString);
+
+
+ if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
+ [self.delegate hideSaveButton:YES];
+ }
+ __block NSError *errorData = nil;
+ __weak ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:urlString]];
+ // [self.activityIndicator startAnimating];
+ // self.activityIndicator.hidden = NO;
+ [request setCompletionBlock:
+ ^{
+ NSData *responseData = [request responseData];
+ NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingAllowFragments error:&errorData];
- if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
- [self.delegate hideSaveButton:NO];
+ // //NSLog(@"json:%@",json);
+ if ([[json objectForKey:@"status"] integerValue] == 1) {
+ if ([self.delegate respondsToSelector:@selector(replaceSaveWithText:)]) {
+ [self.delegate replaceSaveWithText:[NSString stringWithFormat:@"Saved to %@",self.buyer_name]];
+ }
}
- }
-
-
- }];
- [request setFailedBlock:^{
- NSError *error = [request error];
- NSLog(@" error:%@",error);
- }];
-
- [request startAsynchronous];
+ else {
+ // //NSLog(@"Failed");
+
+ if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
+ [self.delegate hideSaveButton:NO];
+ }
+ }
+
+
+ }];
+ [request setFailedBlock:^{
+ NSError *error = [request error];
+ NSLog(@" error:%@",error);
+ }];
+
+ [request startAsynchronous];
+ }
if ([self.loginDetail.user_id integerValue] != [self.propertyDetails.user_id integerValue]) {
//NSLog(@" REstriction %i --- %i",[self.loginDetail.user_id integerValue],[self.propertyDetails.user_id integerValue]);
@@ -258,21 +267,35 @@ - (void)viewDidLoad
if ([access.permission boolValue] == YES) {
[self loadPOPsImages];
[self getPriceText];
+ self.labelPropertyType.hidden = NO;
}
else if ([access.permission boolValue] == NO){
self.labelExpiry.text = @"";
self.labelExpiry.hidden = YES;
// self.viewForDescription.hidden = NO;
self.labelDescription.hidden = NO;
self.buttonDescription.hidden = NO;
+ self.labelPropertyType.hidden = YES;
+
+ CGRect frame = self.labelDescription.frame;
+ frame.origin.y -= 20.0f;
+ self.labelDescription.frame = frame;
+
self.labelDescription.text = @"This POPs™ is restricted to private";
[self.buttonDescription setTitle:@"Pending" forState:UIControlStateNormal];
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+
+ while ([[self.scrollImages subviews]count] > 0) {
+
+ [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ }
+
+ [self.loadingImageIndicator removeFromSuperview];
+
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
+ NSString *imageName = [NSString stringWithFormat:@"%@",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+ imageView.image = [UIImage imageNamed:[imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"]];
[self.scrollImages addSubview:imageView];
@@ -288,40 +311,64 @@ - (void)viewDidLoad
// self.viewForDescription.hidden = NO;
self.labelDescription.hidden = NO;
self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+ self.labelPropertyType.hidden = YES;
+
+ CGRect frame = self.labelDescription.frame;
+ frame.origin.y -= 20.0f;
+ self.labelDescription.frame = frame;
+
+ self.labelDescription.text = @"You need to request permission to view this POPs™.";
[self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
self.buttonDescription.tag = 20002;
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+
+ while ([[self.scrollImages subviews]count] > 0) {
+
+ [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ }
+
+ [self.loadingImageIndicator removeFromSuperview];
+
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
+ NSString *imageName = [NSString stringWithFormat:@"%@",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+ imageView.image = [UIImage imageNamed:[imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"]];
[self.scrollImages addSubview:imageView];
}
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
}
else {
self.labelExpiry.text = @"";
self.labelExpiry.hidden = YES;
// self.viewForDescription.hidden = NO;
self.labelDescription.hidden = NO;
self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+ self.labelPropertyType.hidden = YES;
+
+ CGRect frame = self.labelDescription.frame;
+ frame.origin.y -= 20.0f;
+ self.labelDescription.frame = frame;
+
+ self.labelDescription.text = @"You need to request permission to view this POPs™.";
[self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
self.buttonDescription.tag = 20002;
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+
+ while ([[self.scrollImages subviews]count] > 0) {
+
+ [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ }
+
+ [self.loadingImageIndicator removeFromSuperview];
+
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
+ NSString *imageName = [NSString stringWithFormat:@"%@",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+ imageView.image = [UIImage imageNamed:[imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"]];
[self.scrollImages addSubview:imageView];
@@ -344,15 +391,27 @@ - (void)viewDidLoad
// self.viewForDescription.hidden = NO;
self.labelDescription.hidden = NO;
self.buttonDescription.hidden = NO;
+ self.labelPropertyType.hidden = YES;
+
+ CGRect frame = self.labelDescription.frame;
+ frame.origin.y -= 20.0f;
+ self.labelDescription.frame = frame;
+
self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
[self.buttonDescription setTitle:@"Pending" forState:UIControlStateNormal];
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ while ([[self.scrollImages subviews]count] > 0) {
+
+ [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ }
+
+ [self.loadingImageIndicator removeFromSuperview];
+
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
+ NSString *imageName = [NSString stringWithFormat:@"%@",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+ imageView.image = [UIImage imageNamed:[imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"]];
[self.scrollImages addSubview:imageView];
@@ -361,7 +420,6 @@ - (void)viewDidLoad
}
}
else {
-
[self loadPOPsImages];
}
}
@@ -371,22 +429,33 @@ - (void)viewDidLoad
// self.viewForDescription.hidden = NO;
self.labelDescription.hidden = NO;
self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+ self.labelPropertyType.hidden = YES;
+
+ CGRect frame = self.labelDescription.frame;
+ frame.origin.y -= 20.0f;
+ self.labelDescription.frame = frame;
+
+ self.labelDescription.text = @"You need to request permission to view this POPs™.";
[self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
self.buttonDescription.tag = 10001;
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ while ([[self.scrollImages subviews]count] > 0) {
+
+ [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ }
+
+ [self.loadingImageIndicator removeFromSuperview];
+
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
+ NSString *imageName = [NSString stringWithFormat:@"%@",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+ imageView.image = [UIImage imageNamed:[imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"]];
[self.scrollImages addSubview:imageView];
}
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
}
else {
@@ -395,17 +464,28 @@ - (void)viewDidLoad
// self.viewForDescription.hidden = NO;
self.labelDescription.hidden = NO;
self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+ self.labelPropertyType.hidden = YES;
+
+ CGRect frame = self.labelDescription.frame;
+ frame.origin.y -= 20.0f;
+ self.labelDescription.frame = frame;
+
+ self.labelDescription.text = @"You need to request permission to view this POPs™.";
[self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
self.buttonDescription.tag = 10001;
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ while ([[self.scrollImages subviews]count] > 0) {
+
+ [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+ }
+
+ [self.loadingImageIndicator removeFromSuperview];
+
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
+ NSString *imageName = [NSString stringWithFormat:@"%@",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+ imageView.image = [UIImage imageNamed:[imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"]];
[self.scrollImages addSubview:imageView];
@@ -423,12 +503,14 @@ - (void)viewDidLoad
else {
[self getPriceText];
[self loadPOPsImages];
+ self.labelPropertyType.hidden = NO;
}
}
else {
[self getPriceText];
[self loadPOPsImages];
+ self.labelPropertyType.hidden = NO;
}
[self getExpiredText];
@@ -447,11 +529,6 @@ - (void)viewDidLoad
self.buttonDescription.frame = frame;
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeCenter;
- imageView.image = [UIImage imageNamed:[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
-
- [self.scrollImages addSubview:imageView];
// Add a bottomBorder.
CALayer *bottomBorder = [CALayer layer];
@@ -828,360 +905,360 @@ - (void) checkSettingGetPrice {
}
}
-- (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse *)response
-{
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
- [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
- self.dataReceived = nil;
- self.dataReceived = [[NSMutableData alloc]init];
-}
-- (void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data
-{
- ////NSLog(@"Did Receive Data %@", data);
- [self.dataReceived appendData:data];
-}
-- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error
-{
- // //NSLog(@"Did Fail");
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Internet Connection" message:@"You have no Internet Connection available." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
- [alert show];
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
-}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
-{
- NSError *error = nil;
- NSDictionary *json = [NSJSONSerialization JSONObjectWithData:self.dataReceived options:NSJSONReadingAllowFragments error:&error];
-
-// //NSLog(@"Did Finish:%@", json);
- if (connection == self.urlConnectionImages) {
-
- if ([[json objectForKey:@"data"] count]) {
-
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
- __block CGFloat xOffset = 0.0f;
- __block NSInteger i = 0;
-
- dispatch_async(dispatch_get_main_queue(), ^{
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
- });
-
- for (NSDictionary *entry in [json objectForKey:@"data"]) {
- PropertyImages *image = nil;
-
- NSPredicate * predicate = [NSPredicate predicateWithFormat:@"image_id == %@", [entry objectForKey:@"image_id"]];
- NSManagedObjectContext *context = ((ABridge_AppDelegate *)[[UIApplication sharedApplication] delegate]).managedObjectContext;
- NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init];
- [fetchRequest setPredicate:predicate];
- [fetchRequest setEntity:[NSEntityDescription entityForName:@"PropertyImages" inManagedObjectContext:context]];
- NSError * error = nil;
- NSArray * results = [context executeFetchRequest:fetchRequest error:&error];
- if ([results count]) {
- image = (PropertyImages*)[results firstObject];
- }
- else {
- image = [NSEntityDescription insertNewObjectForEntityForName: @"PropertyImages" inManagedObjectContext: context];
- }
-
- [image setValuesForKeysWithDictionary:entry];
-
- NSError *errorSave = nil;
- if (![context save:&errorSave]) {
- //NSLog(@"Error on saving PropertyImages:%@",[errorSave localizedDescription]);
- }
- else {
-
- dispatch_async(dispatch_get_main_queue(), ^{
- // Update UI
- if (self.arrayOfImageData == nil) {
- self.arrayOfImageData = [[NSMutableArray alloc] init];
- }
-
- if (image.image_data == nil) {
- image.image_data = [NSData dataWithContentsOfURL:[NSURL URLWithString:image.image]];
- }
-
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(xOffset, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeScaleAspectFill;
- imageView.image = [UIImage imageWithData:image.image_data];
-
- [self.arrayOfImageData addObject:image.image_data];
-
- [self.scrollImages addSubview:imageView];
-
- xOffset += imageView.frame.size.width;
- i++;
-
- [self.scrollImages setContentSize:CGSizeMake(xOffset, 0.0f)];
- });
-
- }
- }
-
-
-
- dispatch_async(dispatch_get_main_queue(), ^{
- UITapGestureRecognizer *tapZoom = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(sendDelegateImage:)];
-
- tapZoom.numberOfTapsRequired = 1;
- tapZoom.numberOfTouchesRequired = 1;
- [self.scrollImages addGestureRecognizer:tapZoom];
- });
- });
-
- }
- else {
- //NSLog(@"no data");
- }
-
- self.loadingImageIndicator.hidden = YES;
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
- }
- else if (connection == self.urlConnectionRequestNetwork) {
- if ([[json objectForKey:@"data"] count]) {
-// //NSLog(@"Did Finish:%@", json);
- NSManagedObjectContext *context = ((ABridge_AppDelegate *)[[UIApplication sharedApplication] delegate]).managedObjectContext;
-
- NSDictionary *entry = [[json objectForKey:@"data"] firstObject];
- if ([[json objectForKey:@"data"] count]) {
- RequestNetwork *network = nil;
-
- NSPredicate * predicate = [NSPredicate predicateWithFormat:@"network_id == %@", [entry objectForKey:@"network_id"]];
-
- NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init];
- [fetchRequest setPredicate:predicate];
- [fetchRequest setEntity:[NSEntityDescription entityForName:@"RequestNetwork" inManagedObjectContext:context]];
- NSError * error = nil;
- NSArray * result = [context executeFetchRequest:fetchRequest error:&error];
- if ([result count]) {
- network = (RequestNetwork*)[result firstObject];
- }
- else {
- network = [NSEntityDescription insertNewObjectForEntityForName: @"RequestNetwork" inManagedObjectContext: context];
- }
-
- [network setValuesForKeysWithDictionary:entry];
-
- NSError *errorSave = nil;
- if (![context save:&errorSave]) {
- //NSLog(@"Error on saving RequestNetwork:%@",[errorSave localizedDescription]);
- }
-
- if ([network.status integerValue] == 1) {
- if ([self.propertyDetails.setting integerValue] == 1) {
- [self checkSettingGetPrice];
- }
- else if ([self.propertyDetails.setting integerValue] == 2) {
-
- NSString *parameters = [NSString stringWithFormat:@"?user_id=%@&other_user_id=%@&property_id=%@",self.propertyDetails.user_id,self.loginDetail.user_id, self.propertyDetails.listing_id];
-
- NSMutableString *urlString_ = [NSMutableString stringWithString:@"http://keydiscoveryinc.com/agent_bridge/webservice/get_request_access.php"];
- [urlString_ appendString:parameters];
- // //NSLog(@"url:%@",urlString_);
- NSURLRequest *urlRequest = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:urlString_]];
-
- self.urlConnectionRequestAccess = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:YES];
-
- if (self.urlConnectionRequestAccess) {
- [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
- }
- }
-
- }
- else if ([network.status integerValue] == 0){
- self.labelExpiry.text = @"";
- self.labelExpiry.hidden = YES;
-// self.viewForDescription.hidden = NO;
- self.labelDescription.hidden = NO;
- self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
- [self.buttonDescription setTitle:@"Pending" forState:UIControlStateNormal];
-
-
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]];
-
- imageName = [imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"];
- imageView.image = [UIImage imageNamed:imageName];
-
- [self.scrollImages addSubview:imageView];
-
- if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
- [self.delegate hideSaveButton:YES];
- }
- }
- else {
-
- [self loadPOPsImages];
- }
- }
- else {
- self.labelExpiry.text = @"";
- self.labelExpiry.hidden = YES;
-// self.viewForDescription.hidden = NO;
- self.labelDescription.hidden = NO;
- self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
- [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
- self.buttonDescription.tag = 10001;
-
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
-
- [self.scrollImages addSubview:imageView];
-
+//- (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse *)response
+//{
+// [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
+// self.dataReceived = nil;
+// self.dataReceived = [[NSMutableData alloc]init];
+//}
+//- (void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data
+//{
+// ////NSLog(@"Did Receive Data %@", data);
+// [self.dataReceived appendData:data];
+//}
+//- (void)connection:(NSURLConnection*)connection didFailWithError:(NSError*)error
+//{
+// // //NSLog(@"Did Fail");
+// UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Internet Connection" message:@"You have no Internet Connection available." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
+// [alert show];
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
+//}
+//- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+//{
+// NSError *error = nil;
+// NSDictionary *json = [NSJSONSerialization JSONObjectWithData:self.dataReceived options:NSJSONReadingAllowFragments error:&error];
+//
+//// //NSLog(@"Did Finish:%@", json);
+// if (connection == self.urlConnectionImages) {
+//
+// if ([[json objectForKey:@"data"] count]) {
+//
+// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+// __block CGFloat xOffset = 0.0f;
+// __block NSInteger i = 0;
+//
+// dispatch_async(dispatch_get_main_queue(), ^{
+// [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+// });
+//
+// for (NSDictionary *entry in [json objectForKey:@"data"]) {
+// PropertyImages *image = nil;
+//
+// NSPredicate * predicate = [NSPredicate predicateWithFormat:@"image_id == %@", [entry objectForKey:@"image_id"]];
+// NSManagedObjectContext *context = ((ABridge_AppDelegate *)[[UIApplication sharedApplication] delegate]).managedObjectContext;
+// NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init];
+// [fetchRequest setPredicate:predicate];
+// [fetchRequest setEntity:[NSEntityDescription entityForName:@"PropertyImages" inManagedObjectContext:context]];
+// NSError * error = nil;
+// NSArray * results = [context executeFetchRequest:fetchRequest error:&error];
+// if ([results count]) {
+// image = (PropertyImages*)[results firstObject];
+// }
+// else {
+// image = [NSEntityDescription insertNewObjectForEntityForName: @"PropertyImages" inManagedObjectContext: context];
+// }
+//
+// [image setValuesForKeysWithDictionary:entry];
+//
+// NSError *errorSave = nil;
+// if (![context save:&errorSave]) {
+// //NSLog(@"Error on saving PropertyImages:%@",[errorSave localizedDescription]);
+// }
+// else {
+//
+// dispatch_async(dispatch_get_main_queue(), ^{
+// // Update UI
+// if (self.arrayOfImageData == nil) {
+// self.arrayOfImageData = [[NSMutableArray alloc] init];
+// }
+//
+// if (image.image_data == nil) {
+// image.image_data = [NSData dataWithContentsOfURL:[NSURL URLWithString:image.image]];
+// }
+//
+// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(xOffset, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+// imageView.contentMode = UIViewContentModeScaleAspectFill;
+// imageView.image = [UIImage imageWithData:image.image_data];
+//
+// [self.arrayOfImageData addObject:image.image_data];
+//
+// [self.scrollImages addSubview:imageView];
+//
+// xOffset += imageView.frame.size.width;
+// i++;
+//
+// [self.scrollImages setContentSize:CGSizeMake(xOffset, 0.0f)];
+// });
+//
+// }
+// }
+//
+//
+//
+// dispatch_async(dispatch_get_main_queue(), ^{
+// UITapGestureRecognizer *tapZoom = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(sendDelegateImage:)];
+//
+// tapZoom.numberOfTapsRequired = 1;
+// tapZoom.numberOfTouchesRequired = 1;
+// [self.scrollImages addGestureRecognizer:tapZoom];
+// });
+// });
+//
+// }
+// else {
+// //NSLog(@"no data");
+// }
+//
+// self.loadingImageIndicator.hidden = YES;
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
+// [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
+// }
+// else if (connection == self.urlConnectionRequestNetwork) {
+// if ([[json objectForKey:@"data"] count]) {
+//// //NSLog(@"Did Finish:%@", json);
+// NSManagedObjectContext *context = ((ABridge_AppDelegate *)[[UIApplication sharedApplication] delegate]).managedObjectContext;
+//
+// NSDictionary *entry = [[json objectForKey:@"data"] firstObject];
+// if ([[json objectForKey:@"data"] count]) {
+// RequestNetwork *network = nil;
+//
+// NSPredicate * predicate = [NSPredicate predicateWithFormat:@"network_id == %@", [entry objectForKey:@"network_id"]];
+//
+// NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init];
+// [fetchRequest setPredicate:predicate];
+// [fetchRequest setEntity:[NSEntityDescription entityForName:@"RequestNetwork" inManagedObjectContext:context]];
+// NSError * error = nil;
+// NSArray * result = [context executeFetchRequest:fetchRequest error:&error];
+// if ([result count]) {
+// network = (RequestNetwork*)[result firstObject];
+// }
+// else {
+// network = [NSEntityDescription insertNewObjectForEntityForName: @"RequestNetwork" inManagedObjectContext: context];
+// }
+//
+// [network setValuesForKeysWithDictionary:entry];
+//
+// NSError *errorSave = nil;
+// if (![context save:&errorSave]) {
+// //NSLog(@"Error on saving RequestNetwork:%@",[errorSave localizedDescription]);
+// }
+//
+// if ([network.status integerValue] == 1) {
+// if ([self.propertyDetails.setting integerValue] == 1) {
+// [self checkSettingGetPrice];
+// }
+// else if ([self.propertyDetails.setting integerValue] == 2) {
+//
+// NSString *parameters = [NSString stringWithFormat:@"?user_id=%@&other_user_id=%@&property_id=%@",self.propertyDetails.user_id,self.loginDetail.user_id, self.propertyDetails.listing_id];
+//
+// NSMutableString *urlString_ = [NSMutableString stringWithString:@"http://keydiscoveryinc.com/agent_bridge/webservice/get_request_access.php"];
+// [urlString_ appendString:parameters];
+// // //NSLog(@"url:%@",urlString_);
+// NSURLRequest *urlRequest = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:urlString_]];
+//
+// self.urlConnectionRequestAccess = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:YES];
+//
+// if (self.urlConnectionRequestAccess) {
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
+// [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
+// }
+// }
+//
+// }
+// else if ([network.status integerValue] == 0){
+// self.labelExpiry.text = @"";
+// self.labelExpiry.hidden = YES;
+//// self.viewForDescription.hidden = NO;
+// self.labelDescription.hidden = NO;
+// self.buttonDescription.hidden = NO;
+// self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+// [self.buttonDescription setTitle:@"Pending" forState:UIControlStateNormal];
+//
+//
+// [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+// imageView.contentMode = UIViewContentModeCenter;
+// NSString *imageName = [self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]];
+//
+// imageName = [imageName stringByReplacingOccurrencesOfString:@".png" withString:@"_bw.png"];
+// imageView.image = [UIImage imageNamed:imageName];
+//
+// [self.scrollImages addSubview:imageView];
+//
+// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
+// [self.delegate hideSaveButton:YES];
+// }
+// }
+// else {
+//
+// [self loadPOPsImages];
+// }
+// }
+// else {
+// self.labelExpiry.text = @"";
+// self.labelExpiry.hidden = YES;
+//// self.viewForDescription.hidden = NO;
+// self.labelDescription.hidden = NO;
+// self.buttonDescription.hidden = NO;
+// self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+// [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
+// self.buttonDescription.tag = 10001;
+//
+// [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+// imageView.contentMode = UIViewContentModeCenter;
+// NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+// imageView.image = [UIImage imageNamed:imageName];
+//
+// [self.scrollImages addSubview:imageView];
+//
+//// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
+//// [self.delegate hideSaveButton:YES];
+//// }
+// }
+//
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
+// [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
+//
+// }
+// else {
+// self.labelExpiry.text = @"";
+// self.labelExpiry.hidden = YES;
+//// self.viewForDescription.hidden = NO;
+// self.labelDescription.hidden = NO;
+// self.buttonDescription.hidden = NO;
+// self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+// [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
+// self.buttonDescription.tag = 10001;
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
+// [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
+//
+// [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+// imageView.contentMode = UIViewContentModeCenter;
+// NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+// imageView.image = [UIImage imageNamed:imageName];
+//
+// [self.scrollImages addSubview:imageView];
+//
+//// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
+//// [self.delegate hideSaveButton:YES];
+//// }
+// }
+//
+// }
+// else if (connection == self.urlConnectionRequestAccess) {
+// if ([[json objectForKey:@"data"] count]) {
+//// //NSLog(@"Did Finish:%@", json);
+// NSManagedObjectContext *context = ((ABridge_AppDelegate *)[[UIApplication sharedApplication] delegate]).managedObjectContext;
+// NSDictionary *entry = [[json objectForKey:@"data"] firstObject];
+//
+// if ([[json objectForKey:@"data"] count]) {
+// RequestAccess *access = nil;
+//
+// NSPredicate * predicate = [NSPredicate predicateWithFormat:@"access_id == %@", [entry objectForKey:@"access_id"]];
+//
+// NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init];
+// [fetchRequest setPredicate:predicate];
+// [fetchRequest setEntity:[NSEntityDescription entityForName:@"RequestAccess" inManagedObjectContext:context]];
+// NSError * error = nil;
+// NSArray * result = [context executeFetchRequest:fetchRequest error:&error];
+//
+// if ([result count]) {
+// access = (RequestAccess*)[result firstObject];
+// }
+// else {
+// access = [NSEntityDescription insertNewObjectForEntityForName: @"RequestAccess" inManagedObjectContext: context];
+// }
+//
+// [access setValuesForKeysWithDictionary:entry];
+//
+// NSError *errorSave = nil;
+// if (![context save:&errorSave]) {
+// //NSLog(@"Error on saving RequestAccess:%@",[errorSave localizedDescription]);
+// }
+//
+// if ([access.permission boolValue] == YES) {
+// [self loadPOPsImages];
+// [self getPriceText];
+// }
+// else if ([access.permission boolValue] == NO){
+// self.labelExpiry.text = @"";
+// self.labelExpiry.hidden = YES;
+//// self.viewForDescription.hidden = NO;
+// self.labelDescription.hidden = NO;
+// self.buttonDescription.hidden = NO;
+// self.labelDescription.text = @"This POPs™ is restricted to private";
+// [self.buttonDescription setTitle:@"Pending" forState:UIControlStateNormal];
+//
+// [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+// imageView.contentMode = UIViewContentModeCenter;
+// NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+// imageView.image = [UIImage imageNamed:imageName];
+//
+// [self.scrollImages addSubview:imageView];
+//
// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
// [self.delegate hideSaveButton:YES];
// }
- }
-
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
-
- }
- else {
- self.labelExpiry.text = @"";
- self.labelExpiry.hidden = YES;
-// self.viewForDescription.hidden = NO;
- self.labelDescription.hidden = NO;
- self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
- [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
- self.buttonDescription.tag = 10001;
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
-
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
-
- [self.scrollImages addSubview:imageView];
-
-// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
-// [self.delegate hideSaveButton:YES];
-// }
- }
-
- }
- else if (connection == self.urlConnectionRequestAccess) {
- if ([[json objectForKey:@"data"] count]) {
-// //NSLog(@"Did Finish:%@", json);
- NSManagedObjectContext *context = ((ABridge_AppDelegate *)[[UIApplication sharedApplication] delegate]).managedObjectContext;
- NSDictionary *entry = [[json objectForKey:@"data"] firstObject];
-
- if ([[json objectForKey:@"data"] count]) {
- RequestAccess *access = nil;
-
- NSPredicate * predicate = [NSPredicate predicateWithFormat:@"access_id == %@", [entry objectForKey:@"access_id"]];
-
- NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init];
- [fetchRequest setPredicate:predicate];
- [fetchRequest setEntity:[NSEntityDescription entityForName:@"RequestAccess" inManagedObjectContext:context]];
- NSError * error = nil;
- NSArray * result = [context executeFetchRequest:fetchRequest error:&error];
-
- if ([result count]) {
- access = (RequestAccess*)[result firstObject];
- }
- else {
- access = [NSEntityDescription insertNewObjectForEntityForName: @"RequestAccess" inManagedObjectContext: context];
- }
-
- [access setValuesForKeysWithDictionary:entry];
-
- NSError *errorSave = nil;
- if (![context save:&errorSave]) {
- //NSLog(@"Error on saving RequestAccess:%@",[errorSave localizedDescription]);
- }
-
- if ([access.permission boolValue] == YES) {
- [self loadPOPsImages];
- [self getPriceText];
- }
- else if ([access.permission boolValue] == NO){
- self.labelExpiry.text = @"";
- self.labelExpiry.hidden = YES;
-// self.viewForDescription.hidden = NO;
- self.labelDescription.hidden = NO;
- self.buttonDescription.hidden = NO;
- self.labelDescription.text = @"This POPs™ is restricted to private";
- [self.buttonDescription setTitle:@"Pending" forState:UIControlStateNormal];
-
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
-
- [self.scrollImages addSubview:imageView];
-
- if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
- [self.delegate hideSaveButton:YES];
- }
- }
-
- }
- else {
- self.labelExpiry.text = @"";
- self.labelExpiry.hidden = YES;
-// self.viewForDescription.hidden = NO;
- self.labelDescription.hidden = NO;
- self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
- [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
- self.buttonDescription.tag = 20002;
-
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
-
- [self.scrollImages addSubview:imageView];
-
-// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
-// [self.delegate hideSaveButton:YES];
// }
- }
-
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
- }
- else {
- self.labelExpiry.text = @"";
- self.labelExpiry.hidden = YES;
-// self.viewForDescription.hidden = NO;
- self.labelDescription.hidden = NO;
- self.buttonDescription.hidden = NO;
- self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
- [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
- self.buttonDescription.tag = 20002;
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
-
- [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
- UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
- imageView.contentMode = UIViewContentModeCenter;
- NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
- imageView.image = [UIImage imageNamed:imageName];
-
- [self.scrollImages addSubview:imageView];
-
-// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
-// [self.delegate hideSaveButton:YES];
+//
// }
- }
- }
- // Do something with responseData
-}
+// else {
+// self.labelExpiry.text = @"";
+// self.labelExpiry.hidden = YES;
+//// self.viewForDescription.hidden = NO;
+// self.labelDescription.hidden = NO;
+// self.buttonDescription.hidden = NO;
+// self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+// [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
+// self.buttonDescription.tag = 20002;
+//
+// [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+// imageView.contentMode = UIViewContentModeCenter;
+// NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+// imageView.image = [UIImage imageNamed:imageName];
+//
+// [self.scrollImages addSubview:imageView];
+//
+//// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
+//// [self.delegate hideSaveButton:YES];
+//// }
+// }
+//
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
+// [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
+// }
+// else {
+// self.labelExpiry.text = @"";
+// self.labelExpiry.hidden = YES;
+//// self.viewForDescription.hidden = NO;
+// self.labelDescription.hidden = NO;
+// self.buttonDescription.hidden = NO;
+// self.labelDescription.text = [NSString stringWithFormat:@"This POPs™ is restricted to %@'s Network members only",self.propertyDetails.name];
+// [self.buttonDescription setTitle:@"Request To View" forState:UIControlStateNormal];
+// self.buttonDescription.tag = 20002;
+// [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
+// [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
+//
+// [[[self.scrollImages subviews] firstObject] removeFromSuperview]; //remove default image
+// UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.scrollImages.frame.size.width, self.scrollImages.frame.size.height)];
+// imageView.contentMode = UIViewContentModeCenter;
+// NSString *imageName = [NSString stringWithFormat:@"%@_bw",[self imageStringForPropertyType:[self.propertyDetails.type_property_type integerValue] andSubType:[self.propertyDetails.sub_type integerValue]]];
+// imageView.image = [UIImage imageNamed:imageName];
+//
+// [self.scrollImages addSubview:imageView];
+//
+//// if ([self.delegate respondsToSelector:@selector(hideSaveButton:)]) {
+//// [self.delegate hideSaveButton:YES];
+//// }
+// }
+// }
+// // Do something with responseData
+//}
- (void) sendDelegateImage:(UIGestureRecognizer*)gestureRecognizer {
UIScrollView *scrollView = (UIScrollView*)gestureRecognizer.view;
View
3 AgentBridge/ABridge_PropertyPagesViewController.xib
@@ -77,11 +77,10 @@
<rect key="frame" x="6" y="222" width="309" height="72"/>
<autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
- <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="f4t-qw-XtE">
- <rect key="frame" x="92" y="302" width="135" height="30"/>
+ <rect key="frame" x="20" y="302" width="288" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="Request to View" backgroundImage="button-long">
View
2 AgentBridge/ABridge_ReferralPagesViewController.m
@@ -73,6 +73,8 @@ - (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
+
+
self.labelAgentName.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
self.labelAddress.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
self.labelStateCountry.font = FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR);
View
3 AgentBridge/ABridge_SearchViewController.m
@@ -404,6 +404,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
CGRect frame = self.searchDisplayController.searchResultsTableView.frame;
frame.size.height = 360.0f;
+// frame.size.width = 300.0f;
frame.origin.x = 10.0f;
self.searchDisplayController.searchResultsTableView.frame = frame;
@@ -426,7 +427,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
}
- CGSize constraint = CGSizeMake(tableView.frame.size.width - 20.0f, 20000.0f);
+ CGSize constraint = CGSizeMake(160.0f, 20000.0f);
CGSize size = [text sizeWithFont:FONT_OPENSANS_REGULAR(FONT_SIZE_REGULAR) constrainedToSize:constraint lineBreakMode:NSLineBreakByWordWrapping];
View
1 AgentBridge/ABridge_SecurityViewController.m
@@ -59,6 +59,7 @@ - (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
+ self.slidingViewController.underRightViewController = nil;
self.labelNewPassword.font = FONT_OPENSANS_BOLD(FONT_SIZE_REGULAR);
self.confirmPasswordHeader.font = FONT_OPENSANS_BOLD(FONT_SIZE_REGULAR);
self.labelOldPassword.font = FONT_OPENSANS_BOLD(FONT_SIZE_REGULAR);
View
2 AgentBridge/AgentBridge-Info.plist
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0.65</string>
+ <string>1.0.66</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
View
15 AgentBridge/Constants.h
@@ -239,7 +239,7 @@
"<tr><td>&nbsp;</td></tr>"\
"<tr><td>&nbsp;</td></tr>"\
"<tr>"\
-"<td>Referencing AGREEMENT TO PAY REFERRAL FEE (\"Agreement\") by and between All Moves, (\"Referring Broker\")"\
+"<td>Referencing AGREEMENT TO PAY REFERRAL FEE (\"Agreement\") by and between %@, (\"Referring Broker\")"\
"and %@ (\"Receiving Broker\") with regard to the referral of %@.</td>"\
"</tr>"\
"</table>"\
@@ -263,12 +263,13 @@
"<td valign=\"top\" style=\"text-align:left\">"\
"<ul style=\"list-style:none; margin:0; padding:0;\">"\
"<li style=\"margin-bottom:5px;\">&nbsp;</li>"\
-"<li>All Moves</li>"\
-"<li>BL123</li>"\
-"<li>Rebekah Roque</li>"\
-"<li>AB123</li>"\
-"<li>(310) 341-0201</li>"\
-"<li><a href=\"#\" style=\" color:#0d4a6f; text-decoration:none; \">rebekah.roque@yopmail.com</a></li>"\
+"<li>%@</li>"\
+"<li>%@</li>"\
+"<li>%@</li>"\
+"<li>%@</li>"\
+"<li>%@</li>"\
+"<li><a href=\"#\" style=\" color:#0d4a6f; text-decoration:none; \">%@</a></li>"\
+"<li>%@</li>"\
"</ul>"\
"</td>"\
"<td valign=\"top\" width=\"50px\">&nbsp;</td>"\
View
281 AgentBridge/Main.storyboard
@@ -3165,237 +3165,40 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <scrollView clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" delaysContentTouches="NO" canCancelContentTouches="NO" bouncesZoom="NO" id="bW1-Ve-cdc">
- <rect key="frame" x="0.0" y="56" width="320" height="322"/>
- <autoresizingMask key="autoresizingMask" heightSizable="YES"/>
+ <view contentMode="scaleToFill" id="vj5-3i-21q">
+ <rect key="frame" x="0.0" y="55" width="320" height="322"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <view contentMode="scaleToFill" id="vj5-3i-21q">
- <rect key="frame" x="0.0" y="0.0" width="320" height="322"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="zDm-PX-7Rn">
- <rect key="frame" x="20" y="270" width="288" height="44"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
- <state key="normal" title="Upgrade Membership" backgroundImage="button-long">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
- </state>
- <connections>
- <action selector="buttonMonthlyPressed:" destination="fnu-Yc-Dae" eventType="touchUpInside" id="JbG-aY-NX4"/>
- </connections>
- </button>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Current Plan:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="35H-F0-3dZ">
- <rect key="frame" x="16" y="13" width="101" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Month to month" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="G1s-tg-ZUW">
- <rect key="frame" x="121" y="13" width="178" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="[PROMOTION_CODE_NAME]" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cvY-4m-2k4">
- <rect key="frame" x="17" y="37" width="287" height="27"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="zht-qJ-YWD">
- <rect key="frame" x="7" y="42" width="307" height="192"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <connections>
- <outlet property="dataSource" destination="fnu-Yc-Dae" id="u5J-C8-iu4"/>
- </connections>
- </tableView>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cost:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="atr-HB-MjT">
- <rect key="frame" x="17" y="250" width="45" height="20"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Save:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kAq-Jo-rqH">
- <rect key="frame" x="165" y="249" width="45" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$ 100" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="udE-E9-fNz">
- <rect key="frame" x="41" y="242" width="80" height="35"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$ 0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Nmg-RN-K9u">
- <rect key="frame" x="190" y="242" width="89" height="35"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
- </view>
- <view contentMode="scaleToFill" id="TuN-i1-llL">
- <rect key="frame" x="320" y="0.0" width="320" height="322"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="8vY-SR-vMV">
- <rect key="frame" x="20" y="270" width="288" height="44"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
- <state key="normal" title="Upgrade Membership" backgroundImage="button-long">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
- </state>
- <connections>
- <action selector="buttonQuarterlyPressed:" destination="fnu-Yc-Dae" eventType="touchUpInside" id="4FW-A6-35f"/>
- </connections>
- </button>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Current Plan:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="DO8-ax-L8i">
- <rect key="frame" x="16" y="13" width="101" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Quarterly Savings" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ltE-66-LM5">
- <rect key="frame" x="121" y="13" width="178" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="[PROMOTION_CODE_NAME]" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xpc-0O-aU2">
- <rect key="frame" x="17" y="37" width="287" height="27"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="czv-Qa-eVo">
- <rect key="frame" x="7" y="42" width="307" height="192"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <connections>
- <outlet property="dataSource" destination="fnu-Yc-Dae" id="SId-di-41L"/>
- </connections>
- </tableView>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cost:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="36J-XC-NxO">
- <rect key="frame" x="17" y="250" width="45" height="20"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Save:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="URH-Ms-Klh">
- <rect key="frame" x="165" y="249" width="45" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$ XXX" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Mw9-FO-5gT">
- <rect key="frame" x="61" y="242" width="80" height="35"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$ XX" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rDn-Kq-Ozv">
- <rect key="frame" x="190" y="242" width="89" height="35"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
- </view>
- <view contentMode="scaleToFill" id="YbI-z4-TQz">
- <rect key="frame" x="640" y="0.0" width="320" height="322"/>
+ <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="zDm-PX-7Rn">
+ <rect key="frame" x="20" y="270" width="288" height="44"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="Upgrade Membership" backgroundImage="button-long">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="buttonMonthlyPressed:" destination="fnu-Yc-Dae" eventType="touchUpInside" id="JbG-aY-NX4"/>
+ </connections>
+ </button>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Month to month" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="G1s-tg-ZUW">
+ <rect key="frame" x="20" y="13" width="279" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="22"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="zht-qJ-YWD">
+ <rect key="frame" x="7" y="42" width="307" height="220"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="yvM-fx-1u1">
- <rect key="frame" x="20" y="270" width="288" height="44"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
- <state key="normal" title="Upgrade Membership" backgroundImage="button-long">
- <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
- </state>
- <connections>
- <action selector="buttonAnnualPressed:" destination="fnu-Yc-Dae" eventType="touchUpInside" id="O4n-MC-6A0"/>
- </connections>
- </button>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Current Plan:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="DoG-or-Z8Z">
- <rect key="frame" x="16" y="13" width="101" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Annual Savings" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8c6-4f-QB8">
- <rect key="frame" x="121" y="13" width="178" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="[PROMOTION_CODE_NAME]" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IJr-wo-63n">
- <rect key="frame" x="17" y="37" width="287" height="27"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="22"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" allowsSelection="NO" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="N9L-2L-p3g">
- <rect key="frame" x="7" y="42" width="307" height="192"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
- <connections>
- <outlet property="dataSource" destination="fnu-Yc-Dae" id="gQz-J8-rn3"/>
- </connections>
- </tableView>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Cost:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="elw-Pg-aTb">
- <rect key="frame" x="17" y="250" width="45" height="20"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Save:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ySi-So-Sdf">
- <rect key="frame" x="165" y="249" width="45" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <nil key="highlightedColor"/>
- </label>
- <label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$ XXXX" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="h0n-Qj-Feq">
- <rect key="frame" x="61" y="242" width="80" height="35"/>
- <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>