23 self.title =
@"Google Calendar";
25 self.service = [[GTLRCalendarService alloc] init];
26 [[
self view] setBackgroundColor:[UIColor colorWithHue:0.32
31 CGRect totalFrame =
self.view.frame;
37 if ([[loginControl signedIn] boolValue]) {
41 CGRect listFilesButtonFrame = CGRectMake(totalFrame.size.width * 0.30,
42 totalFrame.size.height * 0.2,
43 totalFrame.size.width * 0.4,
44 totalFrame.size.height * 0.1);
46 self.listEventsButton = [[UIButton alloc] initWithFrame:listFilesButtonFrame];
47 [
self.listEventsButton setTitle:@"list events" forState:UIControlStateNormal];
48 [
self.listEventsButton addTarget:self action:@selector(fetchEvents) forControlEvents:UIControlEventTouchUpInside];
49 [
self.view addSubview:self.listEventsButton];
51 self.service = [calendarControl
service];
55 CGRect signInButtonFrame = CGRectMake(totalFrame.size.width * 0.45,
56 totalFrame.size.height * 0.1,
57 totalFrame.size.width * 0.1,
58 totalFrame.size.height * 0.05);
67 [
self.signInButton setFrame:signInButtonFrame];
68 _signInButton.layer.cornerRadius = 8;
69 _signInButton.layer.borderColor = [[UIColor blackColor] CGColor];
70 _signInButton.layer.borderWidth = 3.0;
71 _signInButton .clipsToBounds = YES;
72 [
self.view addSubview:self.signInButton];
id< GIDSignInDelegate > delegate
instancetype sharedInstance()
GTLRCalendarService * service
void signedIn:(GIDGoogleUser *user)
id< GIDSignInUIDelegate > uiDelegate
Singleton interface to both core and remote data sources.
void addCalendarListener:(id< Z5GoogleCalendarListener > ear)
GIDSignIn * sharedInstance()
void configureGoogleSignIn()
GIDGoogleUser * signedInUser