Skip to content

Commit

Permalink
update code style
Browse files Browse the repository at this point in the history
  • Loading branch information
brow committed Sep 21, 2013
1 parent d77863e commit 3ae32f3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 24 deletions.
8 changes: 1 addition & 7 deletions FacebookLikeViewDemo/FacebookLikeViewDemoAppDelegate.h
Expand Up @@ -10,12 +10,6 @@

@class FacebookLikeViewDemoViewController;

@interface FacebookLikeViewDemoAppDelegate : NSObject <UIApplicationDelegate> {

}

@property (nonatomic, retain) IBOutlet UIWindow *window;

@property (nonatomic, retain) IBOutlet FacebookLikeViewDemoViewController *viewController;
@interface FacebookLikeViewDemoAppDelegate : NSObject <UIApplicationDelegate>

@end
8 changes: 6 additions & 2 deletions FacebookLikeViewDemo/FacebookLikeViewDemoAppDelegate.m
Expand Up @@ -11,8 +11,13 @@

#define SavedHTTPCookiesKey @"SavedHTTPCookies"

@implementation FacebookLikeViewDemoAppDelegate
@interface FacebookLikeViewDemoAppDelegate ()

@property (nonatomic, retain) IBOutlet FacebookLikeViewDemoViewController *viewController;

@end

@implementation FacebookLikeViewDemoAppDelegate

@synthesize window=_window;

Expand Down Expand Up @@ -40,7 +45,6 @@ - (void)applicationDidEnterBackground:(UIApplication *)application {
forKey:SavedHTTPCookiesKey];
}


- (void)dealloc
{
[_window release];
Expand Down
8 changes: 1 addition & 7 deletions FacebookLikeViewDemo/FacebookLikeViewDemoViewController.h
Expand Up @@ -7,13 +7,7 @@
//

#import <UIKit/UIKit.h>
#import "FBConnect.h"
#import "FacebookLikeView.h"

@interface FacebookLikeViewDemoViewController : UIViewController {
Facebook *_facebook;
}

@property (nonatomic, retain) IBOutlet FacebookLikeView *facebookLikeView;
@interface FacebookLikeViewDemoViewController : UIViewController

@end
18 changes: 10 additions & 8 deletions FacebookLikeViewDemo/FacebookLikeViewDemoViewController.m
Expand Up @@ -7,16 +7,18 @@
//

#import "FacebookLikeViewDemoViewController.h"
#import "FBConnect.h"
#import "FacebookLikeView.h"

@interface FacebookLikeViewDemoViewController () <FacebookLikeViewDelegate, FBSessionDelegate>

@end
@property (readonly) Facebook *facebook;
@property (nonatomic, retain) IBOutlet FacebookLikeView *facebookLikeView;

@end

@implementation FacebookLikeViewDemoViewController

@synthesize facebookLikeView=_facebookLikeView;

- (id)initWithCoder:(NSCoder *)aDecoder {
if (self = [super initWithCoder:aDecoder]) {
_facebook = [[Facebook alloc] initWithAppId:@"158575400878173" andDelegate:self];
Expand All @@ -31,7 +33,7 @@ - (void)dealloc
[super dealloc];
}

#pragma mark FBSessionDelegate methods
#pragma mark FBSessionDelegate

- (void)fbDidLogin {
self.facebookLikeView.alpha = 1;
Expand All @@ -43,10 +45,10 @@ - (void)fbDidLogout {
[self.facebookLikeView load];
}

#pragma mark FacebookLikeViewDelegate methods
#pragma mark FacebookLikeViewDelegate

- (void)facebookLikeViewRequiresLogin:(FacebookLikeView *)aFacebookLikeView {
[_facebook authorize:[NSArray array]];
[self.facebook authorize:[NSArray array]];
}

- (void)facebookLikeViewDidRender:(FacebookLikeView *)aFacebookLikeView {
Expand Down Expand Up @@ -74,7 +76,7 @@ - (void)facebookLikeViewDidUnlike:(FacebookLikeView *)aFacebookLikeView {
[alert show];
}

#pragma mark UIViewController methods
#pragma mark UIViewController

- (void)viewDidLoad
{
Expand All @@ -83,14 +85,14 @@ - (void)viewDidLoad
self.facebookLikeView.href = [NSURL URLWithString:@"http://www.yardsellr.com"];
self.facebookLikeView.layout = @"button_count";
self.facebookLikeView.showFaces = NO;

self.facebookLikeView.alpha = 0;
[self.facebookLikeView load];
}

- (void)viewDidUnload
{
[super viewDidUnload];

self.facebookLikeView = nil;
}

Expand Down

0 comments on commit 3ae32f3

Please sign in to comment.