From 4d19c16cb820d6a729c454bf89171564466533ef Mon Sep 17 00:00:00 2001 From: Miles Crabbe Date: Fri, 6 Jun 2014 14:42:34 -0500 Subject: [PATCH] -extremely basic about UP page implemented, NOT FINAL PRODUCT --- .../AboutUPViewController.h | 4 +- .../AboutUPViewController.m | 40 +++++++-- .../AboutUPViewController.xib | 89 ++++++++++++------- .../ContactUPViewController.xib | 4 + .../DirectoryTableViewCell.xib | 3 + 5 files changed, 102 insertions(+), 38 deletions(-) diff --git a/UniversityPrograms/UniversityPrograms/AboutUPViewController.h b/UniversityPrograms/UniversityPrograms/AboutUPViewController.h index 720798f..6e52bcb 100644 --- a/UniversityPrograms/UniversityPrograms/AboutUPViewController.h +++ b/UniversityPrograms/UniversityPrograms/AboutUPViewController.h @@ -9,7 +9,7 @@ #import #import "UPViewController.h" -@interface AboutUPViewController : UPViewController -@property (weak, nonatomic) IBOutlet UILabel *placeholderLabel; +@interface AboutUPViewController : UPViewController + @end diff --git a/UniversityPrograms/UniversityPrograms/AboutUPViewController.m b/UniversityPrograms/UniversityPrograms/AboutUPViewController.m index c152c66..77f799e 100644 --- a/UniversityPrograms/UniversityPrograms/AboutUPViewController.m +++ b/UniversityPrograms/UniversityPrograms/AboutUPViewController.m @@ -10,9 +10,9 @@ #import "UIColor+UPColors.h" @interface AboutUPViewController () -@property (weak, nonatomic) IBOutlet UIScrollView *mainScrollView; -@property (strong, nonatomic) IBOutlet UIView *bigView; - +@property (weak, nonatomic) IBOutlet UITableView *aboutTableView; +@property (strong, nonatomic) IBOutlet UITableViewCell *whatWeDo; +@property (strong, nonatomic) IBOutlet UITableViewCell *whoWeAre; @end @@ -34,8 +34,7 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.mainScrollView.contentSize=self.bigView.frame.size; - [self.view addSubview:self.bigView]; + //[self.view addSubview:self.scrollView]; @@ -48,4 +47,35 @@ - (void)didReceiveMemoryWarning // Dispose of any resources that can be recreated. } +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + + // Return the number of sections. + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + + // Return the number of rows in the section. + return 2; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + if(indexPath.row==0){ + + + UITableViewCell *cell = self.whatWeDo; + return cell; + } + else{ + UITableViewCell *cell = self.whoWeAre; + return cell; + } + +} +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + [self.aboutTableView reloadData]; +} @end diff --git a/UniversityPrograms/UniversityPrograms/AboutUPViewController.xib b/UniversityPrograms/UniversityPrograms/AboutUPViewController.xib index 0249339..a5c8005 100644 --- a/UniversityPrograms/UniversityPrograms/AboutUPViewController.xib +++ b/UniversityPrograms/UniversityPrograms/AboutUPViewController.xib @@ -6,9 +6,10 @@ - - - + + + + @@ -16,10 +17,16 @@ - - + + - + + + + + + + @@ -27,31 +34,51 @@ - - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/UniversityPrograms/UniversityPrograms/ContactUPViewController.xib b/UniversityPrograms/UniversityPrograms/ContactUPViewController.xib index 5fdc5be..5d739f7 100644 --- a/UniversityPrograms/UniversityPrograms/ContactUPViewController.xib +++ b/UniversityPrograms/UniversityPrograms/ContactUPViewController.xib @@ -45,6 +45,7 @@