BaseCollectionViewCell.swift 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*****************************************************************************
  2. * BaseCollectionViewCell.Swift
  3. * VLC for iOS
  4. *****************************************************************************
  5. * Copyright (c) 2018 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Carola Nitz <nitz.carola # googlemail.com>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. import Foundation
  13. class BaseCollectionViewCell: UICollectionViewCell {
  14. static var defaultReuseIdentifier: String {
  15. return NSStringFromClass(self)
  16. }
  17. class var nibName: String {
  18. return String(describing:self)
  19. }
  20. var media: VLCMLObject?
  21. class func cellSizeForWidth(_ width: CGFloat) -> CGSize {
  22. return CGSize.zero
  23. }
  24. class var edgePadding: CGFloat {
  25. return 15
  26. }
  27. class var interItemPadding: CGFloat {
  28. return 5
  29. }
  30. }
  31. enum DeviceWidth: CGFloat {
  32. case iPhonePortrait = 414
  33. case iPhoneLandscape = 896
  34. case iPadLandscape = 1024
  35. }