After reading the related answer, I think the problem might come from the hard coded HTML code you generate in -(NSString*)generatePinterestHTML
function. According to your screenshots, your sharing form is staying next to your image, while it should go to a new paragraph. Though in the related answer's code, @Sudha is putting <p>
tags for line breaks, whether you've omitted them, or you've just forgotten them.
In the first case, you should insert a <br />
tag at the beginning of the third [htmlString appendFormat];
instruction.
Which means you should end up with this snippet:
...
[htmlString appendFormat:@"<html> <body>"];
[htmlString appendFormat:@"<p align=\"center\"><a href=%@ class=\"pin-it-button\" count-layout=\"horizontal\"><img border=\"0\" src=\"http://assets.pinterest.com/images/PinExt.png\" title=\"Pin It\" /></a></p>", buttonUrl];
[htmlString appendFormat:@"<br/><p align=\"center\"><img width=\"400px\" height = \"400px\" src=%@></img></p>", imageUrl];
[htmlString appendFormat:@"<script type=\"text/javascript\" src=\"//assets.pinterest.com/js/pinit.js\"></script>"];
[htmlString appendFormat:@"</body> </html>"];
...
Note : If this answer didn't help you, you should post the code you used, so that we can directly see what's wrong