UISegmentedControlInside me, a UINavigationBarlooks like this:

Here you can see how it is created in the Storyboard:

The problem is that when I create a software screenshot to share it, I got the UISegmentedControlselected tab without the text, for example here:

As far as I know, itβs normal that the status bar is not displayed, and also that the Share button is displayed as selected, because it is actually selected at the time of taking the screenshot, but has no idea what is happening with UISegmentedControlany idea?
PS: I can use the screen capture code, but this is a pretty simple standard code.
UPDATE
This is the screenshot code I'm using:
- (UIImage*)screenshot
{
CGSize imageSize = [[UIScreen mainScreen] bounds].size;
if (NULL != UIGraphicsBeginImageContextWithOptions)
UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);
else
UIGraphicsBeginImageContext(imageSize);
CGContextRef context = UIGraphicsGetCurrentContext();
for (UIWindow *window in [[UIApplication sharedApplication] windows])
{
if (![window respondsToSelector:@selector(screen)] || [window screen] == [UIScreen mainScreen])
{
CGContextSaveGState(context);
CGContextTranslateCTM(context, [window center].x, [window center].y);
CGContextConcatCTM(context, [window transform]);
CGContextTranslateCTM(context,
-[window bounds].size.width * [[window layer] anchorPoint].x,
-[window bounds].size.height * [[window layer] anchorPoint].y);
[[window layer] renderInContext:context];
CGContextRestoreGState(context);
}
}
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
UPDATE 2
, : https://github.com/apascual/APSegmentedControlExample