Skip to content

Instantly share code, notes, and snippets.

View patelrohan's full-sized avatar
🤓

Rohan Patel patelrohan

🤓
  • Dynamic Island
View GitHub Profile
@patelrohan
patelrohan / loginFacebook
Created February 10, 2012 12:02
Login using facebook account
- (IBAction)loginButtonPressed:(id)sender {
NSString *client_id = @"142759389130183";
//alloc and initalize our FbGraph instance
self.fbGraph = [[FbGraph alloc] initWithFbClientID:client_id];
//begin the authentication process.....
[fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(fbGraphCallback:)
andExtendedPermissions:@"read_stream,user_photos,user_videos,publish_stream,offline_access,user_checkins,friends_checkins"];
@patelrohan
patelrohan / navigationbuttons
Created December 30, 2011 07:18
Add buttons to UInavigationbar
UIToolbar *tools = [[UIToolbar alloc]
initWithFrame:CGRectMake(0.0f, 0.0f, 90.0f, 45.01f)]; // 44.01 shifts it up 1px
tools.clearsContextBeforeDrawing = NO;
tools.clipsToBounds = NO;
tools.barStyle = -1;
NSMutableArray *buttons = [[NSMutableArray alloc] initWithCapacity:2];
// ---------------------------------------Add Pin button----------------------------------.