Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
xffruit
Commits
8b27616c
Commit
8b27616c
authored
8 years ago
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加演示Demo的target
parent
913bf261
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1153 additions
and
256 deletions
+1153
-256
XFFruit copy-Info.plist
XFFruit copy-Info.plist
+48
-0
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+838
-0
ICRAppViewControllerManager.m
...ntrollers/AppViewController/ICRAppViewControllerManager.m
+87
-76
ICRLoginContentView.m
XFFruit/General/Views/ICRLoginContentView.m
+6
-1
ICRAppMacro.h
XFFruit/Macro/ICRAppMacro.h
+9
-3
ICRLoginViewController.m
XFFruit/ViewControllers/Login/ICRLoginViewController.m
+106
-114
ICRAboutViewController.m
XFFruit/ViewControllers/System/ICRAboutViewController.m
+59
-62
No files found.
XFFruit copy-Info.plist
0 → 100644
View file @
8b27616c
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
生鲜采购
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.12
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
0
<
/string
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
NSLocationWhenInUseUsageDescription
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
armv7
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
~
ipad
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationPortraitUpsideDown
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
This diff is collapsed.
Click to expand it.
XFFruit.xcodeproj/project.pbxproj
View file @
8b27616c
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/AppViewController/ICRAppViewControllerManager.m
View file @
8b27616c
...
@@ -9,31 +9,31 @@
...
@@ -9,31 +9,31 @@
#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
,
^
{
...
@@ -44,7 +44,8 @@
...
@@ -44,7 +44,8 @@
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
;
...
@@ -60,15 +61,15 @@
...
@@ -60,15 +61,15 @@
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,34 +77,38 @@
...
@@ -76,34 +77,38 @@
}
}
#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
;
}
}
...
@@ -116,38 +121,41 @@
...
@@ -116,38 +121,41 @@
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
];
...
@@ -156,9 +164,10 @@
...
@@ -156,9 +164,10 @@
}
}
#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
];
...
@@ -169,23 +178,23 @@
...
@@ -169,23 +178,23 @@
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
;
...
@@ -194,14 +203,14 @@
...
@@ -194,14 +203,14 @@
[
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
];
...
@@ -213,8 +222,9 @@
...
@@ -213,8 +222,9 @@
}
}
}
}
-
(
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
];
...
@@ -226,8 +236,9 @@
...
@@ -226,8 +236,9 @@
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
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/General/Views/ICRLoginContentView.m
View file @
8b27616c
...
@@ -226,7 +226,12 @@
...
@@ -226,7 +226,12 @@
self
.
m_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
19
.
0
f
];
self
.
m_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
19
.
0
f
];
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
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Macro/ICRAppMacro.h
View file @
8b27616c
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Login/ICRLoginViewController.m
View file @
8b27616c
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/System/ICRAboutViewController.m
View file @
8b27616c
...
@@ -19,20 +19,23 @@
...
@@ -19,20 +19,23 @@
@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"
];
...
@@ -41,35 +44,19 @@
...
@@ -41,35 +44,19 @@
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
)
*
.
5
f
,
.
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
)
*
.
5
f
,
.
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
;
...
@@ -80,20 +67,24 @@
...
@@ -80,20 +67,24 @@
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
];
/*
/*
...
@@ -110,11 +101,11 @@
...
@@ -110,11 +101,11 @@
};
};
*/
*/
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
;
}
}
...
@@ -126,7 +117,7 @@
...
@@ -126,7 +117,7 @@
// 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
;
...
@@ -136,19 +127,25 @@
...
@@ -136,19 +127,25 @@
#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
target
:
nil
title
:
[
IBTCommon
localizableString
:
@"Phone Number"
]
rightValue
:
@"021-54325000"
accessoryType
:
UITableViewCellAccessoryNone
];
#else
IBTTableViewCellInfo
*
phoneCellInfo
=
[
IBTTableViewCellInfo
normalCellForSel
:
nil
target
:
nil
title
:
[
IBTCommon
localizableString
:
@"Phone Number"
]
title
:
[
IBTCommon
localizableString
:
@"Phone Number"
]
rightValue
:
@"400-400-4000"
rightValue
:
@"400-400-4000"
accessoryType
:
UITableViewCellAccessoryNone
];
accessoryType
:
UITableViewCellAccessoryNone
];
#endif
phoneCellInfo
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
phoneCellInfo
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
[
sec0Info
addCell
:
phoneCellInfo
];
[
sec0Info
addCell
:
phoneCellInfo
];
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment