不多说 直接贴代码 随意输入银行卡号便可以够进行断定
- (void)viewDidLoad {
[super viewDidLoad];
NSString *str = @"6226820011200783033";
BOOL isRight = [self checkCardNo:str];
if (!isRight) {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"不对" message:@"请重新输入卡号" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
[alert show];
}else{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"对" message:@"" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
[alert show];}
}- (void)viewDidLoad