Grouper/FlatUIKit — pull request #83 by hebertialmeida (2013-08-05 17:22:14+00:00)
Title: Border implementation like iOS 7 design

I have implemented border on FUISegmentedControl see the example:

FUISegmentedControl *segmentedControl = [[FUISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"Loja", @"Compradas", nil]];
segmentedControl.frame = CGRectMake(0, 0, 160, 30);
segmentedControl.selectedFont = [UIFont boldFlatFontOfSize:13];
segmentedControl.selectedFontColor = [UIColor colorWithRed:31/255.0 green:34/255.0 blue:36/255.0 alpha:1.0];
segmentedControl.deselectedFont = [UIFont flatFontOfSize:13];
segmentedControl.deselectedFontColor = [UIColor colorWithRed:228/255.0 green:228/255.0 blue:228/255.0 alpha:1.0];
segmentedControl.selectedColor = [UIColor colorWithRed:228/255.0 green:228/255.0 blue:228/255.0 alpha:1.0];
segmentedControl.deselectedColor = [UIColor colorWithRed:31/255.0 green:34/255.0 blue:36/255.0 alpha:1.0];
_// segmentedControl.dividerColor = [UIColor redColor];_
segmentedControl.cornerRadius = 5.0;
__segmentedControl.borderWidth = 1.0;__
__segmentedControl.borderColor = [UIColor colorWithRed:228/255.0 green:228/255.0 blue:228/255.0 alpha:1.0];__
![foto-1](https://f.cloud.github.com/assets/103670/911760/32683ccc-fdf2-11e2-91df-e78255c16458.png)
Now if you don't set dividerColor automatically is selected and unselected colors.

If using needsLayoutSubviews YES auto adjust height on iPhone
__segmentedControl.needsLayoutSubviews = YES;__
![foto-2](https://f.cloud.github.com/assets/103670/911786/b60cc14c-fdf2-11e2-9ddb-f4eb78f2442a.png)