NSArray * arr=[[NSArray alloc]initWithObjects:[NSNumber numberWithInt:10],[NSNumber numberWithInt:100],[NSNumber numberWithInt:50],[NSNumber numberWithInt:30],[NSNumber numberWithInt:70], nil];
NSLog(@"Before sorting%@",arr);
arr = [arr sortedArrayUsingSelector:@selector(compare:)];
NSLog(@"After sorting%@",arr);