About Me


An iPhone/iPad Programmer RapidValueSolutions

Regular Expression For validation

November 4, 2010
Email Validation :

    Description    :        word@word.(2,6 characters)
    Expression    :       \\b([a-zA-Z0-9%_.+\\-]+)@([a-zA-Z0-9.\\-]+?\\.[a-zA-Z]{2,6})\\b

User Name Validation :

    Description    :        contains only character, digits and minimum 4 and maximum 60 characters
    Expression    :       ^[a-zA-Z0-9_]{4,60}$
Password Validation :

  Description    :    Should contain letters, atleast one digit, one special character and 8-60 characters long.
  Expression    :   ^.*(?=.{8,60})(?=.*\\d)(?=.*[a-z])(?=.*[@#$%^&+=]).*$

Credit Card Validation :

    Description    :    Validate Visa and Masetro Card Number   
    Expression    :    ^5[1-5][0-9]{14}$|^4[0-9]{12}(?:[0-9]{3})?$
 

Custom Progress Bar View for iPhone iPad

November 3, 2010
/**************************************************************************************
/*  File Name      : ProgressBar.h
/*  Project Name   : <nil> Generic
/*  Description    : A Custom Progress Bar View
/*  Version        : 1.0
/*  Created by     : Naveen Shan
/*  Created on     : 13/10/10
/*  Copyright (C) 2010 RapidValue IT Services Pvt. Ltd. All Rights Reserved.
/**************************************************************************************/

#import <UIKit/UIKit.h>

@interface ProgressBar...
Continue reading...
 

Draw Label in CGContextRef

October 19, 2010
Here is code for draw a text in context reference
 
   CGContextRef context = UIGraphicsGetCurrentContext();  
   CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
    CGContextSetRGBStrokeColor(context, 1.0, 0.0, 0.0, 1.0);
    CGContextSelectFont(context, "Helvetica", 20, kCGEncodingMacRoman);
    CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1.0, -1.0));
    CGContextSetTextDrawingMode(context, kCGTextFill);
    char *str="Text";
    CGContextShowTextAtPoint(context,20.0,20.0,st...
Continue reading...
 

Serialization of function call / Passing arguments to selector

October 19, 2010
  First allocate the opertion Queue

    NSOperationQueue *operationQueue=[[NSOperationQueue alloc] init];
    [operationQueue setMaxConcurrentOperationCount:1];

then,

   NSString  *stringName = @"Naveen Shan";
    [stringName retain];    //dont forget to allocate memory to arguments
    NSString  * stringPlace = @"Kochi";
    [stringPlace retain];
   
    SEL selector = @selector(myFunction:strPlace:);
   
    NSMethodSignature *signature = [DBHandler instanceMethodSignatureForSelector:selector];
    N...
Continue reading...
 

WRITING HTTP IMAGES TO FILE

October 18, 2010
-(void)writeImagesToFile:(NSString *)strURL ImageName:(NSString *)fileName    {
   
    NSData *imgaeData=[NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];
    NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
    NSString *path = [docsDirectory stringByAppendingPathComponent:fileName];
    // Write the file
    [imgaeData writeToFile:path atomically:YES];
}
...
Continue reading...
 

View Slider

October 7, 2010
Hi,

Here is Sample Code for Sliding Views (such as UIView, UIWebview, UIImageView).
This code has tested for Memory leaks and no leaks found
here I properly unload views..
Check it out....

ViewSlider.h File


/**************************************************************************************
/*  File Name      : ViewSlider.h
/*  Project Name   : Generic
/*  Description    : Slide Views
/*  Version        : 1.0
/*  Created by     : Naveen Shan
/*  Created on     : 28/10/10
/*  Copyright (C) 2010 RapidVal...
Continue reading...
 

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to www.yola.com and sign up today!

Make a free website with Yola