Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-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
张杰
Opple-iOS
Commits
61bfff8b
Commit
61bfff8b
authored
Dec 16, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项说明:优化代码
parent
205cbfab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
60 deletions
+80
-60
OnlineLearningDetailViewController.m
...enter/OnlineLearning/OnlineLearningDetailViewController.m
+19
-9
VideoHelperViewController.m
...LearningCenter/OnlineLearning/VideoHelperViewController.m
+8
-1
OrderdetailsViewController.m
Class/OrderdetailsViewController.m
+0
-5
LearningCenter.storyboard
Lighting/LearningCenter.storyboard
+43
-43
BaseViewController.m
Tools/BaseViewController.m
+10
-2
No files found.
Class/LearningCenter/OnlineLearning/OnlineLearningDetailViewController.m
View file @
61bfff8b
...
...
@@ -61,20 +61,17 @@
{
//播放窗口
VideoHelperViewController
*
videoWindow
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"VideoHelperViewController"
];
videoWindow
.
view
.
frame
=
CGRectMake
(
0
,
NavigationHeight
,
ScreenWidth
*
2
/
3
,
ScreenHeight
/
2
);
videoWindow
.
delegate
=
self
;
[
self
addChildViewController
:
videoWindow
];
[
self
.
view
addSubview
:
videoWindow
.
view
];
//播放列表
VideoListViewController
*
playList
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"VideoListViewController"
];
playList
.
view
.
frame
=
CGRectMake
(
ScreenWidth
*
2
/
3
+
5
,
NavigationHeight
,
ScreenWidth
/
3
-
5
,
ScreenHeight
-
64
);
playList
.
studyItemTitleLabel
.
text
=
self
.
studyTypeEntity
.
name
;
playList
.
delegate
=
self
;
[
self
addChildViewController
:
playList
];
[
self
.
view
addSubview
:
playList
.
view
];
//播放简介
VideoDetailViewController
*
playDetail
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"VideoDetailViewController"
];
playDetail
.
view
.
frame
=
CGRectMake
(
0
,
ScreenHeight
/
2
+
NavigationHeight
,
ScreenWidth
*
2
/
3
,
ScreenHeight
/
2
-
NavigationHeight
);
[
self
addChildViewController
:
playDetail
];
[
self
.
view
addSubview
:
playDetail
.
view
];
__block
VideoHelperViewController
*
weakVideWindow
=
videoWindow
;
...
...
@@ -82,7 +79,7 @@
WS
(
weakSelf
);
[
videoWindow
setZoomButtonClickBlock
:
^
(
BOOL
boolValue
)
{
if
(
boolValue
)
{
[
weakSelf
.
view
.
window
addSubview
:
weakVideWindow
.
view
];
[
SHARED_APPDELEGATE
.
window
addSubview
:
weakVideWindow
.
view
];
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
weakVideWindow
.
view
.
frame
=
[
UIScreen
mainScreen
].
bounds
;
weakVideWindow
.
playerLayer
.
frame
=
[
UIScreen
mainScreen
].
bounds
;
...
...
@@ -95,8 +92,12 @@
}
completion
:
nil
];
}
}];
videoWindow
.
view
.
frame
=
CGRectMake
(
0
,
NavigationHeight
,
ScreenWidth
*
2
/
3
,
ScreenHeight
/
2
);
playList
.
view
.
frame
=
CGRectMake
(
ScreenWidth
*
2
/
3
+
5
,
NavigationHeight
,
ScreenWidth
/
3
-
5
,
ScreenHeight
-
64
);
playDetail
.
view
.
frame
=
CGRectMake
(
0
,
ScreenHeight
/
2
+
NavigationHeight
,
ScreenWidth
*
2
/
3
,
ScreenHeight
/
2
-
NavigationHeight
);
}
#pragma mark - 获取学习项详情
-
(
void
)
getStudyItemDetailAction
{
...
...
@@ -165,11 +166,20 @@
-
(
void
)
beginAssessment
:
(
CustomStudyEntity
*
)
studyEntity
{
WS
(
weakSelf
);
[
self
.
settingsPopoverController
dismissPopoverAnimated
:
YES
completion
:
^
{
AssessmentViewController
*
assessmentVc
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"AssessmentViewController"
];
assessmentVc
.
taskId
=
studyEntity
.
fid
;
[
weakSelf
.
navigationController
pushViewController
:
assessmentVc
animated
:
YES
];
}];
VideoHelperViewController
*
videoWindow
=
self
.
childViewControllers
[
0
];
if
(
videoWindow
.
view
.
height
==
ScreenHeight
)
{
[
self
.
view
insertSubview
:
videoWindow
.
view
atIndex
:
0
];
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
videoWindow
.
view
.
frame
=
CGRectMake
(
0
,
NavigationHeight
,
ScreenWidth
*
2
/
3
,
ScreenHeight
/
2
);
videoWindow
.
playerLayer
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
*
2
/
3
,
ScreenHeight
/
2
);
}
completion
:^
(
BOOL
finished
)
{
[
self
.
settingsPopoverController
dismissPopoverAnimated
:
YES
completion
:
^
{
AssessmentViewController
*
assessmentVc
=
[[[
self
class
]
getLearningCenterStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"AssessmentViewController"
];
assessmentVc
.
taskId
=
studyEntity
.
fid
;
[
weakSelf
.
navigationController
pushViewController
:
assessmentVc
animated
:
YES
];
}];
}];
}
}
#pragma mark - 赋值
...
...
Class/LearningCenter/OnlineLearning/VideoHelperViewController.m
View file @
61bfff8b
...
...
@@ -204,7 +204,14 @@
#pragma mark - 退出播放
-
(
IBAction
)
exitPlayControllerButtonClick
:
(
UIButton
*
)
sender
{
[
self
.
customPlayer
pause
];
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
self
.
playButton
.
selected
=
NO
;
if
(
self
.
playerLayer
.
frame
.
size
.
height
==
ScreenHeight
)
{
if
(
self
.
zoomButtonClickBlock
)
{
self
.
zoomButtonClickBlock
(
NO
);
}
}
else
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}
#pragma mark - 后退5秒
...
...
Class/OrderdetailsViewController.m
View file @
61bfff8b
...
...
@@ -1063,11 +1063,6 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
return
self
.
PDFpath
;
}
-
(
BOOL
)
prefersStatusBarHidden
{
return
YES
;
}
#pragma mark - 分享订单
-
(
void
)
ShareButtonClick
:
(
UIButton
*
)
sender
{
...
...
Lighting/LearningCenter.storyboard
View file @
61bfff8b
This diff is collapsed.
Click to expand it.
Tools/BaseViewController.m
View file @
61bfff8b
...
...
@@ -48,7 +48,6 @@
-
(
WKWebView
*
)
webView
{
if
(
_webView
==
nil
)
{
_webView
=
[[
WKWebView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
)];
}
return
_webView
;
...
...
@@ -59,11 +58,20 @@
[
super
viewDidLoad
];
self
.
automaticallyAdjustsScrollViewInsets
=
NO
;
self
.
navigationController
.
navigationBar
.
translucent
=
NO
;
self
.
navigationController
.
navigationBarHidden
=
YES
;
if
([
self
respondsToSelector
:
@selector
(
setNeedsStatusBarAppearanceUpdate
)])
{
[
self
prefersStatusBarHidden
];
}
//检测登陆超时通知
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
logintimeoutNotification
:
)
name
:
LOGINTIMEOUT
object
:
nil
];
}
#pragma mark - 隐藏状态栏
-
(
BOOL
)
prefersStatusBarHidden
{
return
YES
;
}
#pragma mark -登陆超时回调
-
(
void
)
logintimeoutNotification
:
(
NSNotification
*
)
not
...
...
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