diff --git a/samples/HelloFacebookSample/HelloFacebookSample/HFViewController.m b/samples/HelloFacebookSample/HelloFacebookSample/HFViewController.m index d9b9fe43ea..ffab6d1e99 100644 --- a/samples/HelloFacebookSample/HelloFacebookSample/HFViewController.m +++ b/samples/HelloFacebookSample/HelloFacebookSample/HFViewController.m @@ -63,6 +63,8 @@ - (void)viewDidLoad { loginview.delegate = self; [self.view addSubview:loginview]; + + [loginview sizeToFit]; } - (void)viewDidUnload { diff --git a/src/FBLoginView.h b/src/FBLoginView.h index e5992b4328..a121d83882 100644 --- a/src/FBLoginView.h +++ b/src/FBLoginView.h @@ -19,38 +19,12 @@ @protocol FBLoginViewDelegate; -/*! - @typedef FBLoginViewLoggedInDisplayStyle enum - - @abstract - Type used to specify the display style of the button. - - @discussion - */ -typedef enum { - /*! Small square profile image and facebook icon overlayed */ - FBLoginViewStyleSquareSmall = 0, - - /*! Large square profile image and facebook icon overlayed */ - FBLoginViewStyleSquareLarge = 1, - - /*! Facebook image and profile image side-by-side */ - FBLoginViewStyleHorizontal = 2, - -} FBLoginViewStyle; - /*! @class @abstract */ @interface FBLoginView : UIView -/*! - @abstract - The display style for the login view. - */ -@property (nonatomic) FBLoginViewStyle style; - /*! @abstract The permissions to login with. Defaults to nil, meaning basic permissions.@property (readwrite, copy) NSArray *permissions; diff --git a/src/FBLoginView.m b/src/FBLoginView.m index ccf645a9e1..047c4d529a 100644 --- a/src/FBLoginView.m +++ b/src/FBLoginView.m @@ -22,29 +22,14 @@ #import "FBGraphUser.h" #import "FBUtility.h" -struct FBLoginViewArrangement { - int width, height; - int iconExtent; - int iconX, iconY; - int profileExtent; - int profileX, profileY; - int questionMarkSize; - int textButtonWidth; - int textButtonHorizMargin; -}; +static NSString *const FBLoginViewCacheIdentity = @"FBLoginView"; +const int kButtonLabelX = 46; -struct FBLoginViewArrangement arrangements[] = { - {32, 32, 12, 0, 20, 32, 0, 0, 26, 80, 3}, - {48, 48, 16, 0, 32, 48, 0, 0, 32, 80, 3}, - {64, 32, 32, 32, 0, 32, 0, 0, 28, 80, 3}, -}; - -NSString *const FBLoginViewCacheIdentity = @"FBLoginView"; +CGSize g_imageSize; @interface FBLoginView() - (void)initialize; -- (void)arrangeViews:(int)arrangement; - (void)buttonPressed:(id)sender; - (void)configureViewForStateLoggedIn:(BOOL)isLoggedIn; - (void)wireViewForSession:(FBSession *)session; @@ -55,11 +40,8 @@ - (void)informDelegate:(BOOL)userOnly; - (void)handleActiveSessionSetNotifications:(NSNotification *)notification; - (void)handleActiveSessionUnsetNotifications:(NSNotification *)notification; -@property (retain, nonatomic) UIImageView *icon; -@property (retain, nonatomic) FBProfilePictureView *profilePicture; @property (retain, nonatomic) UILabel *label; -@property (retain, nonatomic) UIButton *profileButton; -@property (retain, nonatomic) UIButton *textButton; +@property (retain, nonatomic) UIButton *button; @property (retain, nonatomic) FBSession *session; @property (retain, nonatomic) FBRequestConnection *request; @property (retain, nonatomic) id user; @@ -68,17 +50,13 @@ - (void)handleActiveSessionUnsetNotifications:(NSNotification *)notification; @implementation FBLoginView -@synthesize style = _style, - delegate = _delegate, - icon = _icon, - profilePicture = _profilePicture, - label = _label, - profileButton = _profileButton, - textButton = _textButton, - session = _session, - request = _request, - user = _user, - permissions = _permissions; +@synthesize delegate = _delegate, + label = _label, + button = _button, + session = _session, + request = _request, + user = _user, + permissions = _permissions; - (id)init { return [self initWithPermissions:nil]; @@ -117,27 +95,16 @@ - (void)dealloc { // if we have an outstanding request, cancel [self.request cancel]; - self.request = nil; - self.icon = nil; - self.profilePicture = nil; - self.label = nil; - self.profileButton = nil; - self.textButton = nil; - self.session = nil; - self.user = nil; - self.permissions = nil; - + [_request release]; + [_label release]; + [_button release]; + [_session release]; + [_user release]; + [_permissions release]; + [super dealloc]; } -- (void)setStyle:(FBLoginViewStyle)style { - if (_style != style && style <= FBLoginViewStyleHorizontal) { - _style = style; - [self arrangeViews:_style]; - [self configureViewForStateLoggedIn:self.session.isOpen]; - } -} - - (void)setDelegate:(id)newValue { if (_delegate != newValue) { _delegate = newValue; @@ -153,10 +120,10 @@ - (void)setDelegate:(id)newValue { - (void)initialize { // the base class can cause virtual recursion, so // to handle this we make initialize idempotent - if (self.profileButton) { + if (self.button) { return; } - + // setup view self.autoresizesSubviews = YES; self.clipsToBounds = YES; @@ -176,51 +143,52 @@ - (void)initialize { selector:@selector(handleActiveSessionUnsetNotifications:) name:FBSessionDidUnsetActiveSessionNotification object:nil]; - + [self wireViewForSession:FBSession.activeSession]; - // setup icon view - self.icon = [[[UIImageView alloc] - initWithImage:[UIImage imageNamed:@"FacebookSDKResources.bundle/FBLoginView/images/f_logo.png"]] - autorelease]; + // setup button + self.button = [UIButton buttonWithType:UIButtonTypeCustom]; + [self.button addTarget:self + action:@selector(buttonPressed:) + forControlEvents:UIControlEventTouchUpInside]; + self.button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentFill; + self.button.autoresizingMask = UIViewAutoresizingFlexibleWidth; + + UIImage *image = [[UIImage imageNamed:@"FacebookSDKResources.bundle/FBLoginView/images/login-button-small.png"] + stretchableImageWithLeftCapWidth:kButtonLabelX topCapHeight:0]; + g_imageSize = image.size; + [self.button setBackgroundImage:image forState:UIControlStateNormal]; + + image = [[UIImage imageNamed:@"FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed.png"] + stretchableImageWithLeftCapWidth:kButtonLabelX topCapHeight:0]; + [self.button setBackgroundImage:image forState:UIControlStateHighlighted]; - // setup profile picture - self.profilePicture = [[[FBProfilePictureView alloc] initWithProfileID:nil - pictureCropping:FBProfilePictureCroppingSquare] - autorelease]; + [self addSubview:self.button]; - // setup profile picture + // add a label that will appear over the button self.label = [[[UILabel alloc] init] autorelease]; - self.label.text = @"?"; - self.label.backgroundColor = [UIColor clearColor]; - self.label.textColor = [UIColor colorWithRed:59.0/255 // make the ? facebook blue - green:89.0/255 - blue:152.0/255 - alpha:1]; + self.label.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.label.textAlignment = UITextAlignmentCenter; + self.label.backgroundColor = [UIColor clearColor]; + self.label.font = [UIFont boldSystemFontOfSize:16.0]; + self.label.textColor = [UIColor whiteColor]; + self.label.shadowColor = [UIColor blackColor]; + self.label.shadowOffset = CGSizeMake(0.0, -1.0); + [self addSubview:self.label]; - // setup profile button - self.profileButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.profileButton setBackgroundImage:[UIImage imageNamed:@"FacebookSDKResources.bundle/FBLoginView/images/bluetint.png"] - forState:UIControlStateHighlighted]; - [self.profileButton addTarget:self - action:@selector(buttonPressed:) - forControlEvents:UIControlEventTouchUpInside]; + // We force our height to be the same as the image, but we will let someone make us wider + // than the default image. + CGFloat width = MAX(self.frame.size.width, g_imageSize.width); + CGRect frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, + width, image.size.height); + self.frame = frame; - // setup text button - self.textButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - [self.textButton addTarget:self - action:@selector(buttonPressed:) - forControlEvents:UIControlEventTouchUpInside]; + CGRect buttonFrame = CGRectMake(0, 0, width, image.size.height); + self.button.frame = buttonFrame; - [self arrangeViews:0]; + self.label.frame = CGRectMake(kButtonLabelX, 0, width - kButtonLabelX, image.size.height); - // adding the views that we need - [self addSubview:self.profilePicture]; - [self addSubview:self.icon]; - [self addSubview:self.label]; - [self addSubview:self.profileButton]; - [self addSubview:self.textButton]; + self.backgroundColor = [UIColor clearColor]; if (self.session.isOpen) { [self fetchMeInfo]; @@ -230,50 +198,31 @@ - (void)initialize { } } -- (void)arrangeViews:(int)arrangement { - struct FBLoginViewArrangement a = arrangements[arrangement]; +- (CGSize)sizeThatFits:(CGSize)size { + CGSize logInSize = [[self logInText] sizeWithFont:self.label.font]; + CGSize logOutSize = [[self logOutText] sizeWithFont:self.label.font]; - self.frame = CGRectMake(0, 0, a.width + a.textButtonWidth + a.textButtonHorizMargin, a.height); - self.profileButton.frame = CGRectMake(0, 0, a.width, a.height); + // Leave at least a small margin around the label. + CGFloat desiredWidth = kButtonLabelX + 20 + MAX(logInSize.width, logOutSize.width); + // Never get smaller than the image + CGFloat width = MAX(desiredWidth, g_imageSize.width); + + return CGSizeMake(width, g_imageSize.height); +} + +- (NSString *)logInText { + return [FBUtility localizedStringForKey:@"FBLV:LogInButton" withDefault:@"Log In"]; +} - self.icon.frame = CGRectMake(a.iconX, a.iconY, a.iconExtent, a.iconExtent); - self.profilePicture.frame = CGRectMake(a.profileX, a.profileY, a.profileExtent, a.profileExtent); - self.label.frame = self.profilePicture.frame; - self.label.font = [UIFont systemFontOfSize:a.questionMarkSize]; - self.textButton.frame = CGRectMake(a.width + a.textButtonHorizMargin, 0, a.textButtonWidth, a.height); +- (NSString *)logOutText { + return [FBUtility localizedStringForKey:@"FBLV:LogOutButton" withDefault:@"Log Out"]; } - (void)configureViewForStateLoggedIn:(BOOL)isLoggedIn { if (isLoggedIn) { - // removing the views that we don't need - [self.label removeFromSuperview]; - [self.icon removeFromSuperview]; - [self.textButton setTitle:[FBUtility localizedStringForKey:@"FBLV:LogOutButton" - withDefault:@"Log Out"] - forState:UIControlStateNormal]; - - // adjust profile view - struct FBLoginViewArrangement a = arrangements[self.style]; - self.profilePicture.center = CGPointMake(a.width / 2, a.height / 2); + self.label.text = [self logOutText]; } else { - // adding the views that we need - [self insertSubview:self.icon - belowSubview:self.profileButton]; - [self insertSubview:self.label - belowSubview:self.profileButton]; - - [self.textButton setTitle:[FBUtility localizedStringForKey:@"FBLV:LogInButton" - withDefault:@"Log In"] - forState:UIControlStateNormal]; - - // adjust profile view - struct FBLoginViewArrangement a = arrangements[self.style]; - self.profilePicture.frame = CGRectMake(a.profileX, - a.profileY, - a.profileExtent, - a.profileExtent); - - self.profilePicture.profileID = nil; + self.label.text = [self logInText]; self.user = nil; } } @@ -285,18 +234,16 @@ - (void)fetchMeInfo { [self.request addRequest:request completionHandler:^(FBRequestConnection *connection, NSMutableDictionary *result, NSError *error) { if (result) { - self.profilePicture.profileID = [result objectForKey:@"id"]; self.user = result; [self informDelegate:YES]; } else { - self.profilePicture.profileID = nil; self.user = nil; } self.request = nil; }]; [self.request startWithCacheIdentity:FBLoginViewCacheIdentity skipRoundtripIfCached:YES]; - + } - (void)informDelegate:(BOOL)userOnly { @@ -350,7 +297,7 @@ - (void)unwireViewForSession { // to the session object at all [self.session removeObserver:self forKeyPath:@"state"]; - self.session = nil; + self.session = nil; } - (void)observeValueForKeyPath:(NSString *)keyPath diff --git a/src/FBUserSettingsViewController.m b/src/FBUserSettingsViewController.m index 72b600e87b..fa201735a8 100644 --- a/src/FBUserSettingsViewController.m +++ b/src/FBUserSettingsViewController.m @@ -25,6 +25,7 @@ @interface FBUserSettingsViewController () @property (nonatomic, retain) FBProfilePictureView *profilePicture; +@property (nonatomic, retain) UIImageView *backgroundImageView; @property (nonatomic, retain) UILabel *connectedStateLabel; @property (nonatomic, retain) id me; @property (nonatomic, retain) UIButton *loginLogoutButton; @@ -36,6 +37,7 @@ - (void)sessionStateChanged:(FBSession *)session error:(NSError *)error; - (void)openSession; - (void)updateControls; +- (void)updateBackgroundImage; @end @@ -47,6 +49,7 @@ @implementation FBUserSettingsViewController @synthesize loginLogoutButton = _loginLogoutButton; @synthesize permissions = _permissions; @synthesize attemptingLogin = _attemptingLogin; +@synthesize backgroundImageView = _backgroundImageView; #pragma mark View controller lifecycle @@ -76,6 +79,7 @@ - (void)dealloc { [_me release]; [_loginLogoutButton release]; [_permissions release]; + [_backgroundImageView release]; } #pragma mark View lifecycle @@ -88,70 +92,85 @@ - (void)viewDidLoad { self.doneButton = nil; } - UIColor *facebookBlue = [UIColor colorWithRed:(59.0 / 255.0) - green:(89.0 / 255.0) - blue:(152.0 / 255.0) - alpha:1.0]; - - self.view.backgroundColor = facebookBlue; - - // TODO autoresizing, constants for margins, etc. const CGFloat kSideMargin = 20.0; - const CGFloat kInternalMarginX = 20.0; const CGFloat kInternalMarginY = 20.0; CGRect usableBounds = self.canvasView.bounds; + + self.backgroundImageView = [[[UIImageView alloc] init] autorelease]; + self.backgroundImageView.frame = usableBounds; + self.backgroundImageView.userInteractionEnabled = NO; + self.backgroundImageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + [self.canvasView addSubview:self.backgroundImageView]; + [self updateBackgroundImage]; + + UIImageView *logo = [[[UIImageView alloc] + initWithImage:[UIImage imageNamed:@"FacebookSDKResources.bundle/FBLoginView/images/facebook.png"]] autorelease]; + CGPoint center = CGPointMake(CGRectGetMidX(usableBounds), 60); + logo.center = center; + logo.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + [self.canvasView addSubview:logo]; // We want the profile picture control and label to be grouped together when autoresized, // so we put them in a subview. UIView *containerView = [[[UIView alloc] init] autorelease]; - containerView.frame = CGRectMake(kSideMargin, - 80, - usableBounds.size.width - kSideMargin * 2, - 64); - [containerView setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin]; + containerView.frame = CGRectMake(0, + logo.frame.origin.y * 2 + logo.frame.size.height, + usableBounds.size.width, + 110); + containerView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; // Add profile picture control self.profilePicture = [[[FBProfilePictureView alloc] initWithProfileID:nil pictureCropping:FBProfilePictureCroppingSquare] autorelease]; - self.profilePicture.frame = CGRectMake(0, 0, 64, 64); + self.profilePicture.frame = CGRectMake(containerView.frame.size.width / 2 - 32, 0, 64, 64); [containerView addSubview:self.profilePicture]; // Add connected state/name control self.connectedStateLabel = [[[UILabel alloc] init] autorelease]; - self.connectedStateLabel.frame = CGRectMake(64 + kInternalMarginX, - 0, - containerView.frame.size.width - 64 - kInternalMarginX, - 64); - self.connectedStateLabel.backgroundColor = facebookBlue; - self.connectedStateLabel.textColor = [UIColor whiteColor]; + self.connectedStateLabel.frame = CGRectMake(0, + self.profilePicture.frame.size.height + 16.0, + containerView.frame.size.width, + 20); + self.connectedStateLabel.backgroundColor = [UIColor clearColor]; self.connectedStateLabel.textAlignment = UITextAlignmentCenter; self.connectedStateLabel.numberOfLines = 0; - // TODO font + self.connectedStateLabel.font = [UIFont boldSystemFontOfSize:16.0]; + self.connectedStateLabel.shadowColor = [UIColor blackColor]; + self.connectedStateLabel.shadowOffset = CGSizeMake(0.0, -1.0); [containerView addSubview:self.connectedStateLabel]; [self.canvasView addSubview:containerView]; // Add the login/logout button - self.loginLogoutButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - self.loginLogoutButton.frame = CGRectMake(kSideMargin, - CGRectGetMaxY(containerView.frame) + kInternalMarginY, - CGRectGetWidth(usableBounds) - 2 * kSideMargin, - 32); + self.loginLogoutButton = [UIButton buttonWithType:UIButtonTypeCustom]; + UIImage *image = [UIImage imageNamed:@"FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-normal.png"]; + [self.loginLogoutButton setBackgroundImage:image forState:UIControlStateNormal]; + image = [UIImage imageNamed:@"FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-pressed.png"]; + [self.loginLogoutButton setBackgroundImage:image forState:UIControlStateHighlighted]; + self.loginLogoutButton.frame = CGRectMake((int)((usableBounds.size.width - image.size.width) / 2), + CGRectGetMaxY(containerView.frame) + kInternalMarginY * 2, + image.size.width, + image.size.height); [self.loginLogoutButton addTarget:self action:@selector(loginLogoutButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; - [self.loginLogoutButton setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin]; + self.loginLogoutButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + UIColor *loginTitleColor = [UIColor colorWithRed:75.0 / 255.0 + green:81.0 / 255.0 + blue:100.0 / 255.0 + alpha:1.0]; + [self.loginLogoutButton setTitleColor:loginTitleColor forState:UIControlStateNormal]; + self.loginLogoutButton.titleLabel.font = [UIFont boldSystemFontOfSize:18.0]; + + UIColor *loginShadowColor = [UIColor colorWithRed:212.0 / 255.0 + green:218.0 / 255.0 + blue:225.0 / 255.0 + alpha:1.0]; + [self.loginLogoutButton setTitleShadowColor:loginShadowColor forState:UIControlStateNormal]; + self.loginLogoutButton.titleLabel.shadowOffset = CGSizeMake(0.0, 1.0); [self.canvasView addSubview:self.loginLogoutButton]; - /* TODO figure out where, if anywhere, to put the logo - UIImageView *logo = [[UIImageView alloc] - initWithImage:[UIImage imageNamed:@"FacebookSDKResources.bundle/FBLoginView/images/f_logo.png"]]; // TODO autorelease - logo.frame = CGRectMake(bounds.size.width - 64 - 10, 10 + yOffset, 64, 64); - - [self.view addSubview:logo]; - */ - // We need to know when the active session changes state. // We use the same handler for both, because we don't actually care about distinguishing between them. [[NSNotificationCenter defaultCenter] addObserver:self @@ -166,14 +185,25 @@ - (void)viewDidLoad { [self updateControls]; } +- (void)updateBackgroundImage { + NSString *orientation = UIInterfaceOrientationIsPortrait(self.interfaceOrientation) ? @"Portrait" : @"Landscape"; + NSString *idiom = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) ? @"IPhone" : @"IPad"; + NSString *imagePath = [NSString stringWithFormat:@"FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackground%@%@.jpg", idiom, orientation]; + self.backgroundImageView.image = [UIImage imageNamed:imagePath]; +} + - (void)viewDidUnload { [super viewDidUnload]; [[NSNotificationCenter defaultCenter] removeObserver:self]; } +- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { + [self updateBackgroundImage]; +} + - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return YES; + return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) || UIInterfaceOrientationIsPortrait(interfaceOrientation); } - (void)viewWillAppear:(BOOL)animated { @@ -187,11 +217,20 @@ - (void)updateControls { withDefault:@"Log Out"]; [self.loginLogoutButton setTitle:loginLogoutText forState:UIControlStateNormal]; + // Label should be white with a shadow + self.connectedStateLabel.textColor = [UIColor whiteColor]; + self.connectedStateLabel.shadowColor = [UIColor blackColor]; + + // Move the label back below the profile view and show the profile view + self.connectedStateLabel.frame = CGRectMake(0, + self.profilePicture.frame.size.height + 16.0, + self.connectedStateLabel.frame.size.width, + 20); + self.profilePicture.hidden = NO; + // Do we know the user's name? If not, request it. if (self.me != nil) { - NSString *format = [FBUtility localizedStringForKey:@"FBUSVC:LogInAs" - withDefault:@"Logged in as: %@"]; - self.connectedStateLabel.text = [NSString stringWithFormat:format, self.me.name]; + self.connectedStateLabel.text = self.me.name; self.profilePicture.profileID = [self.me objectForKey:@"id"]; } else { self.connectedStateLabel.text = [FBUtility localizedStringForKey:@"FBUSVC:LoggedIn" @@ -207,11 +246,24 @@ - (void)updateControls { } } else { self.me = nil; - self.connectedStateLabel.text = [FBUtility localizedStringForKey:@"FBUSVC:NotConnectedToFacebook" - withDefault:@"Not connected to Facebook"]; + + // Label should be gray and centered in its superview; hide the profile view + self.connectedStateLabel.textColor = [UIColor colorWithRed:166.0 / 255.0 + green:174.0 / 255.0 + blue:215.0 / 255.0 + alpha:1.0]; + self.connectedStateLabel.shadowColor = nil; + + CGRect parentBounds = self.connectedStateLabel.superview.bounds; + self.connectedStateLabel.center = CGPointMake(CGRectGetMidX(parentBounds), + CGRectGetMidY(parentBounds)); + self.profilePicture.hidden = YES; + + self.connectedStateLabel.text = [FBUtility localizedStringForKey:@"FBUSVC:NotLoggedIn" + withDefault:@"Not logged in"]; self.profilePicture.profileID = nil; - NSString *loginLogoutText = [FBUtility localizedStringForKey:@"FBUSVC:Connect" - withDefault:@"Connect"]; + NSString *loginLogoutText = [FBUtility localizedStringForKey:@"FBUSVC:LogIn" + withDefault:@"Log In..."]; [self.loginLogoutButton setTitle:loginLogoutText forState:UIControlStateNormal]; } } diff --git a/src/FacebookSDKResources.bundle/FBLoginView/images/facebook.png b/src/FacebookSDKResources.bundle/FBLoginView/images/facebook.png new file mode 100755 index 0000000000..daf8097b14 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBLoginView/images/facebook.png differ diff --git a/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed.png b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed.png new file mode 100644 index 0000000000..31c69fe57a Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed.png differ diff --git a/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed@2x.png b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed@2x.png new file mode 100644 index 0000000000..bd26965923 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small-pressed@2x.png differ diff --git a/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small.png b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small.png new file mode 100644 index 0000000000..22aa4fad60 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small.png differ diff --git a/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small@2x.png b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small@2x.png new file mode 100644 index 0000000000..857c489bf4 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBLoginView/images/login-button-small@2x.png differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadLandscape.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadLandscape.jpg new file mode 100644 index 0000000000..07e75dd076 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadLandscape.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadLandscape@2x.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadLandscape@2x.jpg new file mode 100644 index 0000000000..399e3f5c9f Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadLandscape@2x.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadPortrait.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadPortrait.jpg new file mode 100644 index 0000000000..523ac67a92 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadPortrait.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadPortrait@2x.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadPortrait@2x.jpg new file mode 100644 index 0000000000..45a8cc2b40 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPadPortrait@2x.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhoneLandscape.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhoneLandscape.jpg new file mode 100644 index 0000000000..32e7754c8b Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhoneLandscape.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhoneLandscape@2x.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhoneLandscape@2x.jpg new file mode 100644 index 0000000000..acabb5e339 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhoneLandscape@2x.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhonePortrait.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhonePortrait.jpg new file mode 100644 index 0000000000..1fba77f3f7 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhonePortrait.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhonePortrait@2x.jpg b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhonePortrait@2x.jpg new file mode 100644 index 0000000000..fe1d11aeac Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/loginBackgroundIPhonePortrait@2x.jpg differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-normal.png b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-normal.png new file mode 100644 index 0000000000..892419f355 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-normal.png differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-normal@2x.png b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-normal@2x.png new file mode 100644 index 0000000000..daa4ba694c Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-normal@2x.png differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-pressed.png b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-pressed.png new file mode 100644 index 0000000000..3f862c850b Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-pressed.png differ diff --git a/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-pressed@2x.png b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-pressed@2x.png new file mode 100644 index 0000000000..7866e3da72 Binary files /dev/null and b/src/FacebookSDKResources.bundle/FBUserSettingsView/images/silver-button-pressed@2x.png differ