VLCWiFiUploadTableViewCell.m 2.3 KB

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