52 if (nil==[loginControl username]) {
54 NSLog(
@"V7GoogleLoginControlbar.appear: not logged in");
57 NSLog(
@"V7GoogleLoginControlbar.appear: user: %@",
58 [loginControl username]);
61 [
self setBackgroundColor:[UIColor greenColor]];
63 float submitButtonWidth = 132;
64 float submitButtonHeight = 32;
65 CGRect logOutFrame = CGRectMake(bound.size.width - (submitButtonWidth+ 20.0), 2.0, submitButtonWidth, submitButtonHeight);
66 CGRect forwardButtonFrame = CGRectMake(bound.size.width - 76, 4, 48, 48);
67 _forwardButton = [[UIButton alloc] initWithFrame: forwardButtonFrame];
68 [_forwardButton addTarget:self action:@selector(createEntryOnDrive) forControlEvents:UIControlEventTouchUpInside];
69 UIImage *forwardButtonImage = [UIImage imageNamed:@"forwardButton.png"];
70 [_forwardButton setImage:forwardButtonImage forState:UIControlStateNormal];
71 [
self addSubview:_forwardButton];
75 CGRect loginInfoLabelFrame = CGRectMake(2.0, 2.0, bound.size.width/2,
loginInfoViewHeight - 4.0);
77 loginInfoLabel = [[UILabel alloc] initWithFrame:loginInfoLabelFrame];
78 [loginInfoLabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:16.0]];
80 [loginInfoLabel postAttributedText:loginName];
81 [loginInfoLabel setTextAlignment:NSTextAlignmentCenter];
83 [loginInfoLabel.layer setBorderColor: [[UIColor blackColor] CGColor]];
84 [loginInfoLabel.layer setBorderWidth: 2.0];
87 [
self addSubview:loginInfoLabel];
89 [
self setBackgroundColor:[UIColor cyanColor]];
91 CGRect signInButtonFrame = CGRectMake(bound.size.width/2 + 2,
93 bound.size.width/2 - 4,
101 signIn.
uiDelegate = (id<GIDSignInUIDelegate>)
self;
105 [_signInButton setFrame:signInButtonFrame];
106 _signInButton.layer.cornerRadius = 8;
107 _signInButton.layer.borderColor = [[UIColor blackColor] CGColor];
108 _signInButton.layer.borderWidth = 3.0;
109 _signInButton .clipsToBounds = YES;
110 [
self addSubview:_signInButton];
id< GIDSignInDelegate > delegate
void addLoginListener:(id< Z5GoogleLoginListener > ear)
instancetype sharedInstance()
float loginInfoViewHeight
id< GIDSignInUIDelegate > uiDelegate
GIDProfileData * getLoggedInProfile()
Singleton interface to both core and remote data sources.
GIDSignIn * sharedInstance()
void configureGoogleSignIn()