BOOL in Object-C

typedef signed char BOOL;
#define YES  (BOOL)1
#define NO   (BOOL)0

重構上頁中的程式碼

- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender
{
    NSString *accountName=self.txtUser.text;

    if([_accountServiceBusiness CheckAccount:accountName])
    {
        return TRUE;
    }
    else
    {
        [self showAccountIsNotValid];
        return FALSE;
    }
}