Commit 6290a367 authored by 陈俊泳's avatar 陈俊泳

feat(更新):更新

parent 6b09772c
No preview for this file type
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SupportsSwiftPackage</key>
<true/>
<key>Kind</key>
<string>Xcode.IDEFoundation.TextSubstitutionFileTemplateKind</string>
<key>Description</key>
<string>A Cocoa Touch class.</string>
<key>Summary</key>
<string>A Cocoa Touch class</string>
<key>SortOrder</key>
<string>1</string>
<key>Platforms</key>
<array>
<string>com.apple.platform.iphoneos</string>
</array>
<key>Options</key>
<array>
<dict>
<key>Identifier</key>
<string>productName</string>
<key>Required</key>
<true/>
<key>Name</key>
<string>Class</string>
<key>Description</key>
<string>The name of the class to create</string>
<key>Type</key>
<string>text</string>
<key>NotPersisted</key>
<true/>
</dict>
</array>
</dict>
</plist>
//___FILEHEADER___
NS_ASSUME_NONNULL_BEGIN
@interface ___FILEBASENAMEASIDENTIFIER___Cell : SLBaseTableViewCell
@end
NS_ASSUME_NONNULL_END
//___FILEHEADER___
#import "___FILEBASENAMEASIDENTIFIER___Cell.h"
@implementation ___FILEBASENAMEASIDENTIFIER___Cell
- (void)setUI {
}
@end
//___FILEHEADER___
#import <UIKit/UIKit.h>
@protocol ___FILEBASENAMEASIDENTIFIER___ViewOperation <NSObject>
@optional
@end
//___FILEHEADER___
NS_ASSUME_NONNULL_BEGIN
@interface ___FILEBASENAMEASIDENTIFIER___VC : SLBaseVC
@end
NS_ASSUME_NONNULL_END
//___FILEHEADER___
#import "___FILEBASENAMEASIDENTIFIER___VC.h"
#import "___FILEBASENAMEASIDENTIFIER___View.h"
@interface ___FILEBASENAMEASIDENTIFIER___VC ()<___FILEBASENAMEASIDENTIFIER___ViewOperation>
@property (nonatomic, strong) ___FILEBASENAMEASIDENTIFIER___View *contentView;
@end
@implementation ___FILEBASENAMEASIDENTIFIER___VC
// MARK: - LifeCycle
- (void)viewDidLoad {
[super viewDidLoad];
[self setupInit];
}
- (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews];
_contentView.frame = self.view.bounds;
}
// MARK: - Setup
- (void)setupInit {
[self setupView];
}
- (void)setupView {
[self.view addSubview:self.contentView];
[self.contentView reloadData];
}
// MARK: - ___FILEBASENAMEASIDENTIFIER___Operation
// MARK: - Getter And Setter
- (___FILEBASENAMEASIDENTIFIER___View *)contentView {
if (!_contentView) {
_contentView = [[___FILEBASENAMEASIDENTIFIER___View alloc] init];
_contentView.operation = self;
}
return _contentView;
}
@end
//___FILEHEADER___
NS_ASSUME_NONNULL_BEGIN
@interface ___FILEBASENAMEASIDENTIFIER___VM : SLViewModel
@end
NS_ASSUME_NONNULL_END
//___FILEHEADER___
#import "___FILEBASENAMEASIDENTIFIER___VM.h"
@interface ___FILEBASENAMEASIDENTIFIER___VM ()
@end
@implementation ___FILEBASENAMEASIDENTIFIER___VM
//MARK: - Init
- (instancetype)initWithDelegate:(id<STCViewModelProtocol>)delegate {
self = [super initWithDelegate:delegate];
if(self){
}
return self;
}
//MARK: - Cmd Target
//MARK: - Private Methods
//MARK: - Getter And Setter
@end
//___FILEHEADER___
#import <UIKit/UIKit.h>
#import "___FILEBASENAMEASIDENTIFIER___Interface.h"
#import "___FILEBASENAMEASIDENTIFIER___VM.h"
@interface ___FILEBASENAMEASIDENTIFIER___View : SLBaseView
@property (nonatomic, weak) id<___FILEBASENAMEASIDENTIFIER___ViewOperation> operation;
@property (nonatomic, strong) ___FILEBASENAMEASIDENTIFIER___VM *viewModel;
- (void)reloadData;
@end
//___FILEHEADER___
#import "___FILEBASENAMEASIDENTIFIER___View.h"
#import "___FILEBASENAMEASIDENTIFIER___Cell"
@interface ___FILEBASENAMEASIDENTIFIER___View () <UITableViewDataSource, UITableViewDelegate,STCViewModelProtocol>
@property (nonatomic, strong) SLBaseTableView *tableView;
@end
@implementation ___FILEBASENAMEASIDENTIFIER___View
//MARK: - LifeCycle
- (void)dealloc {
SLDebugLog(@"%@ - execute %s",NSStringFromClass([self class]),__func__);
}
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self setupUI];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)coder {
self = [super initWithCoder:coder];
if (self) {
[self setupUI];
}
return self;
}
//MARK: - Setup
- (void)setupUI {
[self addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(@0);
}];
}
- (void)reloadData {
}
//MARK: - STCViewModelProtocol
- (void)reactActionWithViewModel:(id)viewModel target:(id)target {
}
- (void)updateValue:(id)value withViewModel:(id)viewModel target:(id)target {
}
//MARK: - TableView DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
___FILEBASENAMEASIDENTIFIER___Cell *cell = [___FILEBASENAMEASIDENTIFIER___Cell cellClassWithTableView:tableView forIndexPath:indexPath];
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return [___FILEBASENAMEASIDENTIFIER___Cell cellHeight];
}
//MARK: - TableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
//MARK: - Getter And Setter
- (___FILEBASENAMEASIDENTIFIER___VM *)viewModel {
if(!_viewModel) {
_viewModel = [[___FILEBASENAMEASIDENTIFIER___VM alloc] initWithDelegate:self];
}
return _viewModel;
}
- (SLBaseTableView *)tableView {
if (!_tableView) {
_tableView = [SLBaseTableView new];
[___FILEBASENAMEASIDENTIFIER___Cell registerClassWithTableView:_cusTableView];
_tableView.dataSource = self;
_tableView.delegate = self;
}
return _tableView;
}
@end
## 文件模板
新建 /Library/Developer/Xcode/Templates/File Template/SYC文件夹
导入SLMVVM.xctemplate模板
可新建自己的模板放到项目根目录的Template文件做维护
......@@ -15,6 +15,11 @@
- junyong.chen@shengyc.com
- Kangaroo
- gitlab
- [junyong.chen@shengyc.com](mailto:junyong.chen@shengyc.com)
- syc123456
5566324415272839 02/23 084
- [Appid](https://developer.apple.com/account/#/overview/C77C4Z7YUK) 「App打包密码:vwks-bbxa-onno-futv」
......@@ -25,7 +30,7 @@
- 张总:用于CMS
绑定手机号-17701929135「施婷」
appid账号: saas@shengyc.com
appid密码:Shengyc_1212
appid密码:Shengyc_2023
网易邮箱密码:syc888168
- 测试appid:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment