TouchSpotView.m 662 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import "TouchSpotView.h"
  10. @implementation TouchSpotView
  11. - (instancetype)initWithFrame:(CGRect)frame
  12. {
  13. self = [super initWithFrame:frame];
  14. if (self) {
  15. self.backgroundColor = UIColor.lightGrayColor;
  16. }
  17. return self;
  18. }
  19. - (void)setBounds:(CGRect)newBounds
  20. {
  21. super.bounds = newBounds;
  22. self.layer.cornerRadius = newBounds.size.width / 2.0;
  23. }
  24. @end