shinydevelopment / SDScreenshotCapture

SDScreenshotCapture is a class which can be used to capture a screenshot of the app window which excludes the iOS status bar.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screenshot is missing the selected label in UISegmentedControl

mattbauch opened this issue · comments

As you can see in the attached screenshot the UISegmentedControl is missing the text of the selected segment.

Similar things happen to iAd banners, they don't have any content in the screenshot.

2013-09-23 12-05-00-054

Tested on latest iOS Simulator (screenshot triggered by shake gesture) and iPad 3, running iOS 7.0 (11A465)

To reproduce simply add a UISegmentedControl to your Example project and take a screenshot.

Judging from the code in SDScreenshotCapture, this might as well be a bug on Apples side.

Thanks for reporting this issue Matthias.

Interesting, one thing I want to do is try the screenshotting code with the new iOS 7 snapshotting code rather than renderInContext:. I kept it with renderInContext: for now to maintain iOS 5/6 compatibility.

I will try it and see if it makes any difference, if it works it could conditionally call the 5/6 or 7 code depending on platform.

Cheers
Dave

OK, I just checked into this a little and it does seem that the new iOS 7 rendering methods are much more reliable with iOS 7 controls like this.

I don't have time to do a full release tonight but I have pushed a version of the code which is iOS 7 specific to the ios7renderingbug (01aa61f) branch. If you could check this change works for you then I will integrate it and push a new version tomorrow.

Thanks again for the bug report!
Dave

Fixed in v1.1.