Skip to content

Instantly share code, notes, and snippets.

- (CGSize)sizeThatFits:(CGSize)size
{
NSMutableArray *bottoms = [NSMutableArray array];
for (UIView *view in self.subviews) {
NSNumber *bottom = [NSNumber numberWithFloat:view.center.y + CGRectGetMidY(view.bounds)];
[bottoms addObject:bottom];
@zakdances
zakdances / as
Last active December 17, 2015 04:29
Size
- (CGSize)sizeThatFits:(CGSize)size
{
NSMutableArray *bottoms = [NSMutableArray array];
for (UIView *view in self.subviews) {
NSNumber *bottom = [NSNumber numberWithFloat:view.center.y + CGRectGetMidY(view.bounds)];
[bottoms addObject:bottom];
- (CGSize)sizeThatFits:(CGSize)size
{
NSMutableArray *bottoms = [NSMutableArray array];
for (UIView *view in self.subviews) {
NSNumber *bottom = [NSNumber numberWithFloat:view.center.y + CGRectGetMidY(view.bounds)];
[bottoms addObject:bottom];
- (CGSize)sizeThatFits:(CGSize)size
{
NSMutableArray *bottoms = [NSMutableArray array];
for (UIView *view in self.subviews) {
NSNumber *bottom = [NSNumber numberWithFloat:view.center.y + CGRectGetMidY(view.bounds)];
[bottoms addObject:bottom];
- (CGSize)sizeThatFits:(CGSize)size
{
NSMutableArray *bottoms = [NSMutableArray array];
for (UIView *view in self.subviews) {
NSNumber *bottom = [NSNumber numberWithFloat:view.center.y + CGRectGetMidY(view.bounds)];
[bottoms addObject:bottom];
.shadow {
position: relative;
top: 20px;
height: 20px;
}
.shadow:before {
position: absolute;
content: '';
left: 0;
right: 0;
.shadow {
position: relative;
top: 10px;
left: 300px;
width: 200px;
height: 20px;
background-color: green;
}
.shadow:before {
position: absolute;
.shadow {
position: relative;
top: 20px;
left: 300px;
width: 200px;
height: 10px;
background-color: green;
}
.shadow:before {
position: absolute;
@zakdances
zakdances / dabblet.css
Created June 24, 2013 11:14 — forked from anonymous/dabblet.css
Matrix 3d transform for obtaining trapezoid? (SO)
/**
* Matrix 3d transform for obtaining trapezoid? (SO)
* http://stackoverflow.com/q/14480341/1397351
*/
* {
transform-style: preserve-3d;
}
generateUniqueID = () ->
_p8 = (s) ->
p = (Math.random().toString(16)+"000000000").substr(2,8)
if s then "-" + p.substr(0,4) + "-" + p.substr(4,4) else p
_p8() + _p8(true) + _p8(true) + _p8()