Hey i just start ios programming today and i am facing this erro.
plz help me to remove this error
plz suggest me some nice ios developer tutorial
#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
If you're not using ARC, you cannot use weak
. For IBOutlet
references in non-ARC code, replace your references to weak
with retain
, instead. (It's a little confusing, but generally you use assign
rather than weak
in non-ARC code, but for IBOutlet
references, you use retain
.)
Better yet, as nneonneo suggests, you should use ARC.
If you're just starting off, you should just enable ARC. It will save you a lot of headaches, and it will resolve that issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With