gpt4 book ai didi

ios - 如何创建更干净的 UIViewController?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:15:59 28 4
gpt4 key购买 nike

<分区>

总是,当我创建 ViewController 时,我有这个:

#import "SomeVCC.h"
@interface SomeVC ()

@end

@implementation SomeVC

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/

@end

而且我经常需要一些更干净的版本,像这样:

#import "SomeVC.h"
@interface SomeVC ()

@end

@implementation SomeVC
#pragma mark - LifeCycle
- (void)viewDidLoad
{
[super viewDidLoad];
}

@end

如何更改苹果的或创建我自己的 viewContoller 模板?我使用 alcatraz 创建了一些模板,但它们不适合我。

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com