Here is your solution
use this code
//
// RootViewController.m
// delete1
//
// Created by apple apple on 03/09/10.
// Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import "RootViewController.h"
@implementation RootViewController
@synthesize pickerViewArray,myPickerView;
#pragma mark -
#pragma mark View lifecycle
- (void)viewDidLoad {
pickerViewArray = [[NSMutableArray alloc] init];
[pickerViewArray addObject:@"Red"];
[pickerViewArray addObject:@"Orange"];
[pickerViewArray addObject:@"Yellow"];
[pickerViewArray addObject:@"Green"];
[pickerViewArray addObject:@"Blue"];
[pickerViewArray addObject:@"Indigo"];
[pickerViewArray addObject:@"Violet"];
myPickerView = [[UIPickerView alloc] initWithFrame:CGRectZero];
myPickerView.delegate=self;
//myPickerView.showsSelectionIndicator =YES;
myPickerView.backgroundColor = [UIColor clearColor];
CGAffineTransform rotate = CGAffineTransformMakeRotation(-3.14/2);
rotate = CGAffineTransformScale(rotate, 0.25, 2.0);
[self.myPickerView setTransform:rotate];
[self.view addSubview:myPickerView];
//Setting Frame
CGRect frame1=CGRectMake(0,0,80,-50);
myPickerView.frame=frame1;
//Adding Picker View on navigationbar
self.navigationItem.titleView = myPickerView;
//self.navigationController.view.frame=frame1;
//self.navigationController.view=myPickerView;
//[myTitleView release];
self.navigationController.navigationBar.tintColor = [UIColor orangeColor];
[super viewDidLoad];
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
-(NSInteger)pickerView: (UIPickerView *)thePickerView numberOfRowsInComponent: (NSInteger)component {
return [pickerViewArray count];
}
//PickerViewController.m
- (NSString *)pickerView: (UIPickerView *)thePickerView titleForRow

NSInteger)row forComponent: (NSInteger)component {
return [pickerViewArray objectAtIndex:row];
}
// UIPickerViewDelegate
- (UIView *)pickerView: (UIPickerView *)pickerView viewForRow

NSInteger)row forComponent

NSInteger)component reusingView

UIView *)view{
CGRect rect = CGRectMake(0, 0, 1024, 40);
UILabel *label = [[UILabel alloc]initWithFrame:rect];
CGAffineTransform rotate = CGAffineTransformMakeRotation(3.14/2);
rotate = CGAffineTransformScale(rotate, 0.25, 2.0);
[label setTransform:rotate];
label.text = [pickerViewArray objectAtIndex:row];
label.font = [UIFont systemFontOfSize:22.0];
label.textAlignment = UITextAlignmentCenter;
label.numberOfLines = 2;
label.lineBreakMode = UILineBreakModeWordWrap;
label.backgroundColor = [UIColor clearColor];
label.clipsToBounds = YES;
return label ;
}
#pragma mark -
#pragma mark Table view data source
// Customize the number of sections in the table view.
- (NSInteger)numberOfSectionsInTableView: (UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView: (UITableView *)tableView numberOfRowsInSection: (NSInteger)section {
return 0;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView: (UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell.
return cell;
}
/*
// Override to support conditional editing of the table view.
- (BOOL)tableView: (UITableView *)tableView canEditRowAtIndexPath: (NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
return YES;
}
*/
/*
// Override to support editing the table view.
- (void)tableView: (UITableView *)tableView commitEditingStyle: (UITableViewCellEditingStyle)editingStyle forRowAtIndexPath: (NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source.
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
}
}
*/
/*
// Override to support rearranging the table view.
- (void)tableView: (UITableView *)tableView moveRowAtIndexPath: (NSIndexPath *)fromIndexPath toIndexPath: (NSIndexPath *)toIndexPath {
}
*/
/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView: (UITableView *)tableView canMoveRowAtIndexPath: (NSIndexPath *)indexPath {
// Return NO if you do not want the item to be re-orderable.
return YES;
}
*/
#pragma mark -
#pragma mark Table view delegate
- (void)tableView: (UITableView *)tableView didSelectRowAtIndexPath: (NSIndexPath *)indexPath {
/*
<#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
// ...
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
*/
}
#pragma mark -
#pragma mark Memory management
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Relinquish ownership any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
// For example: self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end