Skip to content

A set of helper functions I've been using in various XCode projects, abstracted for great good!

Notifications You must be signed in to change notification settings

kreeger/BDKGeometry

Repository files navigation

BDKGeometry

A set of helper functions I've been using in various XCode projects, abstracted for great good!

Getting started

Really all you should do is check out the header file, but here's a list of the methods available.

CGRect CGRectSetSize(CGRect rect, CGSize size);
CGRect CGRectSetOrigin(CGRect rect, CGPoint origin);
CGRect CGRectSetWidth(CGRect rect, CGFloat width);
CGRect CGRectSetHeight(CGRect rect, CGFloat height);
CGRect CGRectSetYOrigin(CGRect rect, CGFloat yOrigin);
CGRect CGRectSetXOrigin(CGRect rect, CGFloat xOrigin);
CGRect CGRectCenterRectInRect(CGRect subRect, CGRect masterRect);
CGRect CGRectCenterRectInRectHorizontally(CGRect subRect, CGRect masterRect);
CGRect CGRectCenterRectInRectVertically(CGRect subRect, CGRect masterRect);
CGRect CGRectInsetByPercent(CGRect rect, CGFloat xPercent, CGFloat yPercent);
void CGRectIntegralSizeToFit(UIView *view);
CGSize CGSizeByDoubling(CGSize size);
CGRect CGRectByDoublingSize(CGRect rect);

Installation

Use CocoaPods, you dingus!

# Podfile
platform :ios, '5.0'

pod 'BDKGeometry', '~> 1.1.0'

Wanna thank me?

Flattr this

About

A set of helper functions I've been using in various XCode projects, abstracted for great good!

Resources

Stars

Watchers

Forks

Packages

No packages published