---Verify the uibtutton--of the phone number
self. submitbtn = [UIButton buttonwithtype: (Uibuttontypecustom)];
Self. Submitbtn.frame = CGRectMake (0,self. undoview.frame.origin.y+self. UndoView.frame.size.height,self. View.frame.size.width, +);
self. Submitbtn.backgroundcolor = [Uicolor colorwithhexstring:@ "47a5d6"];
//self.submitbtn.alpha = 0.5;
[self. SUBMITBTN settitle:@ " send " forstate: (UIControlStateNormal)];
[Self] submitbtn addTarget: Self action:@selector(didbtnaction) forcontrolevents: ( Validationemailformat)];
// e-mail address
Self.Emailft = [[UitextfieldAlloc] initWithFrame:CGRectMake( -, Lineview.Frame.Origin.Y+lineview.Frame.Size.Height + the, Self.View.Frame.Size.Width- -, +)];
self. Emailft . BackgroundColor = [uicolorcolorwithhexstring:@ "F8f8f8"];
self . emailft Placeholder = @ " your phone number !"
self . emailft font = [ uifont Systemfontofsize: 17.0 ];
self. Emailft . clearsonbeginediting =YES;
self. Emailft . TextAlignment = Nstextalignmentcenter;
[Self. View addsubview:self. Emailft];
[Dubai] Verify that the phone number is correct
-(void) Validationemailformat
{
nsstring *mobileregex =@ "^ ((13[0-9]) | ( 147) | (170) | (15[^4,\\d]) | (18[0,5-9])) \\d{8}$ ";
nspredicate *mobiletest = [nspredicatepredicatewithformat:@ "self MATCHES%@", Mobileregex];
BOOL n = [mobiletest evaluatewithobject:self. Emailft. text];
if (n = = NO) {
[alertvcshowwithmessage:@ " phone number format is not correct !" ];
self. Navigationitem. Rightbarbuttonitem. Enabled = YES;
[self removeloadingview];
[Self. Timertt invalidate];
}Else{
[Self. Timertt Fire];
//[self Removeloadingview];
[selfclosevc];
self. Navigationitem. Rightbarbuttonitem. Enabled = YES;
}
}
IOS Phone number format verification