VLCWiFiUploadTableViewCell.m 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // VLCWiFiUploadTableViewCell.m
  3. // VLC for iOS
  4. //
  5. // Created by Felix Paul Kühne on 10.08.13.
  6. // Copyright (c) 2013 VideoLAN. All rights reserved.
  7. //
  8. // Refer to the COPYING file of the official project for license.
  9. //
  10. #import "VLCWiFiUploadTableViewCell.h"
  11. @implementation VLCWiFiUploadTableViewCell
  12. + (VLCWiFiUploadTableViewCell *)cellWithReuseIdentifier:(NSString *)ident
  13. {
  14. NSArray *nibContentArray = [[NSBundle mainBundle] loadNibNamed:@"VLCWiFiUploadTableViewCell" owner:nil options:nil];
  15. NSAssert([nibContentArray count] == 1, @"meh");
  16. NSAssert([[nibContentArray lastObject] isKindOfClass:[VLCWiFiUploadTableViewCell class]], @"meh meh");
  17. VLCWiFiUploadTableViewCell *cell = (VLCWiFiUploadTableViewCell *)[nibContentArray lastObject];
  18. return cell;
  19. }
  20. - (void)awakeFromNib
  21. {
  22. self.titleLabel.text = NSLocalizedString(@"HTTP_UPLOAD", @"");
  23. self.titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
  24. self.titleLabel.shadowColor = [UIColor colorWithWhite:0.0f alpha:0.25f];
  25. self.titleLabel.textColor = [UIColor colorWithRed:(196.0f/255.0f) green:(204.0f/255.0f) blue:(218.0f/255.0f) alpha:1.0f];
  26. self.uploadAddressLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
  27. self.uploadAddressLabel.shadowColor = [UIColor colorWithWhite:0.0f alpha:0.25f];
  28. self.uploadAddressLabel.textColor = [UIColor colorWithRed:(196.0f/255.0f) green:(204.0f/255.0f) blue:(218.0f/255.0f) alpha:1.0f];
  29. UIView *topLine = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, 1.0f)];
  30. topLine.backgroundColor = [UIColor colorWithRed:(54.0f/255.0f) green:(61.0f/255.0f) blue:(76.0f/255.0f) alpha:1.0f];
  31. [self.titleLabel.superview addSubview:topLine];
  32. UIView *topLine2 = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 1.0f, [UIScreen mainScreen].bounds.size.height, 1.0f)];
  33. topLine2.backgroundColor = [UIColor colorWithRed:(54.0f/255.0f) green:(61.0f/255.0f) blue:(77.0f/255.0f) alpha:1.0f];
  34. [self.titleLabel.superview addSubview:topLine2];
  35. UIView *bottomLine = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 50.0f, [UIScreen mainScreen].bounds.size.height, 1.0f)];
  36. bottomLine.backgroundColor = [UIColor colorWithRed:(40.0f/255.0f) green:(47.0f/255.0f) blue:(61.0f/255.0f) alpha:1.0f];
  37. [self.titleLabel.superview addSubview:bottomLine];
  38. }
  39. + (CGFloat)heightOfCell
  40. {
  41. return 50.;
  42. }
  43. @end