12345678910111213141516171819202122232425262728293031323334353637383940 |
- //
- // YMBaseView.m
- // MSYOUPAI
- //
- // Created by YoMi on 2024/2/4.
- // Copyright © 2024 MS. All rights reserved.
- //
- #import "YMBaseView.h"
- @implementation YMBaseView
- - (instancetype)init{
- if (self = [super init]) {
-
- [self ym_setupViews];
- }
- return self;
- }
- - (instancetype)initWithFrame:(CGRect)frame{
- if (self = [super initWithFrame:frame]) {
- [self ym_setupViews];
- }
- return self;
- }
- /** 添加控件 最好最后加上[self setNeedsUpdateConstraints]和[self updateConstraintsIfNeeded],以防不调用updateConstraints*/
- - (void)ym_setupViews {
-
- }
- /** 绑定VM*/
- - (void)ym_bindViewModel:(id)viewModel{
-
- }
- - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
- [self endEditing:YES];
- }
- @end
|