Skip to content

Instantly share code, notes, and snippets.

@valeriomazzeo
valeriomazzeo / gist:6feeb07969edabba2326
Last active February 25, 2016 15:57
Dynamic TableHeaderView Height
- (void)viewDidLoad
{
[super viewDidLoad];
self.label = [[UILabel alloc] initWithFrame:CGRectZero];
self.label.translatesAutoresizingMaskIntoConstraints = NO;
self.label.backgroundColor = [UIColor redColor];
self.label.textAlignment = NSTextAlignmentCenter;
self.label.numberOfLines = 0;
self.label.text = @"Valerio adjkashdjk asdjk asd adj aklsdjasl dkjasdkl askldj aklsdj aklsddj aklsdj aklsdjaklsdj aklsdj aklsd Tiziano.";
@valeriomazzeo
valeriomazzeo / RKObjectManager.m
Created May 11, 2015 14:55
RKObjectManager Extension
#pragma mark - Standard Methods Extensions
- (NSMutableURLRequest *)multipartFormRequestAtPathForRelationship:(NSString *)relationshipName
ofObject:(id)object
method:(RKRequestMethod)method
path:(NSString *)path
parameters:(NSDictionary *)parameters
constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
{
RKRoute *route = [self.router.routeSet routeForRelationship:relationshipName ofClass:[object class] method:method];
@valeriomazzeo
valeriomazzeo / xcode-icon-tag.sh
Last active January 27, 2022 10:19
Xcode Icon Version Overlay
# xcode-icon-tag.sh
# The MIT License (MIT)
#
# Copyright (c) <2015> <Valerio Mazzeo>
# Permission is hereby granted, free of charge, to any person obtaining a copy
#
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is