Skip to content

Instantly share code, notes, and snippets.

View wbroek's full-sized avatar

Wouter van den Broek wbroek

View GitHub Profile
@wbroek
wbroek / gist:3744808
Created September 18, 2012 18:19
iOS 6 Facebook Open Graph call
ACAccountStore *store = [[ACAccountStore alloc] init];
ACAccountType *facebookAccountType = [store accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
NSDictionary *FacebookOptions = @{ACFacebookAppIdKey: @"XXXXXXXXXX",ACFacebookPermissionsKey: @[@"email"],ACFacebookAudienceKey:ACFacebookAudienceEveryone};
[store requestAccessToAccountsWithType:facebookAccountType options:FacebookOptions completion:^(BOOL granted, NSError *error) {
if (granted)
{
NSArray *accounts = [store accountsWithAccountType:facebookAccountType];
@wbroek
wbroek / .gitignore
Created April 6, 2012 07:15 — forked from Abizern/.gitignore
Global git ignore file
# Mac OS X
*.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
@wbroek
wbroek / uiview_gradiant.m
Created December 6, 2010 20:20
Gradiant on a UIView to transparant
CALayer *viewLayer = UIVIEW.layer;
CAGradientLayer *gradientLayerView = [[CAGradientLayer alloc] init];
[gradientLayerView setFrame:[UIVIEW frame]];
[gradientLayerView setPosition:CGPointMake(UIVIEW.frame.size.width / 2, UIVIEW.frame.size.height / 2)];
[gradientLayerView setMasksToBounds:NO];
[gradientLayerView setColors:[NSArray arrayWithObjects:
(id)[[UIColor colorWithWhite:0.0 alpha:1.0] CGColor],
(id)[[UIColor colorWithWhite:0.0 alpha:0.0] CGColor], nil]];
[gradientLayerView setStartPoint:CGPointMake(0.5, 0.92)];