Advertisement
axelso

PaymentConfirmationNewView backup FINAL TEST? @22 Nov 10.33A

Nov 21st, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  PaymentConfirmationNewView.m
  3. //  Moselo
  4. //
  5. //  Created by Axel Soedarsono on 11/15/17.
  6. //  Copyright © 2017 Moselo. All rights reserved.
  7. //
  8.  
  9. #import "PaymentConfirmationNewView.h"
  10.  
  11. @interface PaymentConfirmationNewView ()
  12.  
  13. @end
  14.  
  15. @implementation PaymentConfirmationNewView
  16. #pragma mark - Lifecycle
  17. - (id)initWithFrame:(CGRect)frame {
  18.     self = [super initWithFrame:frame];
  19.    
  20.     self.backgroundColor = [Util getColor:@"F5F5F5"];
  21.    
  22.     if(self) {
  23.        
  24.         _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame))];
  25.         [self.scrollView setContentSize:CGSizeMake(CGRectGetWidth(self.frame), 700.0f)];
  26.         self.scrollView.showsHorizontalScrollIndicator = NO;
  27.         self.scrollView.showsVerticalScrollIndicator = NO;
  28.         self.scrollView.alwaysBounceVertical = YES;
  29.         [self addSubview:self.scrollView];
  30.  
  31.         _paymentTotalPriceWithStatusView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.frame), 130.0f)];
  32.         self.paymentTotalPriceWithStatusView.backgroundColor = [Util getColor:@"FFFFFF"];
  33.         [self.scrollView addSubview:self.paymentTotalPriceWithStatusView];
  34.        
  35.         _separator1View = [[UIView alloc] initWithFrame:CGRectMake(0.0f, CGRectGetMaxY(self.paymentTotalPriceWithStatusView.frame) - [Util lineMinimumHeight], CGRectGetWidth(self.frame), [Util lineMinimumHeight])];
  36.         self.separator1View.backgroundColor = [Util getColor:@"DDDDDD"];
  37.         [self.scrollView addSubview:self.separator1View];
  38.        
  39.         _totalPriceLabel = [[UILabel alloc] initWithFrame:CGRectMake((CGRectGetWidth(self.paymentTotalPriceWithStatusView.frame) - 53.0f)/2.0f, 21.0f, 53.0f, 14.0f)];
  40.         self.totalPriceLabel.text = NSLocalizedString(@"Total (Rp)", @"");
  41.         self.totalPriceLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:12.0f];
  42.         self.totalPriceLabel.textColor = [Util getColor:@"AAAAAA"];
  43.         self.totalPriceLabel.textAlignment = NSTextAlignmentCenter;
  44.         [self.paymentTotalPriceWithStatusView addSubview:self.totalPriceLabel];
  45.        
  46.         _totalPriceNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(16.0f, CGRectGetMaxY(self.totalPriceLabel.frame) + 10.0f, CGRectGetWidth(self.paymentTotalPriceWithStatusView.frame) - 16.0f - 16.0f, 32.0f)];
  47. //        self.totalPriceNumberLabel.text = NSLocalizedString(@"515.000", @"");
  48.         self.totalPriceNumberLabel.font = [UIFont fontWithName:FONT_LATO_BOLD size:30.0f];
  49.         self.totalPriceNumberLabel.textColor = [Util getColor:@"333333"];
  50.         self.totalPriceNumberLabel.textAlignment = NSTextAlignmentCenter;
  51.         [self.paymentTotalPriceWithStatusView addSubview:self.totalPriceNumberLabel];
  52.        
  53.         _paymentStatusNotificationView = [[UIView alloc] initWithFrame:CGRectMake((CGRectGetWidth(self.paymentTotalPriceWithStatusView.frame) - 120.0f)/2.0f, CGRectGetMaxY(self.totalPriceNumberLabel.frame) + 14.0f, 120.0f, 20.0f)];
  54.         self.paymentStatusNotificationView.layer.cornerRadius = CGRectGetHeight(self.paymentStatusNotificationView.frame)/2.0f;
  55.         [self.paymentTotalPriceWithStatusView addSubview:self.paymentStatusNotificationView];
  56.  
  57.         _paymentStatusNotificationLabel = [[UILabel alloc] initWithFrame:CGRectMake(5.0f, 3.0f, 110.0f, 14.0f)];
  58.         self.paymentStatusNotificationLabel.font = [UIFont fontWithName:FONT_LATO_BOLD size:10.0f];
  59.         self.paymentStatusNotificationLabel.textAlignment = NSTextAlignmentCenter;
  60.         [self.paymentStatusNotificationView addSubview:self.paymentStatusNotificationLabel];
  61.        
  62.         //AS TEMP PAYMENT PENDING
  63.         self.paymentStatusNotificationView.backgroundColor = [UIColor whiteColor];
  64.         self.paymentStatusNotificationView.layer.borderWidth = 1.0f;
  65.         self.paymentStatusNotificationView.layer.borderColor = [Util getColor:@"AB81C5"].CGColor;
  66.         self.paymentStatusNotificationLabel.textColor = [Util getColor:@"AB81C5"];
  67.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"PAYMENT PENDING", @"");
  68.         //END AS TEMP
  69.        
  70.         _paymentConfirmationContainerView = [[UIView alloc]initWithFrame:CGRectMake(0.0f, CGRectGetMaxY(self.separator1View.frame), CGRectGetWidth(self.scrollView.frame), CGRectGetHeight(self.frame) - CGRectGetHeight(self.paymentTotalPriceWithStatusView.frame))];
  71.         self.paymentConfirmationContainerView.backgroundColor = [Util getColor:@"F5F5F5"];
  72.         [self.scrollView addSubview:self.paymentConfirmationContainerView];
  73.        
  74.         _paymentConfirmationBlankLabel = [[UILabel alloc] initWithFrame:CGRectMake((CGRectGetWidth(self.paymentConfirmationContainerView.frame) - 130.0f )/2.0f, 80.0f, 130.0f, 30.0f)];
  75.         self.paymentConfirmationBlankLabel.numberOfLines = 0;
  76.         self.paymentConfirmationBlankLabel.text = NSLocalizedString(@"You haven’t made any\npayment confirmation", @"");
  77.         self.paymentConfirmationBlankLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:13.0f];
  78.         self.paymentConfirmationBlankLabel.textColor = [Util getColor:@"AAAAAA"];
  79. //        CGSize paymentConfirmationBlankLabelSize = [self.paymentConfirmationBlankLabel sizeThatFits:CGSizeMake(130.0f, CGFLOAT_MAX)];
  80. //        self.paymentConfirmationBlankLabel.frame = CGRectMake((CGRectGetWidth(self.paymentConfirmationContainerView.frame) - 130.0f )/2.0f, 80.0f, 130.0f, paymentConfirmationBlankLabelSize.height);
  81.         self.paymentConfirmationBlankLabel.textAlignment = NSTextAlignmentCenter;
  82.         [self.paymentConfirmationContainerView addSubview:self.paymentConfirmationBlankLabel];
  83.        
  84.         //IF THERE'S AN ORDER IN ROLE USER || EXPERT
  85.         _paymentConfirmationItemView = [[UIView alloc] initWithFrame:CGRectMake(16.0f, 16.0f, CGRectGetWidth(self.paymentConfirmationContainerView.frame) -  16.0 - 16.0f, 322.0f)];
  86.         self.paymentConfirmationItemView.layer.cornerRadius = 4.0f;
  87.         self.paymentConfirmationItemView.layer.masksToBounds = YES;
  88.         self.paymentConfirmationItemView.clipsToBounds = YES;
  89.         self.paymentConfirmationItemView.layer.borderWidth = 1.0f;
  90.         self.paymentConfirmationItemView.layer.borderColor = [Util getColor:@"EEEEEE"].CGColor;
  91.         self.paymentConfirmationItemView.backgroundColor = [Util getColor:@"FFFFFF"];
  92.         [self.paymentConfirmationContainerView addSubview:self.paymentConfirmationItemView];
  93.        
  94.         _paymentConfirmationItemImageContainerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame), 128.0f)];
  95.        
  96.         //AS TEMP ImageContainer
  97.         UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.paymentConfirmationItemImageContainerView.frame),CGRectGetHeight(self.paymentConfirmationItemImageContainerView.frame))
  98.                                                        byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)
  99.                                                              cornerRadii:CGSizeMake(5.0, 5.0)];
  100.        
  101.         CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  102.         maskLayer.frame = CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.frame), 44.0f);
  103.         maskLayer.path = maskPath.CGPath;
  104.         self.paymentConfirmationItemImageContainerView.layer.mask = maskLayer;
  105.         //END AS TEMP ImageContainer
  106.        
  107.         [self.paymentConfirmationItemView addSubview:self.paymentConfirmationItemImageContainerView];
  108.        
  109.         _paymentConfirmationItemImageView = [[RNImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame), 128.0f)];
  110. //        self.paymentConfirmationItemImageView.image = [UIImage imageNamed:@"testCover"];
  111.         self.paymentConfirmationItemImageView.contentMode = UIViewContentModeScaleAspectFill;
  112.         self.paymentConfirmationItemImageView.layer.borderWidth = 1.0f;
  113.         self.paymentConfirmationItemImageView.layer.borderColor = [Util getColor:@"EEEEEE"].CGColor;
  114.         self.paymentConfirmationItemImageView.clipsToBounds = YES;
  115.         self.paymentConfirmationItemImageView.layer.masksToBounds = YES;
  116.        
  117.         //AS TEMP UIBezierPath RNImage
  118.         UIBezierPath *maskPathImage = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.paymentConfirmationItemImageView.frame),CGRectGetHeight(self.paymentConfirmationItemImageView.frame))
  119.                                                        byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)
  120.                                                              cornerRadii:CGSizeMake(5.0, 5.0)];
  121.         CAShapeLayer *maskLayerImage = [[CAShapeLayer alloc] init];
  122.         maskLayerImage.frame = CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.frame), 44.0f);
  123.         maskLayerImage.path = maskPathImage.CGPath;
  124.         self.paymentConfirmationItemImageView.layer.mask = maskLayerImage;
  125.         //END AS TEMP UIBezierPath RNImage
  126.        
  127.         [self.paymentConfirmationItemImageContainerView addSubview:self.paymentConfirmationItemImageView];
  128.        
  129.         _paymentConfirmationItemDatetimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(17.0f, CGRectGetMaxY(self.paymentConfirmationItemImageView.frame) + 18.0f, 125.0f, 15.0f)];
  130. //        self.paymentConfirmationItemDatetimeLabel.text = NSLocalizedString(@"08 Feb 2017, 21:00", @"");
  131.         self.paymentConfirmationItemDatetimeLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:13.0f];
  132.         self.paymentConfirmationItemDatetimeLabel.textColor = [Util getColor:@"444444"];
  133.         self.paymentConfirmationItemDatetimeLabel.textAlignment = NSTextAlignmentLeft;
  134.         [self.paymentConfirmationItemView addSubview:self.paymentConfirmationItemDatetimeLabel];
  135.        
  136.         _paymentConfirmationItemPriceLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 16.0f - (CGRectGetWidth(self.paymentConfirmationItemView.frame) -  17.0f - 125.0f - 5.0f - 16.0f), CGRectGetMaxY(self.paymentConfirmationItemImageView.frame) + 15.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame) -  17.0f - 125.0f - 5.0f - 16.0f, 20.0f)];
  137. //        self.paymentConfirmationItemPriceLabel.text = NSLocalizedString(@"Rp 99.000.000.000", @"");
  138.         self.paymentConfirmationItemPriceLabel.font = [UIFont fontWithName:FONT_LATO_BOLD size:18.0f];
  139.         self.paymentConfirmationItemPriceLabel.textColor = [Util getColor:@"444444"];
  140.         self.paymentConfirmationItemPriceLabel.textAlignment = NSTextAlignmentRight;
  141.         [self.paymentConfirmationItemView addSubview:self.paymentConfirmationItemPriceLabel];
  142.        
  143.         _iconTransferDestinationImageView = [[UIImageView alloc] initWithFrame:CGRectMake(17.0f, CGRectGetMaxY(self.paymentConfirmationItemPriceLabel.frame) + 14.0f, 15.0f, 17.0f)];
  144.         self.iconTransferDestinationImageView.image = [UIImage imageNamed:@"arrowRightGray"];
  145.         self.iconTransferDestinationImageView.contentMode = UIViewContentModeScaleAspectFit;
  146.         [self.paymentConfirmationItemView addSubview:self.iconTransferDestinationImageView];
  147.        
  148.         _bankAccountTransferDestinationLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconTransferDestinationImageView.frame) + 18.0f, CGRectGetMinY(self.iconTransferDestinationImageView.frame), CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, 15.0f)];
  149.         self.bankAccountTransferDestinationLabel.numberOfLines = 0;
  150. //        self.bankAccountTransferDestinationLabel.text = NSLocalizedString(@"Bank Central Asia: 131-00-12210-888", @"");
  151.         self.bankAccountTransferDestinationLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:13.0f];
  152.         self.bankAccountTransferDestinationLabel.textColor = [Util getColor:@"444444"];
  153. //        CGSize bankAccountTransferDestinationLabelSize = [self.bankAccountTransferDestinationLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, CGFLOAT_MAX)];
  154. //        self.bankAccountTransferDestinationLabel.frame = CGRectMake(CGRectGetMaxX(self.iconTransferDestinationImageView.frame) + 18.0f, CGRectGetMinY(self.iconTransferDestinationImageView.frame), CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, bankAccountTransferDestinationLabelSize.height);
  155.         self.bankAccountTransferDestinationLabel.textAlignment = NSTextAlignmentLeft;
  156.         [self.paymentConfirmationItemView addSubview:self.bankAccountTransferDestinationLabel];
  157.        
  158.         _bankAccountUsernameTransferDestinationLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconTransferDestinationImageView.frame) + 18.0f, CGRectGetMaxY(self.bankAccountTransferDestinationLabel.frame) + 3.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, 15.0f)];
  159.         self.bankAccountUsernameTransferDestinationLabel.numberOfLines = 0;
  160. //        self.bankAccountUsernameTransferDestinationLabel.text = NSLocalizedString(@"Adaniwafi Kodok1 Kodok2 Kodok3 Kodok4", @"");
  161.         self.bankAccountUsernameTransferDestinationLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:13.0f];
  162.         self.bankAccountUsernameTransferDestinationLabel.textColor = [Util getColor:@"444444"];
  163. //        CGSize bankAccountUsernameTransferDestinationLabelSize = [self.bankAccountUsernameTransferDestinationLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, CGFLOAT_MAX)];
  164. //        self.bankAccountUsernameTransferDestinationLabel.frame = CGRectMake(CGRectGetMaxX(self.iconTransferDestinationImageView.frame) + 18.0f, CGRectGetMaxY(self.bankAccountTransferDestinationLabel.frame) + 3.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, bankAccountUsernameTransferDestinationLabelSize.height);
  165.         self.bankAccountUsernameTransferDestinationLabel.textAlignment = NSTextAlignmentLeft;
  166.         [self.paymentConfirmationItemView addSubview:self.bankAccountUsernameTransferDestinationLabel];
  167.        
  168.         _iconSenderImageView = [[UIImageView alloc] initWithFrame:CGRectMake(14.0f, CGRectGetMaxY(self.bankAccountUsernameTransferDestinationLabel.frame) + 16.0f, 20.0f, 16.0f)];
  169.         self.iconSenderImageView.image = [UIImage imageNamed:@"cardLogo"];
  170.         self.iconSenderImageView.contentMode = UIViewContentModeScaleAspectFit;
  171.         [self.paymentConfirmationItemView addSubview:self.iconSenderImageView];
  172.        
  173.         _bankAccountSenderLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconSenderImageView.frame) + 15.0f, CGRectGetMinY(self.iconSenderImageView.frame) - 0.5f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, 15.0f)];
  174.         self.bankAccountSenderLabel.numberOfLines = 0;
  175. //        self.bankAccountSenderLabel.text = NSLocalizedString(@"Bank BRI: 777-1087-888", @"");
  176.         self.bankAccountSenderLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:13.0f];
  177.         self.bankAccountSenderLabel.textColor = [Util getColor:@"444444"];
  178. //        CGSize bankAccountSenderLabelSize = [self.bankAccountSenderLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, CGFLOAT_MAX)];
  179. //        self.bankAccountSenderLabel.frame = CGRectMake(CGRectGetMaxX(self.iconSenderImageView.frame) + 15.0f, CGRectGetMinY(self.iconSenderImageView.frame) - 0.5f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, bankAccountSenderLabelSize.height);
  180.         self.bankAccountSenderLabel.textAlignment = NSTextAlignmentLeft;
  181.         [self.paymentConfirmationItemView addSubview:self.bankAccountSenderLabel];
  182.        
  183.         _bankAccountUsernameSenderLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconSenderImageView.frame) + 15.0f, CGRectGetMaxY(self.bankAccountSenderLabel.frame) + 3.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, 15.0f)];
  184.         self.bankAccountUsernameSenderLabel.numberOfLines = 0;
  185. //        self.bankAccountUsernameSenderLabel.text = NSLocalizedString(@"Rizka FM KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK KODOK  asdasd", @"");
  186.         self.bankAccountUsernameSenderLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:13.0f];
  187.         self.bankAccountUsernameSenderLabel.textColor = [Util getColor:@"444444"];
  188. //        CGSize bankAccountUsernameSenderLabelSize = [self.bankAccountUsernameSenderLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, CGFLOAT_MAX)];
  189. //        self.bankAccountUsernameSenderLabel.frame = CGRectMake(CGRectGetMaxX(self.iconSenderImageView.frame) + 15.0f, CGRectGetMaxY(self.bankAccountSenderLabel.frame) + 3.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, bankAccountUsernameSenderLabelSize.height);
  190.         self.bankAccountUsernameSenderLabel.textAlignment = NSTextAlignmentLeft;
  191.         [self.paymentConfirmationItemView addSubview:self.bankAccountUsernameSenderLabel];
  192.        
  193.         //UPDATE PaymenConfirmationItemView
  194.         self.paymentConfirmationItemView.frame = CGRectMake(16.0f, 16.0f, CGRectGetWidth(self.paymentConfirmationContainerView.frame) -  16.0 - 16.0f, CGRectGetMaxY(self.bankAccountUsernameSenderLabel.frame) + 22.0f + 45.0f);
  195.        
  196.         //WAITING CONFIRMATION
  197.         _statusConfirmationView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, CGRectGetHeight(self.paymentConfirmationItemView.frame) - 45.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame), 45.0f)];
  198.         self.statusConfirmationView.alpha = 0.0f;
  199.         self.statusConfirmationView.backgroundColor = [Util getColor:@"FFFFFF"];
  200.         self.statusConfirmationLabel.clipsToBounds = YES;
  201.         self.statusConfirmationLabel.layer.masksToBounds = YES;
  202.         [self.paymentConfirmationItemView addSubview:self.statusConfirmationView];
  203.  
  204.         _statusConfirmationLabel = [[UILabel alloc] initWithFrame:CGRectMake((CGRectGetWidth(self.statusConfirmationView.frame) - 160.0f)/2.0f, (CGRectGetHeight(self.statusConfirmationView.frame) - 18.0f)/2.0f, 160.0f, 18.0f)];
  205.         self.statusConfirmationLabel.text = NSLocalizedString(@"Waiting Confirmation", @"");
  206.         self.statusConfirmationLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:16.0f];
  207.         self.statusConfirmationLabel.textColor = [Util getColor:@"CCCCCC"];
  208.         self.statusConfirmationLabel.textAlignment = NSTextAlignmentCenter;
  209.         [self.statusConfirmationView addSubview:self.statusConfirmationLabel];
  210.  
  211.         _separatorUpperView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, CGRectGetMinY(self.statusConfirmationView.frame) - [Util lineMinimumHeight], CGRectGetWidth(self.paymentConfirmationItemView.frame), [Util lineMinimumHeight])];
  212.         self.separatorUpperView.backgroundColor = [Util getColor:@"EEEEEE"];
  213.         self.separatorUpperView.alpha = 0.0f;
  214.         [self.paymentConfirmationItemView addSubview:self.separatorUpperView];
  215.         //END WAITING CONFIRMATION
  216.        
  217.         //ACCEPT & DECLINE FOR EXPERT PAYMENT CONFIRMATION FROM USER
  218.         //LEFT OPTION VIEW (DECLINE)
  219.         _leftOptionView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, CGRectGetHeight(self.paymentConfirmationItemView.frame) - 45.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, 45.0f)];
  220.         self.leftOptionView.alpha = 0.0f;
  221.         [self.paymentConfirmationItemView addSubview:self.leftOptionView];
  222.  
  223.         //RIGHT OPTION VIEW (ACCEPT)
  224.         _rightOptionView = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.leftOptionView.frame), CGRectGetMinY(self.leftOptionView.frame), CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, CGRectGetHeight(self.leftOptionView.frame))];
  225.         self.rightOptionView.alpha = 0.0f;
  226.         [self.paymentConfirmationItemView addSubview:self.rightOptionView];
  227.  
  228.         //SEPARATOR MID
  229.         _separatorMidView = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.leftOptionView.frame), CGRectGetMinY(self.leftOptionView.frame), [Util lineMinimumHeight], CGRectGetHeight(self.leftOptionView.frame))];
  230.         self.separatorMidView.backgroundColor = [Util getColor:@"EEEEEE"];
  231.         self.separatorMidView.alpha = 0.0f;
  232.         [self.paymentConfirmationItemView addSubview:self.separatorMidView];
  233.  
  234.         _separatorUpperView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, CGRectGetMinY(self.leftOptionView.frame) - [Util lineMinimumHeight], CGRectGetWidth(self.paymentConfirmationItemView.frame), [Util lineMinimumHeight])];
  235.         self.separatorUpperView.backgroundColor = [Util getColor:@"EEEEEE"];
  236.         self.separatorUpperView.alpha = 0.0f;
  237.         [self.paymentConfirmationItemView addSubview:self.separatorUpperView];
  238.        
  239.         //LEFTOPTION LABEL
  240.         _leftOptionLabel = [[UILabel alloc] initWithFrame:CGRectMake((CGRectGetWidth(self.leftOptionView.frame) - 55.0f)/2.0f, ((CGRectGetHeight(self.leftOptionView.frame) - 18.0f)/2.0f) - 1.5f, 55.0f, 18.0f)];
  241.         self.leftOptionLabel.text = NSLocalizedString(@"Decline", @"");
  242.         self.leftOptionLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:16.0f];
  243.         self.leftOptionLabel.textColor = [Util getColor:@"FF5656"];
  244.         self.leftOptionLabel.textAlignment = NSTextAlignmentCenter;
  245.         [self.leftOptionView addSubview:self.leftOptionLabel];
  246.        
  247.         //RIGHTOPTION LABEL
  248.         _rightOptionLabel = [[UILabel alloc] initWithFrame:CGRectMake((CGRectGetWidth(self.rightOptionView.frame) -  53.0f)/2.0f, ((CGRectGetHeight(self.rightOptionView.frame) - 18.0f)/2.0f) - 1.5f, 53.0f, 18.0f)];
  249.         self.rightOptionLabel.text = NSLocalizedString(@"Accept", @"");
  250.         self.rightOptionLabel.font = [UIFont fontWithName:FONT_LATO_REGULAR size:16.0f];
  251.         self.rightOptionLabel.textColor = [Util getColor:@"2ECCAD"];
  252.         self.rightOptionLabel.textAlignment = NSTextAlignmentCenter;
  253.         [self.rightOptionView addSubview:self.rightOptionLabel];
  254.        
  255.         //LEFTOPTION BUTTON
  256.         _leftOptionButton = [[UIButton alloc] initWithFrame:CGRectMake(0.0f, CGRectGetHeight(self.paymentConfirmationItemView.frame) - 45.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, 45.0f)];
  257.         self.leftOptionButton.alpha = 0.0f;
  258.         [self.paymentConfirmationItemView addSubview:self.leftOptionButton];
  259.        
  260.         //RIGHTOPTION BUTTON
  261.         _rightOptionButton = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.leftOptionButton.frame), CGRectGetMinY(self.leftOptionButton.frame), CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, CGRectGetHeight(self.leftOptionButton.frame))];
  262.         self.rightOptionButton.alpha = 0.0f;
  263.         [self.paymentConfirmationItemView addSubview:self.rightOptionButton];
  264.         //END ACCEPT & DECLINE FOR EXPERT PAYMENT CONFIRMATION FROM USER
  265.        
  266.         //CREATE CONFIRMATION BUTTON FOR USER
  267.         _createConfirmationContainerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, CGRectGetHeight(self.frame) - 56.0f, CGRectGetWidth(self.frame), 56.0f)];
  268.         //AS TEMP
  269.         self.createConfirmationContainerView.alpha = 1.0f; //IF USER
  270. //        self.createConfirmationContainerView.alpha = 0.0f; //IF EXPERT
  271.         //END AS TEMP
  272.         self.createConfirmationContainerView.backgroundColor = [Util getColor:@"FFFFFF"];
  273.         [self addSubview:self.createConfirmationContainerView];
  274.        
  275.         _separatorUppercreateConfirmationContainerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.createConfirmationContainerView.frame), 1.0f)];
  276.         self.separatorUppercreateConfirmationContainerView.backgroundColor = [Util getColor:@"DDDDDD"];
  277.         [self.createConfirmationContainerView addSubview:self.separatorUppercreateConfirmationContainerView];
  278.        
  279.         _createConfirmationView = [[UIView alloc] initWithFrame:CGRectMake(8.0f, 8.0f, CGRectGetWidth(self.createConfirmationContainerView.frame) - 8.0f - 8.0f, CGRectGetHeight(self.createConfirmationContainerView.frame) - 8.0f - 8.0f)];
  280.         self.createConfirmationView.layer.cornerRadius = 4.0f;
  281.         self.createConfirmationView.layer.borderWidth = 1.0f;
  282.         self.createConfirmationView.layer.borderColor = [Util getColor:@"17B293"].CGColor;
  283.         self.createConfirmationView.backgroundColor = [Util getColor:@"2ECCAD"];
  284.         [self. createConfirmationContainerView addSubview:self.createConfirmationView];
  285.        
  286.         _createConfirmationLabel = [[UILabel alloc] initWithFrame:CGRectMake((CGRectGetWidth(self.createConfirmationView.frame) - 150.0f)/2.0f, (CGRectGetHeight(self.createConfirmationView.frame) - 16.0f)/2.0f, 150.0f, 16.0f)];
  287.         self.createConfirmationLabel.text = NSLocalizedString(@"Create Confirmation", @"");
  288.         self.createConfirmationLabel.font = [UIFont fontWithName:FONT_NAME_BOLD size:14.0f];
  289.         self.createConfirmationLabel.textColor = [Util getColor:@"FFFFFF"];
  290.         self.createConfirmationLabel.textAlignment = NSTextAlignmentCenter;
  291.         [self.createConfirmationView addSubview:self.createConfirmationLabel];
  292.        
  293.         _createConfirmationButton = [[UIButton alloc] initWithFrame:CGRectMake(8.0f, 8.0f, CGRectGetWidth(self.createConfirmationContainerView.frame) - 8.0f - 8.0f, CGRectGetHeight(self.createConfirmationContainerView.frame) - 8.0f - 8.0f)];
  294.         [self.createConfirmationContainerView addSubview:self.createConfirmationButton];
  295.        
  296.        
  297.         self.scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.scrollView.frame), CGRectGetMaxY(self.paymentConfirmationContainerView.frame) + 40.0f + CGRectGetHeight(self.createConfirmationContainerView.frame));
  298.     }
  299.    
  300.     return self;
  301. }
  302.  
  303. #pragma mark - Custom Method
  304. - (void)setPaymentConfirmationNewViewType:(PaymentConfirmationNewViewType)paymentConfirmationNewViewType {
  305.     _paymentConfirmationNewViewType = paymentConfirmationNewViewType;
  306.    
  307.     if(self.paymentConfirmationNewViewType == PaymentConfirmationNewViewTypeCancelled) {
  308.        
  309.         self.paymentStatusNotificationView.backgroundColor = [Util getColor:@"FF5656"];
  310.         self.paymentStatusNotificationView.layer.borderWidth = 0.0f;
  311.         self.paymentStatusNotificationLabel.textColor = [UIColor whiteColor];
  312.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"CANCELLED", @"");
  313.     }
  314.     else if(self.paymentConfirmationNewViewType == PaymentConfirmationNewViewTypeConfirmed) {
  315.        
  316.         self.paymentStatusNotificationView.backgroundColor = [UIColor whiteColor];
  317.         self.paymentStatusNotificationView.layer.borderWidth = 1.0f;
  318.         self.paymentStatusNotificationView.layer.borderColor = [Util getColor:@"2ECCAD"].CGColor;
  319.         self.paymentStatusNotificationLabel.textColor = [Util getColor:@"2ECCAD"];
  320.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"USER CONFIRMED", @"");
  321.     }
  322.     else if(self.paymentConfirmationNewViewType == PaymentConfirmationTypeDeclined) {
  323.        
  324.         self.paymentStatusNotificationView.backgroundColor = [Util getColor:@"FF5656"];
  325.         self.paymentStatusNotificationView.layer.borderWidth = 0.0f;
  326.         self.paymentStatusNotificationLabel.textColor = [UIColor whiteColor];
  327.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"EXPERT DECLINED", @"");
  328.     }
  329.     else if(self.paymentConfirmationNewViewType == PaymentConfirmationTypeAccepted) {
  330.        
  331.         self.paymentStatusNotificationView.backgroundColor = [UIColor whiteColor];
  332.         self.paymentStatusNotificationView.layer.borderWidth = 1.0f;
  333.         self.paymentStatusNotificationView.layer.borderColor = [Util getColor:@"AB81C5"].CGColor;
  334.         self.paymentStatusNotificationLabel.textColor = [Util getColor:@"AB81C5"];
  335.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"PAYMENT PENDING", @"");
  336.     }
  337.     else if(self.paymentConfirmationNewViewType == PaymentConfirmationNewViewTypeUserConfirmed) {
  338.    
  339.         self.paymentStatusNotificationView.backgroundColor = [Util getColor:@"2ECCAD"];
  340.         self.paymentStatusNotificationView.layer.borderWidth = 0.0f;
  341.         self.paymentStatusNotificationLabel.textColor = [UIColor whiteColor];
  342.         //NSString *formattedString = [NSString stringWithFormat:@"%li PAYMENT CONFIRMED", (long)numberOfPaymentConfirmed];
  343.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"PAYMENT CONFIRMED", @"");
  344.     }
  345.     else if(self.paymentConfirmationNewViewType == PaymentConfirmationNewViewTypeCompleted) {
  346.        
  347.         self.paymentStatusNotificationView.backgroundColor = [Util getColor:@"AB81C5"];
  348.         self.paymentStatusNotificationView.layer.borderWidth = 0.0f;
  349.         self.paymentStatusNotificationLabel.textColor = [UIColor whiteColor];
  350.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"PAYMENT COMPLETED", @"");
  351.     }
  352.     else if(self.paymentConfirmationNewViewType == PaymentConfirmationNewViewTypeOverpaid) {
  353.        
  354.         self.paymentStatusNotificationView.backgroundColor = [UIColor whiteColor];
  355.         self.paymentStatusNotificationView.layer.borderWidth = 1.0f;
  356.         self.paymentStatusNotificationView.layer.borderColor = [Util getColor:@"FF5656"].CGColor;
  357.         self.paymentStatusNotificationLabel.textColor = [Util getColor:@"FF5656"];
  358.         self.paymentStatusNotificationLabel.text = NSLocalizedString(@"OVERPAID", @"");
  359.     }
  360. }
  361.  
  362. - (void)setPaymentConfirmationNewViewButtonType:(PaymentConfirmationNewViewButtonType)paymentConfirmationNewViewButtonType {
  363.     //User = 0 || Expert = 1
  364.     _paymentConfirmationNewViewButtonType = paymentConfirmationNewViewButtonType;
  365.    
  366.     if(self.paymentConfirmationNewViewButtonType == PaymentConfirmationNewViewButtonTypeUser) {
  367.         //DISPLAY BUTTON CREATE CONFIRMATION
  368.         self.createConfirmationContainerView.alpha = 1.0f;
  369.     }
  370.     else if (self.paymentConfirmationNewViewButtonType == PaymentConfirmationNewViewButtonTypeExpert) {
  371.         //HIDE BUTTON CREATE CONFIRMATION
  372.         self.createConfirmationContainerView.alpha = 0.0f;
  373.     }
  374. }
  375.  
  376. - (void)setPaymentConfirmationNewViewStatusOrActionType:(PaymentConfirmationNewViewStatusOrActionType)paymentConfirmationNewViewStatusOrActionType {
  377.     _paymentConfirmationNewViewStatusOrActionType = paymentConfirmationNewViewStatusOrActionType;
  378.     if(self.paymentConfirmationNewViewStatusOrActionType == PaymentConfirmationNewViewStatusOrActionTypeUser) {
  379.         //IF USER SHOW "Waiting Confirmation"
  380.         self.statusConfirmationView.alpha = 1.0f;
  381.         self.separatorUpperView.alpha = 1.0f;
  382.        
  383.         //HIDE "Decline or Accept"
  384.         self.leftOptionView.alpha = 0.0;
  385.         self.rightOptionView.alpha = 0.0;
  386.         self.separatorMidView.alpha = 0.0;
  387.         self.leftOptionButton.alpha = 0.0;
  388.         self.rightOptionButton.alpha = 0.0;
  389.     }
  390.     else if(self.paymentConfirmationNewViewStatusOrActionType == PaymentConfirmationNewViewStatusOrActionTypeExpert) {
  391.         //IF EXPERT SHOW "Decline or Accept"
  392.         self.leftOptionView.alpha = 1.0;
  393.         self.rightOptionView.alpha = 1.0;
  394.         self.separatorUpperView.alpha = 1.0f;
  395.         self.separatorMidView.alpha = 1.0;
  396.         self.leftOptionButton.alpha = 1.0;
  397.         self.rightOptionButton.alpha = 1.0;
  398.        
  399.         //HIDE "Waiting Confirmation"
  400.         self.statusConfirmationView.alpha = 0.0f;
  401.     }
  402. }
  403.  
  404. //DISPLAY AND HIDE PaymentConfirmationItemView
  405. /*
  406.  
  407.  //if there's no payment confirmation (must check USER/EXPERT)
  408.  //Hide the button if Expert
  409.  self.paymentConfirmationItemView.alpha = 0.0f;
  410.  //self.createConfirmationContainerView.alpha = 1.0f;
  411.  [self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeUser];
  412.  [self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeExpert];
  413.  
  414.  //if theres payment confirmation (must check USER/EXPERT)
  415.  //Hide the button if Expert
  416.  self.paymentConfirmationItemView.alpha = 1.0f;
  417.  //self.createConfirmationContainerView.alpha = 1.0f;
  418.  [self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeUser];
  419.  [self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeExpert];
  420.  
  421.  */
  422.  
  423. - (void)setPaymentConfirmationNewViewValueType:(PaymentConfirmationNewViewValueType)paymentConfirmationNewViewValueType {
  424.     _paymentConfirmationNewViewValueType = paymentConfirmationNewViewValueType;
  425.    
  426.     if(self.paymentConfirmationNewViewValueType == PaymentConfirmationNewViewValueTypeEmptyPaymentConfirmation) {
  427.         //if there's no payment confirmation (must check USER/EXPERT)
  428.         //Hide the button if Expert
  429.         self.paymentConfirmationItemView.alpha = 0.0f;
  430.         //self.createConfirmationContainerView.alpha = 1.0f;
  431.         //[self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeUser];
  432.         //[self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeExpert];
  433.        
  434.     }
  435.     else if (self.paymentConfirmationNewViewValueType == PaymentConfirmationNewViewValueTypeHavePaymentConfirmation) {
  436.         //if there're payment confirmation (must check USER/EXPERT)
  437.         //Hide the button if Expert
  438.         self.paymentConfirmationItemView.alpha = 1.0f;
  439.         //self.createConfirmationContainerView.alpha = 1.0f;
  440.         //[self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeUser];
  441.         //[self setPaymentConfirmationNewViewButtonType:PaymentConfirmationNewViewButtonTypeExpert];
  442.     }
  443. }
  444.  
  445. - (void)setTotalPriceNumberWithTotalPrice:(NSString *)totalPrice {
  446.     //set totalPriceNumberLabel;
  447.     self.totalPriceNumberLabel.text = totalPrice;
  448. }
  449.  
  450. - (void)setPaymentConfirmationItemWithImageUrl:(NSString *)imageURL
  451.                           dateTimeConfirmation:(NSString *)dateTimeConfirmation
  452.                                     totalPrice:(NSString *)totalPrice
  453.                 bankAccountTransferDestination:(NSString *)bankAccountTransferDestination
  454.         bankAccountUsernameTransferDestination:(NSString *)bankAccountUsernameTransferDestination
  455.                              bankAccountSender:(NSString *)bankAccountSender
  456.                      bankAccountUsernameSender:(NSString *)bankAccountUsernameSender {
  457.    
  458.     //set Data for PaymentConfirmationItem
  459.     self.paymentConfirmationItemImageView.image = [UIImage imageNamed:imageURL];
  460.     self.paymentConfirmationItemDatetimeLabel.text = dateTimeConfirmation;
  461.     self.paymentConfirmationItemPriceLabel.text = totalPrice;
  462.     self.bankAccountTransferDestinationLabel.text = bankAccountTransferDestination;
  463.     self.bankAccountUsernameTransferDestinationLabel.text = bankAccountUsernameTransferDestination;
  464.     self.bankAccountSenderLabel.text = bankAccountSender;
  465.     self.bankAccountUsernameSenderLabel.text = bankAccountUsernameSender;
  466.    
  467.     //BANK ACC DESTINATION
  468.     CGSize bankAccountTransferDestinationLabelSize = [self.bankAccountTransferDestinationLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, CGFLOAT_MAX)];
  469.    
  470.     self.bankAccountTransferDestinationLabel.frame = CGRectMake(CGRectGetMaxX(self.iconTransferDestinationImageView.frame) + 18.0f, CGRectGetMinY(self.iconTransferDestinationImageView.frame), CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, bankAccountTransferDestinationLabelSize.height);
  471.  
  472.     //BANK USERNAME DESTINATION
  473.     CGSize bankAccountUsernameTransferDestinationLabelSize = [self.bankAccountUsernameTransferDestinationLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, CGFLOAT_MAX)];
  474.    
  475.     self.bankAccountUsernameTransferDestinationLabel.frame = CGRectMake(CGRectGetMaxX(self.iconTransferDestinationImageView.frame) + 18.0f, CGRectGetMaxY(self.bankAccountTransferDestinationLabel.frame) + 3.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 17.0f - 17.0f - 18.0f - 17.0f, bankAccountUsernameTransferDestinationLabelSize.height);
  476.    
  477.     //BANK ACC ICON SENDER
  478.     self.iconSenderImageView.frame = CGRectMake(CGRectGetMinX(self.iconSenderImageView.frame), CGRectGetMaxY(self.bankAccountUsernameTransferDestinationLabel.frame) + 16.0f, CGRectGetWidth(self.iconSenderImageView.frame), CGRectGetHeight(self.iconSenderImageView.frame));
  479.    
  480.     //BANK ACC SENDER
  481.     CGSize bankAccountSenderLabelSize = [self.bankAccountSenderLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, CGFLOAT_MAX)];
  482.    
  483.     self.bankAccountSenderLabel.frame = CGRectMake(CGRectGetMaxX(self.iconSenderImageView.frame) + 15.0f, CGRectGetMinY(self.iconSenderImageView.frame) - 0.5f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, bankAccountSenderLabelSize.height);
  484.    
  485.     //BANK USERNAMER SENDER
  486.     CGSize bankAccountUsernameSenderLabelSize = [self.bankAccountUsernameSenderLabel sizeThatFits:CGSizeMake(CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, CGFLOAT_MAX)];
  487.    
  488.     self.bankAccountUsernameSenderLabel.frame = CGRectMake(CGRectGetMaxX(self.iconSenderImageView.frame) + 15.0f, CGRectGetMaxY(self.bankAccountSenderLabel.frame) + 3.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame) - 14.0f - 20.0f - 15.0f - 17.0f, bankAccountUsernameSenderLabelSize.height);
  489.  
  490.     //Update PaymenConfirmationItemContainer
  491.     self.paymentConfirmationItemView.frame = CGRectMake(16.0f, 16.0f, CGRectGetWidth(self.paymentConfirmationContainerView.frame) -  16.0 - 16.0f, CGRectGetMaxY(self.bankAccountUsernameSenderLabel.frame) + 45.0f + 22.0f);
  492.    
  493.    
  494.     //FOR USER "WAITING CONFIRMATION"
  495.     self.statusConfirmationView.frame = CGRectMake(0.0f, CGRectGetHeight(self.paymentConfirmationItemView.frame) - 45.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame), 45.0f);
  496.    
  497.     //UpperSeparatorView
  498.     self.separatorUpperView.frame = CGRectMake(0.0f, CGRectGetMinY(self.statusConfirmationView.frame) - [Util lineMinimumHeight], CGRectGetWidth(self.paymentConfirmationItemView.frame), [Util lineMinimumHeight]);
  499.    
  500.     //FOR EXPERT options "Decline | Accept"
  501.     //LEFT OPTION (DECLINE)
  502.     self.leftOptionView.frame = CGRectMake(0.0f, CGRectGetHeight(self.paymentConfirmationItemView.frame) - 45.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, 45.0f);
  503.    
  504.     //RIGHT OPTION VIEW (ACCEPT)
  505.     self.rightOptionView.frame = CGRectMake(CGRectGetMaxX(self.leftOptionView.frame), CGRectGetMinY(self.leftOptionView.frame), CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, CGRectGetHeight(self.leftOptionView.frame));
  506.    
  507.     //separator Mid
  508.     self.separatorMidView.frame =  CGRectMake(CGRectGetMaxX(self.leftOptionView.frame), CGRectGetMinY(self.leftOptionView.frame), [Util lineMinimumHeight], CGRectGetHeight(self.leftOptionView.frame));
  509.    
  510.     //SeparatorUpper
  511.     self.separatorUpperView.frame = CGRectMake(0.0f, CGRectGetMinY(self.leftOptionView.frame) - [Util lineMinimumHeight], CGRectGetWidth(self.paymentConfirmationItemView.frame), [Util lineMinimumHeight]);
  512.    
  513.     //LeftButton
  514.     self.leftOptionButton.frame = CGRectMake(0.0f, CGRectGetHeight(self.paymentConfirmationItemView.frame) - 45.0f, CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, 45.0f);
  515.    
  516.     //RightBUtton
  517.     self.rightOptionButton.frame = CGRectMake(CGRectGetMaxX(self.leftOptionView.frame), CGRectGetMinY(self.leftOptionView.frame), CGRectGetWidth(self.paymentConfirmationItemView.frame)/2.0f, CGRectGetHeight(self.leftOptionView.frame));
  518.    
  519.     //update paymenconfirmationcontainer
  520.     self.paymentConfirmationContainerView.frame = CGRectMake(0.0f, CGRectGetMaxY(self.separator1View.frame), CGRectGetWidth(self.scrollView.frame), CGRectGetMaxY(self.paymentConfirmationItemView.frame) + 40.0f);
  521.    
  522.     //UPDATE SCROLLVIEW CONTENTSIZE
  523.     self.scrollView.contentSize = CGSizeMake(CGRectGetWidth(self.scrollView.frame), CGRectGetMaxY(self.paymentConfirmationContainerView.frame) + 60.0f );
  524. }
  525.  
  526.  
  527. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement