JXFeedShowView.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // JXFeedShowView.m
  3. // shiku_im
  4. //
  5. // Created by 123 on 2020/5/26.
  6. // Copyright © 2020 Reese. All rights reserved.
  7. //
  8. #import "JXFeedShowView.h"
  9. @interface JXFeedShowView()
  10. @property (weak, nonatomic) IBOutlet UIView *blackView2;
  11. @end
  12. @implementation JXFeedShowView
  13. +(instancetype)XIBJXFeedShowView{
  14. return [[NSBundle mainBundle]loadNibNamed:@"JXFeedShowView" owner:self options:nil].firstObject;
  15. }
  16. -(void)awakeFromNib{
  17. [super awakeFromNib];
  18. self.konwBtn22.layer.cornerRadius=4;
  19. self.konwBtn22.layer.masksToBounds=YES;
  20. self.backView.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.3];
  21. self.blackView2.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.2];
  22. // [self.blackView2 addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(closeView)]];
  23. // [self.konwBtn addTarget:self action:@selector(closeView) forControlEvents:UIControlEventTouchUpInside];
  24. }
  25. - (void)closeView{
  26. [self removeFromSuperview];
  27. }
  28. -(void)showView{
  29. JXFeedShowView *show=[JXFeedShowView XIBJXFeedShowView];
  30. show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.6];
  31. show.frame=[UIScreen mainScreen].bounds;
  32. [[UIApplication sharedApplication].keyWindow addSubview:show];
  33. }
  34. @end