ios – 仅在arc或gc模式中允许的弱性质的合成

嗨,我只是开始ios编程今天,我正在面对这个错误.

plz帮我删除这个错误

plz建议我一些很好的ios开发人员教程

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

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

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

@end


#import <UIKit/UIKit.h>

@interface ViewController : UIViewController
@property (weak,nonatomic) IBOutlet UITextField *txtUsername;
@property (weak,nonatomic) IBOutlet UITextField *txtPassword;
- (IBAction)loginClicked:(id)sender;
- (IBAction)backgroundClick:(id)sender;


@end

解决方法

如果你刚刚开始,你应该只是 enable ARC.它会节省你很多的头痛,它会解决这个问题.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...