I use below code for change image of each segment in segmentedControl but doesn't work
How to do it?
First way:
[seg setImage:[UIImage imageNamed:@"1.png"] forSegmentAtIndex:0];
[seg setImage:[UIImage imageNamed:@"2.png"] forSegmentAtIndex:1];
Second way:
[seg insertSegmentWithImage:[UIImage imageNamed:@"1.png"] atIndex:0 animated:YES];
[seg insertSegmentWithImage:[UIImage imageNamed:@"2.png"] atIndex:1 animated:YES];