diff --git a/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj b/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj index 30a908d..c2b5168 100644 --- a/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj +++ b/ParentAssistant/ParentAssistant.xcodeproj/project.pbxproj @@ -52,6 +52,7 @@ ADC9AB80207C672800348EF1 /* SceneTopCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADC9AB7F207C672800348EF1 /* SceneTopCell.xib */; }; ADC9AB82207C673300348EF1 /* SceneMiddleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADC9AB81207C673300348EF1 /* SceneMiddleCell.xib */; }; ADC9AB84207C673C00348EF1 /* SceneDownCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADC9AB83207C673C00348EF1 /* SceneDownCell.xib */; }; + ADC9AB88207C940700348EF1 /* ProgramViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC9AB87207C940700348EF1 /* ProgramViewController.swift */; }; ADE33B312062202300BEA6E6 /* Macro.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE33B302062202300BEA6E6 /* Macro.swift */; }; ADF159612069E00000A9485D /* CalendarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF159602069E00000A9485D /* CalendarView.swift */; }; BF388469205A4DE900A240EF /* StudentClassInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF388468205A4DE900A240EF /* StudentClassInfo.swift */; }; @@ -206,6 +207,7 @@ ADC9AB7F207C672800348EF1 /* SceneTopCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SceneTopCell.xib; sourceTree = ""; }; ADC9AB81207C673300348EF1 /* SceneMiddleCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SceneMiddleCell.xib; sourceTree = ""; }; ADC9AB83207C673C00348EF1 /* SceneDownCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SceneDownCell.xib; sourceTree = ""; }; + ADC9AB87207C940700348EF1 /* ProgramViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramViewController.swift; sourceTree = ""; }; ADE33B302062202300BEA6E6 /* Macro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Macro.swift; sourceTree = ""; }; ADF159602069E00000A9485D /* CalendarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarView.swift; sourceTree = ""; }; BF388468205A4DE900A240EF /* StudentClassInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudentClassInfo.swift; sourceTree = ""; }; @@ -510,6 +512,7 @@ ADC9AB86207C8EB400348EF1 /* Program */ = { isa = PBXGroup; children = ( + ADC9AB87207C940700348EF1 /* ProgramViewController.swift */, ); path = Program; sourceTree = ""; @@ -988,6 +991,7 @@ buildActionMask = 2147483647; files = ( BF621CB02056664C0040D2C1 /* CurrentInfoViewController.swift in Sources */, + ADC9AB88207C940700348EF1 /* ProgramViewController.swift in Sources */, BF7A4C3C204CD55300460463 /* ParentAssistant.xcdatamodeld in Sources */, BFEAAAD620525D620072FAAF /* LxButton.m in Sources */, 5993652C20528D5700C8B371 /* MainViewController.swift in Sources */, diff --git a/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate b/ParentAssistant/ParentAssistant.xcworkspace/xcuserdata/caoyang.xcuserdatad/UserInterfaceState.xcuserstate index 98be7db..1a723c1 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 2b7b7b3..7ba31b0 100644 --- a/ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift +++ b/ParentAssistant/ParentAssistant/Classes/controllers/Grow/GrowViewController.swift @@ -102,9 +102,15 @@ class GrowViewController: UIViewController,UIScrollViewDelegate { private func setChildViewContent(){ //添加子控制器 - for _ in 0..UITableView in + let table = UITableView.init(frame: CGRect.init(x: 15, y: 15, width: screenWidth-30, height: screenHeight-navigationBarHeight!-(self.tabBarController?.tabBar.frame.height)!-statusBarHeight-30)) + table.backgroundColor = UIColor.white + table.delegate = self + table.dataSource = self + return table + }() + //Data + var tableData = Array() + + override func viewDidLoad() { + super.viewDidLoad() + self.view.backgroundColor = backGroundColor + self.view.addSubview(self.tableView) + self.tableData = ["考勤","补卡","请假"] + + // Do any additional setup after loading the view. + } + + + //MARK: - UITableView Delegate & DataSource + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return self.tableData.count + } + func numberOfSections(in tableView: UITableView) -> Int { + return 1 + } + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + return 40 + } + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + let title = UILabel.init(frame: CGRect.init(x: 0, y: 0, width: tableView.bounds.size.width, height: 40)) + title.textAlignment = .center + title.text = "智能校卫" + title.backgroundColor = UIColor.white + return title + } + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = UITableViewCell.init() + cell.textLabel?.text = self.tableData[indexPath.row] + cell.imageView?.image = UIImage.init(named: "my_icon_about") + return cell + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destinationViewController. + // Pass the selected object to the new view controller. + } + */ + +} -- libgit2 0.21.0