Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
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
张杰
红星美凯龙管理在线APP IOS
Commits
0ef0fbc5
Commit
0ef0fbc5
authored
Nov 30, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公告添加segement
parent
6433faf0
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
487 additions
and
376 deletions
+487
-376
project.pbxproj
redstar.xcodeproj/project.pbxproj
+6
-30
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
RootTabBarController.m
redstar/Classes/AppDelegate/RootTabBarController.m
+32
-34
AnnounceViewController.h
...s/Module/Announce/ViewController/AnnounceViewController.h
+1
-7
AnnounceViewController.m
...s/Module/Announce/ViewController/AnnounceViewController.m
+126
-212
ChartViewController.h
...Classes/Module/Chart/ViewController/ChartViewController.h
+0
-13
ChartViewController.m
...Classes/Module/Chart/ViewController/ChartViewController.m
+0
-67
FunctionViewController.h
redstar/Classes/Module/Function/FunctionViewController.h
+19
-0
FunctionViewController.m
redstar/Classes/Module/Function/FunctionViewController.m
+284
-0
TaskModel.h
...unction/WordOfMouth/Inspect/InspectTask/Model/TaskModel.h
+1
-1
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+2
-2
LoginViewController.m
...Classes/Module/Login/ViewController/LoginViewController.m
+0
-2
MineViewController.m
...r/Classes/Module/Mine/ViewController/MineViewController.m
+16
-8
No files found.
redstar.xcodeproj/project.pbxproj
View file @
0ef0fbc5
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
84A673881C0B50B4000F828E
/* OnLineCompleteViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A673871C0B50B4000F828E
/* OnLineCompleteViewController.m */
;
};
84A673881C0B50B4000F828E
/* OnLineCompleteViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A673871C0B50B4000F828E
/* OnLineCompleteViewController.m */
;
};
84A6738B1C0B54A6000F828E
/* OnLineCompleteHeadView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A6738A1C0B54A6000F828E
/* OnLineCompleteHeadView.m */
;
};
84A6738B1C0B54A6000F828E
/* OnLineCompleteHeadView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A6738A1C0B54A6000F828E
/* OnLineCompleteHeadView.m */
;
};
84A6738E1C0BE2D0000F828E
/* OnLineCompleteCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A6738D1C0BE2D0000F828E
/* OnLineCompleteCell.m */
;
};
84A6738E1C0BE2D0000F828E
/* OnLineCompleteCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A6738D1C0BE2D0000F828E
/* OnLineCompleteCell.m */
;
};
84A673911C0C2681000F828E
/* FunctionViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84A673901C0C2681000F828E
/* FunctionViewController.m */
;
};
84AD4F201BF425AC00BFB37C
/* InspectDetailView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F1F1BF425AC00BFB37C
/* InspectDetailView.m */
;
};
84AD4F201BF425AC00BFB37C
/* InspectDetailView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F1F1BF425AC00BFB37C
/* InspectDetailView.m */
;
};
84AD4F221BF42F8E00BFB37C
/* classfiy.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F211BF42F8E00BFB37C
/* classfiy.plist */
;
};
84AD4F221BF42F8E00BFB37C
/* classfiy.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F211BF42F8E00BFB37C
/* classfiy.plist */
;
};
84AD4F261BF4356A00BFB37C
/* TaskModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F251BF4356A00BFB37C
/* TaskModel.m */
;
};
84AD4F261BF4356A00BFB37C
/* TaskModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F251BF4356A00BFB37C
/* TaskModel.m */
;
};
...
@@ -109,7 +110,6 @@
...
@@ -109,7 +110,6 @@
84F57C9C1BECA73800DDEEB1
/* StarBar.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84F57C9B1BECA73800DDEEB1
/* StarBar.m */
;
};
84F57C9C1BECA73800DDEEB1
/* StarBar.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84F57C9B1BECA73800DDEEB1
/* StarBar.m */
;
};
84FAC7611BFF2C6E00FD094D
/* NoDataView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84FAC7601BFF2C6E00FD094D
/* NoDataView.m */
;
};
84FAC7611BFF2C6E00FD094D
/* NoDataView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84FAC7601BFF2C6E00FD094D
/* NoDataView.m */
;
};
84FD89F21BD9FC71006E442A
/* HomeViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84FD89F11BD9FC71006E442A
/* HomeViewController.m */
;
};
84FD89F21BD9FC71006E442A
/* HomeViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84FD89F11BD9FC71006E442A
/* HomeViewController.m */
;
};
84FD8A071BDA01C4006E442A
/* ChartViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84FD8A061BDA01C4006E442A
/* ChartViewController.m */
;
};
84FD8A0A1BDA01D1006E442A
/* MineViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84FD8A091BDA01D1006E442A
/* MineViewController.m */
;
};
84FD8A0A1BDA01D1006E442A
/* MineViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84FD8A091BDA01D1006E442A
/* MineViewController.m */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
...
@@ -225,6 +225,8 @@
...
@@ -225,6 +225,8 @@
84A6738A1C0B54A6000F828E
/* OnLineCompleteHeadView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineCompleteHeadView.m
;
sourceTree
=
"<group>"
;
};
84A6738A1C0B54A6000F828E
/* OnLineCompleteHeadView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineCompleteHeadView.m
;
sourceTree
=
"<group>"
;
};
84A6738C1C0BE2D0000F828E
/* OnLineCompleteCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineCompleteCell.h
;
sourceTree
=
"<group>"
;
};
84A6738C1C0BE2D0000F828E
/* OnLineCompleteCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OnLineCompleteCell.h
;
sourceTree
=
"<group>"
;
};
84A6738D1C0BE2D0000F828E
/* OnLineCompleteCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineCompleteCell.m
;
sourceTree
=
"<group>"
;
};
84A6738D1C0BE2D0000F828E
/* OnLineCompleteCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OnLineCompleteCell.m
;
sourceTree
=
"<group>"
;
};
84A6738F1C0C2681000F828E
/* FunctionViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FunctionViewController.h
;
sourceTree
=
"<group>"
;
};
84A673901C0C2681000F828E
/* FunctionViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FunctionViewController.m
;
sourceTree
=
"<group>"
;
};
84AD4F1E1BF425AC00BFB37C
/* InspectDetailView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectDetailView.h
;
sourceTree
=
"<group>"
;
};
84AD4F1E1BF425AC00BFB37C
/* InspectDetailView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectDetailView.h
;
sourceTree
=
"<group>"
;
};
84AD4F1F1BF425AC00BFB37C
/* InspectDetailView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectDetailView.m
;
sourceTree
=
"<group>"
;
};
84AD4F1F1BF425AC00BFB37C
/* InspectDetailView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectDetailView.m
;
sourceTree
=
"<group>"
;
};
84AD4F211BF42F8E00BFB37C
/* classfiy.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
classfiy.plist
;
sourceTree
=
"<group>"
;
};
84AD4F211BF42F8E00BFB37C
/* classfiy.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
classfiy.plist
;
sourceTree
=
"<group>"
;
};
...
@@ -338,8 +340,6 @@
...
@@ -338,8 +340,6 @@
84FAC7601BFF2C6E00FD094D
/* NoDataView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NoDataView.m
;
sourceTree
=
"<group>"
;
};
84FAC7601BFF2C6E00FD094D
/* NoDataView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NoDataView.m
;
sourceTree
=
"<group>"
;
};
84FD89F01BD9FC71006E442A
/* HomeViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
HomeViewController.h
;
sourceTree
=
"<group>"
;
};
84FD89F01BD9FC71006E442A
/* HomeViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
HomeViewController.h
;
sourceTree
=
"<group>"
;
};
84FD89F11BD9FC71006E442A
/* HomeViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
HomeViewController.m
;
sourceTree
=
"<group>"
;
};
84FD89F11BD9FC71006E442A
/* HomeViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
HomeViewController.m
;
sourceTree
=
"<group>"
;
};
84FD8A051BDA01C4006E442A
/* ChartViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ChartViewController.h
;
sourceTree
=
"<group>"
;
};
84FD8A061BDA01C4006E442A
/* ChartViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChartViewController.m
;
sourceTree
=
"<group>"
;
};
84FD8A081BDA01D1006E442A
/* MineViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MineViewController.h
;
sourceTree
=
"<group>"
;
};
84FD8A081BDA01D1006E442A
/* MineViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MineViewController.h
;
sourceTree
=
"<group>"
;
};
84FD8A091BDA01D1006E442A
/* MineViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MineViewController.m
;
sourceTree
=
"<group>"
;
};
84FD8A091BDA01D1006E442A
/* MineViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MineViewController.m
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
...
@@ -467,6 +467,8 @@
...
@@ -467,6 +467,8 @@
8426A4AA1BDF0CD600E5FDF5
/* Question */
,
8426A4AA1BDF0CD600E5FDF5
/* Question */
,
8426A4AD1BDF0CD600E5FDF5
/* Standard */
,
8426A4AD1BDF0CD600E5FDF5
/* Standard */
,
8426A4B01BDF0CD600E5FDF5
/* WordOfMouth */
,
8426A4B01BDF0CD600E5FDF5
/* WordOfMouth */
,
84A6738F1C0C2681000F828E
/* FunctionViewController.h */
,
84A673901C0C2681000F828E
/* FunctionViewController.m */
,
);
);
path
=
Function
;
path
=
Function
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -988,7 +990,6 @@
...
@@ -988,7 +990,6 @@
841D24F51BEB473B0005CC9F
/* Check */
,
841D24F51BEB473B0005CC9F
/* Check */
,
8426A4A01BDF0CD600E5FDF5
/* Function */
,
8426A4A01BDF0CD600E5FDF5
/* Function */
,
84C957501BDB54BB00083584
/* Announce */
,
84C957501BDB54BB00083584
/* Announce */
,
84FD89F31BDA0136006E442A
/* Chart */
,
84FD89F81BDA0136006E442A
/* Mine */
,
84FD89F81BDA0136006E442A
/* Mine */
,
84FD89ED1BD9FC5B006E442A
/* Home */
,
84FD89ED1BD9FC5B006E442A
/* Home */
,
84970E2E1BD8E04000C1728A
/* Login */
,
84970E2E1BD8E04000C1728A
/* Login */
,
...
@@ -1574,31 +1575,6 @@
...
@@ -1574,31 +1575,6 @@
path
=
ViewController
;
path
=
ViewController
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
84FD89F31BDA0136006E442A
/* Chart */
=
{
isa
=
PBXGroup
;
children
=
(
84FD89F41BDA0136006E442A
/* View */
,
84FD89F51BDA0136006E442A
/* ViewController */
,
);
path
=
Chart
;
sourceTree
=
"<group>"
;
};
84FD89F41BDA0136006E442A
/* View */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
View
;
sourceTree
=
"<group>"
;
};
84FD89F51BDA0136006E442A
/* ViewController */
=
{
isa
=
PBXGroup
;
children
=
(
84FD8A051BDA01C4006E442A
/* ChartViewController.h */
,
84FD8A061BDA01C4006E442A
/* ChartViewController.m */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
84FD89F81BDA0136006E442A
/* Mine */
=
{
84FD89F81BDA0136006E442A
/* Mine */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -1831,7 +1807,6 @@
...
@@ -1831,7 +1807,6 @@
84AD4F3A1BF4844600BFB37C
/* RankDetailHeaderView.m in Sources */
,
84AD4F3A1BF4844600BFB37C
/* RankDetailHeaderView.m in Sources */
,
8490C4D41BF9DEF0006B6569
/* PictureViewController.m in Sources */
,
8490C4D41BF9DEF0006B6569
/* PictureViewController.m in Sources */
,
8474C5951BE78AE1007DCF19
/* QuestionDetailViewController.m in Sources */
,
8474C5951BE78AE1007DCF19
/* QuestionDetailViewController.m in Sources */
,
84FD8A071BDA01C4006E442A
/* ChartViewController.m in Sources */
,
84970DEF1BD8DD8A00C1728A
/* main.m in Sources */
,
84970DEF1BD8DD8A00C1728A
/* main.m in Sources */
,
84A6738B1C0B54A6000F828E
/* OnLineCompleteHeadView.m in Sources */
,
84A6738B1C0B54A6000F828E
/* OnLineCompleteHeadView.m in Sources */
,
8474A01C1BE368D700315F30
/* HomeCellItem.m in Sources */
,
8474A01C1BE368D700315F30
/* HomeCellItem.m in Sources */
,
...
@@ -1878,6 +1853,7 @@
...
@@ -1878,6 +1853,7 @@
84ECCF181C01FA2600EA4960
/* QuestionDetailModel.m in Sources */
,
84ECCF181C01FA2600EA4960
/* QuestionDetailModel.m in Sources */
,
843D1B9E1C0B3F7600E30002
/* SpotCheckOnLineViewController.m in Sources */
,
843D1B9E1C0B3F7600E30002
/* SpotCheckOnLineViewController.m in Sources */
,
84846E9A1BE07CDF0010550A
/* RankingListCell.m in Sources */
,
84846E9A1BE07CDF0010550A
/* RankingListCell.m in Sources */
,
84A673911C0C2681000F828E
/* FunctionViewController.m in Sources */
,
848699B61BDF812F00859DFE
/* RankingListViewController.m in Sources */
,
848699B61BDF812F00859DFE
/* RankingListViewController.m in Sources */
,
84D825821BDD35E000CC61F7
/* HomeHeaderView.m in Sources */
,
84D825821BDD35E000CC61F7
/* HomeHeaderView.m in Sources */
,
84FD89F21BD9FC71006E442A
/* HomeViewController.m in Sources */
,
84FD89F21BD9FC71006E442A
/* HomeViewController.m in Sources */
,
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0ef0fbc5
No preview for this file type
redstar/Classes/AppDelegate/RootTabBarController.m
View file @
0ef0fbc5
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#import "HomeViewController.h"
#import "HomeViewController.h"
#import "AnnounceViewController.h"
#import "AnnounceViewController.h"
#import "
Chart
ViewController.h"
#import "
Function
ViewController.h"
#import "MineViewController.h"
#import "MineViewController.h"
#import <AFNetworking.h>
#import <AFNetworking.h>
...
@@ -54,27 +54,27 @@
...
@@ -54,27 +54,27 @@
[
homeNav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
[
homeNav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
AnnounceViewController
*
announce
=
(
AnnounceViewController
*
)[
self
setUpOneChildViewController
:[[
AnnounceViewController
alloc
]
init
]
title
:
@"功能"
imageName
:
@"function_uncheck"
selImageName
:
@"function_check"
];
FunctionViewController
*
function
=
(
FunctionViewController
*
)[
self
setUpOneChildViewController
:[[
FunctionViewController
alloc
]
init
]
title
:
@"功能"
imageName
:
@"function_uncheck"
selImageName
:
@"function_check"
];
// 添加nav
UINavigationController
*
functionNav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
function
];
UINavigationController
*
announceNav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
announce
];
[
functionNav
.
navigationBar
setBarTintColor
:
kNavigationBarColor
];
[
announceNav
.
navigationBar
setBarTintColor
:
kNavigationBarColor
];
[
functionNav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
[
announceNav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
ChartViewController
*
chart
=
(
ChartViewController
*
)[
self
setUpOneChildViewController
:[[
ChartViewController
alloc
]
init
]
title
:
@"报表查询"
imageName
:
@"report_unchecked"
selImageName
:
@"report_checked"
];
AnnounceViewController
*
announce
=
(
AnnounceViewController
*
)[
self
setUpOneChildViewController
:[[
AnnounceViewController
alloc
]
init
]
title
:
@"公告"
imageName
:
@"notice_unchecked"
selImageName
:
@"notice_checked"
];
UINavigationController
*
chartNav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
chart
];
announce
.
tabBarItem
.
tag
=
3928
;
[
chartNav
.
navigationBar
setBarTintColor
:
kNavigationBarColor
];
// // 添加nav
[
chartNav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
// UINavigationController *announceNav = [[UINavigationController alloc] initWithRootViewController:announce];
// [announceNav.navigationBar setBarTintColor:kNavigationBarColor];
// [announceNav.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];
MineViewController
*
mine
=
(
MineViewController
*
)[
self
setUpOneChildViewController
:[[
MineViewController
alloc
]
init
]
title
:
@"我的"
imageName
:
@"aboutme_unchecked"
selImageName
:
@"aboutme_checke"
];
MineViewController
*
mine
=
(
MineViewController
*
)[
self
setUpOneChildViewController
:[[
MineViewController
alloc
]
init
]
title
:
@"我的"
imageName
:
@"aboutme_unchecked"
selImageName
:
@"aboutme_checke"
];
UINavigationController
*
mineNav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
mine
];
mine
.
tabBarItem
.
tag
=
18274
;
[
mineNav
.
navigationBar
setBarTintColor
:
kNavigationBarColor
];
[
mineNav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
[[
UITabBarItem
appearance
]
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:
[[
UITabBarItem
appearance
]
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:
kNavigationBarColor
,
NSForegroundColorAttributeName
,
kNavigationBarColor
,
NSForegroundColorAttributeName
,
nil
]
forState
:
UIControlStateSelected
];
nil
]
forState
:
UIControlStateSelected
];
self
.
viewControllers
=
@[
homeNav
,
announceNav
,
chartNav
,
mineNav
];
self
.
viewControllers
=
@[
homeNav
,
functionNav
,
announce
,
mine
];
}
}
...
@@ -95,26 +95,24 @@
...
@@ -95,26 +95,24 @@
}
}
#pragma mark - UITabBarController Delegate
#pragma mark - UITabBarController Delegate
//
//- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
-
(
BOOL
)
tabBarController
:
(
UITabBarController
*
)
tabBarController
shouldSelectViewController
:
(
UIViewController
*
)
viewController
{
// NSLog(@"shouldSelectViewController %@", tabBarController.selectedViewController);
if
(
viewController
.
tabBarItem
.
tag
==
18274
)
{
// if (viewController.tabBarItem.tag == 30001) {
MineViewController
*
vc
=
(
MineViewController
*
)[
self
setUpOneChildViewController
:[[
MineViewController
alloc
]
init
]
title
:
@"我的"
imageName
:
@"aboutme_unchecked"
selImageName
:
@"aboutme_checke"
];
// [((UINavigationController *)tabBarController.selectedViewController) pushViewController:viewController animated:YES];
vc
.
hidesBottomBarWhenPushed
=
YES
;
// return NO;
[((
UINavigationController
*
)
tabBarController
.
selectedViewController
)
pushViewController
:
vc
animated
:
YES
];
// }
// return YES;
return
NO
;
//}
}
else
if
(
viewController
.
tabBarItem
.
tag
==
3928
)
{
AnnounceViewController
*
announce
=
(
AnnounceViewController
*
)[
self
setUpOneChildViewController
:[[
AnnounceViewController
alloc
]
init
]
title
:
@"公告"
imageName
:
@"notice_unchecked"
selImageName
:
@"notice_checked"
];
//- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
announce
.
hidesBottomBarWhenPushed
=
YES
;
//{
[((
UINavigationController
*
)
tabBarController
.
selectedViewController
)
pushViewController
:
announce
animated
:
YES
];
// if ([viewController isKindOfClass:[MineViewController class]]) {
return
NO
;
// MineViewController *mine = [[MineViewController alloc] init];
}
// mine.tabBarItem.title= @"我的";
// mine.tabBarItem.image = [UIImage imageNamed:@"aboutme_unchecked"];
// mine.tabBarItem.selectedImage = [[UIImage imageNamed:@"aboutme_checke"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
return
YES
;
// [((UINavigationController *)tabBarController.selectedViewController) pushViewController:mine animated:YES];
}
// }
//}
@end
@end
redstar/Classes/Module/Announce/ViewController/AnnounceViewController.h
View file @
0ef0fbc5
...
@@ -7,14 +7,8 @@
...
@@ -7,14 +7,8 @@
//
//
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "FuncItem.h"
@interface
AnnounceViewController
:
UIViewController
@interface
AnnounceViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
FuncItem
*
onLineSamplingBtn
;
// 在线抽查按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
wordOfMouthBtn
;
// 口碑按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
standardBtn
;
// 口碑标准按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
pictureBtn
;
// 图说口碑按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
questionBtn
;
// 问题与知识按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
rankBtn
;
// 口碑排名按钮
@end
@end
redstar/Classes/Module/Announce/ViewController/AnnounceViewController.m
View file @
0ef0fbc5
...
@@ -7,15 +7,13 @@
...
@@ -7,15 +7,13 @@
//
//
#import "AnnounceViewController.h"
#import "AnnounceViewController.h"
#import "InspectListViewController.h"
#import "RankingListViewController.h"
#import "PictureViewController.h"
#import "QuestionViewController.h"
@interface
AnnounceViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
>
@property
(
nonatomic
,
strong
)
UIView
*
bgBar
;
@property
(
nonatomic
,
strong
)
UISegmentedControl
*
segmentedControl
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@interface
AnnounceViewController
()
@property
(
nonatomic
,
strong
)
NSString
*
stateStr
;
@property
(
nonatomic
,
strong
)
UIView
*
lineView
;
@end
@end
@implementation
AnnounceViewController
@implementation
AnnounceViewController
...
@@ -23,11 +21,7 @@
...
@@ -23,11 +21,7 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"功能"
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
7
.
0
)
{
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
7
.
0
)
{
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
...
@@ -36,250 +30,170 @@
...
@@ -36,250 +30,170 @@
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
}
}
self
.
stateStr
=
@"未读"
;
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
setNav
];
[
self
setup
];
[
self
setup
];
}
}
#pragma mark - Private Methods
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
-
(
void
)
setup
{
{
[
self
.
onLineSamplingBtn
setTitle
:
@"在线抽查"
forState
:
UIControlStateNormal
];
[
super
viewWillAppear
:
animated
];
[
self
.
wordOfMouthBtn
setTitle
:
@"口碑巡检"
forState
:
UIControlStateNormal
];
[
self
.
standardBtn
setTitle
:
@"口碑标准"
forState
:
UIControlStateNormal
];
[
self
.
pictureBtn
setTitle
:
@"图说口碑"
forState
:
UIControlStateNormal
];
[
self
.
questionBtn
setTitle
:
@"问题与知识"
forState
:
UIControlStateNormal
];
[
self
.
rankBtn
setTitle
:
@"口碑排名"
forState
:
UIControlStateNormal
];
//self.lineView.backgroundColor = kSeparateLineViewColor;
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
self
.
tabBarController
.
tabBar
.
hidden
=
YES
;
}
}
#pragma mark - Prative Methods
-
(
void
)
itemClick
:
(
FuncItem
*
)
sender
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
{
FuncItem
*
item
=
(
FuncItem
*
)
sender
;
[
self
.
navigationController
popToViewController
:[
self
.
navigationController
.
viewControllers
objectAtIndex
:
0
]
animated
:
YES
];
UINavigationController
*
nav
;
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"在线抽查"
])
{
return
;
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑巡检"
])
{
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
return
;
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"图说口碑"
])
{
PictureViewController
*
pictureVC
=
[[
PictureViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"问题与知识"
])
{
QuestionViewController
*
questionVC
=
[[
QuestionViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
questionVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑排名"
])
{
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
{
return
;
}
[
nav
.
navigationBar
setBarTintColor
:
kNavigationBarColor
];
[
nav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
[
self
presentViewController
:
nav
animated
:
YES
completion
:
nil
];
}
}
-
(
void
)
setNav
#pragma mark - lazy loading
-
(
FuncItem
*
)
onLineSamplingBtn
{
{
if
(
!
_onLineSamplingBtn
)
{
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
_onLineSamplingBtn
=
[[
FuncItem
alloc
]
init
];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
_onLineSamplingBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
customLab
setText
:
@"公告"
];
[
_onLineSamplingBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
[
_onLineSamplingBtn
setImage
:[
UIImage
imageNamed
:
@"task_000"
]
forState
:
UIControlStateNormal
];
self
.
navigationItem
.
titleView
=
customLab
;
[
self
.
view
addSubview
:
_onLineSamplingBtn
];
NSLayoutConstraint
*
onLineSamplingTop
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingTop
];
NSLayoutConstraint
*
onLineSamplingLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingLeft
];
NSLayoutConstraint
*
onLineSamplingWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
wordOfMouthBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingWidth
];
NSLayoutConstraint
*
onLineSamplingRight
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
wordOfMouthBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingRight
];
NSLayoutConstraint
*
onLineSamplingHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
119
];
[
self
.
view
addConstraint
:
onLineSamplingHeight
];
UIButton
*
backBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backBtn
.
frame
=
CGRectMake
(
0
,
0
,
30
,
44
);
[
backBtn
setImage
:[
UIImage
imageNamed
:
@"back_btn"
]
forState
:
UIControlStateNormal
];
[
backBtn
addTarget
:
self
action
:
@selector
(
doBack
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
}
return
_onLineSamplingBtn
;
}
}
-
(
FuncItem
*
)
wordOfMouthBtn
-
(
void
)
setup
{
{
if
(
!
_wordOfMouthBtn
)
{
self
.
bgBar
.
backgroundColor
=
[
UIColor
whiteColor
];
_wordOfMouthBtn
=
[[
FuncItem
alloc
]
init
];
[
self
.
segmentedControl
addTarget
:
self
action
:
@selector
(
segmentChangedValue
:
)
forControlEvents
:
UIControlEventValueChanged
];
[
_wordOfMouthBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_wordOfMouthBtn
setImage
:[
UIImage
imageNamed
:
@"task_001"
]
forState
:
UIControlStateNormal
];
_wordOfMouthBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_wordOfMouthBtn
];
NSLayoutConstraint
*
wordOfMouthTop
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthTop
];
NSLayoutConstraint
*
wordOfMouthRight
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
standardBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthRight
];
NSLayoutConstraint
*
wordOfMouthWithd
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
standardBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthWithd
];
NSLayoutConstraint
*
wordOfMouthHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthHeight
];
}
return
_wordOfMouthBtn
;
}
}
-
(
FuncItem
*
)
standardBtn
-
(
void
)
segmentChangedValue
:
(
id
)
sender
{
{
if
(
!
_standardBtn
)
{
_standardBtn
=
[[
FuncItem
alloc
]
init
];
[
_standardBtn
setImage
:[
UIImage
imageNamed
:
@"task_002"
]
forState
:
UIControlStateNormal
];
_standardBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_standardBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
_standardBtn
];
NSLayoutConstraint
*
standardRight
=
[
NSLayoutConstraint
constraintWithItem
:
_standardBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
standardRight
];
NSLayoutConstraint
*
standardHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_standardBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
standardHeight
];
NSLayoutConstraint
*
standardTop
=
[
NSLayoutConstraint
constraintWithItem
:
_standardBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
standardTop
];
}
return
_standardBtn
;
}
}
-
(
FuncItem
*
)
pictureBtn
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
{
if
(
!
_pictureBtn
)
{
return
10
;
_pictureBtn
=
[[
FuncItem
alloc
]
init
];
}
[
_pictureBtn
setImage
:[
UIImage
imageNamed
:
@"task_003"
]
forState
:
UIControlStateNormal
];
_pictureBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_pictureBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
_pictureBtn
];
NSLayoutConstraint
*
pictureTop
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
onLineSamplingBtn
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
pictureTop
];
NSLayoutConstraint
*
pictureLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
pictureLeft
];
NSLayoutConstraint
*
pictureRight
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
questionBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
// cell显示的内容
[
self
.
view
addConstraint
:
pictureRight
];
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
NSString
*
CellIdentifier
=
[
NSString
stringWithFormat
:
@"Cell%ld%ld"
,
(
long
)[
indexPath
section
],
(
long
)[
indexPath
row
]];
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
CellIdentifier
];
if
(
!
cell
)
{
cell
=
[[
UITableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
CellIdentifier
];
}
if
([
self
.
stateStr
isEqualToString
:
@"未读"
])
{
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"未读%@"
,
CellIdentifier
];
}
else
if
([
self
.
stateStr
isEqualToString
:
@"已读"
])
{
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"已读%@"
,
CellIdentifier
];
}
else
{
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"历史%@"
,
CellIdentifier
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
NSLayoutConstraint
*
pictureWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
questionBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
]
;
return
cell
;
[
self
.
view
addConstraint
:
pictureWidth
];
}
NSLayoutConstraint
*
pictureHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
onLineSamplingBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
// cell的点击事件
[
self
.
view
addConstraint
:
pictureHeight
];
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
}
return
_pictureBtn
;
}
}
-
(
FuncItem
*
)
questionBtn
{
if
(
!
_questionBtn
)
{
_questionBtn
=
[[
FuncItem
alloc
]
init
];
[
_questionBtn
setImage
:[
UIImage
imageNamed
:
@"task_004"
]
forState
:
UIControlStateNormal
];
_questionBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_questionBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
_questionBtn
];
#pragma mark - lazy laoding
-
(
UIView
*
)
bgBar
{
if
(
!
_bgBar
)
{
_bgBar
=
[[
UIView
alloc
]
init
];
_bgBar
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_bgBar
];
NSLayoutConstraint
*
questionWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
rankBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_bgBar
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
questionWidth
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
questionRight
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
rankBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_bgBar
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
questionRigh
t
];
[
self
.
view
addConstraint
:
tableLef
t
];
NSLayoutConstraint
*
questionTop
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
_pictureBtn
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_bgBar
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
questionTop
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
questionHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_pictureBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_bgBar
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
6
0
];
[
self
.
view
addConstraint
:
question
Height
];
[
self
.
view
addConstraint
:
table
Height
];
}
}
return
_
questionBtn
;
return
_
bgBar
;
}
}
-
(
FuncItem
*
)
rankBtn
-
(
UISegmentedControl
*
)
segmentedControl
{
{
if
(
!
_rankBtn
)
{
if
(
!
_segmentedControl
)
{
_rankBtn
=
[[
FuncItem
alloc
]
init
];
_segmentedControl
=
[[
UISegmentedControl
alloc
]
initWithItems
:[
NSArray
arrayWithObjects
:
@"未读"
,
@"已读"
,
@"历史"
,
nil
]];
[
_rankBtn
setImage
:[
UIImage
imageNamed
:
@"task_005"
]
forState
:
UIControlStateNormal
];
_segmentedControl
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_rankBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_segmentedControl
.
selectedSegmentIndex
=
0
;
[
_rankBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
16
.
0
f
];
NSDictionary
*
attributes
=
[
NSDictionary
dictionaryWithObject
:
font
[
self
.
view
addSubview
:
_rankBtn
];
forKey
:
NSFontAttributeName
];
[
_segmentedControl
setTitleTextAttributes
:
attributes
NSLayoutConstraint
*
caseTop
=
[
NSLayoutConstraint
constraintWithItem
:
_rankBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
_questionBtn
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
forState
:
UIControlStateNormal
];
[
self
.
view
addConstraint
:
caseTop
];
[
self
.
bgBar
addSubview
:
_segmentedControl
];
NSLayoutConstraint
*
caseRight
=
[
NSLayoutConstraint
constraintWithItem
:
_rankBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_segmentedControl
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
bgBar
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
15
];
[
self
.
view
addConstraint
:
caseRight
];
[
self
.
bgBar
addConstraint
:
tableTop
];
NSLayoutConstraint
*
caseHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_rankBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_questionBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_segmentedControl
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
bgBar
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
view
addConstraint
:
caseHeight
];
[
self
.
bgBar
addConstraint
:
tableLeft
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_segmentedControl
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
bgBar
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
bgBar
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_segmentedControl
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
30
];
[
self
.
bgBar
addConstraint
:
tableHeight
];
}
}
return
_
rankBtn
;
return
_
segmentedControl
;
}
}
-
(
UI
View
*
)
lin
eView
-
(
UI
TableView
*
)
tabl
eView
{
{
if
(
!
_lineView
)
{
if
(
!
_tableView
)
{
_lineView
=
[[
UIView
alloc
]
init
];
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectZero
style
:
UITableViewStylePlain
];
_lineView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_tableView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_lineView
];
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
_tableView
.
tableFooterView
=
[[
UIView
alloc
]
init
];
// [_tableView registerClass:[InspectListCell class] forCellReuseIdentifier:kInspectListCell];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addSubview
:
_tableView
];
[
self
.
view
addConstraint
:
lineViewLeft
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
bgBar
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
lineViewRight
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
lineViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
rankBtn
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
lineViewTop
];
[
self
.
view
addConstraint
:
tableLeft
];
NSLayoutConstraint
*
lineViewHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
1
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
lineViewHeight
];
[
self
.
view
addConstraint
:
tableRight
];
}
return
_lineView
;
}
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
-
(
void
)
didReceiveMemoryWarning
{
[
self
.
view
addConstraint
:
tableBottom
];
[
super
didReceiveMemoryWarning
];
}
// Dispose of any resources that can be recreated.
return
_tableView
;
}
/*
#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
@end
redstar/Classes/Module/Chart/ViewController/ChartViewController.h
deleted
100644 → 0
View file @
6433faf0
//
// ChartViewController.h
// redstar
//
// Created by admin on 15/10/23.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
ChartViewController
:
UIViewController
@end
redstar/Classes/Module/Chart/ViewController/ChartViewController.m
deleted
100644 → 0
View file @
6433faf0
//
// ChartViewController.m
// redstar
//
// Created by admin on 15/10/23.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "ChartViewController.h"
@interface
ChartViewController
()
@property
(
nonatomic
,
strong
)
UILabel
*
remindLabel
;
@end
@implementation
ChartViewController
#pragma mark - ViewDidLoad
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"报表查询"
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
self
.
remindLabel
.
text
=
@"暂不开放该功能,待二期研发"
;
}
#pragma mark - lazy Loading
-
(
UILabel
*
)
remindLabel
{
if
(
!
_remindLabel
)
{
_remindLabel
=
[[
UILabel
alloc
]
init
];
}
_remindLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_remindLabel
.
font
=
[
UIFont
systemFontOfSize
:
40
.
0
];
_remindLabel
.
minimumScaleFactor
=
.
5
f
;
_remindLabel
.
textAlignment
=
NSTextAlignmentCenter
;
_remindLabel
.
adjustsFontSizeToFitWidth
=
YES
;
_remindLabel
.
textColor
=
kRemindTextColor
;
[
self
.
view
addSubview
:
_remindLabel
];
// 顶端
NSLayoutConstraint
*
remindTop
=
[
NSLayoutConstraint
constraintWithItem
:
_remindLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
230
];
[
self
.
view
addConstraint
:
remindTop
];
// 左边
NSLayoutConstraint
*
remindLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_remindLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
30
];
[
self
.
view
addConstraint
:
remindLeft
];
// 右边
NSLayoutConstraint
*
remindRight
=
[
NSLayoutConstraint
constraintWithItem
:
_remindLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
30
];
[
self
.
view
addConstraint
:
remindRight
];
// 高度
NSLayoutConstraint
*
remindHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_remindLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
60
];
[
_remindLabel
addConstraint
:
remindHeight
];
return
_remindLabel
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
@end
redstar/Classes/Module/Function/FunctionViewController.h
0 → 100644
View file @
0ef0fbc5
//
// FunctionViewController.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "FuncItem.h"
@interface
FunctionViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
FuncItem
*
onLineSamplingBtn
;
// 在线抽查按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
wordOfMouthBtn
;
// 口碑按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
standardBtn
;
// 口碑标准按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
pictureBtn
;
// 图说口碑按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
questionBtn
;
// 问题与知识按钮
@property
(
nonatomic
,
strong
)
FuncItem
*
rankBtn
;
// 口碑排名按钮
@end
redstar/Classes/Module/Function/FunctionViewController.m
0 → 100644
View file @
0ef0fbc5
//
// FunctionViewController.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "FunctionViewController.h"
#import "InspectListViewController.h"
#import "RankingListViewController.h"
#import "PictureViewController.h"
#import "QuestionViewController.h"
@interface
FunctionViewController
()
@property
(
nonatomic
,
strong
)
UIView
*
lineView
;
@end
@implementation
FunctionViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"功能"
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
if
([[[
UIDevice
currentDevice
]
systemVersion
]
floatValue
]
>=
7
.
0
)
{
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
extendedLayoutIncludesOpaqueBars
=
NO
;
self
.
modalPresentationCapturesStatusBarAppearance
=
NO
;
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
}
[
self
setup
];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
self
.
tabBarController
.
tabBar
.
hidden
=
NO
;
}
#pragma mark - Private Methods
-
(
void
)
setup
{
[
self
.
onLineSamplingBtn
setTitle
:
@"在线抽查"
forState
:
UIControlStateNormal
];
[
self
.
wordOfMouthBtn
setTitle
:
@"口碑巡检"
forState
:
UIControlStateNormal
];
[
self
.
standardBtn
setTitle
:
@"口碑标准"
forState
:
UIControlStateNormal
];
[
self
.
pictureBtn
setTitle
:
@"图说口碑"
forState
:
UIControlStateNormal
];
[
self
.
questionBtn
setTitle
:
@"问题与知识"
forState
:
UIControlStateNormal
];
[
self
.
rankBtn
setTitle
:
@"口碑排名"
forState
:
UIControlStateNormal
];
//self.lineView.backgroundColor = kSeparateLineViewColor;
}
-
(
void
)
itemClick
:
(
FuncItem
*
)
sender
{
FuncItem
*
item
=
(
FuncItem
*
)
sender
;
UINavigationController
*
nav
;
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"在线抽查"
])
{
return
;
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑巡检"
])
{
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑标准"
])
{
return
;
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"图说口碑"
])
{
PictureViewController
*
pictureVC
=
[[
PictureViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
pictureVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"问题与知识"
])
{
QuestionViewController
*
questionVC
=
[[
QuestionViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
questionVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑排名"
])
{
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
{
return
;
}
[
nav
.
navigationBar
setBarTintColor
:
kNavigationBarColor
];
[
nav
.
navigationBar
setTitleTextAttributes
:[
NSDictionary
dictionaryWithObjectsAndKeys
:[
UIColor
whiteColor
],
NSForegroundColorAttributeName
,
nil
]];
[
self
presentViewController
:
nav
animated
:
YES
completion
:
nil
];
}
#pragma mark - lazy loading
-
(
FuncItem
*
)
onLineSamplingBtn
{
if
(
!
_onLineSamplingBtn
)
{
_onLineSamplingBtn
=
[[
FuncItem
alloc
]
init
];
_onLineSamplingBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_onLineSamplingBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_onLineSamplingBtn
setImage
:[
UIImage
imageNamed
:
@"task_000"
]
forState
:
UIControlStateNormal
];
[
self
.
view
addSubview
:
_onLineSamplingBtn
];
NSLayoutConstraint
*
onLineSamplingTop
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingTop
];
NSLayoutConstraint
*
onLineSamplingLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingLeft
];
NSLayoutConstraint
*
onLineSamplingWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
wordOfMouthBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingWidth
];
NSLayoutConstraint
*
onLineSamplingRight
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
wordOfMouthBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
onLineSamplingRight
];
NSLayoutConstraint
*
onLineSamplingHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
119
];
[
self
.
view
addConstraint
:
onLineSamplingHeight
];
}
return
_onLineSamplingBtn
;
}
-
(
FuncItem
*
)
wordOfMouthBtn
{
if
(
!
_wordOfMouthBtn
)
{
_wordOfMouthBtn
=
[[
FuncItem
alloc
]
init
];
[
_wordOfMouthBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_wordOfMouthBtn
setImage
:[
UIImage
imageNamed
:
@"task_001"
]
forState
:
UIControlStateNormal
];
_wordOfMouthBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_wordOfMouthBtn
];
NSLayoutConstraint
*
wordOfMouthTop
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthTop
];
NSLayoutConstraint
*
wordOfMouthRight
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
standardBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthRight
];
NSLayoutConstraint
*
wordOfMouthWithd
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
standardBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthWithd
];
NSLayoutConstraint
*
wordOfMouthHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_onLineSamplingBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
wordOfMouthHeight
];
}
return
_wordOfMouthBtn
;
}
-
(
FuncItem
*
)
standardBtn
{
if
(
!
_standardBtn
)
{
_standardBtn
=
[[
FuncItem
alloc
]
init
];
[
_standardBtn
setImage
:[
UIImage
imageNamed
:
@"task_002"
]
forState
:
UIControlStateNormal
];
_standardBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_standardBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
_standardBtn
];
NSLayoutConstraint
*
standardRight
=
[
NSLayoutConstraint
constraintWithItem
:
_standardBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
standardRight
];
NSLayoutConstraint
*
standardHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_standardBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_wordOfMouthBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
standardHeight
];
NSLayoutConstraint
*
standardTop
=
[
NSLayoutConstraint
constraintWithItem
:
_standardBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
standardTop
];
}
return
_standardBtn
;
}
-
(
FuncItem
*
)
pictureBtn
{
if
(
!
_pictureBtn
)
{
_pictureBtn
=
[[
FuncItem
alloc
]
init
];
[
_pictureBtn
setImage
:[
UIImage
imageNamed
:
@"task_003"
]
forState
:
UIControlStateNormal
];
_pictureBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_pictureBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
_pictureBtn
];
NSLayoutConstraint
*
pictureTop
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
onLineSamplingBtn
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
pictureTop
];
NSLayoutConstraint
*
pictureLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
pictureLeft
];
NSLayoutConstraint
*
pictureRight
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
questionBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
pictureRight
];
NSLayoutConstraint
*
pictureWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
questionBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
pictureWidth
];
NSLayoutConstraint
*
pictureHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_pictureBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
onLineSamplingBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
pictureHeight
];
}
return
_pictureBtn
;
}
-
(
FuncItem
*
)
questionBtn
{
if
(
!
_questionBtn
)
{
_questionBtn
=
[[
FuncItem
alloc
]
init
];
[
_questionBtn
setImage
:[
UIImage
imageNamed
:
@"task_004"
]
forState
:
UIControlStateNormal
];
_questionBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_questionBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
_questionBtn
];
NSLayoutConstraint
*
questionWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeWidth
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
rankBtn
attribute
:
NSLayoutAttributeWidth
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
questionWidth
];
NSLayoutConstraint
*
questionRight
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
rankBtn
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
questionRight
];
NSLayoutConstraint
*
questionTop
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
_pictureBtn
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
questionTop
];
NSLayoutConstraint
*
questionHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_questionBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_pictureBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
questionHeight
];
}
return
_questionBtn
;
}
-
(
FuncItem
*
)
rankBtn
{
if
(
!
_rankBtn
)
{
_rankBtn
=
[[
FuncItem
alloc
]
init
];
[
_rankBtn
setImage
:[
UIImage
imageNamed
:
@"task_005"
]
forState
:
UIControlStateNormal
];
_rankBtn
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_rankBtn
addTarget
:
self
action
:
@selector
(
itemClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
_rankBtn
];
NSLayoutConstraint
*
caseTop
=
[
NSLayoutConstraint
constraintWithItem
:
_rankBtn
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
_questionBtn
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
caseTop
];
NSLayoutConstraint
*
caseRight
=
[
NSLayoutConstraint
constraintWithItem
:
_rankBtn
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
caseRight
];
NSLayoutConstraint
*
caseHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_rankBtn
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
_questionBtn
attribute
:
NSLayoutAttributeHeight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
caseHeight
];
}
return
_rankBtn
;
}
-
(
UIView
*
)
lineView
{
if
(
!
_lineView
)
{
_lineView
=
[[
UIView
alloc
]
init
];
_lineView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
.
view
addSubview
:
_lineView
];
NSLayoutConstraint
*
lineViewLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
lineViewLeft
];
NSLayoutConstraint
*
lineViewRight
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
lineViewRight
];
NSLayoutConstraint
*
lineViewTop
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
rankBtn
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
lineViewTop
];
NSLayoutConstraint
*
lineViewHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_lineView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
1
];
[
self
.
view
addConstraint
:
lineViewHeight
];
}
return
_lineView
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Model/TaskModel.h
View file @
0ef0fbc5
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
weight
;
@property
(
nonatomic
,
copy
)
NSString
*
weight
;
@property
(
nonatomic
,
copy
)
NSString
*
originScore
;
@property
(
nonatomic
,
copy
)
NSString
*
originScore
;
@property
(
nonatomic
,
copy
)
NSString
*
readonlyType
;
+
(
instancetype
)
taskModelWithDict
:(
NSDictionary
*
)
dict
;
+
(
instancetype
)
taskModelWithDict
:(
NSDictionary
*
)
dict
;
-
(
instancetype
)
initWithDict
:(
NSDictionary
*
)
dict
;
-
(
instancetype
)
initWithDict
:(
NSDictionary
*
)
dict
;
@end
@end
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
0ef0fbc5
...
@@ -208,9 +208,9 @@
...
@@ -208,9 +208,9 @@
// 请求地址
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSLog
(
@"useruuid= %@"
,
user_uuid
);
// 请求参数
// 请求参数
NSDictionary
*
parameters
=
@{
NSDictionary
*
parameters
=
@{
@"user"
:
user_uuid
,
@"user"
:
user_uuid
,
@"scope"
:
@"all"
,
@"scope"
:
@"all"
,
@"pageNumber"
:
@
(
0
),
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
2
)
@"pageSize"
:
@
(
2
)
...
...
redstar/Classes/Module/Login/ViewController/LoginViewController.m
View file @
0ef0fbc5
...
@@ -165,8 +165,6 @@
...
@@ -165,8 +165,6 @@
*/
*/
-
(
void
)
loginButtonClick
:
(
UIButton
*
)
sender
-
(
void
)
loginButtonClick
:
(
UIButton
*
)
sender
{
{
self
.
rootTBC
=
[[
RootTabBarController
alloc
]
init
];
[
self
presentViewController
:
_rootTBC
animated
:
YES
completion
:
nil
];
if
(
self
.
loginView
.
usernameTextFiled
.
text
.
length
==
0
||
self
.
loginView
.
passwordTextFiled
.
text
.
length
==
0
)
{
if
(
self
.
loginView
.
usernameTextFiled
.
text
.
length
==
0
||
self
.
loginView
.
passwordTextFiled
.
text
.
length
==
0
)
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"账号、密码不能为空"
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"账号、密码不能为空"
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
...
...
redstar/Classes/Module/Mine/ViewController/MineViewController.m
View file @
0ef0fbc5
...
@@ -33,13 +33,13 @@
...
@@ -33,13 +33,13 @@
[
customLab
setText
:
@"我的"
];
[
customLab
setText
:
@"我的"
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
self
.
navigationItem
.
titleView
=
customLab
;
//
//
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
UIButton
*
backBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
//
backBtn.frame = CGRectMake(0, 0, 30, 44);
backBtn
.
frame
=
CGRectMake
(
0
,
0
,
30
,
44
);
//
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[
backBtn
setImage
:[
UIImage
imageNamed
:
@"back_btn"
]
forState
:
UIControlStateNormal
];
//
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
[
backBtn
addTarget
:
self
action
:
@selector
(
doBack
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
//
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
//
self.navigationItem.leftBarButtonItem = backItem;
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
...
@@ -57,13 +57,21 @@
...
@@ -57,13 +57,21 @@
// Dispose of any resources that can be recreated.
// Dispose of any resources that can be recreated.
}
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
self
.
tabBarController
.
tabBar
.
hidden
=
YES
;
}
#pragma mark - Prative Methods
#pragma mark - Prative Methods
// 返回上一页面
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
self
.
navigationController
popToViewController
:[
self
.
navigationController
.
viewControllers
objectAtIndex
:
0
]
animated
:
YES
];
}
}
-
(
void
)
setupTableView
-
(
void
)
setupTableView
...
...
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