tags:

views:

38

answers:

1

i need to remove the border or seperator for each image in uisegmentedcontrol.

UISegmentedControl *toolbtn;

NSArray *btns = [NSArray  arrayWithObjects:[UIImage imageNamed:@"tab1_ov.png"],[UIImage imageNamed:@"tab2.png"],[UIImage imageNamed:@"tab3.png"],[UIImage imageNamed:@"tab4.png"],nil];
 toolbtn = [[UISegmentedControl alloc] initWithItems:btns]; 
 [toolbtn addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged];
  toolbtn.segmentedControlStyle=UISegmentedControlStyleBar;
  toolbtn.autoresizingMask = UIViewAutoresizingFlexibleWidth;
  [toolbtn setWidth:102 forSegmentAtIndex:0];
  [toolbtn setWidth:67 forSegmentAtIndex:1];
  [toolbtn setWidth:53 forSegmentAtIndex:2];
  [toolbtn setWidth:98 forSegmentAtIndex:3];
  toolbtn.tintColor=[UIColor blackColor];
  toolbtn.backgroundColor=[UIColor blackColor];
  [toolbtn setFrame:CGRectMake(0,0,320,30)];
  [self.view addSubview:toolbtn];

Help me regarding on this!

A: 

Did you find a solution for this?

Valerio Santinelli