diff --git a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate
index d334cf8..82c3f72 100644
Binary files a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate and b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift
index 42be8a4..e99d0cc 100644
--- a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift
+++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift
@@ -99,7 +99,7 @@ class GrowViewController: UIViewController,UIScrollViewDelegate {
}
//设置scrollview滑动范围
contentScrollView.contentSize = CGSize.init(width: width*CGFloat(titleArr.count), height: 0)
- contentScrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: true)
+// contentScrollView.setContentOffset(CGPoint.init(x: 0, y: 0), animated: true)
}
override func viewWillAppear(_ animated: Bool) {
diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Report/ReportViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Report/ReportViewController.swift
index 395f319..e68ffc4 100644
--- a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Report/ReportViewController.swift
+++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/Report/ReportViewController.swift
@@ -64,34 +64,15 @@ class ReportViewController: UIViewController,UITableViewDelegate,UITableViewData
recognizer.direction = UISwipeGestureRecognizerDirection.down
headView.addGestureRecognizer(recognizer)
- calendar = CalendarView.init(frame: CGRect.init(x: 0, y: y, width: screenWidth, height: 245))
+ calendar = CalendarView.init(frame: CGRect.init(x: 0, y: y*2, width: screenWidth, height: 245))
}
@objc func showView(){
calendar.showView()
-// keyWindow = UIApplication.shared.keyWindow!
-// let backBtn = UIButton.init(frame: CGRect.init(x: 0, y: calendar.frame.origin.y+245+y, width: screenWidth, height: screenHeight))
-// backBtn.backgroundColor = UIColor.black
-// backBtn.alpha = 0.4
-//
-// backBtn.addTarget(self, action: #selector(closeView(btn:)), for: UIControlEvents.allEvents)
-// reportTable.isUserInteractionEnabled = false
-//
-// keyWindow.addSubview(backBtn)
-// keyWindow.addSubview(calendar)
-// calendar.isHidden = false
}
-// @objc func closeView(btn:UIButton) {
-//
-// reportTable.isUserInteractionEnabled = true
-// UIView.animate(withDuration: 0.3) {
-// btn.removeFromSuperview()
-// self.calendar.isHidden = true
-// }
-// }
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ReportView/CalendarView.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ReportView/CalendarView.swift
index 8d535e3..a1c4fa1 100644
--- a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ReportView/CalendarView.swift
+++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/View/ReportView/CalendarView.swift
@@ -12,7 +12,7 @@ class CalendarView: UIView,UICollectionViewDelegate,UICollectionViewDataSource {
var keyWindow = UIWindow()
var backBtn = UIButton()
-
+ var topBtn = UIButton()
var weekLab = ["日","一","二","三","四","五","六"]
var firstDay = Int()
var monthDay = Int()
@@ -20,14 +20,13 @@ class CalendarView: UIView,UICollectionViewDelegate,UICollectionViewDataSource {
override init(frame: CGRect) {
super.init(frame: frame)
- self.addSubview(self.collectionView)
- collectionView.snp.makeConstraints { (maker) in
- maker.center.equalToSuperview()
- maker.height.width.equalToSuperview()
+ if !frame.isEmpty{
+ self.addSubview(self.collectionView)
+ firstDay = CalendarDateManager.shared.getFirstMonthDays()
+ monthDay = CalendarDateManager.shared.getCurrentMonthDay()
+ todayDay = CalendarDateManager.shared.getTodayDate()
}
- self.isHidden = false
}
-
override func layoutSubviews() {
self.flowlayOut.itemSize = CGSize.init(width: self.bounds.size.width/7, height: 35)
@@ -35,7 +34,7 @@ class CalendarView: UIView,UICollectionViewDelegate,UICollectionViewDataSource {
lazy var flowlayOut = {()-> UICollectionViewFlowLayout in
//设置layout
let flowlayout = UICollectionViewFlowLayout()
- flowlayout.itemSize = CGSize.init(width: screenWidth/7, height:35)
+ flowlayout.itemSize = CGSize.init(width: self.bounds.size.width/7, height:35)
flowlayout.minimumLineSpacing = 0
flowlayout.minimumInteritemSpacing = 0
flowlayout.headerReferenceSize = CGSize.init(width: 0, height: 0)
@@ -46,7 +45,7 @@ class CalendarView: UIView,UICollectionViewDelegate,UICollectionViewDataSource {
lazy var collectionView = {()-> UICollectionView in
- let calendarView = UICollectionView.init(frame: frame, collectionViewLayout: flowlayOut)
+ let calendarView = UICollectionView.init(frame: self.bounds, collectionViewLayout: flowlayOut)
calendarView.delegate = self
calendarView.dataSource = self
calendarView.backgroundColor = UIColor.white
@@ -59,27 +58,32 @@ class CalendarView: UIView,UICollectionViewDelegate,UICollectionViewDataSource {
func showView(){
let key = UIApplication.shared.keyWindow!
+
+ let top = UIButton.init(frame: CGRect.init(x: 0, y: 0, width: self.bounds.size.width, height: self.frame.origin.y))
+ top.backgroundColor = UIColor.clear
+ top.addTarget(self, action: #selector(closeView(btn:)), for: UIControlEvents.allEvents)
+
let back = UIButton.init(frame: CGRect.init(x: 0, y: self.bounds.size.height, width: screenWidth, height: screenHeight))
back.backgroundColor = UIColor.black
back.alpha = 0.4
-
back.addTarget(self, action: #selector(closeView(btn:)), for: UIControlEvents.allEvents)
+ key.addSubview(top)
key.addSubview(back)
key.addSubview(self)
+
self.isHidden = false
keyWindow = key
backBtn = back
- self.snp.makeConstraints { (maker) in
- maker.center.equalTo(self)
- maker.height.width.equalTo(self)
- }
+ topBtn = top
+
}
//MARK: - 关闭视图
@objc func closeView(btn:UIButton) {
UIView.animate(withDuration: 0.3) {
self.backBtn.removeFromSuperview()
+ self.topBtn.removeFromSuperview()
self.keyWindow = UIWindow.init()
self.isHidden = true
}
diff --git a/ParentAssistant/ParentAssistant/Classes/controllers/Information/Controller/InformationViewController.swift b/ParentAssistant/ParentAssistant/Classes/controllers/Information/Controller/InformationViewController.swift
index b43963e..048e48a 100644
--- a/ParentAssistant/ParentAssistant/Classes/controllers/Information/Controller/InformationViewController.swift
+++ b/ParentAssistant/ParentAssistant/Classes/controllers/Information/Controller/InformationViewController.swift
@@ -46,7 +46,7 @@ class InformationViewController: UIViewController,UISearchBarDelegate {
self.navigationItem.backBarButtonItem = item
drawTopUI()
-
+ self.getDataFromNet()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
@@ -62,7 +62,6 @@ class InformationViewController: UIViewController,UISearchBarDelegate {
}
}
}
- self.getDataFromNet()
}
func drawTopUI(){
diff --git a/ParentAssistant/ParentAssistant/Supporting Files/Info.plist b/ParentAssistant/ParentAssistant/Supporting Files/Info.plist
index ab28db2..3946944 100644
--- a/ParentAssistant/ParentAssistant/Supporting Files/Info.plist
+++ b/ParentAssistant/ParentAssistant/Supporting Files/Info.plist
@@ -43,11 +43,11 @@
armv7
+ UIStatusBarStyle
+ UIStatusBarStyleLightContent
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad
--
libgit2 0.21.0