this login.m
#import @interface login : uiviewcontroller { iboutlet uitextfield *username; iboutlet uitextfield *password; iboutlet uiactivityindicatorview *loginactivity; } @property (nonatomic, retain) iboutlet uitextfield *username; @property (nonatomic, retain) iboutlet uitextfield *password; @property (nonatomic, retain) iboutlet uiactivityindicatorview *loginactivity; - (ibaction) dologin:(id)sender; @end and login.h
#import "login.h" @implementation login @synthesize username,password; - (ibaction) dologin:(id)sender { [ password resignfirstresponder ]; [ loginactivity startanimating ]; nslog(@"%@ / %@", [ username text ], [ password text ] ); } - (void)didreceivememorywarning { [super didreceivememorywarning]; } - (void)viewdidunload { [super viewdidunload]; // release retained subviews of main view. // e.g. self.myoutlet = nil; } - (void)dealloc { [super dealloc]; } @end if press login(dologin) got error -[viewacontroller dologin:]: unrecognized selector sent instance
it looks you've named class "login", have hooked button instance of "viewacontroller". viewacontroller doesn't have dologin: method?
Comments
Post a Comment