| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // MOAnchorTaskRuleView.m
- // MiMoLive
- //
- // Created by SuperC on 2024/6/3.
- //
- #import "MOAnchorTaskRuleView.h"
- @interface MOAnchorTaskRuleView ()
- @property (weak, nonatomic) IBOutlet UILabel *titleLab;
- @property (weak, nonatomic) IBOutlet UITextView *contentTev;
- @end
- @implementation MOAnchorTaskRuleView
- + (instancetype)moAnchorTaskRuleView{
- return [[[NSBundle mainBundle] loadNibNamed:@"MOAnchorTaskRuleView" owner:self options:nil] firstObject];
- }
- - (void)awakeFromNib{
- [super awakeFromNib];
-
- self.titleLab.text = NSLocalString(@"mimo_anchor_task_rule_title");
- self.titleLab.font = [MOTextTools getTheFontWithSize:16.0 AndFontName:kNormalTitleFontStr];
-
- self.layer.cornerRadius = 16.0;
- self.layer.masksToBounds = YES;
- self.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
-
- self.contentTev.text = NSLocalString(@"mimo_anchor_task_rule_tip");
- self.contentTev.editable = NO;
- [self.contentTev setFont:[MOTextTools getTheFontWithSize:14.0 AndFontName:kNormalContentFontStr]];
- }
- - (IBAction)closeBtnClick:(id)sender {
- [self dismissAnchorTaskRuleView];
- }
- - (void)showAnchorTaskRuleView{
- self.frame = CGRectMake(0, 0, SCREENWIDTH, 443.0);
-
- CGRect actionViewRect = self.frame;
- actionViewRect.origin.x = SCREENWIDTH;
- self.frame = actionViewRect;
-
- WEAKSELF
- [UIView animateWithDuration:0.3 animations:^{
- CGRect actionViewRect = weakSelf.frame;
- actionViewRect.origin.x = 0;
- weakSelf.frame = actionViewRect;
- }];
- }
- - (void)dismissAnchorTaskRuleView{
- //完成下移动画
- WEAKSELF
- [UIView animateWithDuration:0.3 animations:^
- {
- CGRect actionSheetViewRect = weakSelf.frame;
- actionSheetViewRect.origin.x = SCREENWIDTH;
- weakSelf.frame = actionSheetViewRect;
- } completion:^(BOOL finished)
- {
- [self removeFromSuperview];
- }];
- }
- @end
|