Commit 8b27616c authored by Sandy's avatar Sandy

增加演示Demo的target

parent 913bf261
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>生鲜采购</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.12</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
This diff is collapsed.
...@@ -9,66 +9,67 @@ ...@@ -9,66 +9,67 @@
#import "ICRAppViewControllerManager.h" #import "ICRAppViewControllerManager.h"
#import "ICRUIAppearance.h" #import "ICRUIAppearance.h"
#import "BusinessViewController.h"
#import "IBTUINavigationController.h" #import "IBTUINavigationController.h"
#import "ICRLoginViewController.h"
#import "ICRHomeViewController.h" #import "ICRHomeViewController.h"
#import "BusinessViewController.h" #import "ICRLoginViewController.h"
#import "ReportViewController.h"
#import "ICRSyncViewController.h" #import "ICRSyncViewController.h"
#import "ICRSystemViewController.h" #import "ICRSystemViewController.h"
#import "ReportDetailViewController.h" #import "ReportDetailViewController.h"
@interface ICRAppViewControllerManager () #import "ReportViewController.h"
< @interface ICRAppViewControllerManager () <UITabBarControllerDelegate>
UITabBarControllerDelegate
>
@end @end
@implementation ICRAppViewControllerManager @implementation ICRAppViewControllerManager
+ (UINavigationController *)getCurrentNavigationController { + (UINavigationController *)getCurrentNavigationController
{
return nil; return nil;
} }
+ (IBTTabBarController *)getTabBarController { + (IBTTabBarController *)getTabBarController
{
return [[self getAppViewControllerManager] getTabBarController]; return [[self getAppViewControllerManager] getTabBarController];
} }
+ (ICRAppViewControllerManager *)getAppViewControllerManager { + (ICRAppViewControllerManager *)getAppViewControllerManager
{
static ICRAppViewControllerManager *_sharedMgr = nil; static ICRAppViewControllerManager *_sharedMgr = nil;
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
_sharedMgr = [[ICRAppViewControllerManager alloc] initWithWindow:keyWindow]; _sharedMgr = [[ICRAppViewControllerManager alloc] initWithWindow:keyWindow];
}); });
return _sharedMgr; return _sharedMgr;
} }
- (id)initWithWindow:(UIWindow *)window { - (id)initWithWindow:(UIWindow *)window
{
self = [super init]; self = [super init];
if (!self) { if (!self) {
return nil; return nil;
} }
[ICRUIAppearance CustomAppearance]; [ICRUIAppearance CustomAppearance];
m_window = window; m_window = window;
m_arrTabBarBaseViewController = [NSMutableArray array]; m_arrTabBarBaseViewController = [NSMutableArray array];
m_arrViewController = [NSMutableArray array]; m_arrViewController = [NSMutableArray array];
// Automatic login // Automatic login
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance]; ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
if ([userUtil isLogin]) { if ([userUtil isLogin]) {
[self openMainFrame]; [self openMainFrame];
} } else {
else {
[self openFirstView]; [self openFirstView];
} }
return self; return self;
} }
- (void)dealloc { - (void)dealloc
{
m_window = nil; m_window = nil;
m_arrViewController = nil; m_arrViewController = nil;
m_arrTabBarBaseViewController = nil; m_arrTabBarBaseViewController = nil;
...@@ -76,116 +77,124 @@ ...@@ -76,116 +77,124 @@
} }
#pragma mark - Public Method #pragma mark - Public Method
- (CGSize)getRootViewSize { - (CGSize)getRootViewSize
{
return m_window.rootViewController.view.frame.size; return m_window.rootViewController.view.frame.size;
} }
- (IBTTabBarController *)getTabBarController { - (IBTTabBarController *)getTabBarController
{
return m_tabbarController; return m_tabbarController;
} }
- (NSUInteger)getCurTabBarIndex { - (NSUInteger)getCurTabBarIndex
{
return m_tabbarController.selectedIndex; return m_tabbarController.selectedIndex;
} }
- (UIViewController *)getTabBarBaseViewController:(CRTapBarItemIndex)index { - (UIViewController *)getTabBarBaseViewController:(CRTapBarItemIndex)index
{
if (index > kCRSystem || index > [m_arrTabBarBaseViewController count]) { if (index > kCRSystem || index > [m_arrTabBarBaseViewController count]) {
return nil; return nil;
} }
return m_arrTabBarBaseViewController[ index ]; return m_arrTabBarBaseViewController[index];
} }
- (void)openFirstView { - (void)openFirstView
{
if ([m_window.rootViewController isKindOfClass:[IBTUINavigationController class]]) { if ([m_window.rootViewController isKindOfClass:[IBTUINavigationController class]]) {
IBTUINavigationController *navCtrl = (IBTUINavigationController *)m_window.rootViewController; IBTUINavigationController *navCtrl = (IBTUINavigationController *)m_window.rootViewController;
if ([[navCtrl.viewControllers lastObject] isKindOfClass:[ICRLoginViewController class]]) { if ([[navCtrl.viewControllers lastObject] isKindOfClass:[ICRLoginViewController class]]) {
return; return;
} } else if ([[navCtrl.viewControllers firstObject] isKindOfClass:[ICRLoginViewController class]]) {
else if ([[navCtrl.viewControllers firstObject] isKindOfClass:[ICRLoginViewController class]]) {
[navCtrl popToRootViewControllerAnimated:YES]; [navCtrl popToRootViewControllerAnimated:YES];
return; return;
} }
} }
ICRLoginViewController *loginCtrl = [[ICRLoginViewController alloc] init]; ICRLoginViewController *loginCtrl = [[ICRLoginViewController alloc] init];
IBTUINavigationController *naviCtrl = [[IBTUINavigationController alloc] initWithRootViewController:loginCtrl]; IBTUINavigationController *naviCtrl = [[IBTUINavigationController alloc] initWithRootViewController:loginCtrl];
naviCtrl.navigationBarHidden = YES; naviCtrl.navigationBarHidden = YES;
m_window.rootViewController = naviCtrl; m_window.rootViewController = naviCtrl;
} }
// 主页面 // 主页面
- (void)openMainFrame { - (void)openMainFrame
if (m_window.rootViewController && {
m_window.rootViewController == m_tabbarController) { if (m_window.rootViewController && m_window.rootViewController == m_tabbarController) {
return; return;
} }
[m_arrTabBarBaseViewController removeAllObjects]; [m_arrTabBarBaseViewController removeAllObjects];
[m_arrViewController removeAllObjects]; [m_arrViewController removeAllObjects];
[self createHomeViewController];//首页 [self createHomeViewController]; //首页
[self createBusinessViewController];//业务 [self createBusinessViewController];//业务
if ([IBTCommon checkIsPermission:Report_ACTION_Check]) { if ([IBTCommon checkIsPermission:Report_ACTION_Check]) {
[self createReportViewController]; [self createReportViewController];
} }
[self createSyncViewController]; #ifdef Demonstrate
#else
[self createSyncViewController];
#endif
[self createSystemViewController]; [self createSystemViewController];
if (!m_tabbarController) { if (!m_tabbarController) {
m_tabbarController = [[IBTTabBarController alloc] init]; m_tabbarController = [[IBTTabBarController alloc] init];
m_tabbarController.delegate = self; m_tabbarController.delegate = self;
} }
// 添加 首页 门店 同步 系统 // 添加 首页 门店 同步 系统
[m_tabbarController setViewControllers:m_arrViewController]; [m_tabbarController setViewControllers:m_arrViewController];
// 默认首次进入 // 默认首次进入
[m_tabbarController setSelectedIndex:kCRHome]; [m_tabbarController setSelectedIndex:kCRHome];
// 底部bar // 底部bar
m_window.rootViewController = m_tabbarController; m_window.rootViewController = m_tabbarController;
} }
#pragma mark - Actions #pragma mark - Actions
- (void)doLogout { - (void)doLogout
{
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance]; ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
[userUtil logout]; [userUtil logout];
[ICRDataBaseController CleanUpDBPath]; [ICRDataBaseController CleanUpDBPath];
[self openFirstView]; [self openFirstView];
} }
#pragma mark - Creation #pragma mark - Creation
- (void)createHomeViewController { - (void)createHomeViewController
{
NSString *nsTitle = ACETapBarItemNames[ kCRHome ];
NSString *nsTitle = ACETapBarItemNames[kCRHome];
ICRHomeViewController *homeVCtrl = [[ICRHomeViewController alloc] init]; ICRHomeViewController *homeVCtrl = [[ICRHomeViewController alloc] init];
[m_arrTabBarBaseViewController addObject:homeVCtrl]; [m_arrTabBarBaseViewController addObject:homeVCtrl];
homeVCtrl.title = [IBTCommon localizableString:nsTitle]; homeVCtrl.title = [IBTCommon localizableString:nsTitle];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:homeVCtrl]; IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:homeVCtrl];
[m_arrViewController addObject:navCtrl]; [m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle; navCtrl.title = nsTitle;
} }
-(void)createBusinessViewController - (void)createBusinessViewController
{ {
NSString *nsTitle = ACETapBarItemNames[ kCRBusiness ]; NSString *nsTitle = ACETapBarItemNames[kCRBusiness];
BusinessViewController *businessVCtrl=[[BusinessViewController alloc]init]; BusinessViewController *businessVCtrl = [[BusinessViewController alloc] init];
[m_arrTabBarBaseViewController addObject:businessVCtrl]; [m_arrTabBarBaseViewController addObject:businessVCtrl];
businessVCtrl.title=[IBTCommon localizableString:nsTitle]; businessVCtrl.title = [IBTCommon localizableString:nsTitle];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:businessVCtrl]; IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:businessVCtrl];
[m_arrViewController addObject:navCtrl]; [m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle;
navCtrl.title = nsTitle;
} }
- (void)createReportViewController { - (void)createReportViewController
{
//如果登陆的是子节点 //如果登陆的是子节点
ICRUserUtil *user = [ICRUserUtil sharedInstance]; ICRUserUtil *user = [ICRUserUtil sharedInstance];
if (user.belongOrgIsLeaf) { if (user.belongOrgIsLeaf) {
Compass *com = [[Compass alloc]init]; Compass *com = [[Compass alloc] init];
com.orgCode = user.org_code; com.orgCode = user.org_code;
com.orgName = user.org_name; com.orgName = user.org_name;
com.orgUuid = user.org_uuid; com.orgUuid = user.org_uuid;
...@@ -193,49 +202,51 @@ ...@@ -193,49 +202,51 @@
storeVCtrl.compass = com; storeVCtrl.compass = com;
[m_arrTabBarBaseViewController addObject:storeVCtrl]; [m_arrTabBarBaseViewController addObject:storeVCtrl];
storeVCtrl.title = com.orgName; storeVCtrl.title = com.orgName;
NSString *nsTitle = ACETapBarItemNames[ kCRReport ]; NSString *nsTitle = ACETapBarItemNames[kCRReport];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl]; IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl];
[m_arrViewController addObject:navCtrl]; [m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle; navCtrl.title = nsTitle;
}else{ } else {
NSString *nsTitle = ACETapBarItemNames[ kCRReport ]; NSString *nsTitle = ACETapBarItemNames[kCRReport];
ReportViewController *storeVCtrl = [[ReportViewController alloc] init]; ReportViewController *storeVCtrl = [[ReportViewController alloc] init];
[m_arrTabBarBaseViewController addObject:storeVCtrl]; [m_arrTabBarBaseViewController addObject:storeVCtrl];
storeVCtrl.title = [IBTCommon localizableString:nsTitle]; storeVCtrl.title = [IBTCommon localizableString:nsTitle];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl]; IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:storeVCtrl];
[m_arrViewController addObject:navCtrl]; [m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle; navCtrl.title = nsTitle;
} }
} }
- (void)createSyncViewController { - (void)createSyncViewController
NSString *nsTitle = ACETapBarItemNames[ kCRSync ]; {
NSString *nsTitle = ACETapBarItemNames[kCRSync];
ICRSyncViewController *syncVCtrl = [[ICRSyncViewController alloc] init]; ICRSyncViewController *syncVCtrl = [[ICRSyncViewController alloc] init];
[m_arrTabBarBaseViewController addObject:syncVCtrl]; [m_arrTabBarBaseViewController addObject:syncVCtrl];
syncVCtrl.title = [IBTCommon localizableString:nsTitle]; syncVCtrl.title = [IBTCommon localizableString:nsTitle];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:syncVCtrl]; IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:syncVCtrl];
[m_arrViewController addObject:navCtrl]; [m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle; navCtrl.title = nsTitle;
} }
- (void)createSystemViewController { - (void)createSystemViewController
NSString *nsTitle = ACETapBarItemNames[ kCRSystem ]; {
NSString *nsTitle = ACETapBarItemNames[kCRSystem];
ICRSystemViewController *systemVCtrl = [[ICRSystemViewController alloc] init]; ICRSystemViewController *systemVCtrl = [[ICRSystemViewController alloc] init];
[m_arrTabBarBaseViewController addObject:systemVCtrl]; [m_arrTabBarBaseViewController addObject:systemVCtrl];
systemVCtrl.title = [IBTCommon localizableString:nsTitle]; systemVCtrl.title = [IBTCommon localizableString:nsTitle];
IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:systemVCtrl]; IBTUINavigationController *navCtrl = [[IBTUINavigationController alloc] initWithRootViewController:systemVCtrl];
[m_arrViewController addObject:navCtrl]; [m_arrViewController addObject:navCtrl];
navCtrl.title = nsTitle; navCtrl.title = nsTitle;
} }
......
...@@ -226,7 +226,12 @@ ...@@ -226,7 +226,12 @@
self.m_titleLabel.font = [UIFont systemFontOfSize:19.0f]; self.m_titleLabel.font = [UIFont systemFontOfSize:19.0f];
self.m_titleLabel.textColor = [UIColor whiteColor]; self.m_titleLabel.textColor = [UIColor whiteColor];
self.m_titleLabel.textAlignment = NSTextAlignmentCenter; self.m_titleLabel.textAlignment = NSTextAlignmentCenter;
self.m_titleLabel.text = @"移动管理平台";//[IBTCommon localizableString:@"XFFruit"]; #ifdef Demonstrate
self.m_titleLabel.text = @"生鲜采购管理平台";
#else
self.m_titleLabel.text = @"移动管理平台";
#endif
//[IBTCommon localizableString:@"XFFruit"];
[self addSubview:_m_titleLabel]; [self addSubview:_m_titleLabel];
......
...@@ -29,10 +29,16 @@ ...@@ -29,10 +29,16 @@
//#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest" //#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//********正式环境********* ////********正式环境*********
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest" //#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
////
//#define HTTP_REST_REPORT_BASE_URL @"http://122.224.171.126:7380"
//********演示环境*********
#define HTTP_REST_API_BASE_URL @"http://jdcg.demo.hd123.cn:7080/cruiser-server/rest"
// //
#define HTTP_REST_REPORT_BASE_URL @"http://122.224.171.126:7380" #define HTTP_REST_REPORT_BASE_URL @"http://jdcg.demo.hd123.cn:7080"
// HTTP // HTTP
//#define HTTP_REST_API_BASE_URL @"http://115.28.191.44:8080/IPatrol/rest" //#define HTTP_REST_API_BASE_URL @"http://115.28.191.44:8080/IPatrol/rest"
//10月23 122.224.171.126:7280 //10月23 122.224.171.126:7280
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright (c) 2015年 Xummer. All rights reserved. // Copyright (c) 2015年 Xummer. All rights reserved.
// //
#define IBT_APP_ICON_WIDTH (80) #define IBT_APP_ICON_WIDTH (80)
#import "ICRAboutViewController.h" #import "ICRAboutViewController.h"
...@@ -19,83 +19,74 @@ ...@@ -19,83 +19,74 @@
@implementation ICRAboutViewController @implementation ICRAboutViewController
- (void)viewDidLoad { - (void)viewDidLoad
{
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[self initTableViewInfo]; [self initTableViewInfo];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
} }
#pragma mark - Private Method #pragma mark - Private Method
- (void)initTableViewInfo { - (void)initTableViewInfo
{
self.title = [IBTCommon localizableString:@"About"]; self.title = [IBTCommon localizableString:@"About"];
self.m_tableViewInfo = [[IBTTableViewInfo alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; self.m_tableViewInfo = [[IBTTableViewInfo alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
IBTTableView *tableV = [_m_tableViewInfo getTableView]; IBTTableView *tableV = [_m_tableViewInfo getTableView];
[self.view addSubview:tableV]; [self.view addSubview:tableV];
IBTUIView *tableHeader = [[IBTUIView alloc] init]; IBTUIView *tableHeader = [[IBTUIView alloc] init];
tableHeader.backgroundColor = [UIColor clearColor]; tableHeader.backgroundColor = [UIColor clearColor];
tableHeader.frame = (CGRect){ tableHeader.frame = (CGRect){.origin.x = 0, .origin.y = 0, .size.width = tableV.width, .size.height = 160 };
.origin.x = 0,
.origin.y = 0,
.size.width = tableV.width,
.size.height = 160
};
CGFloat fNameH = 40; CGFloat fNameH = 40;
self.m_viewAvatarImage = [[UIImageView alloc] init]; self.m_viewAvatarImage = [[UIImageView alloc] init];
_m_viewAvatarImage.frame = (CGRect){ _m_viewAvatarImage.frame = (CGRect){.origin.x = (tableHeader.width - IBT_APP_ICON_WIDTH) * .5f, .origin.y = (tableHeader.height - IBT_APP_ICON_WIDTH - fNameH) * IBT_GOLDEN_RATIO, .size.width = IBT_APP_ICON_WIDTH, .size.height = IBT_APP_ICON_WIDTH };
.origin.x = (tableHeader.width - IBT_APP_ICON_WIDTH) * .5f,
.origin.y = (tableHeader.height - IBT_APP_ICON_WIDTH - fNameH) * IBT_GOLDEN_RATIO,
.size.width = IBT_APP_ICON_WIDTH,
.size.height = IBT_APP_ICON_WIDTH
};
_m_viewAvatarImage.layer.cornerRadius = IBT_APP_ICON_WIDTH / 10; _m_viewAvatarImage.layer.cornerRadius = IBT_APP_ICON_WIDTH / 10;
_m_viewAvatarImage.layer.masksToBounds = YES; _m_viewAvatarImage.layer.masksToBounds = YES;
CGFloat fMargin = 10; CGFloat fMargin = 10;
UILabel *appNameLabel = [[UILabel alloc] init]; UILabel *appNameLabel = [[UILabel alloc] init];
appNameLabel.frame = (CGRect){ appNameLabel.frame = (CGRect){.origin.x = fMargin, .origin.y = _m_viewAvatarImage.bottom, .size.width = tableHeader.width - 2 * fMargin, .size.height = fNameH };
.origin.x = fMargin,
.origin.y = _m_viewAvatarImage.bottom,
.size.width = tableHeader.width - 2 * fMargin,
.size.height = fNameH
};
appNameLabel.font = [UIFont boldSystemFontOfSize:18]; appNameLabel.font = [UIFont boldSystemFontOfSize:18];
appNameLabel.textColor = IBT_TINTCOLOR; appNameLabel.textColor = IBT_TINTCOLOR;
appNameLabel.textAlignment = NSTextAlignmentCenter; appNameLabel.textAlignment = NSTextAlignmentCenter;
[tableHeader addSubview:_m_viewAvatarImage]; [tableHeader addSubview:_m_viewAvatarImage];
[tableHeader addSubview:appNameLabel]; [tableHeader addSubview:appNameLabel];
tableV.tableHeaderView = tableHeader; tableV.tableHeaderView = tableHeader;
// Footer // Footer
CGRect frame = self.view.frame; CGRect frame = self.view.frame;
frame.size.height = 20; frame.size.height = 20;
frame.origin.y = self.view.height - CGRectGetHeight(frame) -20; frame.origin.y = self.view.height - CGRectGetHeight(frame) - 20;
UILabel *label = [[UILabel alloc] initWithFrame:frame]; UILabel *label = [[UILabel alloc] initWithFrame:frame];
label.font = [UIFont systemFontOfSize:16]; label.font = [UIFont systemFontOfSize:16];
label.text = @"Copyright@2014"; #ifdef Demonstrate
label.text = @"上海海鼎信息工程股份有限公司";
#else
label.text = @"Copyright © 2014";
#endif
label.backgroundColor = [UIColor clearColor]; label.backgroundColor = [UIColor clearColor];
label.textAlignment = NSTextAlignmentCenter; label.textAlignment = NSTextAlignmentCenter;
label.autoresizingMask = UIViewAutoresizingFlexibleTopMargin; label.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
//tableV.tableFooterView = label; // tableV.tableFooterView = label;
[self.view addSubview:label]; [self.view addSubview:label];
/* /*
CFBundleIcons = { CFBundleIcons = {
CFBundlePrimaryIcon = { CFBundlePrimaryIcon = {
...@@ -109,24 +100,24 @@ ...@@ -109,24 +100,24 @@
}; };
}; };
*/ */
NSArray *arrIcons = [[NSBundle mainBundle] infoDictionary][ @"CFBundleIcons" ][ @"CFBundlePrimaryIcon" ][ @"CFBundleIconFiles" ]; NSArray *arrIcons = [[NSBundle mainBundle] infoDictionary][@"CFBundleIcons"][@"CFBundlePrimaryIcon"][@"CFBundleIconFiles"];
UIImage *appIcon = nil; UIImage *appIcon = nil;
NSUInteger uiIconCount = [arrIcons count]; NSUInteger uiIconCount = [arrIcons count];
for (NSInteger i = uiIconCount - 1; i >= 0; i -- ) { for (NSInteger i = uiIconCount - 1; i >= 0; i--) {
appIcon = [UIImage imageNamed:arrIcons[ i ]]; appIcon = [UIImage imageNamed:arrIcons[i]];
if (appIcon) { if (appIcon) {
break; break;
} }
} }
_m_viewAvatarImage.image = appIcon; _m_viewAvatarImage.image = appIcon;
appNameLabel.text = IBT_APP_NAME_STR; appNameLabel.text = IBT_APP_NAME_STR;
// Section 0 // Section 0
IBTTableViewSectionInfo *sec0Info = [IBTTableViewSectionInfo sectionInfoDefaut]; IBTTableViewSectionInfo *sec0Info = [IBTTableViewSectionInfo sectionInfoDefaut];
// Version // Version
#if DEBUG #if DEBUG
NSString *nsBuild = IBT_APP_BUILD_STR; NSString *nsBuild = IBT_APP_BUILD_STR;
NSString *nsVersion = IBT_APP_VERSION_STR; NSString *nsVersion = IBT_APP_VERSION_STR;
...@@ -134,25 +125,31 @@ ...@@ -134,25 +125,31 @@
#else #else
NSString *nsV = IBT_APP_VERSION_STR; NSString *nsV = IBT_APP_VERSION_STR;
#endif #endif
IBTTableViewCellInfo *versionCellInfo = IBTTableViewCellInfo *versionCellInfo =
[IBTTableViewCellInfo normalCellForSel:nil target:nil [IBTTableViewCellInfo normalCellForSel:nil target:nil title:[IBTCommon localizableString:@"Version"] rightValue:nsV accessoryType:UITableViewCellAccessoryNone];
title:[IBTCommon localizableString:@"Version"]
rightValue:nsV
accessoryType:UITableViewCellAccessoryNone];
versionCellInfo.selectionStyle = UITableViewCellSelectionStyleNone; versionCellInfo.selectionStyle = UITableViewCellSelectionStyleNone;
[sec0Info addCell:versionCellInfo]; [sec0Info addCell:versionCellInfo];
IBTTableViewCellInfo *phoneCellInfo = #ifdef Demonstrate
[IBTTableViewCellInfo normalCellForSel:nil target:nil IBTTableViewCellInfo *phoneCellInfo = [IBTTableViewCellInfo normalCellForSel:nil
title:[IBTCommon localizableString:@"Phone Number"] target:nil
rightValue:@"400-400-4000" title:[IBTCommon localizableString:@"Phone Number"]
accessoryType:UITableViewCellAccessoryNone]; rightValue:@"021-54325000"
accessoryType:UITableViewCellAccessoryNone];
#else
IBTTableViewCellInfo *phoneCellInfo = [IBTTableViewCellInfo normalCellForSel:nil
target:nil
title:[IBTCommon localizableString:@"Phone Number"]
rightValue:@"400-400-4000"
accessoryType:UITableViewCellAccessoryNone];
#endif
phoneCellInfo.selectionStyle = UITableViewCellSelectionStyleNone; phoneCellInfo.selectionStyle = UITableViewCellSelectionStyleNone;
[sec0Info addCell:phoneCellInfo]; [sec0Info addCell:phoneCellInfo];
[_m_tableViewInfo addSection:sec0Info]; [_m_tableViewInfo addSection:sec0Info];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment