Browse Source

ios13 首次打开工作 有黑条的bug 修复

fancy 5 years ago
parent
commit
49822a9883

+ 8 - 4
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceCheckInController.swift

@@ -35,6 +35,7 @@ class OOAttanceCheckInController: UITableViewController {
     
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
+        headerView.startBMKMapViewService()
         NotificationCenter.default.addObserver(self, selector: #selector(locationReceive(_:)), name: OONotification.location.notificationName, object: nil)
         if myButton != nil {
             myButton.isHidden = false
@@ -43,6 +44,7 @@ class OOAttanceCheckInController: UITableViewController {
     
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
+        headerView.stopBMKMapViewService()
         NotificationCenter.default.removeObserver(self)
         if myButton != nil {
             myButton.isHidden = true
@@ -54,12 +56,13 @@ class OOAttanceCheckInController: UITableViewController {
         super.viewDidAppear(animated)
         getWorkPlace()
     }
+    
 
    
     override func viewDidLoad() {
         super.viewDidLoad()
 //        title = "打卡"
-        headerView.startBMKMapViewService()
+        
 //        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "关闭", style: .plain, target: self, action: #selector(closeWindow))
         //tableView.tableHeaderView = headerView
         //tableView.contentInset = UIEdgeInsets(top: 230, left: 0, bottom: 0, right: 0)
@@ -70,6 +73,7 @@ class OOAttanceCheckInController: UITableViewController {
         self.perform(#selector(createButton), with: nil, afterDelay: 0)
     }
     
+    
     @objc func closeWindow() {
         self.tabBarController?.navigationController?.dismiss(animated: true, completion: nil)
     }
@@ -248,7 +252,7 @@ class OOAttanceCheckInController: UITableViewController {
     }
     
     
-    deinit {
-         headerView.stopBMKMapViewService()
-    }
+//    deinit {
+//         headerView.stopBMKMapViewService()
+//    }
 }

+ 2 - 4
o2ios/O2Platform/App/NewAttance-考勤打卡/c/OOAttanceSettingController.swift

@@ -153,11 +153,9 @@ class OOAttanceSettingController: UIViewController {
     }
     
     func commonDataView() {
-        let window = UIApplication.shared.windows[0]
-        //let barHeight = self.cyl_tabBarController.tabBarHeight
+        let window = UIApplication.shared.windows.last
         dataView.frame = CGRect(x: 0, y: SCREEN_HEIGHT - 125 - 50, width: SCREEN_WIDTH, height: 125)
-        //view.insertSubview(dataView, aboveSubview: mapView)
-        window.addSubview(dataView)
+        window?.addSubview(dataView)
     }
     
     

+ 9 - 4
o2ios/O2Platform/App/NewAttance-考勤打卡/v/OOAttanceHeaderView.swift

@@ -29,17 +29,17 @@ class OOAttanceHeaderView: UIView {
     
     override init(frame: CGRect) {
         super.init(frame: frame)
-        //commonInit()
+        commonInit()
     }
     
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
-        //commonInit()
+        commonInit()
     }
     
-    func startBMKMapViewService(){
+    func commonInit() {
         mapView = BMKMapView(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: 280))
-        mapView.delegate = self
+        
         mapView.showsUserLocation = true
         mapView.isSelectedAnnotationViewFront = true
         mapView.showMapScaleBar = true
@@ -52,6 +52,11 @@ class OOAttanceHeaderView: UIView {
         self.backgroundColor = UIColor.white
         self.addSubview(mapView)
         
+    }
+    
+    func startBMKMapViewService(){
+        
+        mapView.delegate = self
         
         locService =  BMKLocationManager()
         locService.desiredAccuracy = kCLLocationAccuracyBest

+ 9 - 5
o2ios/O2Platform/App/Work-工作/c/MainTaskSecondViewController.swift

@@ -459,11 +459,15 @@ extension MainTaskSecondViewController:UITableViewDataSource,UITableViewDelegate
     }
     
     private func forwardTodoTaskDetail(_ todoTask:TodoTask){
+        DDLogError("反反复复。。。。。。")
         let taskStoryboard = UIStoryboard(name: "task", bundle: Bundle.main)
         let todoTaskDetailVC = taskStoryboard.instantiateViewController(withIdentifier: "todoTaskDetailVC") as! TodoTaskDetailViewController
         todoTaskDetailVC.todoTask = todoTask
         todoTaskDetailVC.backFlag = 3
-        self.navigationController?.pushViewController(todoTaskDetailVC, animated: true)
+        todoTaskDetailVC.modalPresentationStyle = .fullScreen
+//        self.show(todoTaskDetailVC, sender: nil)
+//        self.presentVC(todoTaskDetailVC)
+        self.navigationController?.pushViewController(todoTaskDetailVC, animated: false)
     }
 }
 //分类显示点击代理
@@ -551,7 +555,7 @@ extension MainTaskSecondViewController:NewMainAppTableViewCellDelegate{
                 if destVC.isKind(of: ZLNavigationController.self) {
                     self.show(destVC, sender: nil)
                 }else{
-                    self.navigationController?.pushViewController(destVC, animated: true)
+                    self.navigationController?.pushViewController(destVC, animated: false)
                 }
                 
             }
@@ -594,7 +598,7 @@ extension MainTaskSecondViewController:ImageSlidesShowViewDelegate{
                     DDLogError(JSON(val).description)
                 }
             case .failure(let err):
-                DDLogDebug(err as! String)
+                DDLogError(err.localizedDescription)
             }
         }
     }
@@ -604,8 +608,8 @@ extension MainTaskSecondViewController:ImageSlidesShowViewDelegate{
         let destVC = bbsStoryboard.instantiateViewController(withIdentifier: "CMSSubjectDetailVC") as! CMSItemDetailViewController
         destVC.documentId = entity.infoId
         destVC.title = entity.title
-        //self.navigationController?.navigationBar.isHidden = false
-        self.pushVC(destVC)
+        destVC.modalPresentationStyle = .fullScreen
+        self.navigationController?.pushViewController(destVC, animated: false)
 
     }
 }

+ 4 - 2
o2ios/O2Platform/App/Work-工作/c/TodoTaskDetailViewController.swift

@@ -105,10 +105,12 @@ class TodoTaskDetailViewController: BaseWebViewUIViewController {
         //toolbar
         self.toolbarView = UIToolbar(frame: CGRect(x: 0, y: self.view.height - 44, width: self.view.width, height: 44))
        
-        self.automaticallyAdjustsScrollViewInsets = false
+        
         myTitle = todoTask?.title
-        if myTitle != nil {
+        if myTitle?.isBlank == false  {
             title = myTitle
+        }else if todoTask?.processName?.isBlank == false {
+            title = todoTask?.processName
         }
         
         //添加工作页面特殊的js处理

+ 3 - 3
o2ios/O2Platform/App/Work-工作/c/category/ZoneMenuViewController.swift

@@ -51,13 +51,13 @@ class ZoneMenuViewController: UIViewController {
         self.automaticallyAdjustsScrollViewInsets = false
         //mainMenu
         if let mainVC = self.storyboard?.instantiateViewController(withIdentifier: "mainMenu") {
-            self.mainVC = mainVC as! ZoneMainCategoryViewController
+            self.mainVC = mainVC as? ZoneMainCategoryViewController
             self.addChild(mainVC)
             mainVC.view.frame = CGRect(x: 0, y: 0, width: view.bounds.width * 0.4, height: view.bounds.height)
             self.view.addSubview(mainVC.view)
         }
         if let subVC = self.storyboard?.instantiateViewController(withIdentifier: "subMenu") {
-            self.subVC = subVC as! ZoneSubCategoryViewController
+            self.subVC = subVC as? ZoneSubCategoryViewController
             self.addChild(subVC)
             subVC.view.frame = CGRect(x: view.bounds.width * 0.4, y: 0, width: view.bounds.width * 0.6, height: view.bounds.height)
             //let tView = subVC.view as! UITableView
@@ -73,7 +73,7 @@ class ZoneMenuViewController: UIViewController {
     
     @objc private func reveiveCategoryNotification(_ notification:NSNotification){
         let obj = notification.object
-        self.subVC.app = obj as! Application
+        self.subVC.app = obj as? Application
     }
     
     @objc private func receiveSubNotification(_ notification:NSNotification){