Run layoutIfNeeded before renderInContext
Run layoutIfNeeded before renderInContext

Things like auto layout seem to work best if you call layoutIfNeeded before renderInContext.
davidman/DHSmartScreenshot,davidman/DHSmartScreenshot