Skip to content

Instantly share code, notes, and snippets.

@bdolman
bdolman / gist:5379465
Created April 13, 2013 18:16
Example of the use of even spacing constraints in a view controller (using the category from this answer: http://stackoverflow.com/questions/13075415/evenly-space-multiple-views-within-a-container-view/14568394#14568394)
- (void)viewDidLoad
{
[super viewDidLoad];
UILabel *label1 = [UILabel new];
UILabel *label2 = [UILabel new];
UILabel *label3 = [UILabel new];
UILabel *label4 = [UILabel new];
[label1 setTranslatesAutoresizingMaskIntoConstraints:NO];
NSString *plaintext = @"**text to render**";
struct sd_markdown *markdown;
struct html_renderopt html_options;
unsigned int render_flags = HTML_HARD_WRAP;
unsigned int extensions = MKDEXT_NO_INTRA_EMPHASIS |
MKDEXT_TABLES |
MKDEXT_FENCED_CODE |
MKDEXT_AUTOLINK |