VLCWiFiUploadTableViewCell.m 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 whiteColor];
  26. self.backgroundColor = [UIColor colorWithRed:(43.0f/255.0f) green:(43.0f/255.0f) blue:(43.0f/255.0f) alpha:1.0f];
  27. self.uploadAddressLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
  28. self.uploadAddressLabel.shadowColor = [UIColor colorWithWhite:0.0f alpha:0.25f];
  29. self.uploadAddressLabel.textColor = [UIColor whiteColor];
  30. UIView *topLine = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, 1.0f)];
  31. topLine.backgroundColor = [UIColor colorWithRed:(16.0f/255.0f) green:(16.0f/255.0f) blue:(16.0f/255.0f) alpha:1.0f];
  32. [self.titleLabel.superview addSubview:topLine];
  33. UIView *bottomLine = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 50.0f, [UIScreen mainScreen].bounds.size.height, 1.0f)];
  34. bottomLine.backgroundColor = [UIColor colorWithRed:(23.0f/255.0f) green:(23.0f/255.0f) blue:(23.0f/255.0f) alpha:1.0f];
  35. [self.titleLabel.superview addSubview:bottomLine];
  36. }
  37. + (CGFloat)heightOfCell
  38. {
  39. return 50.;
  40. }
  41. @end