-
Notifications
You must be signed in to change notification settings - Fork 0
/
PAAddPrayerViewController.m
74 lines (61 loc) · 1.95 KB
/
PAAddPrayerViewController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// PAAddPrayerViewController.m
// prayApp
//
// Created by Jeff Wang on 12/16/13.
// Copyright (c) 2013 Jeff Wang. All rights reserved.
//
#import "PAAddPrayerViewController.h"
@interface PAAddPrayerViewController (){
UIButton* selectGroupButton;
PAGroupSelectionViewController* groupSelectionViewController;
}
@end
@implementation PAAddPrayerViewController
@synthesize prayerGroupList, groupButton;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
groupSelectionViewController = [[PAGroupSelectionViewController alloc] init];
groupSelectionViewController.prayerGroupList = prayerGroupList;
groupSelectionViewController.delegate = self;
// Update the prayer group button text.
if (prayerGroupList != nil && [prayerGroupList count] > 0){
[groupButton setTitle:[prayerGroupList objectAtIndex:0] forState:UIControlStateNormal];
}
}
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(IBAction)cancelButtonClicked:(id)sender{
[self.navigationController popViewControllerAnimated:YES];
}
-(IBAction)groupButtonClicked:(id)sender{
UINavigationController* navigationVC = [[UINavigationController alloc] initWithRootViewController:groupSelectionViewController];
[self presentViewController:navigationVC animated:YES completion:^{
;
}];
}
- (void)createPrayer:(UIBarButtonItem*)button{
}
#pragma Delegate function
- (void)groupSelectionDidCancel{
}
- (void)groupSelectionDidSelect:(NSString *)prayerGroup{
[groupButton setTitle:prayerGroup forState:UIControlStateNormal];
}
@end