Skip to content

Commit

Permalink
完美解决bug 做导入数据前的最后准备
Browse files Browse the repository at this point in the history
  • Loading branch information
zpz1237 committed Oct 22, 2015
1 parent 9907c2e commit b9fc3b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 2 additions & 3 deletions zhihuDaily 2.0/ThemeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ThemeViewController: UIViewController {

override func viewWillAppear(animated: Bool) {

self.navigationController?.navigationBarHidden = false
//self.navigationController?.navigationBarHidden = false
}

//设置StatusBar颜色
Expand Down Expand Up @@ -152,8 +152,7 @@ extension ThemeViewController: UITableViewDelegate, UITableViewDataSource, Paral
//拿到webViewController
let webViewController = self.storyboard?.instantiateViewControllerWithIdentifier("webViewController") as!WebViewController
webViewController.newsId = "Jst Try"
webViewController.pushed = true


//实施转场
self.navigationController?.pushViewController(webViewController, animated: true)
}
Expand Down
8 changes: 2 additions & 6 deletions zhihuDaily 2.0/WebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class WebViewController: UIViewController, UIScrollViewDelegate, ParallaxHeaderV
var triggered = false
var newsId = ""
var hasImage = true
var pushed = false

//滑到对应位置时调整StatusBar
var statusBarFlag = true {
Expand Down Expand Up @@ -54,6 +53,8 @@ class WebViewController: UIViewController, UIScrollViewDelegate, ParallaxHeaderV
override func viewDidLoad() {
super.viewDidLoad()

self.automaticallyAdjustsScrollViewInsets = false

//避免webScrollView的ContentView过长 挡住底层View
self.view.clipsToBounds = true

Expand All @@ -69,11 +70,6 @@ class WebViewController: UIViewController, UIScrollViewDelegate, ParallaxHeaderV
}

override func viewWillAppear(animated: Bool) {

if pushed {
self.navigationController?.navigationBarHidden = true
}

if hasImage {
loadParallaxHeader("")
} else {
Expand Down

0 comments on commit b9fc3b8

Please sign in to comment.