From e7d3dc8cc40175863b5393b5d25985e79969285a Mon Sep 17 00:00:00 2001 From: yufuchenArya Date: Fri, 12 Sep 2014 21:21:54 -0700 Subject: [PATCH 1/7] push --- AppConstants/MCAConstant.h | 6 + AppCoreData/MCADBIntraction.h | 6 + AppCoreData/MCADBIntraction.m | 58 ++++++ AppCoreData/MobileCollegeAdmin.sqlite | Bin 196608 -> 262144 bytes AppModel/MCAResourcesCatDHolder.h | 18 ++ AppModel/MCAResourcesCatDHolder.m | 14 ++ AppModel/MCAResourcesDHolder.h | 18 ++ AppModel/MCAResourcesDHolder.m | 13 ++ AppRestIntraction/MCARestIntraction.h | 4 + AppRestIntraction/MCARestIntraction.m | 126 +++++++++++- AppUI/AppController/tabBar/MCADetailTblCell.h | 16 ++ AppUI/AppController/tabBar/MCADetailTblCell.m | 50 +++++ .../MCAResourcesCategoryViewController.h | 19 ++ .../MCAResourcesCategoryViewController.m | 160 +++++++++++++++ .../tabBar/MCAResourcesDetailViewController.h | 19 ++ .../tabBar/MCAResourcesDetailViewController.m | 91 +++++++++ .../tabBar/MCAResourcesViewController.h | 21 ++ .../tabBar/MCAResourcesViewController.m | 147 ++++++++++++++ .../camera-1.imageset/Contents.json | 18 ++ Images.xcassets/camera-1.imageset/camera.png | Bin 0 -> 3914 bytes .../camera-1.imageset/camera@2x.png | Bin 0 -> 2056 bytes Main_Iphone.storyboard | 184 ++++++++++++++++-- MobileCollegeAdmin.xcodeproj/project.pbxproj | 46 ++++- .../MobileCollegeAdmin.xccheckout | 14 +- 24 files changed, 1021 insertions(+), 27 deletions(-) create mode 100644 AppModel/MCAResourcesCatDHolder.h create mode 100644 AppModel/MCAResourcesCatDHolder.m create mode 100644 AppModel/MCAResourcesDHolder.h create mode 100644 AppModel/MCAResourcesDHolder.m create mode 100644 AppUI/AppController/tabBar/MCADetailTblCell.h create mode 100644 AppUI/AppController/tabBar/MCADetailTblCell.m create mode 100644 AppUI/AppController/tabBar/MCAResourcesCategoryViewController.h create mode 100644 AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m create mode 100644 AppUI/AppController/tabBar/MCAResourcesDetailViewController.h create mode 100644 AppUI/AppController/tabBar/MCAResourcesDetailViewController.m create mode 100644 AppUI/AppController/tabBar/MCAResourcesViewController.h create mode 100644 AppUI/AppController/tabBar/MCAResourcesViewController.m create mode 100644 Images.xcassets/camera-1.imageset/Contents.json create mode 100644 Images.xcassets/camera-1.imageset/camera.png create mode 100644 Images.xcassets/camera-1.imageset/camera@2x.png diff --git a/AppConstants/MCAConstant.h b/AppConstants/MCAConstant.h index dbf6988..eea9ae8 100644 --- a/AppConstants/MCAConstant.h +++ b/AppConstants/MCAConstant.h @@ -84,9 +84,15 @@ #define NOTIFICATION_NOTES_CATEGORY_SUCCESS @"notificationNotesCategorySuccess" #define NOTIFICATION_NOTES_CATEGORY_FAILED @"notificationNotesCategoryFailed" +#define NOTIFICATION_RESOURCE_CATEGORY_SUCCESS @"notificationResourceCategorySuccess" +#define NOTIFICATION_RESOURCE_CATEGORY_FAILED @"notificationResourceCategoryFailed" + #define NOTIFICATION_NOTES_SUCCESS @"notificationNotesSuccess" #define NOTIFICATION_NOTES_FAILED @"notificationNotesFailed" +#define NOTIFICATION_RESOURCE_SUCCESS @"notificationResourcesSuccess" +#define NOTIFICATION_RESOURCE_FAILED @"notificationResourcesFailed" + #define NOTIFICATION_USER_PROFILE_EDIT_SUCCESS @"notificationUserProfileEditSuccess" #define NOTIFICATION_USER_PROFILE_EDIT_FAILED @"notificationUserProfileEditFailed" diff --git a/AppCoreData/MCADBIntraction.h b/AppCoreData/MCADBIntraction.h index 71271ed..4429b1e 100644 --- a/AppCoreData/MCADBIntraction.h +++ b/AppCoreData/MCADBIntraction.h @@ -32,4 +32,10 @@ -(void)insertNotesCatList:(NSMutableArray*)arr_notesCatList; -(NSMutableArray*)retrieveNotesCatList:(id)sender; + +#pragma mark - RESOURCE_QUERY +-(void)insertResourceCatList:(NSMutableArray*)arr_resourceList; +-(NSMutableArray*)retrieveResourceCatList:(id)sender; + + @end diff --git a/AppCoreData/MCADBIntraction.m b/AppCoreData/MCADBIntraction.m index fec48f0..fce4977 100644 --- a/AppCoreData/MCADBIntraction.m +++ b/AppCoreData/MCADBIntraction.m @@ -430,4 +430,62 @@ -(NSMutableArray*)retrieveNotesCatList:(id)sender{ return arr_dbNotesCatList; } +#pragma mark - RESOURCE_CATEGORY QUERY +-(void)insertResourceCatList:(NSMutableArray*)arr_resourceList{ + + for (int i=0; i?}E#=yY90mLvMJ5k42T8u&W84GXqeFpZ*`wVsBbw4Zb*Xq|^s)?-m zw6QU+a$*4c;`^0MEVbGURTCS_>Kny)*u_;<85{FU5|eULOOkTpi&Bg8ON)|G*zC?h zu8twD3L%b8KCTK%$jX!yG?a=`ofAtuU6d5U9D|%a9D@`Bf;@d4gCZ5YT_Y6~{QN@{ z{6c+v6m%4zDsvOlQ^ATAK&oNFeu=pdQIMdfIWL>Ix9a2@wKCE$7sVSQTg*`>%)rvD zU)!!<%eY;?mg!>C6h;;{#`+};^-Dlr-8jL9EiH6BmO5d^fQ^kljLrJB?fSKh+x2UiE;a!Gowpg# diff --git a/AppModel/MCAResourcesCatDHolder.h b/AppModel/MCAResourcesCatDHolder.h new file mode 100644 index 0000000..2961d9b --- /dev/null +++ b/AppModel/MCAResourcesCatDHolder.h @@ -0,0 +1,18 @@ +// +// MCAResourcesCatDHolder.h +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import + +@interface MCAResourcesCatDHolder : NSObject{ + +} +@property(nonatomic,strong)NSString *str_resourcesCatId; +@property(nonatomic,strong)NSString *str_resourcesCatImage; +@property(nonatomic,strong)NSString *str_resourcesCatName; + +@end diff --git a/AppModel/MCAResourcesCatDHolder.m b/AppModel/MCAResourcesCatDHolder.m new file mode 100644 index 0000000..5ec1cd7 --- /dev/null +++ b/AppModel/MCAResourcesCatDHolder.m @@ -0,0 +1,14 @@ +// +// MCAResourcesCatDHolder.m +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourcesCatDHolder.h" + +@implementation MCAResourcesCatDHolder +@synthesize str_resourcesCatId,str_resourcesCatImage,str_resourcesCatName; + +@end diff --git a/AppModel/MCAResourcesDHolder.h b/AppModel/MCAResourcesDHolder.h new file mode 100644 index 0000000..52c9e94 --- /dev/null +++ b/AppModel/MCAResourcesDHolder.h @@ -0,0 +1,18 @@ +// +// MCAResourcesDHolder.h +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import + +@interface MCAResourcesDHolder : NSObject{ + +} +@property(nonatomic,strong)NSString *str_resourcesDataId; +@property(nonatomic,strong)NSString *str_book_name; +@property(nonatomic,strong)NSString *str_url; + +@end diff --git a/AppModel/MCAResourcesDHolder.m b/AppModel/MCAResourcesDHolder.m new file mode 100644 index 0000000..ec1ec01 --- /dev/null +++ b/AppModel/MCAResourcesDHolder.m @@ -0,0 +1,13 @@ +// +// MCAResourcesDHolder.m +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourcesDHolder.h" + +@implementation MCAResourcesDHolder +@synthesize str_book_name, str_resourcesDataId, str_url; +@end diff --git a/AppRestIntraction/MCARestIntraction.h b/AppRestIntraction/MCARestIntraction.h index d55e6a0..2e269a7 100644 --- a/AppRestIntraction/MCARestIntraction.h +++ b/AppRestIntraction/MCARestIntraction.h @@ -10,6 +10,8 @@ #import "JSON.h" #import "MCALoginDHolder.h" #import "MCANotesDHolder.h" +#import "MCAResourcesDHolder.h" +#import "MCAResourcesCatDHolder.h" #import "MCASignUpDHolder.h" #import "MCANotesCatDHolder.h" #import "ASIFormDataRequest.h" @@ -35,7 +37,9 @@ MCARestIntraction *restIntraction; -(void)requestForDeleteOrCompleteTask:(NSString*)info :(NSString*)controller; -(void)requestForAddTask:(NSString*)info; -(void)requestForNotesCategory:(NSString*)info; +-(void)requestForResourcesCategory:(NSString*)info; -(void)requestForNotes:(NSString*)info; +-(void)requestForResources:(NSString*)info; -(void)requestForUserProfileEdit:(NSString *)info; -(void)requestForChangePwd:(NSString *)info; diff --git a/AppRestIntraction/MCARestIntraction.m b/AppRestIntraction/MCARestIntraction.m index 8b48a19..2d4e03f 100644 --- a/AppRestIntraction/MCARestIntraction.m +++ b/AppRestIntraction/MCARestIntraction.m @@ -657,7 +657,7 @@ -(void)requestNotesCategorySuccess:(ASIFormDataRequest*)request{ SBJSON *parser=[[SBJSON alloc]init]; NSDictionary *results = [parser objectWithString:responseString error:nil]; - NSMutableDictionary *responseDict = ((NSMutableDictionary *)[results objectForKey:@"data"]); +// NSMutableDictionary *responseDict = ((NSMutableDictionary *)[results objectForKey:@"data"]); NSMutableArray *arr_notesCategory = (NSMutableArray*)[results objectForKey:@"data"]; NSString *status_code = [results valueForKey:@"status_code"]; @@ -774,6 +774,130 @@ -(void)requestNotesSuccess:(ASIFormDataRequest*)request{ } } +#pragma mark resources catrgory + + +-(void)requestForResourcesCategory:(NSString*)info{ + NSURL *url = [NSURL URLWithString:URL_MAIN]; + ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url]; + + [request setPostValue:info forKey:@"data"]; + + [request setDelegate:self]; + [request setDidFailSelector:@selector(requestResourceCategoryFail:)]; + [request setDidFinishSelector:@selector(requestResourceCategorySuccess:)]; + [request startAsynchronous]; + +} + +-(void)requestResourceCategoryFail:(ASIFormDataRequest*)request{ + + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_CATEGORY_FAILED object:@"Unable to get category at this movement."]; + }); +} +-(void)requestResourceCategorySuccess:(ASIFormDataRequest*)request{ + + NSString *responseString = [request responseString]; + responseString = [[responseString componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]] componentsJoinedByString:@""]; + responseString = [responseString stringByReplacingOccurrencesOfString:@"\t" withString:@""]; + SBJSON *parser=[[SBJSON alloc]init]; + + NSDictionary *results = [parser objectWithString:responseString error:nil]; +// NSMutableDictionary *responseDict = ((NSMutableDictionary *)[results objectForKey:@"data"]); + NSMutableArray *arr_resourceCategory = (NSMutableArray*)[results objectForKey:@"data"]; + NSString *status_code = [results valueForKey:@"status_code"]; + + if ([status_code isEqualToString:@"S1001"]) + { + NSMutableArray *arr_resourcesCategoryList = [NSMutableArray new]; + + for (int i = 0; i < arr_resourceCategory.count; i++) { + + MCAResourcesCatDHolder *resourceDHolder = [MCAResourcesCatDHolder new]; + resourceDHolder.str_resourcesCatId = [[arr_resourceCategory valueForKey:@"resource_id"] objectAtIndex:i]; + resourceDHolder.str_resourcesCatName = [[arr_resourceCategory valueForKey:@"resource_name"] objectAtIndex:i]; + resourceDHolder.str_resourcesCatImage = [[arr_resourceCategory valueForKey:@"resource_cat_image"] objectAtIndex:i]; + [arr_resourcesCategoryList addObject:resourceDHolder]; + } + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_CATEGORY_SUCCESS object:arr_resourcesCategoryList]; + }); + } + else{ + + NSString *errMsg = [results valueForKey:@"msg"]; + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_CATEGORY_FAILED object:errMsg]; + }); + } +} + +#pragma mark - RESOURCES + +-(void)requestForResources:(NSString *)info{ + + NSURL *url = [NSURL URLWithString:URL_MAIN]; + ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url]; + + [request setPostValue:info forKey:@"data"]; + + [request setDelegate:self]; + [request setDidFailSelector:@selector(requestResourcesFail:)]; + [request setDidFinishSelector:@selector(requestResourcesSuccess:)]; + [request startAsynchronous]; +} +-(void)requestResourcesFail:(ASIFormDataRequest*)request{ + + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_FAILED object:@"Unable to get resource at this movement."]; + }); +} +-(void)requestResourcesSuccess:(ASIFormDataRequest*)request{ + + NSString *responseString = [request responseString]; + responseString = [[responseString componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]] componentsJoinedByString:@""]; + responseString = [responseString stringByReplacingOccurrencesOfString:@"\t" withString:@""]; + SBJSON *parser=[[SBJSON alloc]init]; + + NSDictionary *results = [parser objectWithString:responseString error:nil]; + //NSMutableDictionary *responseDict = ((NSMutableDictionary *)[results objectForKey:@"data"]); + + NSMutableArray *arr_resources = (NSMutableArray*)[results objectForKey:@"data"]; + NSString *status_code = [results valueForKey:@"status_code"]; + + if ([status_code isEqualToString:@"S1001"]) + { + NSMutableArray *arr_resourcesList = [NSMutableArray new]; + + for (int i = 0; i < arr_resources.count; i++) + { + MCAResourcesDHolder *reDHolder = [MCAResourcesDHolder new]; + + reDHolder.str_resourcesDataId = [[arr_resources valueForKey:@"resource_data_id"] objectAtIndex:i]; + reDHolder.str_url = [[arr_resources valueForKey:@"resource_url"] objectAtIndex:i]; + reDHolder.str_book_name = [[arr_resources valueForKey:@"book_name"] objectAtIndex:i]; + [arr_resourcesList addObject:reDHolder]; + } + + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_SUCCESS object:arr_resourcesList]; + }); + } + else{ + + NSString *errMsg = [results valueForKey:@"msg"]; + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_FAILED object:errMsg]; + }); + } +} #pragma mark - USER_PROFILE_EDIT diff --git a/AppUI/AppController/tabBar/MCADetailTblCell.h b/AppUI/AppController/tabBar/MCADetailTblCell.h new file mode 100644 index 0000000..e45bddc --- /dev/null +++ b/AppUI/AppController/tabBar/MCADetailTblCell.h @@ -0,0 +1,16 @@ +// +// MCADetailTblCell.h +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import + +@interface MCADetailTblCell : UITableViewCell +@property(nonatomic,retain) UILabel *url; + +-(void)setIntroductionText:(NSString*)text; +-(id)initWithReuseIdentifier:(NSString*)reuseIdentifier; +@end diff --git a/AppUI/AppController/tabBar/MCADetailTblCell.m b/AppUI/AppController/tabBar/MCADetailTblCell.m new file mode 100644 index 0000000..b9a7348 --- /dev/null +++ b/AppUI/AppController/tabBar/MCADetailTblCell.m @@ -0,0 +1,50 @@ +// +// MCADetailTblCell.m +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCADetailTblCell.h" + +@implementation MCADetailTblCell +-(id)initWithReuseIdentifier:(NSString*)reuseIdentifier{ + self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; + if (self) { + [self initLayuot]; + } + return self; +} + +-(void)initLayuot{ + _url = [[UILabel alloc] initWithFrame:CGRectMake(5, 78, 250, 40)]; + [self addSubview:_url]; +} + + +-(void)setIntroductionText:(NSString*)text{ + CGRect frame = [self frame]; + self.url.text = text; + self.url.numberOfLines = 10; + CGSize size = CGSizeMake(300, 1000); + CGSize labelSize = [self.url.text sizeWithFont:self.url.font constrainedToSize:size lineBreakMode:NSLineBreakByClipping]; + self.url.frame = CGRectMake(self.url.frame.origin.x, self.url.frame.origin.y, labelSize.width, labelSize.height); + frame.size.height = labelSize.height+100; + + self.frame = frame; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + +} + +- (void)awakeFromNib +{ + // Initialization code +} + + +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.h b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.h new file mode 100644 index 0000000..e88cebf --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.h @@ -0,0 +1,19 @@ +// +// MCAResourcesCategoryViewController.h +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import + +@interface MCAResourcesCategoryViewController : UIViewController{ + + IBOutlet UITableView *tbl_resourcesCategory; + + NSMutableArray *arr_resourcesCategory; + + AryaHUD *HUD; +} +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m new file mode 100644 index 0000000..799ab02 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m @@ -0,0 +1,160 @@ +// +// MCAResourcesCategoryViewController.m +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourcesCategoryViewController.h" +#import "MCAResourcesViewController.h" + +@interface MCAResourcesCategoryViewController () + +@end + +@implementation MCAResourcesCategoryViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + HUD = [AryaHUD new]; + [self.view addSubview:HUD]; + arr_resourcesCategory = [NSMutableArray new]; + + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(resourcesCategoryFailed:) name:NOTIFICATION_RESOURCE_CATEGORY_FAILED object:nil]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(resourcesCategorySuccess:) name:NOTIFICATION_RESOURCE_CATEGORY_SUCCESS object:nil]; + + [self getResourcesCategory:nil]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} +#pragma mark - UITABLEVIEW DELEGATE AND DATASOURCE METHODS + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 42; + +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return arr_resourcesCategory.count; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *cellIdentifier = @"resourcesCell"; + UITableViewCell *cell = nil; + cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; + if (!cell) + { + cell = [[UITableViewCell alloc] + initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:cellIdentifier]; + } + MCAResourcesCatDHolder *reDHolder = (MCAResourcesCatDHolder*)[arr_resourcesCategory objectAtIndex:indexPath.row]; + UILabel *lbl_catName = (UILabel *)[cell.contentView viewWithTag:2]; + lbl_catName.text = reDHolder.str_resourcesCatName; + + UIImageView *img_cat=(UIImageView *)[cell.contentView viewWithTag:1]; + [img_cat removeFromSuperview]; + img_cat = nil; + img_cat = [[UIImageView alloc]initWithFrame:CGRectMake(10, 8, 26, 26)]; + img_cat.tag = 1; + [cell.contentView addSubview:img_cat]; + + [img_cat setImageWithUrl:[NSURL URLWithString:reDHolder.str_resourcesCatImage] + andPlaceHoder:[UIImage imageNamed:PLACEHOLDER_IMAGE] + andNoImage:[UIImage imageNamed:NO_IMAGE]]; + + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + + return cell; + +} +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + MCAResourcesCatDHolder *reDHolder = (MCAResourcesCatDHolder*)[arr_resourcesCategory objectAtIndex:indexPath.row]; + + [self performSegueWithIdentifier:@"segue_resources" sender:reDHolder]; + +} +/* + #pragma mark - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender + { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. + } + */ + +-(void)getResourcesCategory:(id)sender{ + + NSMutableDictionary * info = [NSMutableDictionary new]; + + [info setValue:@"get_resource_category" forKey:@"cmd"]; + [info setValue:@"en_us" forKey:@"language_code"]; + + NSString *str_jsonCategory = [NSString getJsonObject:info]; + [HUD showForTabBar]; + [self.view bringSubviewToFront:HUD]; + [self requestResourcesCategory:str_jsonCategory]; + +} + +-(void)requestResourcesCategory:(NSString*)info{ + + if ([MCAGlobalFunction isConnectedToInternet]) { + + [[MCARestIntraction sharedManager]requestForResourcesCategory:info]; + + }else{ + + [HUD hide]; + arr_resourcesCategory = [[MCADBIntraction databaseInteractionManager] retrieveResourceCatList: nil]; + [tbl_resourcesCategory reloadData]; + } +} + +#pragma mark - NSNOTIFICATION SELECTOR + +-(void)resourcesCategorySuccess:(NSNotification*)notification{ + + [HUD hide]; + arr_resourcesCategory = notification.object; + + [[MCADBIntraction databaseInteractionManager]insertResourceCatList:arr_resourcesCategory]; + [tbl_resourcesCategory reloadData]; +} +-(void)resourcesCategoryFailed:(NSNotification*)notification{ + + [HUD hide]; +} + +#pragma mark - OTHER_METHOD + +-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ + + if ([segue.identifier isEqualToString:@"segue_resources"]) { + + MCAResourcesViewController *reViewCtr = (MCAResourcesViewController*)[segue destinationViewController]; + reViewCtr.reCatDHolder = (MCAResourcesCatDHolder*)sender; + } +} + +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h new file mode 100644 index 0000000..abf1903 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h @@ -0,0 +1,19 @@ +// +// MCAResourcesDetailViewController.h +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import + +@interface MCAResourcesDetailViewController : UIViewController +{ + IBOutlet UITableView* tbl_url; + NSMutableArray *arr_url; +} + +@property(nonatomic, strong)MCAResourcesDHolder* reDHolder; + +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m new file mode 100644 index 0000000..5f29378 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m @@ -0,0 +1,91 @@ +// +// MCAResourcesDetailViewController.m +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourcesDetailViewController.h" + +@interface MCAResourcesDetailViewController () + +@end + +@implementation MCAResourcesDetailViewController + +@synthesize reDHolder; + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + arr_url = [NSMutableArray new]; + + self.navigationItem.title = reDHolder.str_book_name; + + NSArray * arr_url_old = [reDHolder.str_url componentsSeparatedByString:@"]["]; + for(NSString* strl in arr_url_old){ + NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"\\[]"]; + NSString *str = [[strl componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""]; + [arr_url addObject:str]; + + } + + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 80; + +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return arr_url.count; + +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *cellIdentifier = @"urlCell"; + UITableViewCell *cell = nil; + cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; + if (!cell) + { + cell = [[UITableViewCell alloc] + initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:cellIdentifier]; + } + NSString* str = [arr_url objectAtIndex:indexPath.row]; + UILabel *lbl_catName = (UILabel *)[cell.contentView viewWithTag:2]; + lbl_catName.text = str; + + tbl_url.separatorStyle = UITableViewCellSeparatorStyleSingleLine; + + return cell; + +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesViewController.h b/AppUI/AppController/tabBar/MCAResourcesViewController.h new file mode 100644 index 0000000..1d1a29e --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesViewController.h @@ -0,0 +1,21 @@ +// +// MCAResourcesViewController.h +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import +#import "MCAResourcesDetailViewController.h" + +@interface MCAResourcesViewController : UIViewController +{ + IBOutlet UITableView *tbl_resources; + NSMutableArray *arr_resources; + AryaHUD *HUD; +} + +@property(nonatomic,strong)MCAResourcesCatDHolder *reCatDHolder; + +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesViewController.m b/AppUI/AppController/tabBar/MCAResourcesViewController.m new file mode 100644 index 0000000..8c568f0 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesViewController.m @@ -0,0 +1,147 @@ +// +// MCAResourcesViewController.m +// MobileCollegeAdmin +// +// Created by rashmi on 9/12/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourcesViewController.h" + +@interface MCAResourcesViewController () + +@end + +@implementation MCAResourcesViewController +@synthesize reCatDHolder; + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + HUD = [AryaHUD new]; + [self.view addSubview:HUD]; + + arr_resources = [NSMutableArray new]; + + self.navigationItem.title = reCatDHolder.str_resourcesCatName; + + + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(resourceFailed:) name:NOTIFICATION_RESOURCE_FAILED object:nil]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(resourceSuccess:) name:NOTIFICATION_RESOURCE_SUCCESS object:nil]; + + [self getResources:reCatDHolder.str_resourcesCatId]; + // Do any additional setup after loading the view. +} +-(void)getResources:(id)sender{ + + NSMutableDictionary * info = [NSMutableDictionary new]; + + [info setValue:@"get_resource" forKey:@"cmd"]; + [info setValue:@"en_us" forKey:@"language_code"]; + [info setValue:sender forKey:@"resource_id"]; + + NSString *str_jsonNotes = [NSString getJsonObject:info]; + [HUD showForTabBar]; + [self.view bringSubviewToFront:HUD]; + [self requestResource:str_jsonNotes]; + +} +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} +#pragma mark - API CALLING + +-(void)requestResource:(NSString*)info{ + + if ([MCAGlobalFunction isConnectedToInternet]) { + + [[MCARestIntraction sharedManager] requestForResources:info]; + + }else{ + + [HUD hide]; + } +} + +#pragma mark - NSNOTIFICATION SELECTOR + +-(void)resourceSuccess:(NSNotification*)notification{ + + [HUD hide]; + arr_resources = notification.object; + [tbl_resources reloadData]; + //[self writeToFile:nil]; + +} +-(void)resourceFailed:(NSNotification*)notification{ + + [HUD hide]; +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 42; + +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return arr_resources.count; + +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *cellIdentifier = @"resourcesViewCell"; + UITableViewCell *cell = nil; + cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; + if (!cell) + { + cell = [[UITableViewCell alloc] + initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:cellIdentifier]; + } + MCAResourcesDHolder *reDholder = (MCAResourcesDHolder*)[arr_resources objectAtIndex:indexPath.row]; + UILabel *lbl_catName = (UILabel *)[cell.contentView viewWithTag:2]; + lbl_catName.text = reDholder.str_book_name; + + + tbl_resources.separatorStyle = UITableViewCellSeparatorStyleSingleLine; + + return cell; + +} +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + MCAResourcesDHolder *reDHolder = (MCAResourcesDHolder*)[arr_resources objectAtIndex:indexPath.row]; + + [self performSegueWithIdentifier:@"segue_url" sender:reDHolder]; +} + +#pragma mark - OTHER_METHOD + +-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ + + if ([segue.identifier isEqualToString:@"segue_url"]) { + MCAResourcesDetailViewController * reDetailCtr = (MCAResourcesDetailViewController*)[segue destinationViewController]; + reDetailCtr.reDHolder = (MCAResourcesDHolder*)sender; + } +} +@end diff --git a/Images.xcassets/camera-1.imageset/Contents.json b/Images.xcassets/camera-1.imageset/Contents.json new file mode 100644 index 0000000..92c9f68 --- /dev/null +++ b/Images.xcassets/camera-1.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "camera.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "camera@2x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Images.xcassets/camera-1.imageset/camera.png b/Images.xcassets/camera-1.imageset/camera.png new file mode 100644 index 0000000000000000000000000000000000000000..af8dab9d3db47a5dc50c4588c9e1e85ef1488edb GIT binary patch literal 3914 zcmZuz2RK|?*B(stmP98pCVCrDql`8flcEI4jGEC$8_`CI8YLLfBM71sQ4$hDMlTVr zi6A0^=mb%tjfs!k`+eX2@Bf|W*=O&w&ik&l-nG|r_K7tzfHTq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7 @@ - + @@ -2014,20 +2014,111 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2125,7 +2216,7 @@ - + @@ -2139,6 +2230,11 @@ + + + + + @@ -2516,7 +2612,7 @@ - + @@ -2622,7 +2718,7 @@ - + @@ -2673,7 +2769,59 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2703,8 +2851,8 @@ - - - + + + diff --git a/MobileCollegeAdmin.xcodeproj/project.pbxproj b/MobileCollegeAdmin.xcodeproj/project.pbxproj index 7c27901..54a91c9 100644 --- a/MobileCollegeAdmin.xcodeproj/project.pbxproj +++ b/MobileCollegeAdmin.xcodeproj/project.pbxproj @@ -7,6 +7,12 @@ objects = { /* Begin PBXBuildFile section */ + 0A0AB8E819C3FB0000C51EEE /* MCADetailTblCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A0AB8E719C3FB0000C51EEE /* MCADetailTblCell.m */; }; + 0A3824B119C39DE700662A39 /* MCAResourcesCatDHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A3824B019C39DE700662A39 /* MCAResourcesCatDHolder.m */; }; + 0A3824B419C39E0000662A39 /* MCAResourcesDHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A3824B319C39E0000662A39 /* MCAResourcesDHolder.m */; }; + 0A8BC6E019C39542007C2CB3 /* MCAResourcesCategoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6DF19C39542007C2CB3 /* MCAResourcesCategoryViewController.m */; }; + 0A8BC6E319C3955C007C2CB3 /* MCAResourcesDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */; }; + 0A8BC6E619C395E2007C2CB3 /* MCAResourcesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */; }; CE0D694F1995DC5C009C0DBE /* MCADBIntraction.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */; }; CE0D69521995FE9C009C0DBE /* MCAAddTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D69511995FE9C009C0DBE /* MCAAddTaskViewController.m */; }; CE174993198D19C200F61135 /* AryaHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = CE174992198D19C200F61135 /* AryaHUD.m */; }; @@ -132,6 +138,18 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 0A0AB8E619C3FB0000C51EEE /* MCADetailTblCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCADetailTblCell.h; sourceTree = ""; }; + 0A0AB8E719C3FB0000C51EEE /* MCADetailTblCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCADetailTblCell.m; sourceTree = ""; }; + 0A3824AF19C39DE700662A39 /* MCAResourcesCatDHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesCatDHolder.h; sourceTree = ""; }; + 0A3824B019C39DE700662A39 /* MCAResourcesCatDHolder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesCatDHolder.m; sourceTree = ""; }; + 0A3824B219C39E0000662A39 /* MCAResourcesDHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesDHolder.h; sourceTree = ""; }; + 0A3824B319C39E0000662A39 /* MCAResourcesDHolder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesDHolder.m; sourceTree = ""; }; + 0A8BC6DE19C39542007C2CB3 /* MCAResourcesCategoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesCategoryViewController.h; sourceTree = ""; }; + 0A8BC6DF19C39542007C2CB3 /* MCAResourcesCategoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesCategoryViewController.m; sourceTree = ""; }; + 0A8BC6E119C3955C007C2CB3 /* MCAResourcesDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesDetailViewController.h; sourceTree = ""; }; + 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesDetailViewController.m; sourceTree = ""; }; + 0A8BC6E419C395E2007C2CB3 /* MCAResourcesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesViewController.h; sourceTree = ""; }; + 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesViewController.m; sourceTree = ""; }; CE0D694D1995DC5C009C0DBE /* MCADBIntraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCADBIntraction.h; sourceTree = ""; }; CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCADBIntraction.m; sourceTree = ""; }; CE0D69501995FE9C009C0DBE /* MCAAddTaskViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAAddTaskViewController.h; sourceTree = ""; }; @@ -364,6 +382,21 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 0A5D5CFB19C37ACD00ACC5D6 /* Resources */ = { + isa = PBXGroup; + children = ( + 0A8BC6DE19C39542007C2CB3 /* MCAResourcesCategoryViewController.h */, + 0A8BC6DF19C39542007C2CB3 /* MCAResourcesCategoryViewController.m */, + 0A8BC6E419C395E2007C2CB3 /* MCAResourcesViewController.h */, + 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */, + 0A8BC6E119C3955C007C2CB3 /* MCAResourcesDetailViewController.h */, + 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */, + 0A0AB8E619C3FB0000C51EEE /* MCADetailTblCell.h */, + 0A0AB8E719C3FB0000C51EEE /* MCADetailTblCell.m */, + ); + name = Resources; + sourceTree = ""; + }; CE174990198D19A100F61135 /* HUD */ = { isa = PBXGroup; children = ( @@ -510,9 +543,10 @@ CE6E7D1A1990A8F6005470BC /* tabBar */ = { isa = PBXGroup; children = ( - CE2DFC2619AEE11A000D59EB /* notes */, CE6E7D1B1990A90E005470BC /* tasks */, CEF5375B19A70F9B00B72CD2 /* calendar */, + CE2DFC2619AEE11A000D59EB /* notes */, + 0A5D5CFB19C37ACD00ACC5D6 /* Resources */, CE84C2341962DDDD00A351FF /* more */, ); path = tabBar; @@ -694,6 +728,10 @@ CE2DFC2B19AEE7C6000D59EB /* MCANotesCatDHolder.m */, CEBD96E219B0513800A63CC5 /* MCANotesDHolder.h */, CEBD96E319B0513800A63CC5 /* MCANotesDHolder.m */, + 0A3824AF19C39DE700662A39 /* MCAResourcesCatDHolder.h */, + 0A3824B019C39DE700662A39 /* MCAResourcesCatDHolder.m */, + 0A3824B219C39E0000662A39 /* MCAResourcesDHolder.h */, + 0A3824B319C39E0000662A39 /* MCAResourcesDHolder.m */, ); path = AppModel; sourceTree = ""; @@ -966,6 +1004,7 @@ CE27456919C031E400DDA5A8 /* MCATutorialViewController.m in Sources */, CE32DA7819AAF14A0037C555 /* NSMutableArray+convenience.m in Sources */, CE84C2371962DE1200A351FF /* MCALoginViewController.m in Sources */, + 0A8BC6E619C395E2007C2CB3 /* MCAResourcesViewController.m in Sources */, CEEDCAD5197F8BF30088511D /* SBJsonWriter.m in Sources */, CEEDCAC1197F8BE20088511D /* ASIInputStream.m in Sources */, CE278A1E19920D6700783592 /* SWUtilityButtonView.m in Sources */, @@ -984,6 +1023,7 @@ CEF5375E19A70FB700B72CD2 /* MCACalendarViewController.m in Sources */, CE174993198D19C200F61135 /* AryaHUD.m in Sources */, CE278A2219920DEF00783592 /* CustomTableViewCell.m in Sources */, + 0A8BC6E019C39542007C2CB3 /* MCAResourcesCategoryViewController.m in Sources */, CE84C23A1962DE2E00A351FF /* MCARegistrationViewController.m in Sources */, CEEDCAC0197F8BE20088511D /* ASIHTTPRequest.m in Sources */, CE3B4FE619C18359001B07D4 /* MCASettingViewController.m in Sources */, @@ -993,6 +1033,7 @@ CE278A251992365A00783592 /* MCASignUpDHolder.m in Sources */, CEDB9B42198F61A6006B3C9B /* MCAGlobalData.m in Sources */, CEBD96E419B0513800A63CC5 /* MCANotesDHolder.m in Sources */, + 0A8BC6E319C3955C007C2CB3 /* MCAResourcesDetailViewController.m in Sources */, CE6E7D1E1990A963005470BC /* MCATaskViewController.m in Sources */, CE27456119C01FD000DDA5A8 /* MCATermUseViewController.m in Sources */, CEEDCABD197F8BE20088511D /* ASIDataDecompressor.m in Sources */, @@ -1001,6 +1042,7 @@ CEEDCAD0197F8BF30088511D /* NSObject+SBJSON.m in Sources */, CE2AE6311998881100B23FFF /* FMResultSet.m in Sources */, CE32DA7619AAF14A0037C555 /* MCACalendarView.m in Sources */, + 0A3824B119C39DE700662A39 /* MCAResourcesCatDHolder.m in Sources */, CE278A1B19920D6700783592 /* SWLongPressGestureRecognizer.m in Sources */, CEEDCAC2197F8BE20088511D /* ASINetworkQueue.m in Sources */, CE278A1D19920D6700783592 /* SWUtilityButtonTapGestureRecognizer.m in Sources */, @@ -1016,6 +1058,7 @@ CEA9D9D1197FEFFE009C3884 /* Reachability.m in Sources */, CE36AE0219BD6B75004C047D /* MCADropboxNotesViewController.m in Sources */, CEEDCABB197F8BE20088511D /* ASIAuthenticationDialog.m in Sources */, + 0A0AB8E819C3FB0000C51EEE /* MCADetailTblCell.m in Sources */, CE394C3619938D300080B5B8 /* MCACustomButton.m in Sources */, CE207FB919A8580F00F329FC /* NSString+Util.m in Sources */, CEEDCAE0197F8F520088511D /* MCARestIntraction.m in Sources */, @@ -1025,6 +1068,7 @@ CEBD96E119B04E0000A63CC5 /* MCANotesCategoryViewController.m in Sources */, CE2DFC4719AF1B51000D59EB /* MCALocalStoredFolder.m in Sources */, CEEDCABF197F8BE20088511D /* ASIFormDataRequest.m in Sources */, + 0A3824B419C39E0000662A39 /* MCAResourcesDHolder.m in Sources */, CEEDCAD1197F8BF30088511D /* NSString+SBJSON.m in Sources */, CE32DA7719AAF14A0037C555 /* UIView+convenience.m in Sources */, CE278A1A19920D6700783592 /* SWCellScrollView.m in Sources */, diff --git a/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcshareddata/MobileCollegeAdmin.xccheckout b/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcshareddata/MobileCollegeAdmin.xccheckout index 92c032b..5c273d1 100644 --- a/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcshareddata/MobileCollegeAdmin.xccheckout +++ b/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcshareddata/MobileCollegeAdmin.xccheckout @@ -5,34 +5,34 @@ IDESourceControlProjectFavoriteDictionaryKey IDESourceControlProjectIdentifier - 68CF6F6B-CACE-414A-8AA0-272A0ECFA988 + FC9BBB01-76AD-41DC-AB1D-2911CA46075A IDESourceControlProjectName MobileCollegeAdmin IDESourceControlProjectOriginsDictionary - 3D6B56D3-4340-451A-A738-680BAD8FFD61 - https://github.com/devarya/MobileCollegeAdmin.git + C7273E58-1C2F-4D1E-BB49-6B36F495F7E0 + https://github.com/yufuchenArya/MobileCollegeAdmin.git IDESourceControlProjectPath MobileCollegeAdmin.xcodeproj/project.xcworkspace IDESourceControlProjectRelativeInstallPathDictionary - 3D6B56D3-4340-451A-A738-680BAD8FFD61 + C7273E58-1C2F-4D1E-BB49-6B36F495F7E0 ../.. IDESourceControlProjectURL - https://github.com/devarya/MobileCollegeAdmin.git + https://github.com/yufuchenArya/MobileCollegeAdmin.git IDESourceControlProjectVersion 110 IDESourceControlProjectWCCIdentifier - 3D6B56D3-4340-451A-A738-680BAD8FFD61 + C7273E58-1C2F-4D1E-BB49-6B36F495F7E0 IDESourceControlProjectWCConfigurations IDESourceControlRepositoryExtensionIdentifierKey public.vcs.git IDESourceControlWCCIdentifierKey - 3D6B56D3-4340-451A-A738-680BAD8FFD61 + C7273E58-1C2F-4D1E-BB49-6B36F495F7E0 IDESourceControlWCCName MobileCollegeAdmin From de484e9a764052547632b91fd4228cf77ac4fc62 Mon Sep 17 00:00:00 2001 From: dongjieArya Date: Sun, 14 Sep 2014 21:20:16 -0700 Subject: [PATCH 2/7] fix the multiple line issue in resource detail tableview --- AppUI/AppController/tabBar/MCADetailTblCell.h | 16 ------ AppUI/AppController/tabBar/MCADetailTblCell.m | 50 ------------------- AppUI/AppController/tabBar/MCAResourceCell.h | 14 ++++++ AppUI/AppController/tabBar/MCAResourceCell.m | 35 +++++++++++++ .../tabBar/MCAResourcesDetailViewController.h | 3 ++ .../tabBar/MCAResourcesDetailViewController.m | 44 ++++++++++------ Main_Iphone.storyboard | 9 ++-- MobileCollegeAdmin.xcodeproj/project.pbxproj | 27 +++++----- 8 files changed, 101 insertions(+), 97 deletions(-) delete mode 100644 AppUI/AppController/tabBar/MCADetailTblCell.h delete mode 100644 AppUI/AppController/tabBar/MCADetailTblCell.m create mode 100644 AppUI/AppController/tabBar/MCAResourceCell.h create mode 100644 AppUI/AppController/tabBar/MCAResourceCell.m diff --git a/AppUI/AppController/tabBar/MCADetailTblCell.h b/AppUI/AppController/tabBar/MCADetailTblCell.h deleted file mode 100644 index e45bddc..0000000 --- a/AppUI/AppController/tabBar/MCADetailTblCell.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// MCADetailTblCell.h -// MobileCollegeAdmin -// -// Created by rashmi on 9/12/14. -// Copyright (c) 2014 arya. All rights reserved. -// - -#import - -@interface MCADetailTblCell : UITableViewCell -@property(nonatomic,retain) UILabel *url; - --(void)setIntroductionText:(NSString*)text; --(id)initWithReuseIdentifier:(NSString*)reuseIdentifier; -@end diff --git a/AppUI/AppController/tabBar/MCADetailTblCell.m b/AppUI/AppController/tabBar/MCADetailTblCell.m deleted file mode 100644 index b9a7348..0000000 --- a/AppUI/AppController/tabBar/MCADetailTblCell.m +++ /dev/null @@ -1,50 +0,0 @@ -// -// MCADetailTblCell.m -// MobileCollegeAdmin -// -// Created by rashmi on 9/12/14. -// Copyright (c) 2014 arya. All rights reserved. -// - -#import "MCADetailTblCell.h" - -@implementation MCADetailTblCell --(id)initWithReuseIdentifier:(NSString*)reuseIdentifier{ - self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]; - if (self) { - [self initLayuot]; - } - return self; -} - --(void)initLayuot{ - _url = [[UILabel alloc] initWithFrame:CGRectMake(5, 78, 250, 40)]; - [self addSubview:_url]; -} - - --(void)setIntroductionText:(NSString*)text{ - CGRect frame = [self frame]; - self.url.text = text; - self.url.numberOfLines = 10; - CGSize size = CGSizeMake(300, 1000); - CGSize labelSize = [self.url.text sizeWithFont:self.url.font constrainedToSize:size lineBreakMode:NSLineBreakByClipping]; - self.url.frame = CGRectMake(self.url.frame.origin.x, self.url.frame.origin.y, labelSize.width, labelSize.height); - frame.size.height = labelSize.height+100; - - self.frame = frame; -} - -- (void)setSelected:(BOOL)selected animated:(BOOL)animated -{ - [super setSelected:selected animated:animated]; - -} - -- (void)awakeFromNib -{ - // Initialization code -} - - -@end diff --git a/AppUI/AppController/tabBar/MCAResourceCell.h b/AppUI/AppController/tabBar/MCAResourceCell.h new file mode 100644 index 0000000..c36ecc1 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourceCell.h @@ -0,0 +1,14 @@ +// +// MCAResourceCell.h +// MobileCollegeAdmin +// +// Created by Dongjie Zhang on 9/14/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import + +@interface MCAResourceCell : UITableViewCell + +@property (strong, nonatomic) IBOutlet UILabel *urlLabel; +@end diff --git a/AppUI/AppController/tabBar/MCAResourceCell.m b/AppUI/AppController/tabBar/MCAResourceCell.m new file mode 100644 index 0000000..9e3c8b8 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourceCell.m @@ -0,0 +1,35 @@ +// +// MCAResourceCell.m +// MobileCollegeAdmin +// +// Created by Dongjie Zhang on 9/14/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourceCell.h" + +@implementation MCAResourceCell + + +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier +{ + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if (self) { + // Initialization code + } + return self; +} + +- (void)awakeFromNib +{ + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated +{ + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h index abf1903..878c227 100644 --- a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h +++ b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h @@ -7,6 +7,7 @@ // #import +#import "MCAResourceCell.h" @interface MCAResourcesDetailViewController : UIViewController { @@ -14,6 +15,8 @@ NSMutableArray *arr_url; } +@property (strong, nonatomic)MCAResourceCell *detailCell; @property(nonatomic, strong)MCAResourcesDHolder* reDHolder; + @end diff --git a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m index 5f29378..206dfba 100644 --- a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m +++ b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m @@ -14,7 +14,7 @@ @interface MCAResourcesDetailViewController () @implementation MCAResourcesDetailViewController -@synthesize reDHolder; +@synthesize reDHolder, detailCell; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { @@ -39,26 +39,31 @@ - (void)viewDidLoad [arr_url addObject:str]; } - + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(didChangePreferredContentSize:) + name:UIContentSizeCategoryDidChangeNotification object:nil]; + tbl_url.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; + // Do any additional setup after loading the view. } +- (void)didChangePreferredContentSize:(NSNotification *)notification +{ + [tbl_url reloadData]; +} + - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - - return 80; - -} - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return arr_url.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { +// [self configureCell:cell forRowAtIndexPath:indexPath]; static NSString *cellIdentifier = @"urlCell"; UITableViewCell *cell = nil; cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; @@ -69,23 +74,30 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N reuseIdentifier:cellIdentifier]; } NSString* str = [arr_url objectAtIndex:indexPath.row]; + NSLog(@"%@", str); UILabel *lbl_catName = (UILabel *)[cell.contentView viewWithTag:2]; lbl_catName.text = str; + lbl_catName.numberOfLines = 0; + lbl_catName.lineBreakMode = NSLineBreakByWordWrapping; + [lbl_catName sizeToFit]; tbl_url.separatorStyle = UITableViewCellSeparatorStyleSingleLine; return cell; - } -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender -{ - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + NSString* str = [arr_url objectAtIndex:indexPath.row]; + + CGSize constraint = {236, 20000}; + + CGSize size = [str sizeWithFont: [UIFont fontWithName:@"Verdana" size:13] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; + + CGFloat height = MAX(size.height, 44.0f); + + return height+10; } -*/ + @end diff --git a/Main_Iphone.storyboard b/Main_Iphone.storyboard index 5f7bc41..fd28bd8 100644 --- a/Main_Iphone.storyboard +++ b/Main_Iphone.storyboard @@ -1,5 +1,5 @@ - + @@ -2784,7 +2784,7 @@ - + @@ -2795,7 +2795,7 @@ - + + + diff --git a/MobileCollegeAdmin.xcodeproj/project.pbxproj b/MobileCollegeAdmin.xcodeproj/project.pbxproj index 54a91c9..a547a1c 100644 --- a/MobileCollegeAdmin.xcodeproj/project.pbxproj +++ b/MobileCollegeAdmin.xcodeproj/project.pbxproj @@ -7,12 +7,12 @@ objects = { /* Begin PBXBuildFile section */ - 0A0AB8E819C3FB0000C51EEE /* MCADetailTblCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A0AB8E719C3FB0000C51EEE /* MCADetailTblCell.m */; }; 0A3824B119C39DE700662A39 /* MCAResourcesCatDHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A3824B019C39DE700662A39 /* MCAResourcesCatDHolder.m */; }; 0A3824B419C39E0000662A39 /* MCAResourcesDHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A3824B319C39E0000662A39 /* MCAResourcesDHolder.m */; }; 0A8BC6E019C39542007C2CB3 /* MCAResourcesCategoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6DF19C39542007C2CB3 /* MCAResourcesCategoryViewController.m */; }; 0A8BC6E319C3955C007C2CB3 /* MCAResourcesDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */; }; 0A8BC6E619C395E2007C2CB3 /* MCAResourcesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */; }; + B6DF3B9119C69A44007AE61B /* MCAResourceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B6DF3B9019C69A44007AE61B /* MCAResourceCell.m */; }; CE0D694F1995DC5C009C0DBE /* MCADBIntraction.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */; }; CE0D69521995FE9C009C0DBE /* MCAAddTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D69511995FE9C009C0DBE /* MCAAddTaskViewController.m */; }; CE174993198D19C200F61135 /* AryaHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = CE174992198D19C200F61135 /* AryaHUD.m */; }; @@ -138,8 +138,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0A0AB8E619C3FB0000C51EEE /* MCADetailTblCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCADetailTblCell.h; sourceTree = ""; }; - 0A0AB8E719C3FB0000C51EEE /* MCADetailTblCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCADetailTblCell.m; sourceTree = ""; }; 0A3824AF19C39DE700662A39 /* MCAResourcesCatDHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesCatDHolder.h; sourceTree = ""; }; 0A3824B019C39DE700662A39 /* MCAResourcesCatDHolder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesCatDHolder.m; sourceTree = ""; }; 0A3824B219C39E0000662A39 /* MCAResourcesDHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesDHolder.h; sourceTree = ""; }; @@ -150,6 +148,8 @@ 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesDetailViewController.m; sourceTree = ""; }; 0A8BC6E419C395E2007C2CB3 /* MCAResourcesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesViewController.h; sourceTree = ""; }; 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesViewController.m; sourceTree = ""; }; + B6DF3B8F19C69A44007AE61B /* MCAResourceCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourceCell.h; sourceTree = ""; }; + B6DF3B9019C69A44007AE61B /* MCAResourceCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourceCell.m; sourceTree = ""; }; CE0D694D1995DC5C009C0DBE /* MCADBIntraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCADBIntraction.h; sourceTree = ""; }; CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCADBIntraction.m; sourceTree = ""; }; CE0D69501995FE9C009C0DBE /* MCAAddTaskViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAAddTaskViewController.h; sourceTree = ""; }; @@ -391,8 +391,8 @@ 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */, 0A8BC6E119C3955C007C2CB3 /* MCAResourcesDetailViewController.h */, 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */, - 0A0AB8E619C3FB0000C51EEE /* MCADetailTblCell.h */, - 0A0AB8E719C3FB0000C51EEE /* MCADetailTblCell.m */, + B6DF3B8F19C69A44007AE61B /* MCAResourceCell.h */, + B6DF3B9019C69A44007AE61B /* MCAResourceCell.m */, ); name = Resources; sourceTree = ""; @@ -934,6 +934,9 @@ LastUpgradeCheck = 0510; ORGANIZATIONNAME = arya; TargetAttributes = { + CE84C1EA1962D83800A351FF = { + DevelopmentTeam = J7KASTD2Y4; + }; CE84C20B1962D83800A351FF = { TestTargetID = CE84C1EA1962D83800A351FF; }; @@ -1020,6 +1023,7 @@ CE2DFC2919AEE193000D59EB /* MCANotesViewController.m in Sources */, CE2DFC2C19AEE7C6000D59EB /* MCANotesCatDHolder.m in Sources */, CE2AA3131999DE4900D43008 /* MCATaskDetailViewController.m in Sources */, + B6DF3B9119C69A44007AE61B /* MCAResourceCell.m in Sources */, CEF5375E19A70FB700B72CD2 /* MCACalendarViewController.m in Sources */, CE174993198D19C200F61135 /* AryaHUD.m in Sources */, CE278A2219920DEF00783592 /* CustomTableViewCell.m in Sources */, @@ -1058,7 +1062,6 @@ CEA9D9D1197FEFFE009C3884 /* Reachability.m in Sources */, CE36AE0219BD6B75004C047D /* MCADropboxNotesViewController.m in Sources */, CEEDCABB197F8BE20088511D /* ASIAuthenticationDialog.m in Sources */, - 0A0AB8E819C3FB0000C51EEE /* MCADetailTblCell.m in Sources */, CE394C3619938D300080B5B8 /* MCACustomButton.m in Sources */, CE207FB919A8580F00F329FC /* NSString+Util.m in Sources */, CEEDCAE0197F8F520088511D /* MCARestIntraction.m in Sources */, @@ -1199,8 +1202,8 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer: Rashmi Singh (2EC659949Q)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Rashmi Singh (2EC659949Q)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -1212,7 +1215,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 7.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "d3f12233-bb5b-4175-afc6-25d8b7e67767"; + PROVISIONING_PROFILE = ""; VALID_ARCHS = "armv7 armv7s arm64"; WRAPPER_EXTENSION = app; }; @@ -1222,8 +1225,8 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer: Rashmi Singh (2EC659949Q)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Rashmi Singh (2EC659949Q)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -1235,7 +1238,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 7.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "d3f12233-bb5b-4175-afc6-25d8b7e67767"; + PROVISIONING_PROFILE = ""; VALID_ARCHS = "armv7 armv7s arm64"; WRAPPER_EXTENSION = app; }; From b8d51ffdecc86af1debd6ae8bcfe1c4a46867356 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 14 Sep 2014 21:46:58 -0700 Subject: [PATCH 3/7] Brian_test --- Main_Iphone.storyboard | 1 + .../UserInterfaceState.xcuserstate | Bin 0 -> 9103 bytes .../xcschemes/MobileCollegeAdmin.xcscheme | 96 ++++++++++++++++++ .../xcschemes/xcschememanagement.plist | 27 +++++ 4 files changed, 124 insertions(+) create mode 100644 MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcuserdata/BrianChen.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/MobileCollegeAdmin.xcscheme create mode 100644 MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/Main_Iphone.storyboard b/Main_Iphone.storyboard index fd28bd8..ebb9b69 100644 --- a/Main_Iphone.storyboard +++ b/Main_Iphone.storyboard @@ -2227,6 +2227,7 @@ + diff --git a/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcuserdata/BrianChen.xcuserdatad/UserInterfaceState.xcuserstate b/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcuserdata/BrianChen.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..087fd64c3eaecf2929f8fe05dc1549eff7454907 GIT binary patch literal 9103 zcmb_hcYIXE_CGV5>}Hcqwzu2`0s(=*O@o943+WJ2NrNm%++=T(g=BZx5(tPK#NM9I z-VhRsV#R`}SWrYnL_|bHM2fv2#e$;ZZ|>e~!us?*|M-#5huqwmIp@qN-}9Zh&E5`| zKaigO9uS})gD8jwxonJV?2O@Eg3s^rxMvLaG|v%Q0{+I~4qr>Vi@mNJ9`JZ|K(1Q( zxaJp7Kn&=?07e)CV}XZMNP~39fJ_(%;~@*qhYO$pra&oF!)$1ROTYom&;o7H4s)Rc zeBg%wEP$)vYPbfjh3nvYxB+g2f5TJoG;DxpU?V&W&%yJs30{B~;U#z(Hp46MDr|w* zU@N>1+u#k@4sXH^cnfyI+pr7Xf!**fybmA2LHHOxhcDnu_zJ#;@8Bf-2tScn5=T@d zo+J=8(GV@s5j`;zo}`jAl1?&6CK*S@lPr==%1H&OBvquEOd~awDp8@Y=tCp}~hSw|ix>&Y`@BYB0qO16;K$Q$HCa)5k94w8?_ zA##`;AxFsx@&oya{6;B_rZF^*s;Gu)sgauKFq%w<(-HJMnn}me@idEO(_A`<=FwtW zK`Ut$t)|mxBej!OI+HqRGi{|Ew3GViLb`}vO0S?-(yQpz^hSCMy@%dQ@1v{f8u}=G zj6P1+)6Mi1`YPQ*U!z;;>+~(UlkTDK(U0gs`Z4{Keoar%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wc(iIxZ$MXjNuQX!DupC zjEP2@ajs!TIX zcGE1=Y||yCW)qs0n>L&Fn~s`3F@0t_W%|){+H}VBo9V1sXXeaF=3(aH=JU+s%sJ+X z<_paE=0bC^d9u0Q+-{y{UTD7Be1rKW^Udbl&3BsbHs5PrV}8uM$^4Revw4eot9hIG zfcZ=FSLUzH-+G4c~vy8Niwv4gxmWh^0mV8U0Wr}60rQA|!nPG8Q z+!ntjXqj)h)N+{xEtgwvvn;nfW7%SP-SUQIhh?W_m*oS?LCYb_5z8l*6P6z>r!Bu& z&RW4rtx?u!Yl4-tCRvABhg(Nm$5?r5nl;B-Y@KQ?w^mwft@YOF)<$cm^=9i+*3H(P z)?L=!);-p})_vCf*3Ye9TEDh_YyHl8!g|X3Ltcl09_a{D__*mll#HSKB zByLRHp7?&^{=@@`A15A8Jeqi#i{g}A92d{&I0I+mES!}~=Pu;(xB{-2o6MDR4O}BP zlbg+5!ZmXq&c_9~`CK=*h`WZnp1YB|nY)F%jqBl7b8ESE+{4_X-1FQf?gj28ZU^@^ z_YSv*+sp0a4s%~{Uvb}X$GGF%Z#H6+*`jT+HkB>Grm-d4#@cdi7uoV`1-8kyQd^m= z!Zy?9w9T`1*%sIq+LqXs+Lqa_wB2Rvv7H(eHAp!~9qNZbsq|ZxCjAcoKS=w3ndx_7 literal 0 HcmV?d00001 diff --git a/MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/MobileCollegeAdmin.xcscheme b/MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/MobileCollegeAdmin.xcscheme new file mode 100644 index 0000000..da1c538 --- /dev/null +++ b/MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/MobileCollegeAdmin.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/xcschememanagement.plist b/MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..27c8bf2 --- /dev/null +++ b/MobileCollegeAdmin.xcodeproj/xcuserdata/BrianChen.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + MobileCollegeAdmin.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + CE84C1EA1962D83800A351FF + + primary + + + CE84C20B1962D83800A351FF + + primary + + + + + From 66cb8e98ac555d8d7a6c8b77073d9b3bc6963469 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 14 Sep 2014 21:52:47 -0700 Subject: [PATCH 4/7] UI Test --- Main_Iphone.storyboard | 8 ++++++-- .../UserInterfaceState.xcuserstate | Bin 9103 -> 11888 bytes 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Main_Iphone.storyboard b/Main_Iphone.storyboard index ebb9b69..ecf6cfc 100644 --- a/Main_Iphone.storyboard +++ b/Main_Iphone.storyboard @@ -2057,7 +2057,9 @@ - + + + @@ -2110,7 +2112,9 @@ - + + + diff --git a/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcuserdata/BrianChen.xcuserdatad/UserInterfaceState.xcuserstate b/MobileCollegeAdmin.xcodeproj/project.xcworkspace/xcuserdata/BrianChen.xcuserdatad/UserInterfaceState.xcuserstate index 087fd64c3eaecf2929f8fe05dc1549eff7454907..0b7c4533427649f964ac69773fb63a01eee106b3 100644 GIT binary patch delta 7517 zcmai234BvUx1TeUt!YY=H2Zp!+!QE{|`(1p;kT(-bIBG6C6TjqI{? zVV6Zg1!Yx0L=o8qL? zMFJX$#-OpN0QpcM8i&TC31~8!gXW@F(L6LCEkFy=BD7>tWy|1MbPkIxAfDhpadh{U>mk$ zH%`Q@lL_7%xF~zUoS$H;H zf|ufDcsX8y*W(R%Bi@8J<2UeIco*J-58=c31NAiP0oay;I?E6JsK{?T?aT&@)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B|k2|7M68wE3;nPY`y zp_9;87$?jSmJ2(D6T(U1if~Q1A>0lKcZK`9db$?6R9$ObJ6(HSM_s0FkZzPNS2tD{ z&=u;==&tJS>K^N!>-G9Dy{0dzFQre=m(`ckC+TbH>*(w0>+2ip8|fSCd+GD^>-5L< zclA#VU|Hr0yxP3QyvKaNe9U~(eA;~0 ze9nBs!b{eovluK!i`inegjpPxXiKc6geBfm+ET`nXen>0V5wwjVCiF7V%cH2ZS`1_ ztjz<~-qu0Zq1J3`j&;0smi1%nT9!@dwYFWh-L}29eYX9!1GYo9!?r@(QQP0P>$aP= z+qS#5`?iO+$F?W7XJHU#35yG>7}hkbU09%h*tD>`u(e@3!;XdBwcG7ZyW1|=WqXpn zhCSKd!al^FYaeS5*vH!^*eBXQwSR5jYTs|aYQJW`VZUX+W54H!cO*HgIchj+IqEp- zIhr`yI?@~+977$W9CID>99tbb9lIR69s32)ejpEEY#tl_Nd zZ0GFioa~(D+~_>uJmfs=EOZ`qo^xJsUUXh|-gfz2(XQsMcCOK`fNPO!wQHSggKM*E ztLr=0U#>f@`>uzse_T&p&)qt=)2+CDZofOiUBVsjF6}PkPIRZc-*Uh2p6QeFbM71Ne>`4Kg6B<7Z_iNA zQqMZiHqQ^9A3Z;Le)jC~9QG7?j(U!JPI^vz&U&tRu6b^FZh0Pio=YCdD=Css@=Fm? zyi`s~k}67-rK(arslL=uY9Xaat)z6Rv(#0}mIBgvX@WE{AQeboNh_pP(i&-xR4AR1 z&Pjhte@U05Thblrp7cO^B>m&ndHvpaZv}5%Z)0y$Z*y-;Z>qPWx0APvx0|@myWw0_#8Lo^}#wglYMRQVJC^^$r;{ad}R-c)a^ zcYPM0&sWyh$`|l`;al$e#<$Y9#<$M5!MEG@hc9r{cieZ%cgA#0#do;#e=?xAGynhq From 7eb758b4b868921d435385002548b00ec8f0989a Mon Sep 17 00:00:00 2001 From: dongjieArya Date: Mon, 15 Sep 2014 16:36:15 -0700 Subject: [PATCH 5/7] add purchase alert, rate and review, icon for resource --- AppConstants/MCAConstant.h | 1 + AppExternal/RFRateMe.h | 18 +++ AppExternal/RFRateMe.m | 148 ++++++++++++++++++ AppExternal/UIAlertView+NSCookbook.h | 31 ++++ AppExternal/UIAlertView+NSCookbook.m | 75 +++++++++ AppRestIntraction/MCARestIntraction.m | 4 + AppUI/AppController/MCAMoreViewController.m | 3 + .../MCAResourcesCategoryViewController.m | 41 +++-- .../tabBar/MCAResourcesDetailViewController.h | 1 + .../tabBar/MCAResourcesDetailViewController.m | 5 +- .../tabBar/MCAResourcesViewController.m | 50 ++++-- .../tabBar/MCATaskViewController.m | 1 + Images.xcassets/book.imageset/Contents.json | 18 +++ Images.xcassets/book.imageset/book.png | Bin 0 -> 4537 bytes Images.xcassets/book.imageset/book@2x.png | Bin 0 -> 1825 bytes Images.xcassets/web.imageset/Contents.json | 18 +++ Images.xcassets/web.imageset/web.png | Bin 0 -> 4660 bytes Images.xcassets/web.imageset/web@2x.png | Bin 0 -> 2497 bytes MobileCollegeAdmin.xcodeproj/project.pbxproj | 20 +++ .../MobileCollegeAdmin-Prefix.pch | 1 + 20 files changed, 409 insertions(+), 26 deletions(-) create mode 100644 AppExternal/RFRateMe.h create mode 100644 AppExternal/RFRateMe.m create mode 100755 AppExternal/UIAlertView+NSCookbook.h create mode 100755 AppExternal/UIAlertView+NSCookbook.m create mode 100644 Images.xcassets/book.imageset/Contents.json create mode 100644 Images.xcassets/book.imageset/book.png create mode 100644 Images.xcassets/book.imageset/book@2x.png create mode 100644 Images.xcassets/web.imageset/Contents.json create mode 100644 Images.xcassets/web.imageset/web.png create mode 100644 Images.xcassets/web.imageset/web@2x.png diff --git a/AppConstants/MCAConstant.h b/AppConstants/MCAConstant.h index eea9ae8..6061283 100644 --- a/AppConstants/MCAConstant.h +++ b/AppConstants/MCAConstant.h @@ -11,6 +11,7 @@ //Main URL #define URL_MAIN @"http://122.176.45.15:8080/careerdefine/api/" +#define URL_APPLESTORE @"https://itunes.apple.com/" //Message #define INVALID_PWD @"Please enter valid password." diff --git a/AppExternal/RFRateMe.h b/AppExternal/RFRateMe.h new file mode 100644 index 0000000..1f36015 --- /dev/null +++ b/AppExternal/RFRateMe.h @@ -0,0 +1,18 @@ +// +// RFRateMe.h +// RFRateMeDemo +// +// Created by Ricardo Funk on 1/2/14. +// Copyright (c) 2014 Ricardo Funk. All rights reserved. +// + +#import + +@interface RFRateMe : NSObject + ++(void)showRateAlert; ++(void)showRateAlertAfterTimesOpened:(int)times; ++(void)showRateAlertAfterDays:(int)days; + + +@end diff --git a/AppExternal/RFRateMe.m b/AppExternal/RFRateMe.m new file mode 100644 index 0000000..86810aa --- /dev/null +++ b/AppExternal/RFRateMe.m @@ -0,0 +1,148 @@ +// +// RFRateMe.m +// RFRateMeDemo +// +// Created by Ricardo Funk on 1/2/14. +// Copyright (c) 2014 Ricardo Funk. All rights reserved. +// + +#import "RFRateMe.h" +#import "UIAlertView+NSCookbook.h" +#import "MCAConstant.h" + +#define kNumberOfDaysUntilShowAgain 3 +#define kAppStoreAddress URL_APPLESTORE +#define kAppName @"Moblie College Admin" + +@implementation RFRateMe + ++(void)showRateAlert { + + //If rate was completed, we just return if True + BOOL rateCompleted = [[NSUserDefaults standardUserDefaults] boolForKey:@"RFRateCompleted"]; + if (rateCompleted) return; + + //Check if the user asked not to be prompted again for 3 days (remind me later) + BOOL remindMeLater = [[NSUserDefaults standardUserDefaults] boolForKey:@"RFRemindMeLater"]; + + if (remindMeLater) { + + NSDateFormatter *DateFormatter=[[NSDateFormatter alloc] init]; + [DateFormatter setDateFormat:@"yyyy-MM-dd"]; + + NSString *start = [[NSUserDefaults standardUserDefaults] objectForKey:@"RFStartDate"]; + NSString *end = [DateFormatter stringFromDate:[NSDate date]]; + + NSDateFormatter *f = [[NSDateFormatter alloc] init]; + [f setDateFormat:@"yyyy-MM-dd"]; + NSDate *startDate = [f dateFromString:start]; + NSDate *endDate = [f dateFromString:end]; + + NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSDateComponents *components = [gregorianCalendar components:NSDayCalendarUnit + fromDate:startDate + toDate:endDate + options:0]; + + if ((long)[components day] <= kNumberOfDaysUntilShowAgain) return; + + } + + //Show rate alert + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(kAppName, @"") + message:[NSString stringWithFormat:@"If you enjoy %@, would you mind taking a moment to rate it? It won’t take more than a minute. Thanks for your support!",kAppName] + delegate:nil + cancelButtonTitle:NSLocalizedString(@"Never ask me again", @"") + otherButtonTitles:NSLocalizedString(@"Rate it now", @""),NSLocalizedString(@"Remind me later",@""), nil]; + + [alertView showWithCompletion:^(UIAlertView *alertView, NSInteger buttonIndex) { + + switch (buttonIndex) { + case 0: + + NSLog(@"No, thanks"); + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"RFRateCompleted"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + break; + case 1: + + NSLog(@"Rate it now"); + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"RFRateCompleted"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:kAppStoreAddress]]; + + break; + case 2: + + NSLog(@"Remind me later"); + NSDateFormatter *dateFormatter=[[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"yyyy-MM-dd"]; + NSDate *now = [NSDate date]; + [[NSUserDefaults standardUserDefaults] setObject:[dateFormatter stringFromDate:now] forKey:@"RFStartDate"]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"RFRemindMeLater"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + break; + } + }]; +} + ++(void)showRateAlertAfterTimesOpened:(int)times { + //Thanks @kylnew for feedback and idea! + + BOOL rateCompleted = [[NSUserDefaults standardUserDefaults] boolForKey:@"RFRateCompleted"]; + if (rateCompleted) return; + + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + int timesOpened = (int)[defaults integerForKey:@"timesOpened"]; + [defaults setInteger:timesOpened+1 forKey:@"timesOpened"]; + [defaults synchronize]; + NSLog(@"App has been opened %ld times", (long)[defaults integerForKey:@"timesOpened"]); + if([defaults integerForKey:@"timesOpened"] >= times){ + [RFRateMe showRateAlert]; + } + + +} + + ++(void)showRateAlertAfterDays:(int)times { + + BOOL rateCompleted = [[NSUserDefaults standardUserDefaults] boolForKey:@"RFRateCompleted"]; + if (rateCompleted) return; + + BOOL showAfterXdays = [[NSUserDefaults standardUserDefaults] boolForKey:@"RFShowAfterXDays"]; + + if (!showAfterXdays) { + NSDateFormatter *dateFormatter=[[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"yyyy-MM-dd"]; + NSDate *now = [NSDate date]; + [[NSUserDefaults standardUserDefaults] setObject:[dateFormatter stringFromDate:now] forKey:@"RFGeneralStartDate"]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"RFShowAfterXDays"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } + + NSDateFormatter *DateFormatter=[[NSDateFormatter alloc] init]; + [DateFormatter setDateFormat:@"yyyy-MM-dd"]; + + NSString *start = [[NSUserDefaults standardUserDefaults] objectForKey:@"RFGeneralStartDate"]; + NSString *end = [DateFormatter stringFromDate:[NSDate date]]; + + NSDateFormatter *f = [[NSDateFormatter alloc] init]; + [f setDateFormat:@"yyyy-MM-dd"]; + NSDate *startDate = [f dateFromString:start]; + NSDate *endDate = [f dateFromString:end]; + + NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + NSDateComponents *components = [gregorianCalendar components:NSDayCalendarUnit + fromDate:startDate + toDate:endDate + options:0]; + + if ((long)[components day] <= times) return; + + +} + +@end diff --git a/AppExternal/UIAlertView+NSCookbook.h b/AppExternal/UIAlertView+NSCookbook.h new file mode 100755 index 0000000..470c7ab --- /dev/null +++ b/AppExternal/UIAlertView+NSCookbook.h @@ -0,0 +1,31 @@ +// +// UIAlertView+NSCookbook.h +// SimpleAlertViewSampleApp +// +// Copyright (c) 2013 NSCookbook. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface UIAlertView (NSCookbook) + +- (void)showWithCompletion:(void(^)(UIAlertView *alertView, NSInteger buttonIndex))completion; + +@end diff --git a/AppExternal/UIAlertView+NSCookbook.m b/AppExternal/UIAlertView+NSCookbook.m new file mode 100755 index 0000000..9bf0f72 --- /dev/null +++ b/AppExternal/UIAlertView+NSCookbook.m @@ -0,0 +1,75 @@ +// +// UIAlertView+NSCookbook.m +// SimpleAlertViewSampleApp +// +// Copyright (c) 2013 NSCookbook. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "UIAlertView+NSCookbook.h" + +@interface NSCBAlertWrapper : NSObject + +@property (copy) void(^completionBlock)(UIAlertView *alertView, NSInteger buttonIndex); + +@end + +@implementation NSCBAlertWrapper + +#pragma mark - UIAlertViewDelegate + +// Called when a button is clicked. The view will be automatically dismissed after this call returns +- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex +{ + if (self.completionBlock) + self.completionBlock(alertView, buttonIndex); +} + +// Called when we cancel a view (eg. the user clicks the Home button). This is not called when the user clicks the cancel button. +// If not defined in the delegate, we simulate a click in the cancel button +- (void)alertViewCancel:(UIAlertView *)alertView +{ + // Just simulate a cancel button click + if (self.completionBlock) + self.completionBlock(alertView, alertView.cancelButtonIndex); +} + +@end + + +static const char kNSCBAlertWrapper; +@implementation UIAlertView (NSCookbook) + +#pragma mark - Class Public + +- (void)showWithCompletion:(void(^)(UIAlertView *alertView, NSInteger buttonIndex))completion +{ + NSCBAlertWrapper *alertWrapper = [[NSCBAlertWrapper alloc] init]; + alertWrapper.completionBlock = completion; + self.delegate = alertWrapper; + + // Set the wrapper as an associated object + objc_setAssociatedObject(self, &kNSCBAlertWrapper, alertWrapper, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + // Show the alert as normal + [self show]; +} + +@end diff --git a/AppRestIntraction/MCARestIntraction.m b/AppRestIntraction/MCARestIntraction.m index 2d4e03f..9eab5c9 100644 --- a/AppRestIntraction/MCARestIntraction.m +++ b/AppRestIntraction/MCARestIntraction.m @@ -821,6 +821,10 @@ -(void)requestResourceCategorySuccess:(ASIFormDataRequest*)request{ resourceDHolder.str_resourcesCatImage = [[arr_resourceCategory valueForKey:@"resource_cat_image"] objectAtIndex:i]; [arr_resourcesCategoryList addObject:resourceDHolder]; } + if (![[[NSUserDefaults standardUserDefaults]valueForKey:KEY_USER_TYPE] isEqualToString:@"p"]) + { + [arr_resourcesCategoryList removeObjectAtIndex:0]; + } dispatch_async(dispatch_get_main_queue(), ^ { [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_CATEGORY_SUCCESS object:arr_resourcesCategoryList]; diff --git a/AppUI/AppController/MCAMoreViewController.m b/AppUI/AppController/MCAMoreViewController.m index 3a626e1..674eea2 100644 --- a/AppUI/AppController/MCAMoreViewController.m +++ b/AppUI/AppController/MCAMoreViewController.m @@ -34,6 +34,8 @@ - (void)viewDidLoad arr_moreImageList = [[NSMutableArray alloc]initWithObjects:@"setting.png",@"share.png",@"feedback.png",@"logout.png", nil]; tbl_moreOption.tableFooterView = [[UIView alloc] init]; + + [RFRateMe showRateAlertAfterTimesOpened:1]; } - (void)didReceiveMemoryWarning @@ -92,4 +94,5 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * [self performSegueWithIdentifier:@"segue_setting" sender:nil]; } } + @end diff --git a/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m index 799ab02..8e06a5c 100644 --- a/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m +++ b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m @@ -27,6 +27,7 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil - (void)viewDidLoad { [super viewDidLoad]; + HUD = [AryaHUD new]; [self.view addSubview:HUD]; @@ -87,21 +88,35 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - MCAResourcesCatDHolder *reDHolder = (MCAResourcesCatDHolder*)[arr_resourcesCategory objectAtIndex:indexPath.row]; - + MCAResourcesCatDHolder *reDHolder = (MCAResourcesCatDHolder*)[arr_resourcesCategory objectAtIndex:indexPath.row];\ + if ([reDHolder.str_resourcesCatId isEqualToString:@"10"]) { + + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Mobile College Admin" message:@"You have to purchase for this version. Do you want to purchase?" delegate:self cancelButtonTitle:@"NO" otherButtonTitles:@"Yes", nil]; + alert.backgroundColor = [UIColor blueColor]; + [alert show]; + } + else [self performSegueWithIdentifier:@"segue_resources" sender:reDHolder]; } -/* - #pragma mark - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender - { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. - } - */ + +-(void)willPresentAlertView:(UIAlertView *)alertView{ + UIImage *theImage = [UIImage imageNamed:@"BlueBg.png"]; + UIView *view=[alertView valueForKey:@"_backgroundImageView"]; + //Set frame according to adustable + UIImageView *image=[[UIImageView alloc] initWithImage:theImage]; + [image setFrame:CGRectMake(0, 0, 280, 130)]; + [view addSubview:image]; + NSLog(@"%lu", (unsigned long)[alertView subviews].count); + //[[[alertView subviews] objectAtIndex:3] setBackgroundColor:[UIColor blueColor]]; +} + +-(void)alertView:(UIAlertView*)alterView clickedButtonAtIndex:(NSInteger)buttonIndex{ + if (buttonIndex == 1) { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:URL_APPLESTORE]]; + } +} + -(void)getResourcesCategory:(id)sender{ @@ -157,4 +172,6 @@ -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ } } + + @end diff --git a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h index 878c227..709040a 100644 --- a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h +++ b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.h @@ -17,6 +17,7 @@ @property (strong, nonatomic)MCAResourceCell *detailCell; @property(nonatomic, strong)MCAResourcesDHolder* reDHolder; +@property (strong, nonatomic)NSMutableArray *arr_resources; @end diff --git a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m index 206dfba..f56e029 100644 --- a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m +++ b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m @@ -14,7 +14,7 @@ @interface MCAResourcesDetailViewController () @implementation MCAResourcesDetailViewController -@synthesize reDHolder, detailCell; +@synthesize reDHolder, detailCell, arr_resources; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { @@ -32,7 +32,7 @@ - (void)viewDidLoad self.navigationItem.title = reDHolder.str_book_name; - NSArray * arr_url_old = [reDHolder.str_url componentsSeparatedByString:@"]["]; + NSArray * arr_url_old = [reDHolder.str_url componentsSeparatedByString:@"\\n"]; for(NSString* strl in arr_url_old){ NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"\\[]"]; NSString *str = [[strl componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""]; @@ -100,4 +100,5 @@ -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPat } + @end diff --git a/AppUI/AppController/tabBar/MCAResourcesViewController.m b/AppUI/AppController/tabBar/MCAResourcesViewController.m index 8c568f0..8e509a7 100644 --- a/AppUI/AppController/tabBar/MCAResourcesViewController.m +++ b/AppUI/AppController/tabBar/MCAResourcesViewController.m @@ -27,7 +27,16 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil - (void)viewDidLoad { [super viewDidLoad]; - + UIImage* img_book = [UIImage imageNamed:@"book.png"]; + CGRect img_bookFrame = CGRectMake(0, 0, img_book.size.width, img_book.size.height); + UIButton *btn_book = [[UIButton alloc] initWithFrame:img_bookFrame]; + [btn_book setBackgroundImage:img_book forState:UIControlStateNormal]; + [btn_book addTarget:self + action:@selector(btnBookDidClicked:) + forControlEvents:UIControlEventTouchUpInside]; + [btn_book setShowsTouchWhenHighlighted:YES]; + UIBarButtonItem *btnBar_book =[[UIBarButtonItem alloc] initWithCustomView:btn_book]; + [self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects:btnBar_book,nil]]; HUD = [AryaHUD new]; [self.view addSubview:HUD]; @@ -89,16 +98,7 @@ -(void)resourceFailed:(NSNotification*)notification{ [HUD hide]; } -/* -#pragma mark - Navigation -// In a storyboard-based application, you will often want to do a little preparation before navigation -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender -{ - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. -} -*/ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 42; @@ -110,6 +110,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + MCAResourcesDHolder *reDHolder = (MCAResourcesDHolder*)[arr_resources objectAtIndex:indexPath.row]; static NSString *cellIdentifier = @"resourcesViewCell"; UITableViewCell *cell = nil; cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; @@ -123,6 +124,20 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N UILabel *lbl_catName = (UILabel *)[cell.contentView viewWithTag:2]; lbl_catName.text = reDholder.str_book_name; + UIImageView *img_cat=(UIImageView *)[cell.contentView viewWithTag:1]; + [img_cat removeFromSuperview]; + img_cat = nil; + img_cat = [[UIImageView alloc]initWithFrame:CGRectMake(10, 8, 26, 26)]; + img_cat.tag = 1; + [cell.contentView addSubview:img_cat]; + if ([reDHolder.str_url rangeOfString:@"http"].location == NSNotFound) { + UIImage *img_book = [UIImage imageNamed:@"book.png"]; + [img_cat setImage:img_book]; + }else{ + UIImage *img_web = [UIImage imageNamed:@"web.png"]; + [img_cat setImage:img_web]; + } + tbl_resources.separatorStyle = UITableViewCellSeparatorStyleSingleLine; @@ -131,8 +146,16 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ MCAResourcesDHolder *reDHolder = (MCAResourcesDHolder*)[arr_resources objectAtIndex:indexPath.row]; - - [self performSegueWithIdentifier:@"segue_url" sender:reDHolder]; + if ([reDHolder.str_url rangeOfString:@"http"].location == NSNotFound) { + [self performSegueWithIdentifier:@"segue_url" sender:reDHolder]; + } + else{ + NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"\\[]\""]; + NSString* url = [[reDHolder.str_url componentsSeparatedByCharactersInSet:doNotWant] componentsJoinedByString:@""]; + url = [url substringFromIndex:[url rangeOfString:@"http"].location]; + NSLog(@"%@", url); + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; + } } #pragma mark - OTHER_METHOD @@ -144,4 +167,7 @@ -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ reDetailCtr.reDHolder = (MCAResourcesDHolder*)sender; } } +- (IBAction)btnBookDidClicked:(id)sender{ + //[self performSegueWithIdentifier:@"segue_url" sender:arr_resources]; +} @end diff --git a/AppUI/AppController/tabBar/MCATaskViewController.m b/AppUI/AppController/tabBar/MCATaskViewController.m index 42b8167..b99aacd 100644 --- a/AppUI/AppController/tabBar/MCATaskViewController.m +++ b/AppUI/AppController/tabBar/MCATaskViewController.m @@ -1044,4 +1044,5 @@ -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ } } + @end diff --git a/Images.xcassets/book.imageset/Contents.json b/Images.xcassets/book.imageset/Contents.json new file mode 100644 index 0000000..e906f5d --- /dev/null +++ b/Images.xcassets/book.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "book.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "book@2x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Images.xcassets/book.imageset/book.png b/Images.xcassets/book.imageset/book.png new file mode 100644 index 0000000000000000000000000000000000000000..079a17b00d9fd83f35136ea9833427f03dc26038 GIT binary patch literal 4537 zcmZuz1z1$u+8$t}Q#ynJNs*yJx*3p0&>5PcbLb%?C8VT9hHgPhLDB(f5oAQV9VuxE zY2@NL=iYn%^WXhEYwxwc^}gTtz3*Djvv;h%E`*Gji5LI?kZEeD8eTu?eh)(Y>w8aw zs|)}@tmLGkqOYl<0@C+F*gLt}0RS3gxzCYC52op2Flb5i=bIcLu0y6kBG4BZ4O*Z< ztY(-#ZgeEKpXv>D8Y;erwnp!9ATb;^YBVHIBH)um`;_{9od&9EEAt61M7!1E2Megn ze%RvlTGQmT!*1|oD?tAu0@&pP#R(HDgwpJ6cADL!9_%^BWuU|%hvK})+S>ymC#tw( z7ihVxtd|;n^+!A4Fx$4-yB+%6-V;}$DIAh2ocI7@wQ&jA5N`Sv-1GkL+ zd?L}pB6NjBMO7S2J+-b!<*WQ{11~bUmkXI-!;J65@)Fwg7f@W-;sju!*$b|(4#kfN z?9fJbJ#%oOo%?L7V%sShYRMG<(RTv&9c1> zn^<)`?U-I<4S8@W_aX4yc#nGvlc$uB2U~RAsuD!g0ggCLvTxP5XBYz--0&4wuvL1y zAi(|&K*K`L0c*6YMQYDCQXZ1{tu0q?oO~BB|98pr{0PLyj%caltihf0hcadK3gNdk zX+`bSR?5oDv{Z+NNXauXwwK40S4;1uoIVY7-_6N?Prn!S-PquJI#Fb-V_TGLI5Zh- zOB@+Gjtymy;2~fP$#tP|^tA*8M@i{7YZ81w$N^Mt<8itx1mXs7no`Eh4{6L5|q7Efw-cwahhH~OivA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W!=C%EgnCw=pFgj(t__;Zs zY#(RnPKg#>@G<4Ls~sZ+BYgMOo3V{H`B&aerMD5REMoY`?IM1$M~!L_enx)_hxcs( zuRHE9T6j4r4X#1%k9c~YCXsv|=gJ*F>y^5(Wkf&tlLW;7_B^`9FfxyIfikgUW-9aK w>w3M7F~18o^j*r#nZklN!J+0ZyTBPi{U%4yEiF^y-`_(`HC@#jWvhsP0pOBW-~a#s literal 0 HcmV?d00001 diff --git a/Images.xcassets/book.imageset/book@2x.png b/Images.xcassets/book.imageset/book@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1fb4ec90476cb4d50c367f7f520ccf27e7683d07 GIT binary patch literal 1825 zcmaJ?c~BE~7>!bbL;)%FK#|!-P{EK*0tpZjW5^*0K}$l28XZEiNPuKxvXF4dfPz-> z;1HEaz)^`BJg{C-+v0d&)j{zn9v~JOq)t^1Q7H&?gP{GRbZ2*e$GrEx@B4jkXSXbm zTH=J8g~MPlPT^tPXmljlo=I5r?U}c70y?-OJP9I%6A-;j3t`v_I35DRRkF2EG$d1` zue%8`Fc>?$QY1knf=Id?RuN@34AG#{pll3=!7^xM@?;1B;-R%lH51=?sTL0?6-<0A zRX`GGI8dT8EJF(kGonQDjAVJR0?%3mFbs55Km{Q(z@SP|>*xk1engj!&TZQu9vFcj z$xQs`q$Gmn00-7W0F~(PCnu4~0F6c@2T*A=G6A5F$P|!--ZVdQ0G&#sQv!j}3y((A zDiY|?T>fY*bj8FcB8Y|#f_lB4sP`wr+O;4#I5^m*L817e2tQrA8j%_N)VjH23S3Ah z*D5uL5>^8?MOi$YiZJnLrk_htX}-v+b)(0G9vEnlX+ScOWGiV5C=mQVRHgcY)*;c* z*L?p|SSL!?KwvbagHyF~v~dY@ZJ{)Djuw(3uvP@aDPyO&JP}4QBVHGe^GF>@-F6?pjM!Aada|s=n z3!=$@w#NRe(PLYvdu-D$wnZ0Tj1Q?%w`);bt8p1G(66O5oXZv&p1xjjH$wEocNH_R z+x@T`3K4g|ykqU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Contents.json new file mode 100644 index 0000000..ea0a81b --- /dev/null +++ b/Images.xcassets/web.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "web.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "web@2x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Images.xcassets/web.imageset/web.png b/Images.xcassets/web.imageset/web.png new file mode 100644 index 0000000000000000000000000000000000000000..4df2cbc7fafdb840bf9b6a9afa45c63f9c24cb30 GIT binary patch literal 4660 zcmZuz1z1$u+8$t(E~P;kiJ=*~dl*7NN@9?lp$3NT7(z-)N~8oN1OY(=6aM}%K`u-$|xvQR}%^a>3X=@q0qJffChQaGv5aWQ*_ZdtR!~m1{;X;kSTx|G$N}( z3)G9z4AsStiU9klUQ?r?<}tE)(1NEP&4z^0kcK}(OcL)?>2|g1slt|L$Y?4rp>i`nixP)9Vn0^`msXE}yvIHQQpx8}w1h3SVPyMml&Yp9wz5_)#o3zEO8Bi*unc9++>I!THs` zFo@6=`#>`buzbutI(qV43m`<3X*sY8&PT_Hz-SnEV)pR?L{B@UKYCEaok~080{n{Y zmtui2nuucR$qdx;T94h?UX8&iLYVJqyY|9kKP}v0E!h(x`p`G7&tQ0*aOX^i!O{VaI83u|)ik9U0&1PFD=ja) z*4YIC_OAhI=bj(jjzU|cbbKS@B8}VHLVM!nISKNuNuK9Da_wu5l0MGt-#IsuEv8ot zW7nh=wS_GgmlWSq9T*^^NXOY+98+B`wn(Es^|tdr&ugLIi(E6*TYE|z5#!JpDHmpv zBxpkt5i-6I!XUv#$QYdCMC0IX3BW{3>(*-$_PELepzH)3E{Xy8n9YY&!X!OS9~~-^ z-*_g91pHb(V zMlc5gM1*Qk5j-Oh)WAn60jrf2K3^R{;m>$J;f`*Av9N$4;QdDuZr9C##x3M-q-3G$ zN+eOO_k{4~!catyzEjZ_D3>MC6;WoYOi(eK68S@wb){$sI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>z0De=cb4sc8AsT1 zEV@yAd|jQ(*r1z++*=}BDu}%6n=!OgDx3a$P?yQUHTwN~#+GJ^yY(+$Jo$RDsmP4H VIPO4R2mSsOYr^iUR;pM%`WFJMkR1R3 literal 0 HcmV?d00001 diff --git a/Images.xcassets/web.imageset/web@2x.png b/Images.xcassets/web.imageset/web@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..51945898162046a2a7c3a316f6662f821ae4916d GIT binary patch literal 2497 zcmaJ@c~}$o77Ypof(u~@YaxV9DkLObH-O9YiWdR9;(Y^H@lh-%HhP;2%2`5I2=D=jiIVW61!A&B2f)FU?fV$J|KWrx$M8W)Gu;ZtiTs4BGUj7?;ybT5P^Ku$CAmsFXyu5 zi+Z29>@Vly^hGXKkqmaFvH#WR)h&g4R;HhAt5|$CJ|IxIU8JxzQbtjHEnhj(X|4g1 z!OKOV(E+=4zUTD%c+Z}Ii>6Z=I~kf+&oCU?z1Q{a?^B&~&3b#&sQCg|%yqcS%`7fl z9L>19-608{)*kAYoU8T&{OI>qN@L_ zzWVm&RMm))QDT;Em7V}Osg_0EBiZ8x&r#P-5uA2gq(9nJ{z08w;De29W#=i6$!yb> z&ATn5|kO4F9P z7ZDzE7#3W%_$_j&cSmQKd6R{+T|dElf;rDEt)T{CY<1#a3u=Yt!?x{J+AdnYuJ2t- z0?Qvxiz|i06EOv;{ESyUCv{Bp1iDrlLn+5)3CrJI&T4DykUo)i<42!7D6)8SJ6t_b zZC;w1){qh%Whl#+O*GvXz6^Qr$nw3rmmRW9(?s)JIuv(WnsqZ;ZgMROeVVz@DD>in zcMD(nGvVy5OD)PvH9P9N%2eY9HPQwyCdk7^Ne{2VIXhF^5t>zr&{qvzlb82>%Y7Wt zt2JGp@tWH?+%wV;aeM|f6nZqE5LMDDSTCot-Ww&HlKK2OnFS3ZYr#Y%W&oVb(VGA zO4##vQnG9~Rq!7X#C9qxvB}w`uK%j`W|na%7x?2B;Z{TA2pc(HZN#Sjddb%Tb?Z{h zyM2~j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ollegeAdmin.xcodeproj/project.pbxproj +++ b/MobileCollegeAdmin.xcodeproj/project.pbxproj @@ -13,6 +13,8 @@ 0A8BC6E319C3955C007C2CB3 /* MCAResourcesDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */; }; 0A8BC6E619C395E2007C2CB3 /* MCAResourcesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */; }; B6DF3B9119C69A44007AE61B /* MCAResourceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B6DF3B9019C69A44007AE61B /* MCAResourceCell.m */; }; + B6E323F019C7902300C12AAF /* RFRateMe.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E323ED19C7902300C12AAF /* RFRateMe.m */; }; + B6E323F119C7902300C12AAF /* UIAlertView+NSCookbook.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E323EF19C7902300C12AAF /* UIAlertView+NSCookbook.m */; }; CE0D694F1995DC5C009C0DBE /* MCADBIntraction.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */; }; CE0D69521995FE9C009C0DBE /* MCAAddTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D69511995FE9C009C0DBE /* MCAAddTaskViewController.m */; }; CE174993198D19C200F61135 /* AryaHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = CE174992198D19C200F61135 /* AryaHUD.m */; }; @@ -150,6 +152,10 @@ 0A8BC6E519C395E2007C2CB3 /* MCAResourcesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesViewController.m; sourceTree = ""; }; B6DF3B8F19C69A44007AE61B /* MCAResourceCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourceCell.h; sourceTree = ""; }; B6DF3B9019C69A44007AE61B /* MCAResourceCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourceCell.m; sourceTree = ""; }; + B6E323EC19C7902300C12AAF /* RFRateMe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RFRateMe.h; sourceTree = ""; }; + B6E323ED19C7902300C12AAF /* RFRateMe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RFRateMe.m; sourceTree = ""; }; + B6E323EE19C7902300C12AAF /* UIAlertView+NSCookbook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+NSCookbook.h"; sourceTree = ""; }; + B6E323EF19C7902300C12AAF /* UIAlertView+NSCookbook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+NSCookbook.m"; sourceTree = ""; }; CE0D694D1995DC5C009C0DBE /* MCADBIntraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCADBIntraction.h; sourceTree = ""; }; CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCADBIntraction.m; sourceTree = ""; }; CE0D69501995FE9C009C0DBE /* MCAAddTaskViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAAddTaskViewController.h; sourceTree = ""; }; @@ -397,6 +403,17 @@ name = Resources; sourceTree = ""; }; + B6E323F219C7902700C12AAF /* RFRateMe */ = { + isa = PBXGroup; + children = ( + B6E323EC19C7902300C12AAF /* RFRateMe.h */, + B6E323ED19C7902300C12AAF /* RFRateMe.m */, + B6E323EE19C7902300C12AAF /* UIAlertView+NSCookbook.h */, + B6E323EF19C7902300C12AAF /* UIAlertView+NSCookbook.m */, + ); + name = RFRateMe; + sourceTree = ""; + }; CE174990198D19A100F61135 /* HUD */ = { isa = PBXGroup; children = ( @@ -749,6 +766,7 @@ CE84C2311962DB6200A351FF /* AppExternal */ = { isa = PBXGroup; children = ( + B6E323F219C7902700C12AAF /* RFRateMe */, CEAB94E219BB189A00D4EC9E /* Objective-Zip */, CE394C3319938D0C0080B5B8 /* MCACustomController */, CE2DFC4419AF1B0A000D59EB /* LocalStoredFolder */, @@ -1059,6 +1077,7 @@ CE1805A0198656260087CA3D /* MCAStudentDHolder.m in Sources */, CE69728719C3057000DDE7F5 /* MCAChangePwdViewController.m in Sources */, CEEDCAE3197F962F0088511D /* MCALoginDHolder.m in Sources */, + B6E323F119C7902300C12AAF /* UIAlertView+NSCookbook.m in Sources */, CEA9D9D1197FEFFE009C3884 /* Reachability.m in Sources */, CE36AE0219BD6B75004C047D /* MCADropboxNotesViewController.m in Sources */, CEEDCABB197F8BE20088511D /* ASIAuthenticationDialog.m in Sources */, @@ -1074,6 +1093,7 @@ 0A3824B419C39E0000662A39 /* MCAResourcesDHolder.m in Sources */, CEEDCAD1197F8BF30088511D /* NSString+SBJSON.m in Sources */, CE32DA7719AAF14A0037C555 /* UIView+convenience.m in Sources */, + B6E323F019C7902300C12AAF /* RFRateMe.m in Sources */, CE278A1A19920D6700783592 /* SWCellScrollView.m in Sources */, CE278A1919920D6700783592 /* NSMutableArray+SWUtilityButtons.m in Sources */, CE303986199F230D00D17A2B /* MCAMoreViewController.m in Sources */, diff --git a/MobileCollegeAdmin/MobileCollegeAdmin-Prefix.pch b/MobileCollegeAdmin/MobileCollegeAdmin-Prefix.pch index 3cdba4c..6582614 100644 --- a/MobileCollegeAdmin/MobileCollegeAdmin-Prefix.pch +++ b/MobileCollegeAdmin/MobileCollegeAdmin-Prefix.pch @@ -13,6 +13,7 @@ #import "MCADBIntraction.h" #import "MCAGlobalFunction.h" #import "MCARestIntraction.h" +#import "RFRateMe.h" #ifndef __IPHONE_5_0 #warning "This project uses features only available in iOS SDK 5.0 and later." From bfb2b691c99e16d79d0c68cdd83fa848da83a1fc Mon Sep 17 00:00:00 2001 From: dongjieArya Date: Tue, 16 Sep 2014 12:14:40 -0700 Subject: [PATCH 6/7] add new view for book button on resource navigation bar. --- AppConstants/MCAConstant.h | 3 + AppModel/MCAResourcesBookDHolder.h | 16 +++ AppModel/MCAResourcesBookDHolder.m | 15 ++ AppRestIntraction/MCARestIntraction.h | 2 + AppRestIntraction/MCARestIntraction.m | 61 ++++++++ .../tabBar/MCAResourcesBookController.h | 21 +++ .../tabBar/MCAResourcesBookController.m | 136 ++++++++++++++++++ .../MCAResourcesCategoryViewController.m | 37 +++-- .../tabBar/MCAResourcesDetailViewController.m | 6 +- .../tabBar/MCAResourcesViewController.m | 16 +-- Main_Iphone.storyboard | 87 ++++++++--- MobileCollegeAdmin.xcodeproj/project.pbxproj | 12 ++ 12 files changed, 364 insertions(+), 48 deletions(-) create mode 100644 AppModel/MCAResourcesBookDHolder.h create mode 100644 AppModel/MCAResourcesBookDHolder.m create mode 100644 AppUI/AppController/tabBar/MCAResourcesBookController.h create mode 100644 AppUI/AppController/tabBar/MCAResourcesBookController.m diff --git a/AppConstants/MCAConstant.h b/AppConstants/MCAConstant.h index 6061283..65e21fb 100644 --- a/AppConstants/MCAConstant.h +++ b/AppConstants/MCAConstant.h @@ -94,6 +94,9 @@ #define NOTIFICATION_RESOURCE_SUCCESS @"notificationResourcesSuccess" #define NOTIFICATION_RESOURCE_FAILED @"notificationResourcesFailed" +#define NOTIFICATION_RESOURCE_BOOK_SUCCESS @"notificationResourcesBookSuccess" +#define NOTIFICATION_RESOURCE_BOOK_FAILED @"notificationResourcesBookFailed" + #define NOTIFICATION_USER_PROFILE_EDIT_SUCCESS @"notificationUserProfileEditSuccess" #define NOTIFICATION_USER_PROFILE_EDIT_FAILED @"notificationUserProfileEditFailed" diff --git a/AppModel/MCAResourcesBookDHolder.h b/AppModel/MCAResourcesBookDHolder.h new file mode 100644 index 0000000..76c80af --- /dev/null +++ b/AppModel/MCAResourcesBookDHolder.h @@ -0,0 +1,16 @@ +// +// MCAResourcesBookDHolder.h +// MobileCollegeAdmin +// +// Created by Dongjie Zhang on 9/16/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import + +@interface MCAResourcesBookDHolder : NSObject + +@property(nonatomic,strong)NSString *str_book_name; +@property(nonatomic,strong)NSString *str_url; + +@end diff --git a/AppModel/MCAResourcesBookDHolder.m b/AppModel/MCAResourcesBookDHolder.m new file mode 100644 index 0000000..77bad59 --- /dev/null +++ b/AppModel/MCAResourcesBookDHolder.m @@ -0,0 +1,15 @@ +// +// MCAResourcesBookDHolder.m +// MobileCollegeAdmin +// +// Created by Dongjie Zhang on 9/16/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourcesBookDHolder.h" + +@implementation MCAResourcesBookDHolder + +@synthesize str_url, str_book_name; + +@end diff --git a/AppRestIntraction/MCARestIntraction.h b/AppRestIntraction/MCARestIntraction.h index 2e269a7..f5a4fe8 100644 --- a/AppRestIntraction/MCARestIntraction.h +++ b/AppRestIntraction/MCARestIntraction.h @@ -12,6 +12,7 @@ #import "MCANotesDHolder.h" #import "MCAResourcesDHolder.h" #import "MCAResourcesCatDHolder.h" +#import "MCAResourcesBookDHolder.h" #import "MCASignUpDHolder.h" #import "MCANotesCatDHolder.h" #import "ASIFormDataRequest.h" @@ -40,6 +41,7 @@ MCARestIntraction *restIntraction; -(void)requestForResourcesCategory:(NSString*)info; -(void)requestForNotes:(NSString*)info; -(void)requestForResources:(NSString*)info; +-(void)requestForResourcesBook:(NSString*)info; -(void)requestForUserProfileEdit:(NSString *)info; -(void)requestForChangePwd:(NSString *)info; diff --git a/AppRestIntraction/MCARestIntraction.m b/AppRestIntraction/MCARestIntraction.m index 9eab5c9..274758a 100644 --- a/AppRestIntraction/MCARestIntraction.m +++ b/AppRestIntraction/MCARestIntraction.m @@ -903,6 +903,67 @@ -(void)requestResourcesSuccess:(ASIFormDataRequest*)request{ } } +#pragma mark - RESOURCES_BOOK + +-(void)requestForResourcesBook:(NSString *)info{ + + NSURL *url = [NSURL URLWithString:URL_MAIN]; + ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url]; + + [request setPostValue:info forKey:@"data"]; + + [request setDelegate:self]; + [request setDidFailSelector:@selector(requestResourcesBookFail:)]; + [request setDidFinishSelector:@selector(requestResourcesBookSuccess:)]; + [request startAsynchronous]; +} +-(void)requestResourcesBookFail:(ASIFormDataRequest*)request{ + + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_FAILED object:@"Unable to get resource Book at this movement."]; + }); +} +-(void)requestResourcesBookSuccess:(ASIFormDataRequest*)request{ + + NSString *responseString = [request responseString]; + responseString = [[responseString componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]] componentsJoinedByString:@""]; + responseString = [responseString stringByReplacingOccurrencesOfString:@"\t" withString:@""]; + SBJSON *parser=[[SBJSON alloc]init]; + + NSDictionary *results = [parser objectWithString:responseString error:nil]; + //NSMutableDictionary *responseDict = ((NSMutableDictionary *)[results objectForKey:@"data"]); + + NSMutableArray *arr_resourcesBook = (NSMutableArray*)[results objectForKey:@"data"]; + NSString *status_code = [results valueForKey:@"status_code"]; + + if ([status_code isEqualToString:@"S1001"]) + { + NSMutableArray *arr_resourcesBookList = [NSMutableArray new]; + + for (int i = 0; i < arr_resourcesBook.count; i++) + { + MCAResourcesBookDHolder *reDHolder = [MCAResourcesBookDHolder new]; + + reDHolder.str_url = [[arr_resourcesBook valueForKey:@"book_url"] objectAtIndex:i]; + reDHolder.str_book_name = [[arr_resourcesBook valueForKey:@"book_name"] objectAtIndex:i]; + [arr_resourcesBookList addObject:reDHolder]; + } + + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_BOOK_SUCCESS object:arr_resourcesBookList]; + }); + } + else{ + + NSString *errMsg = [results valueForKey:@"msg"]; + dispatch_async(dispatch_get_main_queue(), ^ + { + [[NSNotificationCenter defaultCenter]postNotificationName:NOTIFICATION_RESOURCE_BOOK_FAILED object:errMsg]; + }); + } +} #pragma mark - USER_PROFILE_EDIT -(void)requestForUserProfileEdit:(NSString *)info{ diff --git a/AppUI/AppController/tabBar/MCAResourcesBookController.h b/AppUI/AppController/tabBar/MCAResourcesBookController.h new file mode 100644 index 0000000..80a5401 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesBookController.h @@ -0,0 +1,21 @@ +// +// MCAResourcesBookController.h +// MobileCollegeAdmin +// +// Created by Dongjie Zhang on 9/16/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import +#import "MCAResourcesBookDHolder.h" + +@interface MCAResourcesBookController : UIViewController +{ + IBOutlet UITableView *tbl_book; + NSMutableArray *arr_book; + AryaHUD *HUD; +} + + + +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesBookController.m b/AppUI/AppController/tabBar/MCAResourcesBookController.m new file mode 100644 index 0000000..0902262 --- /dev/null +++ b/AppUI/AppController/tabBar/MCAResourcesBookController.m @@ -0,0 +1,136 @@ +// +// MCAResourcesBookController.m +// MobileCollegeAdmin +// +// Created by Dongjie Zhang on 9/16/14. +// Copyright (c) 2014 arya. All rights reserved. +// + +#import "MCAResourcesBookController.h" + +@interface MCAResourcesBookController () + +@end + +@implementation MCAResourcesBookController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + HUD = [AryaHUD new]; + [self.view addSubview:HUD]; + + arr_book = [NSMutableArray new]; + + self.navigationItem.title = @"Resources"; + + + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(resourceBookFailed:) name:NOTIFICATION_RESOURCE_BOOK_FAILED object:nil]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(resourceBookSuccess:) name:NOTIFICATION_RESOURCE_BOOK_SUCCESS object:nil]; + + [self getResourcesBook]; + // Do any additional setup after loading the view. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +-(void)getResourcesBook{ + + NSMutableDictionary * info = [NSMutableDictionary new]; + + [info setValue:@"get_book_for_parent" forKey:@"cmd"]; + [info setValue:@"en_us" forKey:@"language_code"]; + + NSString *str_jsonNotes = [NSString getJsonObject:info]; + [HUD showForTabBar]; + [self.view bringSubviewToFront:HUD]; + [self requestResourceBook:str_jsonNotes]; + +} +#pragma mark - API CALLING + +-(void)requestResourceBook:(NSString*)info{ + + if ([MCAGlobalFunction isConnectedToInternet]) { + + [[MCARestIntraction sharedManager] requestForResourcesBook:info]; + + }else{ + + [HUD hide]; + } +} + +#pragma mark - NSNOTIFICATION SELECTOR + +-(void)resourceBookSuccess:(NSNotification*)notification{ + + [HUD hide]; + arr_book = notification.object; + [tbl_book reloadData]; + //[self writeToFile:nil]; + +} +-(void)resourceBookFailed:(NSNotification*)notification{ + + [HUD hide]; +} + + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 42; + +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return arr_book.count; + +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + MCAResourcesBookDHolder *reDHolder = (MCAResourcesBookDHolder*)[arr_book objectAtIndex:indexPath.row]; + static NSString *cellIdentifier = @"resourcesBookCell"; + UITableViewCell *cell = nil; + cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; + if (!cell) + { + cell = [[UITableViewCell alloc] + initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:cellIdentifier]; + } + UILabel *lbl_catName = (UILabel *)[cell.contentView viewWithTag:2]; + lbl_catName.text = reDHolder.str_book_name; + + UIImageView *img=(UIImageView *)[cell.contentView viewWithTag:1]; + [img removeFromSuperview]; + img = nil; + img = [[UIImageView alloc]initWithFrame:CGRectMake(10, 8, 26, 26)]; + img.tag = 1; + [cell.contentView addSubview:img]; + UIImage *img_web = [UIImage imageNamed:@"web.png"]; + [img setImage:img_web]; + + tbl_book.separatorStyle = UITableViewCellSeparatorStyleSingleLine; + + return cell; + +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + MCAResourcesBookDHolder *reDHolder = (MCAResourcesBookDHolder*)[arr_book objectAtIndex:indexPath.row]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:reDHolder.str_url]]; +} +@end diff --git a/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m index 8e06a5c..b62c1a3 100644 --- a/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m +++ b/AppUI/AppController/tabBar/MCAResourcesCategoryViewController.m @@ -27,7 +27,18 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil - (void)viewDidLoad { [super viewDidLoad]; - + UIImage* img_book = [UIImage imageNamed:@"book.png"]; + CGRect img_bookFrame = CGRectMake(0, 0, img_book.size.width, img_book.size.height); + UIButton *btn_book = [[UIButton alloc] initWithFrame:img_bookFrame]; + [btn_book setBackgroundImage:img_book forState:UIControlStateNormal]; + [btn_book addTarget:self + action:@selector(btnBookDidClicked:) + forControlEvents:UIControlEventTouchUpInside]; + [btn_book setShowsTouchWhenHighlighted:YES]; + UIBarButtonItem *btnBar_book =[[UIBarButtonItem alloc] initWithCustomView:btn_book]; + if ([[[NSUserDefaults standardUserDefaults]valueForKey:KEY_USER_TYPE] isEqualToString:@"p"]){ + [self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects:btnBar_book,nil]]; + } HUD = [AryaHUD new]; [self.view addSubview:HUD]; @@ -100,16 +111,6 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * } --(void)willPresentAlertView:(UIAlertView *)alertView{ - UIImage *theImage = [UIImage imageNamed:@"BlueBg.png"]; - UIView *view=[alertView valueForKey:@"_backgroundImageView"]; - //Set frame according to adustable - UIImageView *image=[[UIImageView alloc] initWithImage:theImage]; - [image setFrame:CGRectMake(0, 0, 280, 130)]; - [view addSubview:image]; - NSLog(@"%lu", (unsigned long)[alertView subviews].count); - //[[[alertView subviews] objectAtIndex:3] setBackgroundColor:[UIColor blueColor]]; -} -(void)alertView:(UIAlertView*)alterView clickedButtonAtIndex:(NSInteger)buttonIndex{ if (buttonIndex == 1) { @@ -142,6 +143,16 @@ -(void)requestResourcesCategory:(NSString*)info{ [HUD hide]; arr_resourcesCategory = [[MCADBIntraction databaseInteractionManager] retrieveResourceCatList: nil]; + if (![[[NSUserDefaults standardUserDefaults]valueForKey:KEY_USER_TYPE] isEqualToString:@"p"]) + { + for (int i = 0; i - + @@ -1942,7 +1942,7 @@ - + @@ -1991,7 +1991,7 @@ - + @@ -2063,6 +2063,7 @@ + @@ -2122,7 +2123,7 @@ - + @@ -2220,7 +2221,7 @@ - + @@ -2246,7 +2247,7 @@ - + @@ -2287,7 +2288,7 @@ - + @@ -2308,7 +2309,7 @@ - + @@ -2617,7 +2618,7 @@ - + @@ -2723,7 +2724,7 @@ - + @@ -2774,7 +2775,7 @@ - + @@ -2796,12 +2797,8 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2859,7 +2910,7 @@ - + diff --git a/MobileCollegeAdmin.xcodeproj/project.pbxproj b/MobileCollegeAdmin.xcodeproj/project.pbxproj index 4120942..d8c01f3 100644 --- a/MobileCollegeAdmin.xcodeproj/project.pbxproj +++ b/MobileCollegeAdmin.xcodeproj/project.pbxproj @@ -15,6 +15,8 @@ B6DF3B9119C69A44007AE61B /* MCAResourceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B6DF3B9019C69A44007AE61B /* MCAResourceCell.m */; }; B6E323F019C7902300C12AAF /* RFRateMe.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E323ED19C7902300C12AAF /* RFRateMe.m */; }; B6E323F119C7902300C12AAF /* UIAlertView+NSCookbook.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E323EF19C7902300C12AAF /* UIAlertView+NSCookbook.m */; }; + B6E7966D19C8ADBD00858B66 /* MCAResourcesBookController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E7966C19C8ADBD00858B66 /* MCAResourcesBookController.m */; }; + B6E7967019C8B60500858B66 /* MCAResourcesBookDHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = B6E7966F19C8B60500858B66 /* MCAResourcesBookDHolder.m */; }; CE0D694F1995DC5C009C0DBE /* MCADBIntraction.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */; }; CE0D69521995FE9C009C0DBE /* MCAAddTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0D69511995FE9C009C0DBE /* MCAAddTaskViewController.m */; }; CE174993198D19C200F61135 /* AryaHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = CE174992198D19C200F61135 /* AryaHUD.m */; }; @@ -156,6 +158,10 @@ B6E323ED19C7902300C12AAF /* RFRateMe.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RFRateMe.m; sourceTree = ""; }; B6E323EE19C7902300C12AAF /* UIAlertView+NSCookbook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+NSCookbook.h"; sourceTree = ""; }; B6E323EF19C7902300C12AAF /* UIAlertView+NSCookbook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+NSCookbook.m"; sourceTree = ""; }; + B6E7966B19C8ADBD00858B66 /* MCAResourcesBookController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesBookController.h; sourceTree = ""; }; + B6E7966C19C8ADBD00858B66 /* MCAResourcesBookController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesBookController.m; sourceTree = ""; }; + B6E7966E19C8B60500858B66 /* MCAResourcesBookDHolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAResourcesBookDHolder.h; sourceTree = ""; }; + B6E7966F19C8B60500858B66 /* MCAResourcesBookDHolder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCAResourcesBookDHolder.m; sourceTree = ""; }; CE0D694D1995DC5C009C0DBE /* MCADBIntraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCADBIntraction.h; sourceTree = ""; }; CE0D694E1995DC5C009C0DBE /* MCADBIntraction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCADBIntraction.m; sourceTree = ""; }; CE0D69501995FE9C009C0DBE /* MCAAddTaskViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCAAddTaskViewController.h; sourceTree = ""; }; @@ -399,6 +405,8 @@ 0A8BC6E219C3955C007C2CB3 /* MCAResourcesDetailViewController.m */, B6DF3B8F19C69A44007AE61B /* MCAResourceCell.h */, B6DF3B9019C69A44007AE61B /* MCAResourceCell.m */, + B6E7966B19C8ADBD00858B66 /* MCAResourcesBookController.h */, + B6E7966C19C8ADBD00858B66 /* MCAResourcesBookController.m */, ); name = Resources; sourceTree = ""; @@ -749,6 +757,8 @@ 0A3824B019C39DE700662A39 /* MCAResourcesCatDHolder.m */, 0A3824B219C39E0000662A39 /* MCAResourcesDHolder.h */, 0A3824B319C39E0000662A39 /* MCAResourcesDHolder.m */, + B6E7966E19C8B60500858B66 /* MCAResourcesBookDHolder.h */, + B6E7966F19C8B60500858B66 /* MCAResourcesBookDHolder.m */, ); path = AppModel; sourceTree = ""; @@ -1063,6 +1073,7 @@ CE27456619C02C0900DDA5A8 /* MCAAppDelegate.m in Sources */, CEEDCAD0197F8BF30088511D /* NSObject+SBJSON.m in Sources */, CE2AE6311998881100B23FFF /* FMResultSet.m in Sources */, + B6E7967019C8B60500858B66 /* MCAResourcesBookDHolder.m in Sources */, CE32DA7619AAF14A0037C555 /* MCACalendarView.m in Sources */, 0A3824B119C39DE700662A39 /* MCAResourcesCatDHolder.m in Sources */, CE278A1B19920D6700783592 /* SWLongPressGestureRecognizer.m in Sources */, @@ -1079,6 +1090,7 @@ CEEDCAE3197F962F0088511D /* MCALoginDHolder.m in Sources */, B6E323F119C7902300C12AAF /* UIAlertView+NSCookbook.m in Sources */, CEA9D9D1197FEFFE009C3884 /* Reachability.m in Sources */, + B6E7966D19C8ADBD00858B66 /* MCAResourcesBookController.m in Sources */, CE36AE0219BD6B75004C047D /* MCADropboxNotesViewController.m in Sources */, CEEDCABB197F8BE20088511D /* ASIAuthenticationDialog.m in Sources */, CE394C3619938D300080B5B8 /* MCACustomButton.m in Sources */, From 0d1b29e1a924c0162033976b8cb27b6c828160a2 Mon Sep 17 00:00:00 2001 From: dongjieArya Date: Wed, 17 Sep 2014 11:29:32 -0700 Subject: [PATCH 7/7] fix the third page of resource --- .../tabBar/MCAResourcesDetailViewController.m | 65 +++++++++++++++---- .../tabBar/MCAResourcesViewController.m | 20 +----- Main_Iphone.storyboard | 10 ++- 3 files changed, 61 insertions(+), 34 deletions(-) diff --git a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m index 3cb80dc..5adb25f 100644 --- a/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m +++ b/AppUI/AppController/tabBar/MCAResourcesDetailViewController.m @@ -31,11 +31,20 @@ - (void)viewDidLoad arr_url = [NSMutableArray new]; self.navigationItem.title = reDHolder.str_book_name; - NSArray * arr_url_old = [reDHolder.str_url componentsSeparatedByString:@"\\n"]; + NSArray * arr_url_old = [reDHolder.str_url componentsSeparatedByString:@"]["]; for(NSString* strl in arr_url_old){ - NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"\\[]\""]; - NSString *str = [[strl componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""]; - [arr_url addObject:str]; + if ([strl rangeOfString:@"\\n"].location != NSNotFound) { + NSArray *arr_str = [strl componentsSeparatedByString:@"\\n"]; + for (NSString* strs in arr_str) { + NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"\\[]\""]; + NSString *str = [[strs componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""]; + [arr_url addObject:str]; + } + }else{ + NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"\\[]\""]; + NSString *str = [[strl componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""]; + [arr_url addObject:str]; + } } [[NSNotificationCenter defaultCenter] addObserver:self @@ -62,7 +71,9 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { -// [self configureCell:cell forRowAtIndexPath:indexPath]; + + + static NSString *cellIdentifier = @"urlCell"; UITableViewCell *cell = nil; cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; @@ -73,8 +84,24 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N reuseIdentifier:cellIdentifier]; } NSString* str = [arr_url objectAtIndex:indexPath.row]; + UIImageView *img_cat=(UIImageView *)[cell.contentView viewWithTag:1]; + [img_cat removeFromSuperview]; + img_cat = nil; + img_cat = [[UIImageView alloc]initWithFrame:CGRectMake(10, 8, 26, 26)]; + img_cat.tag = 1; + [cell.contentView addSubview:img_cat]; UILabel *lbl_catName = (UILabel *)[cell.contentView viewWithTag:2]; - lbl_catName.text = str; + + if ([reDHolder.str_url rangeOfString:@"http"].location == NSNotFound) { + UIImage *img_book = [UIImage imageNamed:@"book.png"]; + [img_cat setImage:img_book]; + lbl_catName.text = str; + }else{ + UIImage *img_web = [UIImage imageNamed:@"web.png"]; + [img_cat setImage:img_web]; + lbl_catName.text = str; + }; + lbl_catName.numberOfLines = 0; lbl_catName.lineBreakMode = NSLineBreakByWordWrapping; [lbl_catName sizeToFit]; @@ -87,14 +114,24 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ NSString* str = [arr_url objectAtIndex:indexPath.row]; - - CGSize constraint = {236, 20000}; - - CGSize size = [str sizeWithFont: [UIFont fontWithName:@"Verdana" size:13] constrainedToSize:constraint lineBreakMode:UILineBreakModeWordWrap]; - - CGFloat height = MAX(size.height, 44.0f); - - return height+10; + CGSize widthSize = CGSizeMake(236,9999); + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping; + CGRect textRect = [str boundingRectWithSize:widthSize + options:NSStringDrawingUsesLineFragmentOrigin + attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f],NSParagraphStyleAttributeName: paragraphStyle.copy} + context:nil]; + CGSize size = textRect.size; + CGFloat height = MAX(size.height, 42.0f); + return height; +} + +-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + NSString *str = [arr_url objectAtIndex:indexPath.row]; + if ([str rangeOfString:@"http"].location!= NSNotFound) { + NSString *url = [str substringFromIndex:[str rangeOfString:@"http"].location]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; + } } diff --git a/AppUI/AppController/tabBar/MCAResourcesViewController.m b/AppUI/AppController/tabBar/MCAResourcesViewController.m index 1ad87a2..e373f27 100644 --- a/AppUI/AppController/tabBar/MCAResourcesViewController.m +++ b/AppUI/AppController/tabBar/MCAResourcesViewController.m @@ -121,14 +121,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N img_cat = [[UIImageView alloc]initWithFrame:CGRectMake(10, 8, 26, 26)]; img_cat.tag = 1; [cell.contentView addSubview:img_cat]; - if ([reDHolder.str_url rangeOfString:@"http"].location == NSNotFound) { - UIImage *img_book = [UIImage imageNamed:@"book.png"]; - [img_cat setImage:img_book]; - }else{ - UIImage *img_web = [UIImage imageNamed:@"web.png"]; - [img_cat setImage:img_web]; - } - + UIImage *img_book = [UIImage imageNamed:@"book.png"]; + [img_cat setImage:img_book]; tbl_resources.separatorStyle = UITableViewCellSeparatorStyleSingleLine; @@ -137,15 +131,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ MCAResourcesDHolder *reDHolder = (MCAResourcesDHolder*)[arr_resources objectAtIndex:indexPath.row]; - if ([reDHolder.str_url rangeOfString:@"http"].location == NSNotFound) { - [self performSegueWithIdentifier:@"segue_url" sender:reDHolder]; - } - else{ - NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"\\[]\""]; - NSString* url = [[reDHolder.str_url componentsSeparatedByCharactersInSet:doNotWant] componentsJoinedByString:@""]; - url = [url substringFromIndex:[url rangeOfString:@"http"].location]; - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; - } + [self performSegueWithIdentifier:@"segue_url" sender:reDHolder]; } #pragma mark - OTHER_METHOD diff --git a/Main_Iphone.storyboard b/Main_Iphone.storyboard index 8b77c51..2878a81 100644 --- a/Main_Iphone.storyboard +++ b/Main_Iphone.storyboard @@ -2039,7 +2039,7 @@