Seek advice,,,
The logic of this code here I disarray ah,,,
Reply:
This is a button click trigger event (method), probably function is to determine whether the current user has registered (or login) too, if it is read from the configuration file and assigned a user name and password text boxes.
Reply:
So why is NO time to read, ah, yes I should not read it
if ([accountDefaults boolForKey: NCUserDefaultBoolForRegister] == NO)
Reply:
Plist NSUserDefaults is used to quickly store key-value key-value pairs
Meaning of this code. . Buddy. . Why not copy the code directly. .
- (Void) defaultCheck: (id) sender
{
NSLog (@ "check button is pressed");
/ / Get accountDefaults
if (not registered) {
/ / Store NCUserDefaultNBoolForRegister is YES, that is set to registered
Value / / store account input box to NCUserDefaultNameKey
Value / / store the password input box to NCUserDefaultPasswordKey
}
else {
/ / Registered
/ / Store NCUserDefaultNBoolForRegister is NO, that is set to unregistered
/ / Set NCUserDefaultNameKey empty
/ / Set NCUserDefaultPasswordKey empty
}
No comments:
Post a Comment