Commit ea4b5f1e authored by Sandy's avatar Sandy

公告模块移植

parent 6506a4d2
......@@ -80,7 +80,22 @@
19D76AA51D266910006245D6 /* CALayer+Addtions.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D76AA41D266910006245D6 /* CALayer+Addtions.m */; };
8F0419ED1D6ABEF70062800C /* SaleInputAuditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F0419EC1D6ABEF70062800C /* SaleInputAuditViewController.m */; };
8F0419F01D6AC0D20062800C /* SaleInputAuditTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F0419EF1D6AC0D20062800C /* SaleInputAuditTableViewCell.m */; };
8F67FB4B1D7D4D5000808DF1 /* main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8F67FB4A1D7D4D5000808DF1 /* main.storyboard */; };
8F67FB4B1D7D4D5000808DF1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8F67FB4A1D7D4D5000808DF1 /* Main.storyboard */; };
8F67FB5F1D7D4F6900808DF1 /* AnnouncementDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB4E1D7D4F6900808DF1 /* AnnouncementDetailViewController.m */; };
8F67FB601D7D4F6900808DF1 /* ICRAnnouncementViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB501D7D4F6900808DF1 /* ICRAnnouncementViewController.m */; };
8F67FB611D7D4F6900808DF1 /* ICRAnnouncement.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB531D7D4F6900808DF1 /* ICRAnnouncement.m */; };
8F67FB621D7D4F6900808DF1 /* AnnouncementDetailTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB561D7D4F6900808DF1 /* AnnouncementDetailTableViewCell.m */; };
8F67FB631D7D4F6900808DF1 /* ICRAnnocementContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB581D7D4F6900808DF1 /* ICRAnnocementContentView.m */; };
8F67FB641D7D4F6900808DF1 /* ICRAnnouncementDetailContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB5A1D7D4F6900808DF1 /* ICRAnnouncementDetailContentView.m */; };
8F67FB651D7D4F6900808DF1 /* ICRAnnouncementDetailHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB5C1D7D4F6900808DF1 /* ICRAnnouncementDetailHeadView.m */; };
8F67FB661D7D4F6900808DF1 /* ICRAttachmentCellContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB5E1D7D4F6900808DF1 /* ICRAttachmentCellContentView.m */; };
8F67FBA81D7D527200808DF1 /* GTOPaging.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB711D7D527200808DF1 /* GTOPaging.m */; };
8F67FBB91D7D527200808DF1 /* ICRAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB971D7D527200808DF1 /* ICRAttachment.m */; };
8F67FBBC1D7D527200808DF1 /* LBorderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB9D1D7D527200808DF1 /* LBorderView.m */; };
8F67FBBD1D7D527200808DF1 /* NSMutableArray+SafeInsert.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FB9F1D7D527200808DF1 /* NSMutableArray+SafeInsert.m */; };
8F67FBBE1D7D527200808DF1 /* UILabel+SizeCalculate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FBA11D7D527200808DF1 /* UILabel+SizeCalculate.m */; };
8F67FBBF1D7D527200808DF1 /* UIView+FindUIViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FBA31D7D527200808DF1 /* UIView+FindUIViewController.m */; };
8F67FBC01D7D527200808DF1 /* UIView+ViewFrameGeometry.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F67FBA51D7D527200808DF1 /* UIView+ViewFrameGeometry.m */; };
8F8D6A511D6D3734001199FB /* VankeAffairsTenantBoard_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F8D6A501D6D3734001199FB /* VankeAffairsTenantBoard_iPhone.m */; };
8F8D6A531D6D3894001199FB /* VankeAffairsTenantBoard_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = 8F8D6A521D6D3894001199FB /* VankeAffairsTenantBoard_iPhone.xml */; };
8FBE1E181D6ACDA2002584E5 /* SalesInputAuditListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FBE1E141D6ACDA2002584E5 /* SalesInputAuditListModel.m */; };
......@@ -265,17 +280,8 @@
C17ABD4E1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C17ABD4C1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml */; };
C17ABD521BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C17ABD501BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m */; };
C17ABD531BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C17ABD511BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml */; };
C18A95281C01E7C100429BF7 /* ICRAnnouncementDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95251C01E7C100429BF7 /* ICRAnnouncementDetailViewController.m */; };
C18A95291C01E7C100429BF7 /* ICRAnnouncementViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95271C01E7C100429BF7 /* ICRAnnouncementViewController.m */; };
C18A952E1C01E84E00429BF7 /* ICRAnnouncement.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A952B1C01E84E00429BF7 /* ICRAnnouncement.m */; };
C18A952F1C01E84E00429BF7 /* ICRAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A952D1C01E84E00429BF7 /* ICRAttachment.m */; };
C18A95381C01E8E100429BF7 /* ICRAnnocementContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95311C01E8E100429BF7 /* ICRAnnocementContentView.m */; };
C18A95391C01E8E100429BF7 /* ICRAnnouncementDetailContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95331C01E8E100429BF7 /* ICRAnnouncementDetailContentView.m */; };
C18A953A1C01E8E100429BF7 /* ICRAnnouncementDetailHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95351C01E8E100429BF7 /* ICRAnnouncementDetailHeadView.m */; };
C18A953B1C01E8E100429BF7 /* ICRAttachmentCellContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95371C01E8E100429BF7 /* ICRAttachmentCellContentView.m */; };
C18A95401C01E98200429BF7 /* IBTModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A953F1C01E98200429BF7 /* IBTModel.m */; };
C18A95451C01F56200429BF7 /* ICRDataBaseController.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95441C01F56200429BF7 /* ICRDataBaseController.m */; };
C18A95491C01F64500429BF7 /* LBorderView.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A95481C01F64500429BF7 /* LBorderView.m */; };
C18A954D1C01FAE500429BF7 /* ICRHTTPController.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A954C1C01FAE500429BF7 /* ICRHTTPController.m */; };
C19AC8841C1735E600DE260E /* no_data@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C19AC85D1C1735E600DE260E /* no_data@2x.png */; };
C19AC8851C1735E600DE260E /* no_data@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C19AC85E1C1735E600DE260E /* no_data@3x.png */; };
......@@ -918,7 +924,39 @@
8F0419EC1D6ABEF70062800C /* SaleInputAuditViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SaleInputAuditViewController.m; sourceTree = "<group>"; };
8F0419EE1D6AC0D20062800C /* SaleInputAuditTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaleInputAuditTableViewCell.h; sourceTree = "<group>"; };
8F0419EF1D6AC0D20062800C /* SaleInputAuditTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SaleInputAuditTableViewCell.m; sourceTree = "<group>"; };
8F67FB4A1D7D4D5000808DF1 /* main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = main.storyboard; sourceTree = "<group>"; };
8F67FB4A1D7D4D5000808DF1 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
8F67FB4D1D7D4F6900808DF1 /* AnnouncementDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnouncementDetailViewController.h; sourceTree = "<group>"; };
8F67FB4E1D7D4F6900808DF1 /* AnnouncementDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnouncementDetailViewController.m; sourceTree = "<group>"; };
8F67FB4F1D7D4F6900808DF1 /* ICRAnnouncementViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRAnnouncementViewController.h; sourceTree = "<group>"; };
8F67FB501D7D4F6900808DF1 /* ICRAnnouncementViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRAnnouncementViewController.m; sourceTree = "<group>"; };
8F67FB521D7D4F6900808DF1 /* ICRAnnouncement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRAnnouncement.h; sourceTree = "<group>"; };
8F67FB531D7D4F6900808DF1 /* ICRAnnouncement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRAnnouncement.m; sourceTree = "<group>"; };
8F67FB551D7D4F6900808DF1 /* AnnouncementDetailTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnnouncementDetailTableViewCell.h; sourceTree = "<group>"; };
8F67FB561D7D4F6900808DF1 /* AnnouncementDetailTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnnouncementDetailTableViewCell.m; sourceTree = "<group>"; };
8F67FB571D7D4F6900808DF1 /* ICRAnnocementContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRAnnocementContentView.h; sourceTree = "<group>"; };
8F67FB581D7D4F6900808DF1 /* ICRAnnocementContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRAnnocementContentView.m; sourceTree = "<group>"; };
8F67FB591D7D4F6900808DF1 /* ICRAnnouncementDetailContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRAnnouncementDetailContentView.h; sourceTree = "<group>"; };
8F67FB5A1D7D4F6900808DF1 /* ICRAnnouncementDetailContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRAnnouncementDetailContentView.m; sourceTree = "<group>"; };
8F67FB5B1D7D4F6900808DF1 /* ICRAnnouncementDetailHeadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRAnnouncementDetailHeadView.h; sourceTree = "<group>"; };
8F67FB5C1D7D4F6900808DF1 /* ICRAnnouncementDetailHeadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRAnnouncementDetailHeadView.m; sourceTree = "<group>"; };
8F67FB5D1D7D4F6900808DF1 /* ICRAttachmentCellContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRAttachmentCellContentView.h; sourceTree = "<group>"; };
8F67FB5E1D7D4F6900808DF1 /* ICRAttachmentCellContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRAttachmentCellContentView.m; sourceTree = "<group>"; };
8F67FB701D7D527200808DF1 /* GTOPaging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTOPaging.h; sourceTree = "<group>"; };
8F67FB711D7D527200808DF1 /* GTOPaging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTOPaging.m; sourceTree = "<group>"; };
8F67FB761D7D527200808DF1 /* IBTInputViewHandleDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBTInputViewHandleDelegate.h; sourceTree = "<group>"; };
8F67FB961D7D527200808DF1 /* ICRAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRAttachment.h; sourceTree = "<group>"; };
8F67FB971D7D527200808DF1 /* ICRAttachment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRAttachment.m; sourceTree = "<group>"; };
8F67FB9C1D7D527200808DF1 /* LBorderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LBorderView.h; sourceTree = "<group>"; };
8F67FB9D1D7D527200808DF1 /* LBorderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LBorderView.m; sourceTree = "<group>"; };
8F67FB9E1D7D527200808DF1 /* NSMutableArray+SafeInsert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+SafeInsert.h"; sourceTree = "<group>"; };
8F67FB9F1D7D527200808DF1 /* NSMutableArray+SafeInsert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+SafeInsert.m"; sourceTree = "<group>"; };
8F67FBA01D7D527200808DF1 /* UILabel+SizeCalculate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+SizeCalculate.h"; sourceTree = "<group>"; };
8F67FBA11D7D527200808DF1 /* UILabel+SizeCalculate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+SizeCalculate.m"; sourceTree = "<group>"; };
8F67FBA21D7D527200808DF1 /* UIView+FindUIViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+FindUIViewController.h"; sourceTree = "<group>"; };
8F67FBA31D7D527200808DF1 /* UIView+FindUIViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+FindUIViewController.m"; sourceTree = "<group>"; };
8F67FBA41D7D527200808DF1 /* UIView+ViewFrameGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+ViewFrameGeometry.h"; sourceTree = "<group>"; };
8F67FBA51D7D527200808DF1 /* UIView+ViewFrameGeometry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+ViewFrameGeometry.m"; sourceTree = "<group>"; };
8F67FBA61D7D527200808DF1 /* UIViewController+LogicController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+LogicController.h"; sourceTree = "<group>"; };
8F8D6A4F1D6D3734001199FB /* VankeAffairsTenantBoard_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VankeAffairsTenantBoard_iPhone.h; sourceTree = "<group>"; };
8F8D6A501D6D3734001199FB /* VankeAffairsTenantBoard_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VankeAffairsTenantBoard_iPhone.m; sourceTree = "<group>"; };
8F8D6A521D6D3894001199FB /* VankeAffairsTenantBoard_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = VankeAffairsTenantBoard_iPhone.xml; sourceTree = "<group>"; };
......@@ -1213,28 +1251,10 @@
C17ABD4F1BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VankeStatementDetailMonthCell_iPhone.h; path = statement/VankeStatementDetailMonthCell_iPhone.h; sourceTree = "<group>"; };
C17ABD501BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VankeStatementDetailMonthCell_iPhone.m; path = statement/VankeStatementDetailMonthCell_iPhone.m; sourceTree = "<group>"; };
C17ABD511BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = VankeStatementDetailMonthCell_iPhone.xml; path = statement/VankeStatementDetailMonthCell_iPhone.xml; sourceTree = "<group>"; };
C18A95241C01E7C100429BF7 /* ICRAnnouncementDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAnnouncementDetailViewController.h; path = announcement/ICRAnnouncementDetailViewController.h; sourceTree = "<group>"; };
C18A95251C01E7C100429BF7 /* ICRAnnouncementDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAnnouncementDetailViewController.m; path = announcement/ICRAnnouncementDetailViewController.m; sourceTree = "<group>"; };
C18A95261C01E7C100429BF7 /* ICRAnnouncementViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAnnouncementViewController.h; path = announcement/ICRAnnouncementViewController.h; sourceTree = "<group>"; };
C18A95271C01E7C100429BF7 /* ICRAnnouncementViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAnnouncementViewController.m; path = announcement/ICRAnnouncementViewController.m; sourceTree = "<group>"; };
C18A952A1C01E84E00429BF7 /* ICRAnnouncement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAnnouncement.h; path = announcement/ICRAnnouncement.h; sourceTree = "<group>"; };
C18A952B1C01E84E00429BF7 /* ICRAnnouncement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAnnouncement.m; path = announcement/ICRAnnouncement.m; sourceTree = "<group>"; };
C18A952C1C01E84E00429BF7 /* ICRAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAttachment.h; path = announcement/ICRAttachment.h; sourceTree = "<group>"; };
C18A952D1C01E84E00429BF7 /* ICRAttachment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAttachment.m; path = announcement/ICRAttachment.m; sourceTree = "<group>"; };
C18A95301C01E8E100429BF7 /* ICRAnnocementContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAnnocementContentView.h; path = announcement/ICRAnnocementContentView.h; sourceTree = "<group>"; };
C18A95311C01E8E100429BF7 /* ICRAnnocementContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAnnocementContentView.m; path = announcement/ICRAnnocementContentView.m; sourceTree = "<group>"; };
C18A95321C01E8E100429BF7 /* ICRAnnouncementDetailContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAnnouncementDetailContentView.h; path = announcement/ICRAnnouncementDetailContentView.h; sourceTree = "<group>"; };
C18A95331C01E8E100429BF7 /* ICRAnnouncementDetailContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAnnouncementDetailContentView.m; path = announcement/ICRAnnouncementDetailContentView.m; sourceTree = "<group>"; };
C18A95341C01E8E100429BF7 /* ICRAnnouncementDetailHeadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAnnouncementDetailHeadView.h; path = announcement/ICRAnnouncementDetailHeadView.h; sourceTree = "<group>"; };
C18A95351C01E8E100429BF7 /* ICRAnnouncementDetailHeadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAnnouncementDetailHeadView.m; path = announcement/ICRAnnouncementDetailHeadView.m; sourceTree = "<group>"; };
C18A95361C01E8E100429BF7 /* ICRAttachmentCellContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ICRAttachmentCellContentView.h; path = announcement/ICRAttachmentCellContentView.h; sourceTree = "<group>"; };
C18A95371C01E8E100429BF7 /* ICRAttachmentCellContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ICRAttachmentCellContentView.m; path = announcement/ICRAttachmentCellContentView.m; sourceTree = "<group>"; };
C18A953E1C01E98200429BF7 /* IBTModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IBTModel.h; sourceTree = "<group>"; };
C18A953F1C01E98200429BF7 /* IBTModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IBTModel.m; sourceTree = "<group>"; };
C18A95431C01F56200429BF7 /* ICRDataBaseController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRDataBaseController.h; sourceTree = "<group>"; };
C18A95441C01F56200429BF7 /* ICRDataBaseController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRDataBaseController.m; sourceTree = "<group>"; };
C18A95471C01F64500429BF7 /* LBorderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LBorderView.h; sourceTree = "<group>"; };
C18A95481C01F64500429BF7 /* LBorderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LBorderView.m; sourceTree = "<group>"; };
C18A954B1C01FAE500429BF7 /* ICRHTTPController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRHTTPController.h; sourceTree = "<group>"; };
C18A954C1C01FAE500429BF7 /* ICRHTTPController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRHTTPController.m; sourceTree = "<group>"; };
C19AC85D1C1735E600DE260E /* no_data@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "no_data@2x.png"; path = "img/no_data@2x.png"; sourceTree = "<group>"; };
......@@ -2370,6 +2390,75 @@
path = TZImagePickerController;
sourceTree = "<group>";
};
8F67FB4C1D7D4F6900808DF1 /* Announcement */ = {
isa = PBXGroup;
children = (
8F67FB4D1D7D4F6900808DF1 /* AnnouncementDetailViewController.h */,
8F67FB4E1D7D4F6900808DF1 /* AnnouncementDetailViewController.m */,
8F67FB4F1D7D4F6900808DF1 /* ICRAnnouncementViewController.h */,
8F67FB501D7D4F6900808DF1 /* ICRAnnouncementViewController.m */,
8F67FB511D7D4F6900808DF1 /* Models */,
8F67FB541D7D4F6900808DF1 /* Views */,
);
path = Announcement;
sourceTree = "<group>";
};
8F67FB511D7D4F6900808DF1 /* Models */ = {
isa = PBXGroup;
children = (
8F67FB521D7D4F6900808DF1 /* ICRAnnouncement.h */,
8F67FB531D7D4F6900808DF1 /* ICRAnnouncement.m */,
);
path = Models;
sourceTree = "<group>";
};
8F67FB541D7D4F6900808DF1 /* Views */ = {
isa = PBXGroup;
children = (
8F67FB551D7D4F6900808DF1 /* AnnouncementDetailTableViewCell.h */,
8F67FB561D7D4F6900808DF1 /* AnnouncementDetailTableViewCell.m */,
8F67FB571D7D4F6900808DF1 /* ICRAnnocementContentView.h */,
8F67FB581D7D4F6900808DF1 /* ICRAnnocementContentView.m */,
8F67FB591D7D4F6900808DF1 /* ICRAnnouncementDetailContentView.h */,
8F67FB5A1D7D4F6900808DF1 /* ICRAnnouncementDetailContentView.m */,
8F67FB5B1D7D4F6900808DF1 /* ICRAnnouncementDetailHeadView.h */,
8F67FB5C1D7D4F6900808DF1 /* ICRAnnouncementDetailHeadView.m */,
8F67FB5D1D7D4F6900808DF1 /* ICRAttachmentCellContentView.h */,
8F67FB5E1D7D4F6900808DF1 /* ICRAttachmentCellContentView.m */,
);
path = Views;
sourceTree = "<group>";
};
8F67FB6B1D7D508700808DF1 /* Old */ = {
isa = PBXGroup;
children = (
);
path = Old;
sourceTree = "<group>";
};
8F67FB6F1D7D527200808DF1 /* TotalSupportField */ = {
isa = PBXGroup;
children = (
8F67FB701D7D527200808DF1 /* GTOPaging.h */,
8F67FB711D7D527200808DF1 /* GTOPaging.m */,
8F67FB761D7D527200808DF1 /* IBTInputViewHandleDelegate.h */,
8F67FB961D7D527200808DF1 /* ICRAttachment.h */,
8F67FB971D7D527200808DF1 /* ICRAttachment.m */,
8F67FB9C1D7D527200808DF1 /* LBorderView.h */,
8F67FB9D1D7D527200808DF1 /* LBorderView.m */,
8F67FB9E1D7D527200808DF1 /* NSMutableArray+SafeInsert.h */,
8F67FB9F1D7D527200808DF1 /* NSMutableArray+SafeInsert.m */,
8F67FBA01D7D527200808DF1 /* UILabel+SizeCalculate.h */,
8F67FBA11D7D527200808DF1 /* UILabel+SizeCalculate.m */,
8F67FBA21D7D527200808DF1 /* UIView+FindUIViewController.h */,
8F67FBA31D7D527200808DF1 /* UIView+FindUIViewController.m */,
8F67FBA41D7D527200808DF1 /* UIView+ViewFrameGeometry.h */,
8F67FBA51D7D527200808DF1 /* UIView+ViewFrameGeometry.m */,
8F67FBA61D7D527200808DF1 /* UIViewController+LogicController.h */,
);
path = TotalSupportField;
sourceTree = "<group>";
};
C10F17831BF7ACA80065F18C /* 3rd */ = {
isa = PBXGroup;
children = (
......@@ -2764,29 +2853,6 @@
path = UIPopoverList;
sourceTree = "<group>";
};
C18A95231C01E7B100429BF7 /* announcement */ = {
isa = PBXGroup;
children = (
C18A95301C01E8E100429BF7 /* ICRAnnocementContentView.h */,
C18A95311C01E8E100429BF7 /* ICRAnnocementContentView.m */,
C18A952A1C01E84E00429BF7 /* ICRAnnouncement.h */,
C18A952B1C01E84E00429BF7 /* ICRAnnouncement.m */,
C18A95321C01E8E100429BF7 /* ICRAnnouncementDetailContentView.h */,
C18A95331C01E8E100429BF7 /* ICRAnnouncementDetailContentView.m */,
C18A95341C01E8E100429BF7 /* ICRAnnouncementDetailHeadView.h */,
C18A95351C01E8E100429BF7 /* ICRAnnouncementDetailHeadView.m */,
C18A95241C01E7C100429BF7 /* ICRAnnouncementDetailViewController.h */,
C18A95251C01E7C100429BF7 /* ICRAnnouncementDetailViewController.m */,
C18A95261C01E7C100429BF7 /* ICRAnnouncementViewController.h */,
C18A95271C01E7C100429BF7 /* ICRAnnouncementViewController.m */,
C18A952C1C01E84E00429BF7 /* ICRAttachment.h */,
C18A952D1C01E84E00429BF7 /* ICRAttachment.m */,
C18A95361C01E8E100429BF7 /* ICRAttachmentCellContentView.h */,
C18A95371C01E8E100429BF7 /* ICRAttachmentCellContentView.m */,
);
name = announcement;
sourceTree = "<group>";
};
C18A953D1C01E98200429BF7 /* IBTModels */ = {
isa = PBXGroup;
children = (
......@@ -2808,8 +2874,6 @@
C18A95461C01F64500429BF7 /* LBorderView */ = {
isa = PBXGroup;
children = (
C18A95471C01F64500429BF7 /* LBorderView.h */,
C18A95481C01F64500429BF7 /* LBorderView.m */,
);
path = LBorderView;
sourceTree = "<group>";
......@@ -3054,7 +3118,7 @@
C12804EA1BC3727A001ECBAA /* VankeConfig.h */,
C1D58B361BB1BC9200D297FE /* AppDelegate.m */,
C1D58B551BB1BC9200D297FE /* Info.plist */,
8F67FB4A1D7D4D5000808DF1 /* main.storyboard */,
8F67FB4A1D7D4D5000808DF1 /* Main.storyboard */,
19605F911D3759D100C20590 /* Statement.storyboard */,
C1DED2B71BCEC3F70049BB2D /* LaunchScreen.xib */,
19B34CC21D3B343D0060E272 /* SalesInPut.storyboard */,
......@@ -3176,11 +3240,13 @@
C1D58B3D1BB1BC9200D297FE /* templates */ = {
isa = PBXGroup;
children = (
8F67FB6F1D7D527200808DF1 /* TotalSupportField */,
8F67FB6B1D7D508700808DF1 /* Old */,
8F67FB4C1D7D4F6900808DF1 /* Announcement */,
19605F7B1D37458200C20590 /* statements(对账单) */,
196F0F391D339D140047300A /* report(报表) */,
19000E731CC6215000DF8D71 /* salesInput(销售录入) */,
C1A069FB1BE1046B0082006F /* affairs */,
C18A95231C01E7B100429BF7 /* announcement */,
C19BBBDE1BBE85B300831290 /* common */,
C19BBBDD1BBE857600831290 /* floor-detail */,
C19BBC121BBE863B00831290 /* floor-list */,
......@@ -4743,7 +4809,7 @@
C19AC88D1C1735E600DE260E /* confirmed@3x.png in Resources */,
C1D595031BB42A6800D297FE /* page-normal@2x.png in Resources */,
C117864F1C0B3A5900DB7E4B /* notice_icon@3x.png in Resources */,
8F67FB4B1D7D4D5000808DF1 /* main.storyboard in Resources */,
8F67FB4B1D7D4D5000808DF1 /* Main.storyboard in Resources */,
19D76AA11D2667AB006245D6 /* SaleInputPictureTableViewCell.xib in Resources */,
C117866A1C0B4C5200DB7E4B /* bill_remark@2x.png in Resources */,
C19AC89E1C1735E600DE260E /* rejected_big@2x.png in Resources */,
......@@ -4981,7 +5047,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C18A952F1C01E84E00429BF7 /* ICRAttachment.m in Sources */,
C1D599461BB44B2100D297FE /* NSObject+BeeMacros.mm in Sources */,
C1D5995B1BB44B2100D297FE /* Bee_HTTPConnection2.m in Sources */,
C10F182B1BF7ACA80065F18C /* ICRFunctionBaseView.m in Sources */,
......@@ -5013,7 +5078,6 @@
C10F181B1BF7ACA80065F18C /* UIResponder+FirstResponder.m in Sources */,
C1F790A51C075A09001AEBBB /* VankeSettlementConfirmAPI.m in Sources */,
C19BBC1B1BBE865400831290 /* VankeFloorListBoardCell_iPhone.m in Sources */,
C18A95381C01E8E100429BF7 /* ICRAnnocementContentView.m in Sources */,
C1D598621BB44B2000D297FE /* BeeUIBoard+Popover.m in Sources */,
19605F8C1D37597300C20590 /* StatementDetailViewController.m in Sources */,
19000E911CC71DD200DF8D71 /* MyToolBar.m in Sources */,
......@@ -5035,7 +5099,6 @@
C1D5989B1BB44B2000D297FE /* Bee_UIActivityIndicatorView.m in Sources */,
C1D5984C1BB44B2000D297FE /* BeeMessage+BeeJSON.mm in Sources */,
C18A95451C01F56200429BF7 /* ICRDataBaseController.m in Sources */,
C18A95491C01F64500429BF7 /* LBorderView.m in Sources */,
C19BBC0E1BBE861700831290 /* VankeBusinessChartCell_iPhone.m in Sources */,
19605F8D1D37597300C20590 /* StatementViewController.m in Sources */,
C1D598B11BB44B2000D297FE /* Bee_UITabBar.m in Sources */,
......@@ -5054,7 +5117,9 @@
C1D598B81BB44B2000D297FE /* Bee_UIWebView.m in Sources */,
C12804FD1BC417A6001ECBAA /* VankeProjectSummaryModel.m in Sources */,
C1D5988C1BB44B2000D297FE /* UIView+Animation.m in Sources */,
8F67FB651D7D4F6900808DF1 /* ICRAnnouncementDetailHeadView.m in Sources */,
C17ABD4D1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.m in Sources */,
8F67FB641D7D4F6900808DF1 /* ICRAnnouncementDetailContentView.m in Sources */,
C1D598591BB44B2000D297FE /* Bee_UIConfig.m in Sources */,
C12805091BC55773001ECBAA /* VankeBaseAPI.m in Sources */,
19D76A881D265A1B006245D6 /* TZAssetCell.m in Sources */,
......@@ -5083,10 +5148,8 @@
C1D599891BB44B2100D297FE /* CXMLNamespaceNode.m in Sources */,
19994DBF1D3500030089A129 /* QueryOrder.m in Sources */,
19000E871CC6215000DF8D71 /* HistoryViewController.m in Sources */,
C18A952E1C01E84E00429BF7 /* ICRAnnouncement.m in Sources */,
19994DB91D34F9A40089A129 /* CustomSegView.m in Sources */,
C1D599471BB44B2100D297FE /* NSObject+BeeNotification.mm in Sources */,
C18A953B1C01E8E100429BF7 /* ICRAttachmentCellContentView.m in Sources */,
C1D5996D1BB44B2100D297FE /* Bee_Socket.m in Sources */,
8FBE1E191D6ACDA2002584E5 /* SalesInputLines.m in Sources */,
C1D598721BB44B2000D297FE /* BeeUIStyle+Builder.m in Sources */,
......@@ -5160,6 +5223,7 @@
C1D5996C1BB44B2100D297FE /* Bee_Reachability.m in Sources */,
C1D598EE1BB44B2000D297FE /* UIView+LayoutParser.m in Sources */,
190AFD9C1CF41798002698FC /* VankeFloorDetailWebViewController.m in Sources */,
8F67FBC01D7D527200808DF1 /* UIView+ViewFrameGeometry.m in Sources */,
C1D599421BB44B2100D297FE /* NSDictionary+BeeExtension.mm in Sources */,
C1D5991F1BB44B2100D297FE /* Bee_Cache.mm in Sources */,
C1D5992E1BB44B2100D297FE /* BeeDatabase+BeeActiveRecord.m in Sources */,
......@@ -5205,8 +5269,10 @@
C1D598C51BB44B2000D297FE /* UIView+Visibility.m in Sources */,
C1D599221BB44B2100D297FE /* Bee_Keychain.mm in Sources */,
C19BBBE21BBE85D000831290 /* VankeLoginBoard_iPhone.m in Sources */,
8F67FBBD1D7D527200808DF1 /* NSMutableArray+SafeInsert.m in Sources */,
C1D598421BB44B2000D297FE /* Bee_Version.mm in Sources */,
C1D598E01BB44B2000D297FE /* UIImageView+BeeUILayout.m in Sources */,
8F67FBBF1D7D527200808DF1 /* UIView+FindUIViewController.m in Sources */,
C1D599341BB44B2100D297FE /* Bee_Foundation.mm in Sources */,
19994DA61D34D7D60089A129 /* SaleViewController.m in Sources */,
C10F18431BF7ACA80065F18C /* IBTUIButton.m in Sources */,
......@@ -5234,6 +5300,7 @@
C19BBBFD1BBE85F500831290 /* VankeServiceBoardCell_iPhone.m in Sources */,
19D76A891D265A1B006245D6 /* TZAssetModel.m in Sources */,
C1D599701BB44B2100D297FE /* Bee_Service.m in Sources */,
8F67FB631D7D4F6900808DF1 /* ICRAnnocementContentView.m in Sources */,
C1E0AD861C131D1F00DE6BB9 /* VankeTenantTabBoard_iPhone.m in Sources */,
C1CF9F301BEF20DB0033C35E /* VankeNoticeBoard_iPhone.m in Sources */,
C1555F421C020F0900C80B55 /* IBTWebProgressBar.m in Sources */,
......@@ -5245,6 +5312,7 @@
C1D5987D1BB44B2000D297FE /* UIView+BeeUIStyle.m in Sources */,
19B34CD81D3C8AF80060E272 /* GalleryViewController.m in Sources */,
C1F790AB1C07600E001AEBBB /* VankeStatementConfirmModel.m in Sources */,
8F67FB661D7D4F6900808DF1 /* ICRAttachmentCellContentView.m in Sources */,
C1D5988A1BB44B2000D297FE /* Bee_UIAnimationStyling.m in Sources */,
C1D599571BB44B2100D297FE /* Bee_HTTPConfig.m in Sources */,
C1D599501BB44B2100D297FE /* Bee_Language.m in Sources */,
......@@ -5286,7 +5354,6 @@
C1D598921BB44B2000D297FE /* UITextField+UIDataBinding.m in Sources */,
C1D5992F1BB44B2100D297FE /* NSArray+BeeActiveRecord.m in Sources */,
19D76A911D265A1B006245D6 /* UIView+Layout.m in Sources */,
C18A95391C01E8E100429BF7 /* ICRAnnouncementDetailContentView.m in Sources */,
C1D599101BB44B2000D297FE /* UIViewController+BeeUITemplate.m in Sources */,
C1D599371BB44B2100D297FE /* Bee_Runtime.mm in Sources */,
19605FA61D38949700C20590 /* ReportBoardTableViewCell.m in Sources */,
......@@ -5308,7 +5375,6 @@
C19BBC101BBE861700831290 /* VankeFloorDetailBoardPhoto_iPhone.m in Sources */,
C1D5996B1BB44B2100D297FE /* Bee_MIME2.m in Sources */,
19B34CE61D3CCE9F0060E272 /* StatementPaging.m in Sources */,
C18A95291C01E7C100429BF7 /* ICRAnnouncementViewController.m in Sources */,
C10F18121BF7ACA80065F18C /* NSDate+FormatterAdditions.m in Sources */,
C1D598951BB44B2000D297FE /* NSObject+UIPropertyMapping.m in Sources */,
C1D598D41BB44B2000D297FE /* Bee_UISignalBus.m in Sources */,
......@@ -5359,7 +5425,6 @@
C12804DA1BC12A67001ECBAA /* VankeWeatherController.m in Sources */,
C1D599211BB44B2100D297FE /* Bee_FileCache.mm in Sources */,
C10F18761BF8F33B0065F18C /* VankeSettlementListAPI.m in Sources */,
C18A953A1C01E8E100429BF7 /* ICRAnnouncementDetailHeadView.m in Sources */,
C1A026271C12CA2900737937 /* VankeStatementSubjectListModel.m in Sources */,
C19BBBF91BBE85F500831290 /* VankeMainBoard_iPhone.m in Sources */,
C1D599261BB44B2100D297FE /* NSObject+BeeUserDefaults.mm in Sources */,
......@@ -5383,7 +5448,6 @@
C1D5986D1BB44B2000D297FE /* UIViewController+UINavigationBar.m in Sources */,
C1D5994B1BB44B2100D297FE /* NSObject+BeeTypeConversion.mm in Sources */,
C1D5993C1BB44B2100D297FE /* Bee_Ticker.mm in Sources */,
C18A95281C01E7C100429BF7 /* ICRAnnouncementDetailViewController.m in Sources */,
C1D599871BB44B2100D297FE /* CXMLElement_CreationExtensions.m in Sources */,
C1D598C71BB44B2000D297FE /* Bee_UICameraView.m in Sources */,
C1D598F21BB44B2000D297FE /* BeeUIQuery+CSS.m in Sources */,
......@@ -5394,6 +5458,7 @@
C1D598DE1BB44B2000D297FE /* BeeUILayout+CSSElement.m in Sources */,
C1D598B61BB44B2000D297FE /* Bee_UIVideoEditorController.m in Sources */,
C1D598401BB44B2000D297FE /* Bee.mm in Sources */,
8F67FB601D7D4F6900808DF1 /* ICRAnnouncementViewController.m in Sources */,
C1D599381BB44B2100D297FE /* Bee_Sandbox.mm in Sources */,
C1D598BA1BB44B2000D297FE /* UIView+HoldGesture.m in Sources */,
C1D5991A1BB44B2100D297FE /* UITextView+XMLParser.m in Sources */,
......@@ -5417,6 +5482,7 @@
1912FCE31CCDECF8004CF976 /* PaymentTypeModel.m in Sources */,
19D76A8C1D265A1B006245D6 /* TZImagePickerController.m in Sources */,
C1D598B21BB44B2000D297FE /* Bee_UITableView.m in Sources */,
8F67FB611D7D4F6900808DF1 /* ICRAnnouncement.m in Sources */,
C19BBC051BBE85F500831290 /* VankeWeatherCell_iPhone.m in Sources */,
C10F183D1BF7ACA80065F18C /* IBTObject.m in Sources */,
C1D598A31BB44B2000D297FE /* Bee_UIImageView.m in Sources */,
......@@ -5439,6 +5505,7 @@
C1CF9F401BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.m in Sources */,
C1D5984D1BB44B2000D297FE /* BeeMessage+BeeNetwork.mm in Sources */,
C10F184B1BF7ACA80065F18C /* IBTUIViewController.m in Sources */,
8F67FB5F1D7D4F6900808DF1 /* AnnouncementDetailViewController.m in Sources */,
C1D599391BB44B2100D297FE /* Bee_Singleton.mm in Sources */,
8FBE1E181D6ACDA2002584E5 /* SalesInputAuditListModel.m in Sources */,
C1D598501BB44B2000D297FE /* Bee_Model.mm in Sources */,
......@@ -5461,6 +5528,8 @@
C1D598D51BB44B2000D297FE /* BeeUISignal+SourceView.m in Sources */,
C1D598561BB44B2000D297FE /* UIColor+BeeExtension.m in Sources */,
C10F18491BF7ACA80065F18C /* IBTUITextField.m in Sources */,
8F67FBBC1D7D527200808DF1 /* LBorderView.m in Sources */,
8F67FBA81D7D527200808DF1 /* GTOPaging.m in Sources */,
C1D598ED1BB44B2000D297FE /* UITextView+LayoutParser.m in Sources */,
C1D599361BB44B2100D297FE /* Bee_Performance.mm in Sources */,
C1D599441BB44B2100D297FE /* NSObject+BeeExtension.mm in Sources */,
......@@ -5481,6 +5550,7 @@
C1D5986B1BB44B2000D297FE /* UIViewController+Title.m in Sources */,
C1D599641BB44B2100D297FE /* Bee_HTTPUtility2.m in Sources */,
C1D598CF1BB44B2000D297FE /* BeeUISignal+BeeUICell.m in Sources */,
8F67FB621D7D4F6900808DF1 /* AnnouncementDetailTableViewCell.m in Sources */,
C10F18731BF8F1830065F18C /* VankeStatementListModel.m in Sources */,
C16BA6231BD393B7001ACB26 /* VankePassengerDetailBoard_iPhone.m in Sources */,
C1D598CE1BB44B2000D297FE /* Bee_UIZoomView.m in Sources */,
......@@ -5498,6 +5568,7 @@
C1D598821BB44B2000D297FE /* CSSStyleSelector.m in Sources */,
C10F18351BF7ACA80065F18C /* IBTTableViewCellInfo.m in Sources */,
C1D598601BB44B2000D297FE /* BeeUIBoard+ModalStack.m in Sources */,
8F67FBBE1D7D527200808DF1 /* UILabel+SizeCalculate.m in Sources */,
C1D598771BB44B2000D297FE /* UIImageView+BeeUIStyle.m in Sources */,
C17ABD521BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m in Sources */,
C10F18281BF7ACA80065F18C /* ICRAttachmentView.m in Sources */,
......@@ -5508,6 +5579,7 @@
C1D598AE1BB44B2000D297FE /* Bee_UISegmentedControl.m in Sources */,
C1D598701BB44B2000D297FE /* Bee_UIStyleManager.m in Sources */,
C1D598DA1BB44B2000D297FE /* Bee_UILayoutBuilder_v1.m in Sources */,
8F67FBB91D7D527200808DF1 /* ICRAttachment.m in Sources */,
C1D598E41BB44B2000D297FE /* UITextField+BeeUILayout.m in Sources */,
C1D598CC1BB44B2000D297FE /* Bee_UITipsView.m in Sources */,
C1D599311BB44B2100D297FE /* NSObject+BeeActiveRecord.m in Sources */,
......
......@@ -13,6 +13,8 @@
/** 从storyBoard获取控制器 */
- (id)controllerWithIdentifier:(NSString *)identifier;
- (id)getMainVCWithIdentifier:(NSString *)identifier;
/**
* 根据storyboarId push到指定的vc
*/
......
......@@ -27,6 +27,11 @@
return [storyboard instantiateViewControllerWithIdentifier:identifier];
}
- (id)getMainVCWithIdentifier:(NSString *)identifier {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
return [storyboard instantiateViewControllerWithIdentifier:identifier];
}
- (void)PushToStoryBoardVCWithIdentifier:(NSString *)identifier isHideTabbar:(BOOL)hide animate:(BOOL)animate {
UIViewController *vc = [self controllerWithIdentifier:identifier];
vc.hidesBottomBarWhenPushed = YES;
......
......@@ -43,13 +43,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
/* 公告列表(读)
获得公告列表
*/
- (void)doGetBoardListFromUpdateTime:(NSString *)updateTime
position:(NSUInteger)uiPosition
size:(NSUInteger)uiSize
type:(ICRAnnouncementType)eType
deleteLocal:(BOOL)bDeleteLocal
success:(void (^)(id data))succ
failure:(void (^)(id data))fail;
//- (void)doGetBoardListFromUpdateTime:(NSString *)updateTime
// position:(NSUInteger)uiPosition
// size:(NSUInteger)uiSize
// type:(ICRAnnouncementType)eType
// deleteLocal:(BOOL)bDeleteLocal
// success:(void (^)(id data))succ
// failure:(void (^)(id data))fail;
/* 读取公告(读)
读取单个公告
......
......@@ -401,64 +401,64 @@ acceptTypeJson:(BOOL)bAcceptJson
// failure:failure];
}
#pragma mark - Board
- (void)doGetBoardListFromUpdateTime:(NSString *)updateTime
position:(NSUInteger)uiPosition
size:(NSUInteger)uiSize
type:(ICRAnnouncementType)eType
deleteLocal:(BOOL)bDeleteLocal
success:(void (^)(id data))succ
failure:(void (^)(id data))fail
{
void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"%@", responseObject);
if (IsDictObject(responseObject)) {
void (^complete)(void) = ^(void){
if (succ) {
[IBTCommon runOnMainThreadWithoutDeadlocking:^{
succ( responseObject );
}];
}
};
void(^dataHandle)(id<IBTDatabaseObject>) = ^(id<IBTDatabaseObject> model) {
ICRAnnouncement *ann = model;
ann.priority = eType;
};
ICRDataBaseController *dbCtrl = [ICRDataBaseController sharedController];
[dbCtrl storageEntities:responseObject[ @"data" ][ @"records" ]
objectClass:NSClassFromString( @"ICRAnnouncement" )
deleteLocal:bDeleteLocal
handleData:dataHandle
complete:complete
fail:fail];
}
else {
if (fail) {
fail( nil );
}
}
};
void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@", error);
if (fail) {
fail( error );
}
};
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:kICRHTTP_BoardQuery] stringByAppendingFormat:@"/%@?start_date=%@&page_number=%@&page_size=%@",[[VankeCommonModel sharedInstance] currentUser].uuid ,updateTime ? : [[NSDate dateWithTimeIntervalSince1970:0] httpParameterString],@( uiPosition ),@( uiSize )];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"%@",encodeUrlStr);
[self POST:encodeUrlStr
parameters:nil
needToken:NO
acceptTypeJson:YES
success:success
failure:failure];
}
//#pragma mark - Board
//- (void)doGetBoardListFromUpdateTime:(NSString *)updateTime
// position:(NSUInteger)uiPosition
// size:(NSUInteger)uiSize
// type:(ICRAnnouncementType)eType
// deleteLocal:(BOOL)bDeleteLocal
// success:(void (^)(id data))succ
// failure:(void (^)(id data))fail
//{
// void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
// NSLog(@"%@", responseObject);
//
// if (IsDictObject(responseObject)) {
// void (^complete)(void) = ^(void){
// if (succ) {
// [IBTCommon runOnMainThreadWithoutDeadlocking:^{
// succ( responseObject );
// }];
// }
// };
//
// void(^dataHandle)(id<IBTDatabaseObject>) = ^(id<IBTDatabaseObject> model) {
// ICRAnnouncement *ann = model;
// ann.priority = eType;
// };
//
// ICRDataBaseController *dbCtrl = [ICRDataBaseController sharedController];
// [dbCtrl storageEntities:responseObject[ @"data" ][ @"records" ]
// objectClass:NSClassFromString( @"ICRAnnouncement" )
// deleteLocal:bDeleteLocal
// handleData:dataHandle
// complete:complete
// fail:fail];
// }
// else {
// if (fail) {
// fail( nil );
// }
// }
// };
//
// void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
// NSLog(@"%@", error);
// if (fail) {
// fail( error );
// }
// };
//
// NSString *urlStr = [[[self class] UrlForPluginHTTPAction:kICRHTTP_BoardQuery] stringByAppendingFormat:@"/%@?start_date=%@&page_number=%@&page_size=%@",[[VankeCommonModel sharedInstance] currentUser].uuid ,updateTime ? : [[NSDate dateWithTimeIntervalSince1970:0] httpParameterString],@( uiPosition ),@( uiSize )];
// NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
// NSLog(@"%@",encodeUrlStr);
// [self POST:encodeUrlStr
// parameters:nil
// needToken:NO
//acceptTypeJson:YES
// success:success
// failure:failure];
//}
- (void)doGetBoardWithID:(NSNumber *)boardID
success:(void (^)(id data))succ
......
......@@ -13,7 +13,7 @@
#import "IBTWebViewController.h"
#import "IBTWebViewDelegate.h"
#import "IBTWebProgressBar.h"
#import "VankeUtil.h"
@interface IBTWebViewController ()
<
UIWebViewDelegate
......@@ -83,6 +83,18 @@
[self goToURL:[NSURL URLWithString:self.m_initUrl]];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.navigationController.navigationBar.backgroundImage = [UIImage imageWithColor:[UIColor colorWithR:63 g:134 b:244 a:1]];
UIColor *color = [VankeUtil rgbStringToColor: @"237,27,35"];
if ( IOS7_OR_LATER ) {
self.navigationController.navigationBar.barTintColor = color;
} else {
self.navigationController.navigationBar.tintColor = color;
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "AnnounceTitleBG.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "AnnounceTitleBG@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "PriorityTagGreen.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "PriorityTagGreen@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "PriorityTagGrey.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "PriorityTagGrey@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
vanke/Images.xcassets/announceMent/PriorityTagGrey.imageset/PriorityTagGrey.png

607 Bytes

{
"images" : [
{
"idiom" : "universal",
"filename" : "PriorityTagOrange.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "PriorityTagOrange@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "PriorityTagRed.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "PriorityTagRed@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
vanke/Images.xcassets/announceMent/PriorityTagRed.imageset/PriorityTagRed.png

667 Bytes

{
"images" : [
{
"idiom" : "universal",
"filename" : "announcementDetailCell_bottom.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "announcementDetailCell_bottom@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "announcementDetailCell_center.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "announcementDetailCell_center@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "announcementDetailCell_top.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "announcementDetailCell_top@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--Announcement Detail View Controller-->
<scene sceneID="Ku2-we-blm">
<objects>
<viewController storyboardIdentifier="AnnouncementDetailViewController" id="gu8-Sy-NPD" customClass="AnnouncementDetailViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="kIu-j9-0tb"/>
<viewControllerLayoutGuide type="bottom" id="ZKP-ct-Skx"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="AzW-Un-F5L">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kgs-Zg-CuL">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GQF-ew-Vdi">
<rect key="frame" x="0.0" y="0.0" width="375" height="232"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="AnnounceTitleBG" translatesAutoresizingMaskIntoConstraints="NO" id="FF8-Nw-nDw">
<rect key="frame" x="30" y="15" width="315" height="42"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="dWP-uH-U0S"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="公告问题测试" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vQE-jZ-f6T">
<rect key="frame" x="58" y="25" width="260" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="超级管理员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vgJ-cy-UNm">
<rect key="frame" x="30" y="90" width="75" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="超级管理员时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方说的超级管理员时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方说的" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AJL-kM-nNg">
<rect key="frame" x="30" y="134" width="315" height="90"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="发布人" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vux-qR-XFV">
<rect key="frame" x="30" y="70" width="45" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.2784313725" green="0.56078431370000004" blue="0.94509803920000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="发布时间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kp3-Bv-JMd">
<rect key="frame" x="188" y="70" width="60" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.2784313725" green="0.56078431370000004" blue="0.94509803920000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="超级管理员" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v1Q-MA-b4A">
<rect key="frame" x="188" y="90" width="75" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="内容" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xzn-rI-fX4">
<rect key="frame" x="30" y="116" width="30" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.2784313725" green="0.56078431370000004" blue="0.94509803920000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.91719922220000005" green="0.95656324439999996" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="vgJ-cy-UNm" firstAttribute="top" secondItem="vux-qR-XFV" secondAttribute="bottom" constant="2" id="3bd-3t-gH4"/>
<constraint firstAttribute="trailing" secondItem="vQE-jZ-f6T" secondAttribute="trailing" constant="57" id="5Si-ss-TDn"/>
<constraint firstItem="vQE-jZ-f6T" firstAttribute="centerY" secondItem="FF8-Nw-nDw" secondAttribute="centerY" id="AK3-Ok-7ba"/>
<constraint firstItem="vux-qR-XFV" firstAttribute="leading" secondItem="FF8-Nw-nDw" secondAttribute="leading" id="Aok-Vq-Do5"/>
<constraint firstItem="AJL-kM-nNg" firstAttribute="trailing" secondItem="FF8-Nw-nDw" secondAttribute="trailing" id="C0W-EW-gtf"/>
<constraint firstItem="vQE-jZ-f6T" firstAttribute="centerX" secondItem="GQF-ew-Vdi" secondAttribute="centerX" id="DxO-nr-3eM"/>
<constraint firstItem="v1Q-MA-b4A" firstAttribute="leading" secondItem="Kp3-Bv-JMd" secondAttribute="leading" id="FKz-Fn-LZg"/>
<constraint firstItem="Xzn-rI-fX4" firstAttribute="top" secondItem="vgJ-cy-UNm" secondAttribute="bottom" constant="8" id="H89-Kn-rBK"/>
<constraint firstItem="Kp3-Bv-JMd" firstAttribute="top" secondItem="FF8-Nw-nDw" secondAttribute="bottom" constant="13" id="JsV-6o-ihl"/>
<constraint firstItem="vgJ-cy-UNm" firstAttribute="leading" secondItem="vux-qR-XFV" secondAttribute="leading" id="Kb5-YK-k9F"/>
<constraint firstItem="vQE-jZ-f6T" firstAttribute="leading" secondItem="GQF-ew-Vdi" secondAttribute="leading" constant="58" id="Pfo-UR-XTo"/>
<constraint firstItem="FF8-Nw-nDw" firstAttribute="leading" secondItem="vQE-jZ-f6T" secondAttribute="trailing" constant="-171" id="PqJ-eo-Q4P"/>
<constraint firstAttribute="bottom" secondItem="AJL-kM-nNg" secondAttribute="bottom" constant="8" id="WKq-WU-e7h"/>
<constraint firstItem="FF8-Nw-nDw" firstAttribute="top" secondItem="GQF-ew-Vdi" secondAttribute="top" constant="15" id="YRW-1g-qnY"/>
<constraint firstItem="Kp3-Bv-JMd" firstAttribute="centerX" secondItem="vQE-jZ-f6T" secondAttribute="centerX" constant="30" id="fn4-DY-ZjS"/>
<constraint firstItem="vQE-jZ-f6T" firstAttribute="top" secondItem="GQF-ew-Vdi" secondAttribute="top" constant="25" id="j9O-BT-7CL"/>
<constraint firstItem="AJL-kM-nNg" firstAttribute="top" secondItem="Xzn-rI-fX4" secondAttribute="bottom" id="k95-JZ-Mfk"/>
<constraint firstItem="vux-qR-XFV" firstAttribute="top" secondItem="FF8-Nw-nDw" secondAttribute="bottom" constant="13" id="kfc-IS-sGt"/>
<constraint firstItem="Xzn-rI-fX4" firstAttribute="leading" secondItem="FF8-Nw-nDw" secondAttribute="leading" id="pMu-uh-ChG"/>
<constraint firstAttribute="trailing" secondItem="FF8-Nw-nDw" secondAttribute="trailing" constant="30" id="vdH-gW-ySG"/>
<constraint firstItem="v1Q-MA-b4A" firstAttribute="centerY" secondItem="vgJ-cy-UNm" secondAttribute="centerY" id="vyN-i3-fte"/>
<constraint firstItem="FF8-Nw-nDw" firstAttribute="centerX" secondItem="GQF-ew-Vdi" secondAttribute="centerX" id="x0m-mb-0be"/>
<constraint firstItem="AJL-kM-nNg" firstAttribute="leading" secondItem="Xzn-rI-fX4" secondAttribute="leading" id="xcL-vq-Oef"/>
<constraint firstAttribute="height" constant="150" id="zZi-RD-xqc"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="zZi-RD-xqc"/>
<exclude reference="PqJ-eo-Q4P"/>
<exclude reference="DxO-nr-3eM"/>
</mask>
</variation>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="附件:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zMT-LR-Svj">
<rect key="frame" x="23" y="247" width="45" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.2784313725" green="0.56078431370000004" blue="0.94509803920000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="58" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="1wd-qk-vUd">
<rect key="frame" x="30" y="279" width="315" height="300"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="300" id="NoJ-QY-ySd"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="announcementTopCell" rowHeight="58" id="kW7-2o-6PV" customClass="AnnouncementDetailTableViewCell">
<rect key="frame" x="0.0" y="28" width="315" height="58"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="kW7-2o-6PV" id="jHD-Ec-Eub">
<rect key="frame" x="0.0" y="0.0" width="315" height="57.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="announcementDetailCell_top" translatesAutoresizingMaskIntoConstraints="NO" id="8ly-pd-Dae">
<rect key="frame" x="0.0" y="0.0" width="315" height="57"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="announcementDetailCell_center" translatesAutoresizingMaskIntoConstraints="NO" id="A1T-nm-ggT">
<rect key="frame" x="0.0" y="0.0" width="315" height="58"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="announcementDetailCell_bottom" translatesAutoresizingMaskIntoConstraints="NO" id="PW6-M9-Cgc">
<rect key="frame" x="0.0" y="4" width="315" height="53"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" tag="1111" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="sdfsdfvnslrekjdf823kd82d.jpg" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XiM-Gb-Z2i">
<rect key="frame" x="20" y="25" width="198" height="17.5"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
<color key="textColor" red="0.2784313725" green="0.56078431370000004" blue="0.94509803920000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tXH-qk-fvu">
<rect key="frame" x="247" y="19" width="40" height="30"/>
<color key="backgroundColor" red="0.2784313725" green="0.56078431370000004" blue="0.94509803920000002" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="r4g-IE-9Kv"/>
</constraints>
<state key="normal" title="打开">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="open:" destination="kW7-2o-6PV" eventType="touchUpInside" id="CKn-S7-cQf"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="8ly-pd-Dae" firstAttribute="top" secondItem="jHD-Ec-Eub" secondAttribute="top" id="4Hq-0e-IMH"/>
<constraint firstItem="tXH-qk-fvu" firstAttribute="centerY" secondItem="jHD-Ec-Eub" secondAttribute="centerY" id="4sG-p7-Ir1"/>
<constraint firstAttribute="bottom" secondItem="8ly-pd-Dae" secondAttribute="bottom" id="6YA-lX-kcR"/>
<constraint firstItem="XiM-Gb-Z2i" firstAttribute="leading" secondItem="jHD-Ec-Eub" secondAttribute="leading" constant="20" id="72P-0q-xPh"/>
<constraint firstItem="8ly-pd-Dae" firstAttribute="leading" secondItem="jHD-Ec-Eub" secondAttribute="leading" id="9hf-pE-hNq"/>
<constraint firstItem="A1T-nm-ggT" firstAttribute="leading" secondItem="jHD-Ec-Eub" secondAttribute="leading" id="DFw-kd-USE"/>
<constraint firstItem="PW6-M9-Cgc" firstAttribute="leading" secondItem="jHD-Ec-Eub" secondAttribute="leading" id="Ehv-JO-yCf"/>
<constraint firstAttribute="trailingMargin" secondItem="tXH-qk-fvu" secondAttribute="trailing" constant="20" id="I7f-S7-vq0"/>
<constraint firstItem="A1T-nm-ggT" firstAttribute="top" secondItem="jHD-Ec-Eub" secondAttribute="top" id="Owc-sh-ztS"/>
<constraint firstItem="8ly-pd-Dae" firstAttribute="leading" secondItem="jHD-Ec-Eub" secondAttribute="leadingMargin" id="Qou-43-M83"/>
<constraint firstItem="tXH-qk-fvu" firstAttribute="centerY" secondItem="XiM-Gb-Z2i" secondAttribute="centerY" id="S56-Ep-eF3"/>
<constraint firstAttribute="trailing" secondItem="PW6-M9-Cgc" secondAttribute="trailing" id="SWe-im-BXD"/>
<constraint firstAttribute="trailing" secondItem="A1T-nm-ggT" secondAttribute="trailing" id="VWs-64-IyK"/>
<constraint firstAttribute="bottom" secondItem="A1T-nm-ggT" secondAttribute="bottom" id="YXR-Qq-wax"/>
<constraint firstAttribute="trailingMargin" secondItem="8ly-pd-Dae" secondAttribute="trailing" id="f3l-rt-MTh"/>
<constraint firstItem="PW6-M9-Cgc" firstAttribute="top" secondItem="jHD-Ec-Eub" secondAttribute="top" constant="4" id="mn3-Ms-mxT"/>
<constraint firstAttribute="bottom" secondItem="8ly-pd-Dae" secondAttribute="bottom" id="rdx-P7-Wld"/>
<constraint firstItem="XiM-Gb-Z2i" firstAttribute="centerY" secondItem="jHD-Ec-Eub" secondAttribute="centerY" constant="5" id="rjo-ik-9Gz"/>
<constraint firstAttribute="bottom" secondItem="PW6-M9-Cgc" secondAttribute="bottom" constant="0.5" id="uvH-Kc-edB"/>
<constraint firstAttribute="trailing" secondItem="8ly-pd-Dae" secondAttribute="trailing" id="wdW-qP-ufb"/>
<constraint firstItem="8ly-pd-Dae" firstAttribute="top" secondItem="jHD-Ec-Eub" secondAttribute="topMargin" id="xP3-Vw-bF9"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="xP3-Vw-bF9"/>
<exclude reference="rdx-P7-Wld"/>
<exclude reference="f3l-rt-MTh"/>
<exclude reference="Qou-43-M83"/>
<exclude reference="4sG-p7-Ir1"/>
</mask>
</variation>
</tableViewCellContentView>
<inset key="separatorInset" minX="15" minY="0.0" maxX="15" maxY="0.0"/>
<connections>
<outlet property="bottomImage" destination="PW6-M9-Cgc" id="dOV-Bv-EUM"/>
<outlet property="centerImage" destination="A1T-nm-ggT" id="8RV-S2-AFe"/>
<outlet property="content" destination="XiM-Gb-Z2i" id="UHO-Cf-56S"/>
<outlet property="topImage" destination="8ly-pd-Dae" id="JIY-c6-9UZ"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="gu8-Sy-NPD" id="rzR-Aa-UcR"/>
<outlet property="delegate" destination="gu8-Sy-NPD" id="eZW-Le-sck"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="GQF-ew-Vdi" secondAttribute="bottom" constant="450" id="5va-vO-qv9"/>
<constraint firstAttribute="trailing" secondItem="GQF-ew-Vdi" secondAttribute="trailing" id="7Gc-wk-MuZ"/>
<constraint firstItem="1wd-qk-vUd" firstAttribute="width" secondItem="FF8-Nw-nDw" secondAttribute="width" id="CyE-tO-3Br"/>
<constraint firstItem="zMT-LR-Svj" firstAttribute="top" secondItem="GQF-ew-Vdi" secondAttribute="bottom" constant="15" id="GW2-EP-QSa"/>
<constraint firstItem="GQF-ew-Vdi" firstAttribute="leading" secondItem="Kgs-Zg-CuL" secondAttribute="leading" id="Maw-mU-jLN"/>
<constraint firstItem="zMT-LR-Svj" firstAttribute="centerX" secondItem="Xzn-rI-fX4" secondAttribute="centerX" id="eoN-Bl-vGW"/>
<constraint firstItem="GQF-ew-Vdi" firstAttribute="top" secondItem="Kgs-Zg-CuL" secondAttribute="top" id="gu9-jD-JlR"/>
<constraint firstItem="1wd-qk-vUd" firstAttribute="top" secondItem="zMT-LR-Svj" secondAttribute="bottom" constant="14" id="lah-wl-wXh"/>
<constraint firstItem="1wd-qk-vUd" firstAttribute="centerX" secondItem="FF8-Nw-nDw" secondAttribute="centerX" id="yOY-c4-RnN"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="GQF-ew-Vdi" firstAttribute="width" secondItem="AzW-Un-F5L" secondAttribute="width" id="Wbc-eV-kUP"/>
<constraint firstItem="ZKP-ct-Skx" firstAttribute="top" secondItem="Kgs-Zg-CuL" secondAttribute="bottom" id="eX1-ea-JSD"/>
<constraint firstItem="Kgs-Zg-CuL" firstAttribute="leading" secondItem="AzW-Un-F5L" secondAttribute="leading" id="gCu-Km-lhq"/>
<constraint firstAttribute="trailing" secondItem="Kgs-Zg-CuL" secondAttribute="trailing" id="lsI-Zv-vp3"/>
<constraint firstItem="Kgs-Zg-CuL" firstAttribute="top" secondItem="kIu-j9-0tb" secondAttribute="bottom" id="pKY-ca-1jF"/>
</constraints>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections>
<outlet property="labelContent" destination="AJL-kM-nNg" id="KKi-wJ-e6Q"/>
<outlet property="labelPublisher" destination="vgJ-cy-UNm" id="3WK-om-Yu1"/>
<outlet property="labelTime" destination="v1Q-MA-b4A" id="g6q-WO-nfi"/>
<outlet property="tableView" destination="1wd-qk-vUd" id="UQ2-Dx-zsU"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="AhJ-RV-fy5" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-255.5" y="3567.5"/>
</scene>
</scenes>
<resources>
<image name="AnnounceTitleBG" width="280" height="55"/>
<image name="announcementDetailCell_bottom" width="352" height="36"/>
<image name="announcementDetailCell_center" width="352" height="36"/>
<image name="announcementDetailCell_top" width="352" height="36"/>
</resources>
</document>
......@@ -30,6 +30,9 @@ static NSString *const VANKE_SERVER_MEDIA_BASE_URL = @"http://140.206.62.178:808
//static NSString *const VANKE_SERVER_BASE_URL = @"http://139.196.39.77:6080/wanke-server/rest";
//static NSString *const VANKE_SERVER_MEDIA_BASE_URL = @"http://139.196.39.77:6080";
/** 图片URL */
#define IMAGE_URL(url) [NSString stringWithFormat:@"%@%@", VANKE_SERVER_MEDIA_BASE_URL,url]
// 后台服务企业认证码
#define VANKE_AUTHENTI_CODE @"211534962"
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<scenes/>
</document>
//
// GTOPaging.h
// total
//
// Created by freecui on 15/10/29.
// Copyright © 2015年 free. All rights reserved.
//
#import "IBTModel.h"
@interface GTOPaging : IBTModel
@property (assign, nonatomic) NSInteger page;//当前页码
@property (assign, nonatomic) NSInteger pageSize;//分页大小
@property (assign, nonatomic) NSInteger pageCount;//总页数
@property (assign, nonatomic) NSInteger recordCount;//总记录数
@end
//
// GTOPaging.m
// total
//
// Created by freecui on 15/10/29.
// Copyright © 2015年 free. All rights reserved.
//
#import "GTOPaging.h"
@implementation GTOPaging
@end
//
// IBTInputViewHandleDelegate.h
// Cruiser
//
// Created by Xummer on 15/6/8.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol IBTInputViewHandleDelegate <NSObject>
@optional
- (void)handleInputView:(id)sender;
@end
//
// ICRAttachment.h
// Cruiser
//
// Created by Xummer on 4/12/15.
// Copyright (c) 2015 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface ICRAttachment : IBTModel
@property (assign, nonatomic) NSUInteger aID;
@property (copy, nonatomic) NSString *objectId;
//@property (copy, nonatomic) NSString *fileName;
@property (assign, nonatomic) NSUInteger seq;
@property (copy, nonatomic) NSString *attachmentType;
@property (copy, nonatomic) NSString *uuid;
@property (copy, nonatomic) NSString *fileName;
@property (copy, nonatomic) NSString *fileUrl;
@end
//
// NSMutableArray+SafeInsert.h
// Cruiser
//
// Created by Xummer on 4/10/15.
// Copyright (c) 2015 Xummer. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSMutableArray (SafeInsert)
- (void)safeAddObject:(id)object;
- (void)safeInsertObject:(id)object atIndex:(NSUInteger)index;
- (void)safeRemoveObjectAtIndex:(NSUInteger)index;
- (void)safeReplaceObjectAtIndex:(NSUInteger)index withObject:(id)object;
- (void)removeFirstObject;
@end
@interface NSMutableDictionary (SafeInsert)
- (void)safeSetObject:(id)object forKey:(id<NSCopying>)key;
- (void)safeRemoveObjectForKey:(id)key;
@end
@interface NSMutableSet (SafeInsert)
- (void)safeAddObject:(id)object;
- (void)safeRemoveObject:(id)object;
@end
@interface NSMutableString (SafeInsert)
- (void)safeAppendString:(NSString *)string;
@end
@interface NSArray (SafeFetch)
- (id)safeObjectAtIndex:(NSUInteger)index;
@end
\ No newline at end of file
//
// NSMutableArray+SafeInsert.m
// Cruiser
//
// Created by Xummer on 4/10/15.
// Copyright (c) 2015 Xummer. All rights reserved.
//
#import "NSMutableArray+SafeInsert.h"
#pragma mark - NSMutableArray (SafeInsert)
@implementation NSMutableArray (SafeInsert)
- (void)safeAddObject:(id)object {
if (object) {
[self addObject:object];
}
}
- (void)safeInsertObject:(id)object atIndex:(NSUInteger)index {
if (index < self.count && object) {
[self insertObject:object atIndex:index];
}
}
- (void)safeRemoveObjectAtIndex:(NSUInteger)index {
if (index < self.count) {
[self removeObjectAtIndex:index];
}
}
- (void)safeReplaceObjectAtIndex:(NSUInteger)index withObject:(id)object {
if (index < self.count && object) {
[self replaceObjectAtIndex:index withObject:object];
}
}
- (void)removeFirstObject {
id firstObj = [self firstObject];
if (firstObj) {
[self removeObject:firstObj];
}
}
@end
#pragma mark - NSMutableDictionary (SafeInsert)
@implementation NSMutableDictionary (SafeInsert)
- (void)safeSetObject:(id)object forKey:(id <NSCopying>)key {
if (object) {
[self setObject:object forKey:key];
}
}
- (void)safeRemoveObjectForKey:(id)key {
[self removeObjectForKey:key];
}
@end
#pragma mark - NSMutableSet (SafeInsert)
@implementation NSMutableSet (SafeInsert)
- (void)safeAddObject:(id)object {
if (object) {
[self addObject:object];
}
}
- (void)safeRemoveObject:(id)object {
if (object) {
[self removeObject:object];
}
}
@end
#pragma mark - NSMutableString (SafeInsert)
@implementation NSMutableString (SafeInsert)
- (void)safeAppendString:(NSString *)string {
if ([string isKindOfClass:[NSString class]]) {
[self appendString:string];
}
}
@end
#pragma mark - NSArray (SafeFetch)
@implementation NSArray (SafeFetch)
- (id)safeObjectAtIndex:(NSUInteger)index {
@synchronized(self) {
if (index >= [self count]) return nil;
return [self objectAtIndex:index];
}
}
@end
//
// UILabel+SizeCalculate.h
//
//
// Created by Xummer on 14-2-19.
// Copyright (c) 2014年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UILabel (SizeCalculate)
+ (CGFloat)getLabelWidth:(UILabel *)label;
+ (CGFloat)getLabelHeight:(UILabel *)label;
+ (CGSize)getLabelSize:(UILabel *)label;
+ (CGSize)getSizeWithText:(NSString *)text font:(UIFont *)font andSize:(CGSize)size;
+ (CGSize)getSizeWithText:(NSString *)text font:(UIFont *)font andWidth:(CGFloat)width;
+ (CGFloat)getHeightWithText:(NSString *)text font:(UIFont *)font andWidth:(CGFloat)width;
+ (CGFloat)getWidthWithText:(NSString *)text font:(UIFont *)font andHeight:(CGFloat)height;
- (CGFloat)calculateWidth;
- (CGFloat)calculateHeight;
- (CGSize)calculateSize;
@end
//
// UILabel+SizeCalculate.m
//
//
// Created by Xummer on 14-2-19.
// Copyright (c) 2014年 Xummer. All rights reserved.
//
#import "UILabel+SizeCalculate.h"
@implementation UILabel (SizeCalculate)
+ (CGSize)getSizeWithText:(NSString *)text font:(UIFont *)font andSize:(CGSize)size {
CGSize expectedLabelSize = CGSizeZero;
if (!font || !text ) {
return expectedLabelSize;
}
if (IBT_IOS7_OR_LATER) {
NSDictionary *stringAttributes = @{ NSFontAttributeName : font };
expectedLabelSize =
[text boundingRectWithSize:size
options:NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesLineFragmentOrigin
attributes:stringAttributes
context:nil].size;
}
else {
expectedLabelSize =
[text sizeWithFont:font
constrainedToSize:size
lineBreakMode:NSLineBreakByWordWrapping];
}
return expectedLabelSize;
}
+ (CGSize)getSizeWithText:(NSString *)text font:(UIFont *)font andWidth:(CGFloat)width {
return [[self class] getSizeWithText:text
font:font
andSize:CGSizeMake(width, MAXFLOAT)];
}
+ (CGFloat)getWidthWithText:(NSString *)text font:(UIFont *)font andHeight:(CGFloat)height {
CGSize expectedLabelSize = CGSizeZero;
if (IBT_IOS7_OR_LATER) {
NSDictionary *stringAttributes = @{ NSFontAttributeName : font };
expectedLabelSize =
[text boundingRectWithSize:CGSizeMake(MAXFLOAT, height)
options:NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesLineFragmentOrigin
attributes:stringAttributes
context:nil].size;
}
else {
expectedLabelSize =
[text sizeWithFont:font
constrainedToSize:CGSizeMake(MAXFLOAT, height)
lineBreakMode:NSLineBreakByWordWrapping];
}
return ceil(expectedLabelSize.width);
}
+ (CGFloat)getLabelWidth:(UILabel *)label {
return [[self class] getWidthWithText:label.text
font:label.font
andHeight:CGRectGetHeight(label.frame)];
}
+ (CGFloat)getLabelHeight:(UILabel *)label {
return [[self class] getHeightWithText:label.text
font:label.font
andWidth:label.frame.size.width];
}
+ (CGSize)getLabelSize:(UILabel *)label {
return [[self class] getSizeWithText:label.text
font:label.font
andWidth:CGRectGetWidth(label.frame)];
}
+ (CGFloat)getHeightWithText:(NSString *)text font:(UIFont *)font andWidth:(CGFloat)width {
return ceil([[self class] getSizeWithText:text
font:font
andWidth:width].height);
}
- (CGFloat)calculateWidth {
return [[self class] getLabelWidth:self];
}
- (CGFloat)calculateHeight {
return [[self class] getLabelHeight:self];
}
- (CGSize)calculateSize {
return [[self class] getLabelSize:self];
}
@end
//
// UIView+FindUIViewController.h
// JobTalk
//
// Created by Xummer on 1/20/15.
// Copyright (c) 2015 BST. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface UIView (FindUIViewController)
- (UIViewController *)firstAvailableUIViewController;
- (id)traverseResponderChainForUIViewController;
@end
@interface UIView (Extend)
- (NSArray *)subviewsWithClass:(Class)aClass;
- (id)viewWithClass:(Class)aClass;
- (void)removeSubViewWithClass:(Class)aClass;
- (void)removeSubViewWithTag:(NSInteger)tag;
- (void)removeAllSubViews;
- (void)autoresizingWithStrechFullSize;
- (void)autoresizingWithVerticalCenter;
- (void)autoresizingWithHorizontalCenter;
@end
//
// UIView+FindUIViewController.m
// JobTalk
//
// Created by Xummer on 1/20/15.
// Copyright (c) 2015 BST. All rights reserved.
//
#import "UIView+FindUIViewController.h"
@implementation UIView (FindUIViewController)
- (UIViewController *)firstAvailableUIViewController {
// convenience function for casting and to "mask" the recursive function
return (UIViewController *)[self traverseResponderChainForUIViewController];
}
- (id)traverseResponderChainForUIViewController {
id nextResponder = [self nextResponder];
if ([nextResponder isKindOfClass:[UIViewController class]]) {
return nextResponder;
}
else if ([nextResponder isKindOfClass:[UIView class]]) {
return [nextResponder traverseResponderChainForUIViewController];
}
else {
return nil;
}
}
@end
@implementation UIView (Extend)
- (NSArray *)subviewsWithClass:(Class)aClass {
NSMutableArray *arrTmp = [NSMutableArray array];
for (UIView *view in self.subviews) {
if ([view isKindOfClass:aClass]) {
[arrTmp addObject:view];
}
}
return [arrTmp count] > 0 ? arrTmp : nil;
}
- (id)viewWithClass:(Class)aClass {
__block id machedView = nil;
[self.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:aClass]) {
machedView = obj;
*stop = YES;
}
}];
return machedView;
}
- (void)removeSubViewWithClass:(Class)aClass {
[[self viewWithClass:aClass] removeFromSuperview];
}
- (void)removeSubViewWithTag:(NSInteger)tag {
[[self viewWithTag:tag] removeFromSuperview];
}
- (void)removeAllSubViews {
[self.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
}
- (void)autoresizingWithStrechFullSize {
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
}
- (void)autoresizingWithVerticalCenter {
self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
}
- (void)autoresizingWithHorizontalCenter {
self.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
}
@end
//
// UIView+ViewFrameGeometry.h
// IBTTableViewKit
//
// Created by Xummer on 15/1/9.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (ViewFrameGeometry)
@property (assign) CGFloat x;
@property (assign) CGFloat y;
@property (assign) CGFloat width;
@property (assign) CGFloat height;
@property (assign) CGSize size;
@property (assign) CGPoint origin;
@property (assign) CGFloat left;
@property (assign) CGFloat right;
@property (assign) CGFloat top;
@property (assign) CGFloat bottom;
@property (readonly, assign) CGPoint topRight;
@property (readonly, assign) CGPoint bottomRight;
@property (readonly, assign) CGPoint bottomLeft;
//- (void)frameIntegral;
//- (void)ceilAllSubviews;
//- (void)fitTheSubviews;
- (void)fitInSize:(CGSize)aSize;
- (void)scaleBy:(CGFloat)fScaleFactor;
- (void)moveBy:(CGPoint)pDelta;
- (CGSize)widthLimitedSizeThatFits:(CGSize)size;
- (CGSize)heightLimitedSizeThatFits:(CGSize)size;
@end
//
// UIView+ViewFrameGeometry.m
// IBTTableViewKit
//
// Created by Xummer on 15/1/9.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "UIView+ViewFrameGeometry.h"
@implementation UIView (ViewFrameGeometry)
- (CGFloat) x {
return self.frame.origin.x;
}
- (void) setX:(CGFloat)x {
CGRect nframe = self.frame;
nframe.origin.x = x;
self.frame = nframe;
}
- (CGFloat) y {
return self.frame.origin.y;
}
- (void) setY:(CGFloat)y {
CGRect nframe = self.frame;
nframe.origin.y = y;
self.frame = nframe;
}
// Retrieve and set height, width
- (CGFloat) width {
return self.frame.size.width;
}
- (void) setWidth:(CGFloat)width {
CGRect nframe = self.frame;
nframe.size.width = width;
self.frame = nframe;
}
- (CGFloat) height {
return self.frame.size.height;
}
- (void) setHeight:(CGFloat)height {
CGRect nframe = self.frame;
nframe.size.height = height;
self.frame = nframe;
}
// Retrieve and set the origin, size
- (CGPoint) origin {
return self.frame.origin;
}
- (void) setOrigin:(CGPoint)aPoint {
CGRect nframe = self.frame;
nframe.origin = aPoint;
self.frame = nframe;
}
- (CGSize) size {
return self.frame.size;
}
- (void) setSize:(CGSize)aSize {
CGRect nframe = self.frame;
nframe.size = aSize;
self.frame = nframe;
}
// Retrieve and set top, bottom, left, right
- (CGFloat) left {
return self.x;
}
- (void) setLeft:(CGFloat)left {
self.x = left;
}
- (CGFloat) right {
return CGRectGetMaxX(self.frame);
}
- (void) setRight:(CGFloat)right {
self.x = right - self.width;
}
- (CGFloat) top {
return self.y;
}
- (void) setTop:(CGFloat)top {
self.y = top;
}
- (CGFloat) bottom {
return CGRectGetMaxY(self.frame);
}
- (void) setBottom:(CGFloat)bottom {
self.y = bottom - self.height;
}
// Query other frame locations
- (CGPoint) topRight {
return CGPointMake(self.right, self.top);
}
- (CGPoint) bottomRight {
return CGPointMake(self.right, self.bottom);
}
- (CGPoint) bottomLeft {
return CGPointMake(self.left, self.bottom);
}
// Move via offset
- (void) moveBy:(CGPoint)delta
{
CGPoint nCenter = self.center;
nCenter.x += delta.x;
nCenter.y += delta.y;
self.center = nCenter;
}
// Scaling
- (void) scaleBy:(CGFloat)scaleFactor {
CGRect nframe = self.frame;
nframe.size.width *= scaleFactor;
nframe.size.height *= scaleFactor;
self.frame = nframe;
}
// Ensure that both dimensions fit within the given size by scaling down
- (void) fitInSize:(CGSize)aSize {
CGFloat scale;
CGRect nframe = self.frame;
if (nframe.size.height && (nframe.size.height > aSize.height)) {
scale = aSize.height / nframe.size.height;
nframe.size.width *= scale;
nframe.size.height *= scale;
}
if (nframe.size.width && (nframe.size.width >= aSize.width)) {
scale = aSize.width / nframe.size.width;
nframe.size.width *= scale;
nframe.size.height *= scale;
}
self.frame = nframe;
}
- (CGSize) widthLimitedSizeThatFits:(CGSize)size {
CGSize mSize = [self sizeThatFits:size];
if (mSize.width > size.width) {
mSize.width = size.width;
}
return mSize;
}
- (CGSize) heightLimitedSizeThatFits:(CGSize)size {
CGSize mSize = [self sizeThatFits:size];
if (mSize.height > size.height) {
mSize.height = size.height;
}
return mSize;
}
@end
//
// UIViewController+LogicController.h
// Cruiser
//
// Created by Xummer on 15/4/3.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIViewController (LogicController)
- (UIImage *)getViewControllerImage:(CGSize)imageSize;
// Navigation
- (BOOL)isCurrentViewController;
- (void)onBackButtonClicked;
- (UIViewController *)getViewControllerAtIndex:(NSInteger)iIndex;
- (void)PushViewController:(UIViewController *)viewController animated:(BOOL)bAnimated;
- (UIViewController *)PopViewControllerAnimated:(BOOL)bAnimated;
- (NSArray *)PopToViewController:(UIViewController *)viewController animated:(BOOL)bAnimated;
- (NSArray *)PopToRootViewControllerAnimated:(BOOL)bAnimated;
- (NSArray *)PopToViewControllerWithClass:(Class)vcClass animated:(BOOL)bAnimated;
- (NSArray *)PopToViewControllerAtIndex:(NSInteger)index animated:(BOOL)bAnimated;
@end
@interface UIViewController (ModalView)
//- (void)releasePopoverController:(id)controller;
//- (void)popoverControllerDidDismissPopover:(id)popoverController;
- (void)DismissMyselfAnimated:(BOOL)bAnimated;
- (void)DismissModalViewControllerAnimated:(BOOL)bAnimated;
- (void)PresentModalViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)bAnimated;
- (void)PresentViewControllerInNewNavigation:(UIViewController *)viewControllerToPresent animated:(BOOL)bAnimated completion:(void (^)(void))completion;
@end
@interface UIViewController (margin)
- (void)setLeftBarButtonItem:(UIBarButtonItem *)item;
- (UIBarButtonItem *)leftBarButtonItem;
- (void)setRightBarButtonItem:(UIBarButtonItem *)item;
- (UIBarButtonItem *)rightBarButtonItem;
- (void)setLeftBarButtonItems:(NSArray *)items;
- (void)setRightBarButtonItems:(NSArray *)items;
- (UIBarButtonItem *)addLeftBarBtnItemWithName:(NSString *)btnName action:(SEL)selector;
- (UIBarButtonItem *)addRightBarBtnItemWithName:(NSString *)btnName action:(SEL)selector;
@end
......@@ -28,6 +28,8 @@
#import "ChooseProjectTableViewController.h"
#import "ICRAppMacro.h"
#import "SaleInputAuditViewController.h"
#pragma mark -
@interface VankeAffairsBoard_iPhone()
......@@ -96,10 +98,10 @@ ON_DID_DISAPPEAR( signal )
}
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnNotice, signal) {
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
VankeNoticeListBoard_iPhone *board = [VankeNoticeListBoard_iPhone board];
// ICRAnnouncementViewController *board = [ICRAnnouncementViewController board];
[self.stack pushBoard:board animated:YES];
ICRAnnouncementViewController *announcementVC = [[ICRAnnouncementViewController alloc] init];
announcementVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:announcementVC animated:YES];
}
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
......
//
// AnnouncementDetailViewController.h
// RealEstateManagement
//
// Created by Z on 16/7/4.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import "BaseViewController.h"
#import "ICRAnnouncement.h"
@interface AnnouncementDetailViewController : BaseViewController
@property (nonatomic, strong) ICRAnnouncement *announcement;
@end
//
// AnnouncementDetailViewController.m
// RealEstateManagement
//
// Created by Z on 16/7/4.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import "AnnouncementDetailViewController.h"
#import "ICRAnnouncementDetailHeadView.h"
#import "AnnouncementDetailTableViewCell.h"
#import "IBTWebViewController.h"
#import "VankeUtil.h"
@interface AnnouncementDetailViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UILabel *labelPublisher;
@property (weak, nonatomic) IBOutlet UILabel *labelTime;
@property (weak, nonatomic) IBOutlet UILabel *labelContent;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic, strong) ICRAnnouncement *announcementDetail;
@end
@implementation AnnouncementDetailViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.tableFooterView = [UIView new];
// self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self setUpData];
// Do any additional setup after loading the view.
}
- (void)setUpData {
WS(weakSelf);
NSString *url = [NSString stringWithFormat:@"affiche/get/%@", self.announcement.uuid];
[[ICRHTTPController sharedController] getUrl:url params:nil success:^(id data) {
ICRAnnouncement *announcement = [ICRAnnouncement DBObject];
[announcement praseFromJsonDict:data[@"data"]];
announcement.readType = weakSelf.announcement.readType;
weakSelf.announcementDetail = announcement;
if ([weakSelf.announcementDetail.content hasPrefix:@"<p>"]) {
NSRange lastRange = [weakSelf.announcementDetail.content rangeOfString:@"</p>"];
NSString *cutString = [weakSelf.announcementDetail.content substringWithRange:NSMakeRange(3, lastRange.location - 3)];
weakSelf.announcementDetail.content = cutString;
}
weakSelf.labelPublisher.text = weakSelf.announcementDetail.title;
weakSelf.labelTime.text = weakSelf.announcementDetail.lastModify_time;
weakSelf.labelContent.text = weakSelf.announcementDetail.content;
[weakSelf httpAnnouncementRead];
[weakSelf.tableView reloadData];
} failure:^(id data) {
}];
}
/** 上报已读的公告 */
- (void)httpAnnouncementRead{
NSString *url = [NSString stringWithFormat:@"affiche/read/%@?user_uuid=%@&read_time=%@", self.announcementDetail.uuid,[VankeCommonModel sharedInstance].currentUser.uuid,[[NSDate date] httpParameterString]];
NSString *URLString = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[ICRHTTPController sharedController] postUrl:URLString params:nil success:^(id data) {
CLog(@"该公告已标记为已读");
} failure:^(id data) {
}];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.announcementDetail.attachmentUrls.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
AnnouncementDetailTableViewCell *cell;
cell = [tableView dequeueReusableCellWithIdentifier:@"announcementTopCell" forIndexPath:indexPath];
if (indexPath.row == 0) {
cell.type = announcementDetailCellTypeTop;
cell.isOnlyOne = self.announcementDetail.attachmentUrls.count == 1;
}else if(indexPath.row == self.announcementDetail.attachmentUrls.count - 1) {
cell.type = announcementDetailCellTypeBottom;
}else{
cell.type = announcementDetailCellTypeCenter;
}
cell.contentText = self.announcementDetail.attachmentUrls[indexPath.row][@"fileName"];
NSString *url = IMAGE_URL(self.announcementDetail.attachmentUrls[indexPath.row][@"fileUrl"]);
WS(weakSelf);
cell.openFile = ^{
IBTWebViewController *WVC = [[IBTWebViewController alloc] initWithURL:url presentModal:NO extraInfo:nil];
[weakSelf.navigationController pushViewController:WVC animated:YES];
};
return cell;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -6,8 +6,8 @@
// Copyright (c) 2015 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
#import "BaseViewController.h"
@interface ICRAnnouncementViewController : ICRBaseViewController
@interface ICRAnnouncementViewController : BaseViewController
@end
......@@ -7,63 +7,96 @@
//
#define MYANNOUNCEMENTCELL_HEIGHT (75)
#import "ICRAnnouncementViewController.h"
#import "ICRAnnouncementDetailViewController.h"
#import "ICRAnnouncement.h"
#import "ICRAnnocementContentView.h"
#import "IBTRefreshTableView.h"
#import "ICRDataBaseController.h"
#import "ICRHTTPController.h"
#import "GTOPaging.h"
#import "MJRefresh.h"
#import "IBTSegmentContainer.h"
#import "IBTCommon.h"
#import "IBTTableViewCell.h"
#import "UIView+FindUIViewController.h"
#import "AnnouncementDetailViewController.h"
#import "UIScrollView+EmptyDataSet.h"
#import "VankeAppBoard_iPhone.h"
static NSString *MyTableViewCell = @"IBTTableViewCell";
@interface ICRAnnouncementViewController ()
<
UITableViewDataSource,
UITableViewDelegate,
IBTScrollViewRefreshDelegate
>
@property (strong, nonatomic) IBTRefreshTableView *m_tableView;
UITableViewDataSource,
UITableViewDelegate,
//IBTScrollViewRefreshDelegate,
UITableViewDataSource,UITableViewDelegate,
DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
@property (nonatomic,strong)UITableView *m_tableView;
@property (strong, nonatomic) IBTSegmentContainer *m_segContainer;
@property (weak, nonatomic) IBTSegmentedControl *m_segmentControl;
@property (strong, nonatomic) NSArray *m_arrData;
@property (strong, nonatomic) NSMutableArray *m_arrUnReadData;
@property (strong, nonatomic) NSMutableArray *m_arrReadData;
@property (assign, nonatomic) NSUInteger m_unReadCurrentPage;
@property (assign, nonatomic) NSUInteger m_readedCurrentPage;
@property (nonatomic, assign) BOOL isRefresh;
@property (nonatomic, assign) BOOL isLoadMore;
//@property (assign, nonatomic) BOOL m_isClickeUnread;
@end
@implementation ICRAnnouncementViewController
#pragma mark - Life Cycle
//- (void)viewDidLoad {
// [super viewDidLoad];
// // Do any additional setup after loading the view.
//
// self.title = [IBTCommon localizableString:@"Announcement"];
//
// [self initSegmentConatinerFromOriginY:0];
// [self initTableView];
//
//}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
ON_CREATE_VIEWS( signal )
{
self.navigationBarShown = YES;
self.navigationBarTitle = [IBTCommon localizableString:@"Announcement"];
}
self.title = @"公告";
ON_DID_APPEAR( signal )
{
[self initSegmentConatinerFromOriginY:64];
[self initSegmentConatinerFromOriginY:0];
[self initTableView];
[self fetchDataMore:NO type:kICRAnnouncementTypeUnread];
[self createRefresh];
[self fetchDataMore:NO type:_m_segmentControl.selectedSegmentIndex];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
if (!_m_segmentControl) {
return;
}
[self.m_tableView.mj_header beginRefreshing];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - empty state
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
return [UIImage imageNamed:@"no_data"];
}
- (CAAnimation *)imageAnimationForEmptyDataSet:(UIScrollView *)scrollView {
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath: @"transform"];
animation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI_2, 0.0, 0.0, 1.0)];
animation.duration = 1;
animation.cumulative = YES;
animation.repeatCount = MAXFLOAT;
return animation;
}
- (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView {
return [UIColor whiteColor];
}
#pragma mark - Private Method
- (void)initTableView {
CGFloat dy = CGRectGetMaxY(_m_segContainer.frame);
......@@ -72,15 +105,14 @@ ON_DID_APPEAR( signal )
frame.size.height -= CGRectGetMinY(frame);
self.m_tableView =
[[IBTRefreshTableView alloc] initWithFrame:frame style:UITableViewStylePlain];
[[UITableView alloc] initWithFrame:frame style:UITableViewStylePlain];
[_m_tableView registerClass:[IBTTableViewCell class]
forCellReuseIdentifier:MyTableViewCell];
[_m_tableView autoresizingWithStrechFullSize];
_m_tableView.dataSource = self;
_m_tableView.delegate = self;
_m_tableView.refreshDelegate = self;
[_m_tableView addRefreshControlWithText:[IBTCommon localizableString:@""]];
[_m_tableView addLoadMoreFootWithText:[IBTCommon localizableString:@"Load more"]];
self.m_tableView.emptyDataSetSource = self;
self.m_tableView.emptyDataSetDelegate = self;
UIView *view = [[UIView alloc] initWithFrame:CGRectZero];
_m_tableView.tableFooterView = view;
......@@ -94,11 +126,12 @@ ON_DID_APPEAR( signal )
}
NSArray *arrSegments =
@[ [IBTCommon localizableString:@"Unread"],
[IBTCommon localizableString:@"Read"], ];
@[ @"未读",
@"已读", ];
self.m_segContainer = [[IBTSegmentContainer alloc] initWithItems:arrSegments];
self.m_segmentControl = _m_segContainer.segmentControl;
_m_segmentControl.selectedSegmentIndex = 0;
// _m_segContainer.segmentControl.tintColor = GTO_BLUE_DEEP_COLOR;
_m_segContainer.frame = (CGRect){
.origin.x = 0,
.origin.y = y,
......@@ -132,15 +165,11 @@ ON_DID_APPEAR( signal )
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
{
return [_m_arrData count];
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return _m_segmentControl.selectedSegmentIndex == 0 ? _m_arrUnReadData.count : _m_arrReadData.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView
......@@ -161,7 +190,13 @@ ON_DID_APPEAR( signal )
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
id obj = _m_arrData[ indexPath.row ];
id obj ;
if (!_m_segmentControl.selectedSegmentIndex) {
obj = _m_arrUnReadData[indexPath.row];
}else {
obj = _m_arrReadData[indexPath.row];
}
UIView *contentView = cell.contentView;
......@@ -183,105 +218,171 @@ ON_DID_APPEAR( signal )
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
ICRAnnouncement *annocement ;
if (_m_segmentControl.selectedSegmentIndex == 0) { //未读
annocement = _m_arrUnReadData[indexPath.row];
// [self httpReadBoardWithAnnouncement:annocement];
} else {
annocement = _m_arrReadData[indexPath.row];
}
AnnouncementDetailViewController *detailVC = [self getMainVCWithIdentifier:@"AnnouncementDetailViewController"];
detailVC.announcement = annocement;
[self.navigationController pushViewController:detailVC animated:YES];
ICRAnnouncement *annocement = [_m_arrData objectAtIndex:indexPath.row];
ICRAnnouncementDetailViewController *dVC = [[ICRAnnouncementDetailViewController alloc] initWithAnnouncementData:annocement];
[self PushViewController:dVC animated:YES];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return MYANNOUNCEMENTCELL_HEIGHT;
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView == _m_tableView) {
[_m_tableView tableViewDidScroll:scrollView];
}
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
if (scrollView == _m_tableView) {
[_m_tableView tableviewDidEndDragging:scrollView];
}
//
- (void)httpReadBoardWithAnnouncement: (ICRAnnouncement *)annocement{
// void(^succ)(id) = ^(id data) {
// CLog(@"%@",data);
// if ([data[@"success"] integerValue] == 1) {
// // self.m_isClickeUnread = YES;
// ICRAnnouncementDetailViewController *dVC = [[ICRAnnouncementDetailViewController alloc]
// initWithAnnouncementData:annocement];
//// [self PushViewController:dVC animated:YES];
// }
// };
// void(^fail)(id) = ^(id data) {
// CLog(@"%@",data);
// };
//
// //[IBTLoadingView showProgressLabel:@""];
// ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
// [httpCtrl doReadBoardWithID:annocement.uuid success:succ failure:fail];
}
#pragma mark - IBTScrollViewRefreshDelegate
#pragma mark - Get Data
- (void)startRefreshData:(UIScrollView *)scrollView {
[self fetchDataMore:NO type:_m_segmentControl.selectedSegmentIndex];
}
- (void)fetchDataMore:(BOOL)more type:(ICRAnnouncementReadType)eType {
- (void)endRefreshData:(UIScrollView *)scrollView {
NSUInteger pageNu;
if (eType > 0) {
pageNu = _m_readedCurrentPage;
} else {
pageNu = _m_unReadCurrentPage;
}
NSString *type;
if (eType) {
type = @"true";
} else {
type = @"false";
}
WS(weakSelf);
[[ICRHTTPController sharedController] postUrl:[NSString stringWithFormat:@"affiche/download/%@?read=%@&page_number=%@&page_size=%@", [VankeCommonModel sharedInstance].currentUser.uuid,type,@(pageNu),@20] params:nil success:^(id data) {
[weakSelf endRefreshing];
if ([data[@"success"] integerValue] == 1) {
NSDictionary *dictData = data[@"data"];
[weakSelf fetchArrDataMore:more type:eType data:dictData];
}else{
}
}
} failure:^(id data) {
- (void)startLoadMoreData:(UIScrollView *)scrollView {
[self fetchDataMore:YES type:_m_segmentControl.selectedSegmentIndex];
}];
}
- (void)endLoadMoreData:(UIScrollView *)scrollView {
}
- (void)fetchArrDataMore: (BOOL)more type:(ICRAnnouncementReadType)eType data: (NSDictionary *)data {
GTOPaging *paging = [GTOPaging DBObject];
[paging praseFromJsonDict:data[@"paging"]];
NSMutableArray *records = [@[]mutableCopy] ;
for(NSDictionary *dict in data[@"records"]) {
ICRAnnouncement *announcemet = [ICRAnnouncement DBObject];
[announcemet praseFromLocalDict:dict];
announcemet.readType = eType;
//处理一下字符串,去除html标记
if ([announcemet.content hasPrefix:@"<p>"]) {
NSRange lastRange = [announcemet.content rangeOfString:@"</p>"];
NSString *cutString = [announcemet.content substringWithRange:NSMakeRange(3, lastRange.location - 3)];
announcemet.content = cutString;
}
[records addObject:announcemet];
}
#pragma mark - Data Update
- (void)fetchAnnouncementsListWithType:(ICRAnnouncementType)type {
ICRDatabaseFetchBlock fetchBlk = ^FMResultSet *(FMDatabase *db) {
NSString * sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE %@ = ? ", [ICRAnnouncement TableName], @"priority"];
// , @"createTime" ORDER BY %@ DESC
return [db executeQuery:sql, @( type ) ];
};
if (!_m_arrUnReadData) {
self.m_arrUnReadData = [@[]mutableCopy] ;
}
if (!_m_arrReadData) {
self.m_arrReadData = [@[]mutableCopy] ;
}
__weak typeof(self)weakSelf = self;
ICRDatabaseFetchResultsBlock fetchResultsBlk = ^(NSArray *fetchedObjects) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
strongSelf.m_arrData = fetchedObjects;
[strongSelf.m_tableView reloadData];
};
ICRDataBaseController *dbCtrl = [ICRDataBaseController sharedController];
[dbCtrl runFetchForClass:[ICRAnnouncement class]
fetchBlock:fetchBlk
fetchResultsBlock:fetchResultsBlk];
}
if (!more) {
switch (eType) {
case kICRAnnouncementTypeUnread: {
self.m_unReadCurrentPage = 0;
[self.m_arrUnReadData removeAllObjects];
[self.m_arrUnReadData addObjectsFromArray:records];
}
#pragma mark - Get Data
break;
case kICRAnnouncementTypeReaded: {
self.m_readedCurrentPage = 0;
[self.m_arrReadData removeAllObjects];
[self.m_arrReadData addObjectsFromArray:records];
}
- (void)fetchDataMore:(BOOL)more type:(ICRAnnouncementType)eType {
__weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf fetchAnnouncementsListWithType:eType];
if (!more) {
[_m_tableView endRefreshWithState:kRefreshStateFinished];
default:
break;
}
else {
[_m_tableView endLoadMoreWithState:kLoadStateFinished];
} else {
switch (eType) {
case kICRAnnouncementTypeUnread:
{
if (paging.pageCount > _m_unReadCurrentPage) {
// self.m_unReadCurrentPage ++ ;
[self.m_arrUnReadData addObjectsFromArray:records];
} else {
[self.m_tableView.mj_footer endRefreshingWithNoMoreData];
}
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView showTips:data];
if (!more) {
[_m_tableView endRefreshWithState:kRefreshStateFailed];
}
else {
[_m_tableView endLoadMoreWithState:kLoadStateFailed];
break;
case kICRAnnouncementTypeReaded:
{
if (paging.pageCount > _m_readedCurrentPage) {
// self.m_unReadCurrentPage ++ ;
[self.m_arrReadData addObjectsFromArray:records];
}else {
[self.m_tableView.mj_footer endRefreshingWithNoMoreData];
}
}
default:
break;
}
};
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
}
[self.m_tableView reloadData];
}
ICRAnnouncement *annocement = [_m_arrData lastObject];
[httpCtrl doGetBoardListFromUpdateTime:more ? nil : annocement.lastModifyInfo[@"time"]
position:0
size:20
type:eType
deleteLocal:!more
success:succ
failure:fail];
- (void)createRefresh{
WS(weakSelf);
self.m_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
weakSelf.m_unReadCurrentPage = 0;
weakSelf.m_readedCurrentPage = 0;
weakSelf.isRefresh = YES;
[weakSelf fetchDataMore:NO type:weakSelf.m_segmentControl.selectedSegmentIndex];
}];
// self.tableView.header.lastUpdatedTimeKey = GTO_REPAIR_UPDATEDATE;
self.m_tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
weakSelf.isLoadMore = YES;
weakSelf.m_unReadCurrentPage ++ ;
weakSelf.m_readedCurrentPage ++ ;
[weakSelf fetchDataMore:YES type:weakSelf.m_segmentControl.selectedSegmentIndex];
} ];
}
#pragma mark - 结束刷新
- (void)endRefreshing{
_isLoadMore = NO;
_isRefresh = NO;
[self.m_tableView.mj_header endRefreshing];
[self.m_tableView.mj_footer endRefreshing];
}
@end
//
// ICRAnnouncement.h
// Cruiser
//
// Created by Lili Wang on 15/4/13.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
typedef NS_ENUM(NSUInteger, ICRAnnouncementPriority) {
kICRAnnouncementPriorityLow = 0,
kICRAnnouncementPriorityNormal,
kICRAnnouncementPriorityHigh
};
typedef NS_ENUM(NSUInteger, ICRAnnouncemenState) {
kICRAnnouncementStateUnsubmited = 0,
kICRAnnouncementStateSubmited,
kICRAnnouncementStateCancled
};
typedef NS_ENUM(NSUInteger, ICRAnnouncementReadType) {
kICRAnnouncementTypeUnread = 0,
kICRAnnouncementTypeReaded
};
@interface ICRAnnouncement : IBTModel
@property (copy, nonatomic) NSString *uuid;
@property (assign, nonatomic) NSInteger version;
@property (copy, nonatomic) NSString *create_time;
@property (copy, nonatomic) NSString *create_id;
@property (copy, nonatomic) NSString *create_operName;
@property (copy, nonatomic) NSString *lastModify_time;
@property (copy, nonatomic) NSString *lastModify_id;
@property (copy, nonatomic) NSString *lastModify_operName;
@property (copy, nonatomic) NSString *enterprise;
@property (copy, nonatomic) NSString *title;
@property (copy, nonatomic) NSString *content;
@property (copy, nonatomic) NSString *attachmentId;
@property (copy, nonatomic) NSArray *attachmentUrls;
//附件的url 后台暂时没加
@property (assign, nonatomic) ICRAnnouncementPriority priority;
@property (assign, nonatomic) ICRAnnouncemenState state;
@property (assign, nonatomic) ICRAnnouncementReadType readType;
@end
//
// ICRAnnouncement.m
// Cruiser
//
// Created by Lili Wang on 15/4/13.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRAnnouncement.h"
#import "ICRAttachment.h"
@implementation ICRAnnouncement
//+ (NSDictionary *)specialKeysAndReplaceKeys {
// return @{ @"aID" : [[self class] PrimaryKey], };
//}
+ (NSString *)PrimaryKey {
return @"uuid";
}
//#pragma mark - Setter
//- (void)setAttachments:(NSArray *)attachments {
// if ([_attachments isEqualToArray:attachments]) {
// return;
// }
// _attachments = attachments;
//
// for (NSDictionary *dict in attachments) {
// ICRAttachment *attach = [ICRAttachment DBObject];
// [attach praseFromJsonDict:dict];
//
// [self.arrSubModels addObject:attach];
// }
//}
@end
//
// AnnouncementDetailTableViewCell.h
// RealEstateManagement
//
// Created by Javen on 16/9/5.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, announcementDetailCellType) {
announcementDetailCellTypeTop,
announcementDetailCellTypeCenter,
announcementDetailCellTypeBottom,
};
@interface AnnouncementDetailTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *topImage;
@property (weak, nonatomic) IBOutlet UIImageView *centerImage;
@property (weak, nonatomic) IBOutlet UIImageView *bottomImage;
@property (nonatomic, copy) NSString *contentText;
@property (weak, nonatomic) IBOutlet UILabel *content;
@property (nonatomic, assign) announcementDetailCellType type;
@property (nonatomic, assign) BOOL isOnlyOne;
@property (nonatomic, copy) NSString *fileUrl;
@property (nonatomic, copy) void (^openFile)(void);
@end
//
// AnnouncementDetailTableViewCell.m
// RealEstateManagement
//
// Created by Javen on 16/9/5.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import "AnnouncementDetailTableViewCell.h"
#import "IBTWebViewController.h"
@implementation AnnouncementDetailTableViewCell
- (void)awakeFromNib {
// Initialization code
self.selectionStyle = UITableViewCellSelectionStyleNone;
}
- (IBAction)open:(id)sender {
self.openFile();
}
- (void)setContentText:(NSString *)contentText {
if (![_contentText isEqualToString:contentText]) {
_contentText = contentText;
}
NSMutableAttributedString *content = [[NSMutableAttributedString alloc]initWithString:contentText];
NSRange contentRange = {0,[content length]};
[content addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:contentRange];
self.content.attributedText = content;
}
- (void)setType:(announcementDetailCellType)type {
_type = type;
switch (type) {
case announcementDetailCellTypeTop: {
self.topImage.hidden = NO;
self.centerImage.hidden = YES;
self.bottomImage.hidden = YES;
break;
}
case announcementDetailCellTypeCenter: {
self.topImage.hidden = YES;
self.centerImage.hidden = NO;
self.bottomImage.hidden = YES;
break;
}
case announcementDetailCellTypeBottom: {
self.topImage.hidden = YES;
self.centerImage.hidden = YES;
self.bottomImage.hidden = NO;
break;
}
}
}
- (void)setIsOnlyOne:(BOOL)isOnlyOne {
_isOnlyOne = isOnlyOne;
_bottomImage.hidden = !isOnlyOne;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// ICRAnnocementContentView.m
// Cruiser
//
// Created by Lili Wang on 15/4/14.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#define PRIORITY_LABEL_HEIGHT 30
#define PRIORITY_LABEL_LEFT_PANDING 15
#define PRIORITY_IMAGE_TOP_PANDING 20
#define TITLE_LABEL_TOP_PANDING 15
#define TITLE_LABEL_HEIGHT 15
#define CREAT_BY_LABEL_HEIGHT 14
#define CREAT_BY_LABEL_TOP_PANDING 6
#define CREAT_BY_TEXT_COLOR [UIColor colorWithRed:0.749f green:0.749f blue:0.749f alpha:1.00f]
#import "ICRAnnocementContentView.h"
#import "ICRAnnouncement.h"
#import "UILabel+SizeCalculate.h"
#import "IBTCommon.h"
#import "UIView+ViewFrameGeometry.h"
@interface ICRAnnocementContentView ()
@property (strong, nonatomic) UILabel *m_priorityLabel;
@property (strong, nonatomic) UILabel *m_titleLabel;
@property (strong, nonatomic) UILabel *m_creatByLabel;
@property (strong, nonatomic) UILabel *m_creatTimeLabel;
@property (strong, nonatomic) UILabel *m_creatByValueLabel;
@property (strong, nonatomic) UILabel *m_creatTimeValueLabel;
@end
@implementation ICRAnnocementContentView
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
// code
[self _init];
}
return self;
}
- (void)layoutSubviews {
_m_priorityLabel.frame = (CGRect){
.origin.x = PRIORITY_LABEL_LEFT_PANDING,
.origin.y = (self.height - PRIORITY_LABEL_HEIGHT)/2,
.size.width = PRIORITY_LABEL_HEIGHT,
.size.height = PRIORITY_LABEL_HEIGHT
};
CGFloat fMaxW = self.width - PRIORITY_LABEL_LEFT_PANDING;
CGSize size = CGSizeMake( fMaxW - _m_priorityLabel.right , TITLE_LABEL_HEIGHT);
size = [_m_titleLabel widthLimitedSizeThatFits:size];
_m_titleLabel.frame = (CGRect){
.origin.x = _m_priorityLabel.right + CREAT_BY_LABEL_TOP_PANDING,
.origin.y = _m_priorityLabel.top,
.size = size
};
size = CGSizeMake( fMaxW - _m_priorityLabel.right , TITLE_LABEL_HEIGHT);
size = [_m_creatByLabel widthLimitedSizeThatFits:size];
_m_creatByLabel.frame = (CGRect){
.origin.x = _m_priorityLabel.right + CREAT_BY_LABEL_TOP_PANDING,
.origin.y = CREAT_BY_LABEL_TOP_PANDING + _m_titleLabel.bottom,
.size = size
};
size = CGSizeMake( fMaxW - _m_creatByLabel.right,CREAT_BY_LABEL_HEIGHT );
size = [_m_creatByValueLabel widthLimitedSizeThatFits:size];
_m_creatByValueLabel.frame = (CGRect){
.origin.x = _m_creatByLabel.right,
.origin.y = _m_creatByLabel.top,
.size.width = size.width,
.size.height = _m_creatByLabel.height
};
size = CGSizeMake( fMaxW - _m_creatByValueLabel.right , _m_creatByLabel.height );
size = [_m_creatTimeLabel widthLimitedSizeThatFits:size];
_m_creatTimeLabel.frame = (CGRect){
.origin.x = _m_creatByValueLabel.right + CREAT_BY_LABEL_TOP_PANDING,
.origin.y = _m_creatByValueLabel.top,
.size.width = size.width,
.size.height = _m_creatByValueLabel.height
};
size = CGSizeMake( fMaxW - _m_creatTimeLabel.right, _m_creatTimeLabel.height);
size = [_m_creatTimeValueLabel widthLimitedSizeThatFits:size];
_m_creatTimeValueLabel.frame = (CGRect){
.origin.x = _m_creatTimeLabel.right,
.origin.y = _m_creatTimeLabel.top,
.size.width = size.width,
.size.height = _m_creatTimeLabel.height
};
}
#pragma mark - Private Method
- (void)_init {
self.m_priorityLabel = [[self class ]creatLabelWithTextColor:[UIColor whiteColor]
textFont:[UIFont systemFontOfSize:14]
textAlignment:NSTextAlignmentCenter];
_m_priorityLabel.backgroundColor = [UIColor colorWithPatternImage:
[UIImage imageNamed:@"PriorityTagGrey"]];
_m_priorityLabel.layer.masksToBounds = YES;
_m_priorityLabel.layer.cornerRadius = PRIORITY_LABEL_HEIGHT * 0.5;
[self addSubview:_m_priorityLabel];
self.m_titleLabel = [[self class ] creatLabelWithTextColor:[UIColor colorWithRed:0.165f green:0.165f blue:0.165f alpha:1.00f]
textFont:[UIFont systemFontOfSize:15]
textAlignment:NSTextAlignmentLeft];
[self addSubview:_m_titleLabel];
self.m_creatByLabel = [[self class ] creatLabelWithTextColor:CREAT_BY_TEXT_COLOR
textFont:[UIFont systemFontOfSize:13]
textAlignment:NSTextAlignmentLeft];
_m_creatByLabel.text = @"发布人:";
[self addSubview:_m_creatByLabel];
self.m_creatTimeLabel = [[self class ] creatLabelWithTextColor:CREAT_BY_TEXT_COLOR
textFont:[UIFont systemFontOfSize:13]
textAlignment:NSTextAlignmentLeft];
_m_creatTimeLabel.text = @"发布时间:";
[self addSubview:_m_creatTimeLabel];
self.m_creatByValueLabel = [[self class ] creatLabelWithTextColor:CREAT_BY_TEXT_COLOR
textFont:[UIFont systemFontOfSize:13]
textAlignment:NSTextAlignmentLeft];;
[self addSubview:_m_creatByValueLabel];
self.m_creatTimeValueLabel = [[self class ] creatLabelWithTextColor:CREAT_BY_TEXT_COLOR
textFont:[UIFont systemFontOfSize:13]
textAlignment:NSTextAlignmentLeft];;
[self addSubview:_m_creatTimeValueLabel];
}
#pragma mark - Private Method
+ (UILabel *)creatLabelWithTextColor:(UIColor *)textColor
textFont:(UIFont *)textFont
textAlignment:(NSTextAlignment)textAlignment {
UILabel *label = [[UILabel alloc] init];
label.backgroundColor = [UIColor clearColor];
label.textColor = textColor;
label.font = textFont;
label.textAlignment = textAlignment;
return label;
}
#pragma mark - Public Method
- (void)updateContentWithData:(id)aAnnouncement {
/*
kICRAnnouncementStatusHigh = 0,
kICRAnnouncementStatusLow,
kICRAnnouncementStatusNormal
*/
/*
kICRAnnouncementTypeReaded = 0,
kICRAnnouncementTypeUnread
*/
/*
"Low" = "低";
"Normal" = "中";
"High" = "高";
*/
if ([aAnnouncement isKindOfClass:[ICRAnnouncement class]]) {
ICRAnnouncement *announcement = aAnnouncement;
switch (announcement.readType) {
case kICRAnnouncementTypeUnread:
{
switch (announcement.priority) {
case kICRAnnouncementPriorityLow:
{
self.m_priorityLabel.text = @"低";
self.m_priorityLabel.backgroundColor = [UIColor colorWithPatternImage:
[UIImage imageNamed:@"PriorityTagGreen"]];
}
break;
case kICRAnnouncementPriorityNormal:
{
self.m_priorityLabel.text = [IBTCommon localizableString:@"中"];
self.m_priorityLabel.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"PriorityTagOrange"]];
}
break;
case kICRAnnouncementPriorityHigh:
{
self.m_priorityLabel.text = @"高";
self.m_priorityLabel.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"PriorityTagRed"]];
}
break;
default:
break;
}
}
break;
case kICRAnnouncementTypeReaded:
{
switch (announcement.priority) {
case kICRAnnouncementPriorityLow:
{
self.m_priorityLabel.text = @"低";
}
break;
case kICRAnnouncementPriorityNormal:
{
self.m_priorityLabel.text = @"中";
}
break;
case kICRAnnouncementPriorityHigh:
{
self.m_priorityLabel.text = @"高";
}
break;
default:
break;
}
self.m_priorityLabel.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"PriorityTagGrey"]];
}
break;
default:
break;
}
self.m_titleLabel.text = announcement.title ? : @"";
self.m_creatByValueLabel.text = announcement.create_operName;//[announcement createInfo ][@"operator"][@"operName"] ? :@"";
self.m_creatTimeValueLabel.text = announcement.create_time;//[announcement createInfo ][@"time"]? : @"";
}
[self setNeedsLayout];
}
@end
//
// ICRAnnouncementDetailContentView.m
// Cruiser
//
// Created by Lili Wang on 15/4/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#define LABEL_LEFT_PANDING (20)
#define LABEL_TOP_PANDING (25)
#define LABEL_HEIGHT (13)
#define LABEL_WIDTH (35)
#define TABLEVIEW_CELL_HEIGHT (35)
#import "ICRAnnouncementDetailContentView.h"
#import "ICRAnnouncementDetailHeadView.h"
#import "IBTTableView.h"
#import "LBorderView.h"
#import "IBTTableViewCell.h"
#import "ICRAttachment.h"
#import "ICRAttachmentCellContentView.h"
#import "ICRAnnouncement.h"
static NSString *TableViewCell = @"IBTTableViewCell";
@interface ICRAnnouncementDetailContentView ()
<
UITableViewDataSource,
UITableViewDelegate
>
@property (strong, nonatomic) LBorderView *m_AttachmentView;
@property (strong, nonatomic) UILabel *m_attachemntLabel;
@property (strong, nonatomic) IBTTableView *m_tableView;
@property (strong, nonatomic) NSArray *m_arrData;
@end
@implementation ICRAnnouncementDetailContentView
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self _init];
}
return self;
}
- (void)layoutSubviews {
_m_attachemntLabel.frame = (CGRect){
.origin.x = LABEL_LEFT_PANDING,
.origin.y = LABEL_TOP_PANDING + _m_headView.bottom,
.size.width = LABEL_WIDTH,
.size.height = LABEL_HEIGHT
};
_m_AttachmentView.frame = (CGRect){
.origin.x = _m_attachemntLabel.left,
.origin.y = _m_attachemntLabel.bottom + 6,
.size.width = self.width - LABEL_LEFT_PANDING * 2,
.size.height = _m_arrData.count * TABLEVIEW_CELL_HEIGHT
};
self.height = _m_AttachmentView.bottom + LABEL_TOP_PANDING;
}
#pragma mark - Private Method
- (void)_init {
CGRect frame = self.frame;
self.m_headView = [[ICRAnnouncementDetailHeadView alloc] initWithFrame:frame];
[self addSubview:_m_headView];
self.m_arrData = [NSArray array];
self.m_attachemntLabel = [[UILabel alloc] init];
_m_attachemntLabel.textColor = [UIColor colorWithRed:0.000f green:0.463f blue:0.925f alpha:1.00f];
_m_attachemntLabel.font = [UIFont systemFontOfSize:12];
_m_attachemntLabel.text = [IBTCommon localizableString:@"Attachment:"];
[self addSubview:_m_attachemntLabel];
// Bottom Refference View
self.m_AttachmentView = [[LBorderView alloc] init];
_m_AttachmentView.cornerRadius = 3.0f;
_m_AttachmentView.borderType = BorderTypeDashed;
_m_AttachmentView.borderWidth = .5f;
_m_AttachmentView.borderColor = [UIColor lightGrayColor];
_m_AttachmentView.dashPattern = 4;
_m_AttachmentView.spacePattern = 2;
[self addSubview:_m_AttachmentView];
UIView *view = [[UIView alloc] initWithFrame:CGRectZero];
self.m_tableView = [[IBTTableView alloc]
initWithFrame:_m_AttachmentView.bounds style:UITableViewStylePlain];
_m_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[_m_tableView registerClass:[IBTTableViewCell class]
forCellReuseIdentifier:TableViewCell];
_m_tableView.scrollEnabled = NO;
_m_tableView.rowHeight = TABLEVIEW_CELL_HEIGHT;
_m_tableView.dataSource = self;
_m_tableView.delegate = self;
_m_tableView.tableFooterView = view;
[_m_tableView autoresizingWithStrechFullSize];
[_m_AttachmentView addSubview:_m_tableView];
}
#pragma mark - UITableViewDatasource -
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return _m_arrData.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:TableViewCell];
[self configureCell:cell forRowAtIndexPath:indexPath];
return cell;
}
- (void)configureCell:(UITableViewCell *)cell
forRowAtIndexPath:(NSIndexPath *)indexPath {
cell.selectionStyle = UITableViewCellSelectionStyleNone;
id obj = [_m_arrData objectAtIndex:indexPath.row];
UIView *contentView = cell.contentView;
ICRAttachmentCellContentView *aContentView = [contentView viewWithClass:
[ICRAttachmentCellContentView class]];
if (!aContentView) {
aContentView = [[ICRAttachmentCellContentView alloc] initWithFrame:contentView.frame];
[aContentView autoresizingWithStrechFullSize];
[contentView addSubview:aContentView];
aContentView.m_downloadBtn.tag = indexPath.row;
[aContentView.m_downloadBtn addTarget:self action:@selector(downloadButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
[aContentView updateContentWithData:obj];
}
#pragma mark - UITableViewDelegate
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
// return 35;
//}
#pragma mark - UIButton Actions
- (void)downloadButtonAction:(id)sender {
UIButton *button = (UIButton *)sender;
// button.backgroundColor = [UIColor colorWithRed:0.157f green:0.843f blue:0.463f alpha:1.00f];
// button.userInteractionEnabled = NO;
if ([self.m_delegate respondsToSelector:@selector(AttachmentDetail:downloadBtn:)]) {
[self.m_delegate AttachmentDetail:_m_arrData[ button.tag ] downloadBtn:button];
}
}
#pragma mark - Public Method
- (void)updateWithAnnouncement:(ICRAnnouncement *)announcement {
[self.m_headView updateContentWithData:announcement];
NSUInteger uiAttachCount = [announcement.attachmentUrls count];
if (uiAttachCount > 0) {
_m_attachemntLabel.hidden = NO;
_m_AttachmentView.hidden = NO;
// NSArray *arrAttIDs = [announcement.attachments valueForKeyPath:@"id"];
// ICRDatabaseFetchBlock fetchBlk = ^FMResultSet *(FMDatabase *db) {
// NSString * sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE %@ IN %@ ORDER BY %@", [ICRAttachment TableName], @"id", [IBTModel ValuePlaceholdersWithCount:uiAttachCount] , @"id"];
// return [db executeQuery:sql withArgumentsInArray:arrAttIDs];
// };
//
// __weak typeof(self)weakSelf = self;
// ICRDatabaseFetchResultsBlock fetchResultsBlk = ^(NSArray *fetchedObjects) {
// __strong __typeof(weakSelf)strongSelf = weakSelf;
// strongSelf.m_arrData = fetchedObjects;
// [strongSelf layoutSubviews];
// [strongSelf.m_tableView reloadData];
// };
//
// ICRDataBaseController *dbCtrl = [ICRDataBaseController sharedController];
// [dbCtrl runFetchForClass:[ICRAttachment class]
// fetchBlock:fetchBlk
// fetchResultsBlock:fetchResultsBlk];
NSMutableArray *muArr = [@[]mutableCopy];
for(NSDictionary *dict in announcement.attachmentUrls) {
ICRAttachment *attachment = [ICRAttachment DBObject];
[attachment praseFromJsonDict:dict];
[muArr addObject:attachment];
}
self.m_arrData = muArr;
[self layoutSubviews];
[_m_tableView reloadData];
}
else {
_m_attachemntLabel.hidden = YES;
_m_AttachmentView.hidden = YES;
}
}
@end
//
// ICRAnnouncementDetailHeadView.m
// Cruiser
//
// Created by Lili Wang on 15/4/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#define LABEL_TEXT_COLOR [UIColor colorWithRed:0.286f green:0.549f blue:0.933f alpha:1.00f]
#define CONTENT_LABEL_TEXT_COLOR [UIColor colorWithRed:0.471f green:0.471f blue:0.478f alpha:1.00f]
#define MYSELF_BACKGROUND_COLOR [UIColor colorWithRed:0.941f green:0.965f blue:0.996f alpha:1.00f]
#define LIMITED_SIZE CGSizeMake( self.width/2 , CREAT_BY_LABEL_HEIGHT )
#define TITLE_IMG_TOP_PANDING (5)
#define TITLT_IMG_HEIGHT (55)
#define TITLE_LABEL_HEIGHT (15)
#define TITLE_LABEL_TOP_PANDING (13)
#define CREAT_BY_LABEL_HEIGHT (13)
#define CREAT_BY_LABEL_LEFT_PANDING (20)
#define CREAT_TIME_LABEL_LEFT_PANDING (self.width/2)
#define CREAT_BY_LABEL_INNER (15)
#define CREAT_BY_VALUE_LABEL_INNER (5)
#define TEXTVIEW_BOTTOM_PANDING (20)
#import "ICRAnnouncementDetailHeadView.h"
#import "ICRAnnocementContentView.h"
#import "ICRAnnouncement.h"
@interface ICRAnnouncementDetailHeadView ()
@property (strong, nonatomic) UIImageView *m_titleImageView;
@property (strong, nonatomic) UILabel *m_titleLabel;
@property (strong, nonatomic) UILabel *m_creatByLabel;
@property (strong, nonatomic) UILabel *m_creatByValueLabel;
@property (strong, nonatomic) UILabel *m_creatTimeLabel;
@property (strong, nonatomic) UILabel *m_creatTimeValueLabel;
@property (strong, nonatomic) UILabel *m_announcementContentLabel;
@property (strong, nonatomic) UILabel *m_announcementContentDetail;
@end
@implementation ICRAnnouncementDetailHeadView
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
// code
[self _init];
}
return self;
}
- (void)layoutSubviews {
CGFloat fMaxW = self.width - CREAT_BY_LABEL_LEFT_PANDING;
CGSize size = CGSizeMake( fMaxW , CGFLOAT_MAX );
size = [_m_titleLabel widthLimitedSizeThatFits:size];
_m_titleImageView.frame = (CGRect){
.origin.x = CREAT_BY_LABEL_LEFT_PANDING,
.origin.y = TITLE_IMG_TOP_PANDING,
.size.width = self.width - CREAT_BY_LABEL_LEFT_PANDING * 2,
.size.height = size.height + TITLE_LABEL_TOP_PANDING * 2
};
_m_titleLabel.frame = (CGRect){
.origin.x = (_m_titleImageView.width - size.width)/2,
.origin.y = (_m_titleImageView.height - size.height)/2,
.size = size
};
size = [_m_creatByLabel widthLimitedSizeThatFits:LIMITED_SIZE];
_m_creatByLabel.frame = (CGRect){
.origin.x = _m_titleImageView.left,
.origin.y = _m_titleImageView.bottom + CREAT_BY_LABEL_INNER,
.size = size
};
size = [_m_creatByValueLabel widthLimitedSizeThatFits:LIMITED_SIZE];
_m_creatByValueLabel.frame = (CGRect){
.origin.x = _m_creatByLabel.left,
.origin.y = _m_creatByLabel.bottom + CREAT_BY_VALUE_LABEL_INNER,
.size = size
};
size = [_m_creatTimeLabel widthLimitedSizeThatFits:LIMITED_SIZE];
_m_creatTimeLabel.frame = (CGRect){
.origin.x = CREAT_TIME_LABEL_LEFT_PANDING,
.origin.y = _m_creatByLabel.top,
.size = size
};
size = [_m_creatTimeValueLabel widthLimitedSizeThatFits:LIMITED_SIZE];
_m_creatTimeValueLabel.frame = (CGRect){
.origin.x = _m_creatTimeLabel.left,
.origin.y = _m_creatByValueLabel.top,
.size = size
};
size = [_m_announcementContentLabel widthLimitedSizeThatFits:LIMITED_SIZE];
_m_announcementContentLabel.frame = (CGRect){
.origin.x = _m_creatByLabel.left,
.origin.y = _m_creatByValueLabel.bottom + CREAT_BY_LABEL_INNER,
.size = size
};
size = CGSizeMake( fMaxW , CGFLOAT_MAX);
size = [_m_announcementContentDetail heightLimitedSizeThatFits:size];
_m_announcementContentDetail.frame = (CGRect){
.origin.x = _m_announcementContentLabel.left,
.origin.y = _m_announcementContentLabel.bottom + CREAT_BY_VALUE_LABEL_INNER,
.size.width = fMaxW,
.size.height = size.height
};
self.height = _m_announcementContentDetail.bottom + TEXTVIEW_BOTTOM_PANDING;
}
#pragma mark - Private Method
- (void)_init {
self.backgroundColor = MYSELF_BACKGROUND_COLOR;
self.m_titleImageView = [[UIImageView alloc] init];
_m_titleImageView.backgroundColor = [UIColor clearColor];
_m_titleImageView.image = [[UIImage imageNamed:@"AnnounceTitleBG"]
stretchableImageWithLeftCapWidth:50 topCapHeight:10];
[self addSubview:_m_titleImageView];
self.m_titleLabel = [[ICRAnnocementContentView class]
creatLabelWithTextColor:[UIColor whiteColor]
textFont:[UIFont boldSystemFontOfSize:14]
textAlignment:NSTextAlignmentLeft];
_m_titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
_m_titleLabel.numberOfLines = 0;
[_m_titleImageView addSubview:_m_titleLabel];
self.m_creatByLabel = [[ICRAnnocementContentView class]
creatLabelWithTextColor:LABEL_TEXT_COLOR
textFont:[UIFont systemFontOfSize:12]
textAlignment:NSTextAlignmentLeft];
_m_creatByLabel.text = [IBTCommon localizableString:@"Publisher"];
[self addSubview:_m_creatByLabel];
self.m_creatByValueLabel = [[ICRAnnocementContentView class]
creatLabelWithTextColor:CONTENT_LABEL_TEXT_COLOR
textFont:[UIFont systemFontOfSize:14]
textAlignment:NSTextAlignmentLeft];
[self addSubview:_m_creatByValueLabel];
self.m_creatTimeLabel = [[ICRAnnocementContentView class]
creatLabelWithTextColor:LABEL_TEXT_COLOR
textFont:[UIFont systemFontOfSize:12]
textAlignment:NSTextAlignmentLeft];
_m_creatTimeLabel.text = [IBTCommon localizableString:@"Publish Time"];
[self addSubview:_m_creatTimeLabel];
self.m_creatTimeValueLabel = [[ICRAnnocementContentView class]
creatLabelWithTextColor:CONTENT_LABEL_TEXT_COLOR
textFont:[UIFont systemFontOfSize:14]
textAlignment:NSTextAlignmentLeft];
[self addSubview:_m_creatTimeValueLabel];
self.m_announcementContentLabel = [[ICRAnnocementContentView class]
creatLabelWithTextColor:LABEL_TEXT_COLOR
textFont:[UIFont systemFontOfSize:12]
textAlignment:NSTextAlignmentLeft];
_m_announcementContentLabel.text = [IBTCommon localizableString:@"Content"];
[self addSubview:_m_announcementContentLabel];
self.m_announcementContentDetail = [[ICRAnnocementContentView class]
creatLabelWithTextColor:CONTENT_LABEL_TEXT_COLOR
textFont:[UIFont systemFontOfSize:12]
textAlignment:NSTextAlignmentLeft];
_m_announcementContentDetail.numberOfLines = 0;
[self addSubview:_m_announcementContentDetail];
}
#pragma mark - Public Method
- (void)updateContentWithData:(ICRAnnouncement *)announcement {
self.m_titleLabel.text = announcement.title ? : @"";
self.m_creatByValueLabel.text = announcement.create_operName;//[announcement createInfo][@"operator"][@"operName"] ? : @"";
self.m_creatTimeValueLabel.text = announcement.create_time;//[announcement createInfo][@"time"] ? :@"";
self.m_announcementContentDetail.text = announcement.content ? : @"";
[self setNeedsLayout];
}
@end
//
// ICRAttachmentCellContentView.m
// Cruiser
//
// Created by Lili Wang on 15/4/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#define LABEL_LEFT_PANDING (15)
#define LABEL_HEIGHT (11)
#define LABEL_WIDTH (0)
#define TITLE_LABEL_WIDTH (180)
#define BUTTON_HEIGHT (20)
#define BUTTON_WIDTH (50)
#define NAME_LABEL_LEFT_PANDING (20)
#define BUTTON_LEFT_PANDING (25)
#import "ICRAttachmentCellContentView.h"
#import "ICRAttachment.h"
@interface ICRAttachmentCellContentView ()
@property (strong, nonatomic) UILabel *m_attIdLabel;
@property (strong, nonatomic) UILabel *m_attNameLabel;
@property (strong, nonatomic) UIView *view;
@end
@implementation ICRAttachmentCellContentView
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self _init];
}
return self;
}
- (void)layoutSubviews {
_m_attIdLabel.frame = (CGRect){
.origin.x = LABEL_LEFT_PANDING,
.origin.y = (self.height - LABEL_HEIGHT)/2,
.size.width = LABEL_WIDTH,
.size.height = LABEL_HEIGHT
};
_m_attNameLabel.frame = (CGRect){
.origin.x = _m_attIdLabel.right + NAME_LABEL_LEFT_PANDING,
.origin.y = _m_attIdLabel.top,
.size.width = TITLE_LABEL_WIDTH,
.size.height = LABEL_HEIGHT
};
_m_downloadBtn.frame = (CGRect){
.origin.x = _m_attNameLabel.right + BUTTON_LEFT_PANDING,
.origin.y = (self.height - BUTTON_HEIGHT)/2,
.size.width = BUTTON_WIDTH,
.size.height = BUTTON_HEIGHT
};
_view.frame = (CGRect){
.origin.x = _m_attIdLabel.left,
.origin.y = self.height - 1,
.size.width = self.width - 2 * LABEL_LEFT_PANDING,
.size.height = 1
};
}
#pragma mark - Private Method
- (void)_init {
self.m_attIdLabel = [[UILabel alloc] init];
_m_attIdLabel.textColor = [UIColor colorWithRed:0.443f green:0.443f blue:0.443f alpha:1.00f];
_m_attIdLabel.font = [UIFont systemFontOfSize:10];
_m_attIdLabel.textAlignment = NSTextAlignmentLeft;
[self addSubview:_m_attIdLabel];
self.view = [[UIView alloc] init];
_view.backgroundColor = [UIColor lightGrayColor];
[self addSubview:_view];
self.m_attNameLabel = [[UILabel alloc] init];
_m_attNameLabel.textColor = [UIColor colorWithRed:0.000f green:0.463f blue:0.925f alpha:1.00f];
_m_attNameLabel.font = [UIFont systemFontOfSize:10];
_m_attNameLabel.textAlignment = NSTextAlignmentLeft;
[self addSubview:_m_attNameLabel];
self.m_downloadBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_m_downloadBtn.layer.masksToBounds = YES;
_m_downloadBtn.layer.cornerRadius = 5;
[_m_downloadBtn setTitle:@"打开"
forState:UIControlStateNormal];
[_m_downloadBtn setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:0.157f green:0.843f blue:0.463f alpha:1.00f]] forState:UIControlStateNormal];
// [UIColor colorWithRed:0.690f green:0.690f blue:0.690f alpha:1.00f]];
[self addSubview:_m_downloadBtn];
}
#pragma mark - Pubulic Method
- (void)updateContentWithData:(id)data {
if ([data isKindOfClass:[ICRAttachment class]]) {
ICRAttachment *attachment = data;
_m_attIdLabel.text = attachment.uuid;
NSDictionary *underlineAttribute = @{NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle)};
_m_attNameLabel.attributedText = [[NSAttributedString alloc] initWithString:attachment.fileName
attributes:underlineAttribute];
}
}
@end
//
// ICRAnnocementContentView.h
// Cruiser
//
// Created by Lili Wang on 15/4/14.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTUIView.h"
@interface ICRAnnocementContentView : IBTUIView
+ (UILabel *)creatLabelWithTextColor:(UIColor *)textColor
textFont:(UIFont *)textFont
textAlignment:(NSTextAlignment)textAlignment;
- (void)updateContentWithData:(id)aAnnouncement;
@end
//
// ICRAnnouncementDetailContentView.h
// Cruiser
//
// Created by Lili Wang on 15/4/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTUIView.h"
@protocol ICRAnnouncementDetailHeadViewDelegate;
@class ICRAnnouncement, ICRAttachment;
@class ICRAnnouncementDetailHeadView;
@interface ICRAnnouncementDetailContentView : IBTUIView
@property (strong, nonatomic) ICRAnnouncementDetailHeadView *m_headView;
@property (weak, nonatomic) id <ICRAnnouncementDetailHeadViewDelegate> m_delegate;
- (void)updateWithAnnouncement:(ICRAnnouncement *)announcement;
@end
@protocol ICRAnnouncementDetailHeadViewDelegate <NSObject>
@optional
- (void)AttachmentDetail:(ICRAttachment *)attach downloadBtn:(UIButton *)button;
@end
//
// ICRAnnouncementDetailHeadView.h
// Cruiser
//
// Created by Lili Wang on 15/4/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTUIView.h"
@class ICRAnnouncement;
@interface ICRAnnouncementDetailHeadView : IBTUIView
- (void)updateContentWithData:(ICRAnnouncement *)announcement;
@end
//
// ICRAnnouncementViewController.h
// Cruiser
//
// Created by Xummer on 4/11/15.
// Copyright (c) 2015 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface ICRAnnouncementViewController : ICRBaseViewController
@end
//
// ICRAnnouncementViewController.m
// Cruiser
//
// Created by Xummer on 4/11/15.
// Copyright (c) 2015 Xummer. All rights reserved.
//
#define MYANNOUNCEMENTCELL_HEIGHT (75)
#import "ICRAnnouncementViewController.h"
#import "ICRAnnouncementDetailViewController.h"
#import "ICRAnnouncement.h"
#import "ICRAnnocementContentView.h"
#import "IBTRefreshTableView.h"
#import "ICRDataBaseController.h"
#import "ICRHTTPController.h"
static NSString *MyTableViewCell = @"IBTTableViewCell";
@interface ICRAnnouncementViewController ()
<
UITableViewDataSource,
UITableViewDelegate,
IBTScrollViewRefreshDelegate
>
@property (strong, nonatomic) IBTRefreshTableView *m_tableView;
@property (strong, nonatomic) IBTSegmentContainer *m_segContainer;
@property (weak, nonatomic) IBTSegmentedControl *m_segmentControl;
@property (strong, nonatomic) NSArray *m_arrData;
@end
@implementation ICRAnnouncementViewController
#pragma mark - Life Cycle
//- (void)viewDidLoad {
// [super viewDidLoad];
// // Do any additional setup after loading the view.
//
// self.title = [IBTCommon localizableString:@"Announcement"];
//
// [self initSegmentConatinerFromOriginY:0];
// [self initTableView];
//
//}
ON_CREATE_VIEWS( signal )
{
self.navigationBarShown = YES;
self.navigationBarTitle = [IBTCommon localizableString:@"Announcement"];
}
ON_DID_APPEAR( signal )
{
[self initSegmentConatinerFromOriginY:64];
[self initTableView];
[self fetchDataMore:NO type:kICRAnnouncementTypeUnread];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Private Method
- (void)initTableView {
CGFloat dy = CGRectGetMaxY(_m_segContainer.frame);
CGRect frame = self.view.bounds;
frame.origin.y = dy;
frame.size.height -= CGRectGetMinY(frame);
self.m_tableView =
[[IBTRefreshTableView alloc] initWithFrame:frame style:UITableViewStylePlain];
[_m_tableView registerClass:[IBTTableViewCell class]
forCellReuseIdentifier:MyTableViewCell];
[_m_tableView autoresizingWithStrechFullSize];
_m_tableView.dataSource = self;
_m_tableView.delegate = self;
_m_tableView.refreshDelegate = self;
[_m_tableView addRefreshControlWithText:[IBTCommon localizableString:@""]];
[_m_tableView addLoadMoreFootWithText:[IBTCommon localizableString:@"Load more"]];
UIView *view = [[UIView alloc] initWithFrame:CGRectZero];
_m_tableView.tableFooterView = view;
[self.view addSubview:_m_tableView];
}
- (void)initSegmentConatinerFromOriginY:(CGFloat)y {
if (_m_segContainer) {
return;
}
NSArray *arrSegments =
@[ [IBTCommon localizableString:@"Unread"],
[IBTCommon localizableString:@"Read"], ];
self.m_segContainer = [[IBTSegmentContainer alloc] initWithItems:arrSegments];
self.m_segmentControl = _m_segContainer.segmentControl;
_m_segmentControl.selectedSegmentIndex = 0;
_m_segContainer.frame = (CGRect){
.origin.x = 0,
.origin.y = y,
.size.width = CGRectGetWidth(self.view.bounds),
.size.height = IBT_SEGMENT_CONTAINER_DEFUALT_HEIGHT
};
[self.view addSubview:_m_segContainer];
[_m_segmentControl addTarget:self action:@selector(onSegmentsTapped:)
forControlEvents:UIControlEventValueChanged];
}
#pragma mark - Action
- (void)onSegmentsTapped:(id)sender {
UISegmentedControl *segmentedCtrl = sender;
switch (segmentedCtrl.selectedSegmentIndex) {
case 0: // 未读
{
[self fetchDataMore:NO type:kICRAnnouncementTypeUnread];
}
break;
case 1: // 已读
{
[self fetchDataMore:NO type:kICRAnnouncementTypeReaded];
}
break;
default:
break;
}
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
{
return [_m_arrData count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell =
[tableView dequeueReusableCellWithIdentifier:MyTableViewCell
forIndexPath:indexPath];
[self configureCell:cell forRowAtIndexPath:indexPath];
return cell;
}
- (void)configureCell:(UITableViewCell *)cell
forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
id obj = _m_arrData[ indexPath.row ];
UIView *contentView = cell.contentView;
ICRAnnocementContentView *aContentView = [contentView viewWithClass:
[ICRAnnocementContentView class]];
if (!aContentView) {
aContentView = [[ICRAnnocementContentView alloc] initWithFrame:contentView.frame];
[aContentView autoresizingWithStrechFullSize];
[contentView addSubview:aContentView];
}
[aContentView updateContentWithData:obj];
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
ICRAnnouncement *annocement = [_m_arrData objectAtIndex:indexPath.row];
ICRAnnouncementDetailViewController *dVC = [[ICRAnnouncementDetailViewController alloc] initWithAnnouncementData:annocement];
[self PushViewController:dVC animated:YES];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return MYANNOUNCEMENTCELL_HEIGHT;
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView == _m_tableView) {
[_m_tableView tableViewDidScroll:scrollView];
}
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
if (scrollView == _m_tableView) {
[_m_tableView tableviewDidEndDragging:scrollView];
}
}
#pragma mark - IBTScrollViewRefreshDelegate
- (void)startRefreshData:(UIScrollView *)scrollView {
[self fetchDataMore:NO type:_m_segmentControl.selectedSegmentIndex];
}
- (void)endRefreshData:(UIScrollView *)scrollView {
}
- (void)startLoadMoreData:(UIScrollView *)scrollView {
[self fetchDataMore:YES type:_m_segmentControl.selectedSegmentIndex];
}
- (void)endLoadMoreData:(UIScrollView *)scrollView {
}
#pragma mark - Data Update
- (void)fetchAnnouncementsListWithType:(ICRAnnouncementType)type {
ICRDatabaseFetchBlock fetchBlk = ^FMResultSet *(FMDatabase *db) {
NSString * sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE %@ = ? ", [ICRAnnouncement TableName], @"priority"];
// , @"createTime" ORDER BY %@ DESC
return [db executeQuery:sql, @( type ) ];
};
__weak typeof(self)weakSelf = self;
ICRDatabaseFetchResultsBlock fetchResultsBlk = ^(NSArray *fetchedObjects) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
strongSelf.m_arrData = fetchedObjects;
[strongSelf.m_tableView reloadData];
};
ICRDataBaseController *dbCtrl = [ICRDataBaseController sharedController];
[dbCtrl runFetchForClass:[ICRAnnouncement class]
fetchBlock:fetchBlk
fetchResultsBlock:fetchResultsBlk];
}
#pragma mark - Get Data
- (void)fetchDataMore:(BOOL)more type:(ICRAnnouncementType)eType {
__weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf fetchAnnouncementsListWithType:eType];
if (!more) {
[_m_tableView endRefreshWithState:kRefreshStateFinished];
}
else {
[_m_tableView endLoadMoreWithState:kLoadStateFinished];
}
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView showTips:data];
if (!more) {
[_m_tableView endRefreshWithState:kRefreshStateFailed];
}
else {
[_m_tableView endLoadMoreWithState:kLoadStateFailed];
}
};
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
ICRAnnouncement *annocement = [_m_arrData lastObject];
[httpCtrl doGetBoardListFromUpdateTime:more ? nil : annocement.lastModifyInfo[@"time"]
position:0
size:20
type:eType
deleteLocal:!more
success:succ
failure:fail];
}
@end
//
// ICRAttachment.m
// Cruiser
//
// Created by Xummer on 4/12/15.
// Copyright (c) 2015 Xummer. All rights reserved.
//
#import "ICRAttachment.h"
@implementation ICRAttachment
+ (NSDictionary *)specialKeysAndReplaceKeys {
return @{ @"aID" : [[self class] PrimaryKey], };
}
+ (NSString *)PrimaryKey {
return @"id";
}
@end
//
// ICRAttachmentCellContentView.h
// Cruiser
//
// Created by Lili Wang on 15/4/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTUIView.h"
@interface ICRAttachmentCellContentView : IBTUIView
@property (strong, nonatomic) UIButton *m_downloadBtn;
- (void)updateContentWithData:(id)data;
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment