Commit dcbf94c6 authored by Achilles's avatar Achilles

add upgrade fun.

parent 2c319d5c
......@@ -114,6 +114,27 @@
C1A06A0E1BE10B080082006F /* sale_input@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C1A06A061BE10B080082006F /* sale_input@2x.png */; };
C1A06A0F1BE10B080082006F /* service_apply.png in Resources */ = {isa = PBXBuildFile; fileRef = C1A06A071BE10B080082006F /* service_apply.png */; };
C1A06A101BE10B080082006F /* service_apply@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C1A06A081BE10B080082006F /* service_apply@2x.png */; };
C1CF9F2B1BEE5C690033C35E /* UISearchBar+BeeUIStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CF9F2A1BEE5C690033C35E /* UISearchBar+BeeUIStyle.m */; };
C1CF9F301BEF20DB0033C35E /* VankeNoticeBoard_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CF9F2E1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.m */; };
C1CF9F311BEF20DB0033C35E /* VankeNoticeBoard_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F2F1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.xml */; };
C1CF9F351BEF232A0033C35E /* VankeNoticeListBoard_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CF9F331BEF232A0033C35E /* VankeNoticeListBoard_iPhone.m */; };
C1CF9F361BEF232A0033C35E /* VankeNoticeListBoard_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F341BEF232A0033C35E /* VankeNoticeListBoard_iPhone.xml */; };
C1CF9F391BEF2F630033C35E /* VankeNoticeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CF9F381BEF2F630033C35E /* VankeNoticeListModel.m */; };
C1CF9F3C1BEF30850033C35E /* VankeNoticeListAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CF9F3B1BEF30850033C35E /* VankeNoticeListAPI.m */; };
C1CF9F401BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CF9F3E1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.m */; };
C1CF9F411BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F3F1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.xml */; };
C1CF9F4E1BEFB1530033C35E /* AnnounceTitleBG.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F441BEFB1520033C35E /* AnnounceTitleBG.png */; };
C1CF9F4F1BEFB1530033C35E /* AnnounceTitleBG@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F451BEFB1520033C35E /* AnnounceTitleBG@2x.png */; };
C1CF9F501BEFB1530033C35E /* PriorityTagGreen.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F461BEFB1520033C35E /* PriorityTagGreen.png */; };
C1CF9F511BEFB1530033C35E /* PriorityTagGreen@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F471BEFB1520033C35E /* PriorityTagGreen@2x.png */; };
C1CF9F521BEFB1530033C35E /* PriorityTagGrey.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F481BEFB1520033C35E /* PriorityTagGrey.png */; };
C1CF9F531BEFB1530033C35E /* PriorityTagGrey@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F491BEFB1520033C35E /* PriorityTagGrey@2x.png */; };
C1CF9F541BEFB1530033C35E /* PriorityTagOrange.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F4A1BEFB1530033C35E /* PriorityTagOrange.png */; };
C1CF9F551BEFB1530033C35E /* PriorityTagOrange@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F4B1BEFB1530033C35E /* PriorityTagOrange@2x.png */; };
C1CF9F561BEFB1530033C35E /* PriorityTagRed.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F4C1BEFB1530033C35E /* PriorityTagRed.png */; };
C1CF9F571BEFB1530033C35E /* PriorityTagRed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F4D1BEFB1530033C35E /* PriorityTagRed@2x.png */; };
C1CF9F591BF23FED0033C35E /* right_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = C1CF9F581BF23FED0033C35E /* right_arrow.png */; };
C1CF9F5C1BF4D6EB0033C35E /* VankeVersionAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CF9F5B1BF4D6EB0033C35E /* VankeVersionAPI.m */; };
C1D58B1A1BB1BC9200D297FE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1D58B191BB1BC9200D297FE /* UIKit.framework */; };
C1D58B1C1BB1BC9200D297FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1D58B1B1BB1BC9200D297FE /* Foundation.framework */; };
C1D58B1E1BB1BC9200D297FE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1D58B1D1BB1BC9200D297FE /* CoreGraphics.framework */; };
......@@ -655,6 +676,34 @@
C1A06A061BE10B080082006F /* sale_input@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "sale_input@2x.png"; path = "img/sale_input@2x.png"; sourceTree = "<group>"; };
C1A06A071BE10B080082006F /* service_apply.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = service_apply.png; path = img/service_apply.png; sourceTree = "<group>"; };
C1A06A081BE10B080082006F /* service_apply@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "service_apply@2x.png"; path = "img/service_apply@2x.png"; sourceTree = "<group>"; };
C1CF9F291BEE5C690033C35E /* UISearchBar+BeeUIStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UISearchBar+BeeUIStyle.h"; sourceTree = "<group>"; };
C1CF9F2A1BEE5C690033C35E /* UISearchBar+BeeUIStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UISearchBar+BeeUIStyle.m"; sourceTree = "<group>"; };
C1CF9F2D1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VankeNoticeBoard_iPhone.h; path = notice/VankeNoticeBoard_iPhone.h; sourceTree = "<group>"; };
C1CF9F2E1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VankeNoticeBoard_iPhone.m; path = notice/VankeNoticeBoard_iPhone.m; sourceTree = "<group>"; };
C1CF9F2F1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = VankeNoticeBoard_iPhone.xml; path = notice/VankeNoticeBoard_iPhone.xml; sourceTree = "<group>"; };
C1CF9F321BEF232A0033C35E /* VankeNoticeListBoard_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VankeNoticeListBoard_iPhone.h; path = notice/VankeNoticeListBoard_iPhone.h; sourceTree = "<group>"; };
C1CF9F331BEF232A0033C35E /* VankeNoticeListBoard_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VankeNoticeListBoard_iPhone.m; path = notice/VankeNoticeListBoard_iPhone.m; sourceTree = "<group>"; };
C1CF9F341BEF232A0033C35E /* VankeNoticeListBoard_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = VankeNoticeListBoard_iPhone.xml; path = notice/VankeNoticeListBoard_iPhone.xml; sourceTree = "<group>"; };
C1CF9F371BEF2F630033C35E /* VankeNoticeListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VankeNoticeListModel.h; sourceTree = "<group>"; };
C1CF9F381BEF2F630033C35E /* VankeNoticeListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VankeNoticeListModel.m; sourceTree = "<group>"; };
C1CF9F3A1BEF30850033C35E /* VankeNoticeListAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VankeNoticeListAPI.h; sourceTree = "<group>"; };
C1CF9F3B1BEF30850033C35E /* VankeNoticeListAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VankeNoticeListAPI.m; sourceTree = "<group>"; };
C1CF9F3D1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VankeNoticeListBoardCell_iPhone.h; path = notice/VankeNoticeListBoardCell_iPhone.h; sourceTree = "<group>"; };
C1CF9F3E1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VankeNoticeListBoardCell_iPhone.m; path = notice/VankeNoticeListBoardCell_iPhone.m; sourceTree = "<group>"; };
C1CF9F3F1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = VankeNoticeListBoardCell_iPhone.xml; path = notice/VankeNoticeListBoardCell_iPhone.xml; sourceTree = "<group>"; };
C1CF9F441BEFB1520033C35E /* AnnounceTitleBG.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = AnnounceTitleBG.png; path = img/AnnounceTitleBG.png; sourceTree = "<group>"; };
C1CF9F451BEFB1520033C35E /* AnnounceTitleBG@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "AnnounceTitleBG@2x.png"; path = "img/AnnounceTitleBG@2x.png"; sourceTree = "<group>"; };
C1CF9F461BEFB1520033C35E /* PriorityTagGreen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityTagGreen.png; path = img/PriorityTagGreen.png; sourceTree = "<group>"; };
C1CF9F471BEFB1520033C35E /* PriorityTagGreen@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "PriorityTagGreen@2x.png"; path = "img/PriorityTagGreen@2x.png"; sourceTree = "<group>"; };
C1CF9F481BEFB1520033C35E /* PriorityTagGrey.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityTagGrey.png; path = img/PriorityTagGrey.png; sourceTree = "<group>"; };
C1CF9F491BEFB1520033C35E /* PriorityTagGrey@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "PriorityTagGrey@2x.png"; path = "img/PriorityTagGrey@2x.png"; sourceTree = "<group>"; };
C1CF9F4A1BEFB1530033C35E /* PriorityTagOrange.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityTagOrange.png; path = img/PriorityTagOrange.png; sourceTree = "<group>"; };
C1CF9F4B1BEFB1530033C35E /* PriorityTagOrange@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "PriorityTagOrange@2x.png"; path = "img/PriorityTagOrange@2x.png"; sourceTree = "<group>"; };
C1CF9F4C1BEFB1530033C35E /* PriorityTagRed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PriorityTagRed.png; path = img/PriorityTagRed.png; sourceTree = "<group>"; };
C1CF9F4D1BEFB1530033C35E /* PriorityTagRed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "PriorityTagRed@2x.png"; path = "img/PriorityTagRed@2x.png"; sourceTree = "<group>"; };
C1CF9F581BF23FED0033C35E /* right_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = right_arrow.png; path = img/right_arrow.png; sourceTree = "<group>"; };
C1CF9F5A1BF4D6EB0033C35E /* VankeVersionAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VankeVersionAPI.h; sourceTree = "<group>"; };
C1CF9F5B1BF4D6EB0033C35E /* VankeVersionAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VankeVersionAPI.m; sourceTree = "<group>"; };
C1D58B161BB1BC9200D297FE /* vanke.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = vanke.app; sourceTree = BUILT_PRODUCTS_DIR; };
C1D58B191BB1BC9200D297FE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
C1D58B1B1BB1BC9200D297FE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
......@@ -1550,6 +1599,22 @@
name = affairs;
sourceTree = "<group>";
};
C1CF9F2C1BEF1DB20033C35E /* notice */ = {
isa = PBXGroup;
children = (
C1CF9F2D1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.h */,
C1CF9F2E1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.m */,
C1CF9F2F1BEF20DB0033C35E /* VankeNoticeBoard_iPhone.xml */,
C1CF9F321BEF232A0033C35E /* VankeNoticeListBoard_iPhone.h */,
C1CF9F331BEF232A0033C35E /* VankeNoticeListBoard_iPhone.m */,
C1CF9F341BEF232A0033C35E /* VankeNoticeListBoard_iPhone.xml */,
C1CF9F3D1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.h */,
C1CF9F3E1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.m */,
C1CF9F3F1BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.xml */,
);
name = notice;
sourceTree = "<group>";
};
C1D58B0D1BB1BC9200D297FE = {
isa = PBXGroup;
children = (
......@@ -1593,8 +1658,8 @@
children = (
C1DED2B71BCEC3F70049BB2D /* LaunchScreen.xib */,
C1D58B351BB1BC9200D297FE /* AppDelegate.h */,
C12804EA1BC3727A001ECBAA /* VankeConfig.h */,
C1D58B361BB1BC9200D297FE /* AppDelegate.m */,
C12804EA1BC3727A001ECBAA /* VankeConfig.h */,
C1D58B551BB1BC9200D297FE /* Info.plist */,
C1D58B501BB1BC9200D297FE /* Images.xcassets */,
C1D58B3A1BB1BC9200D297FE /* controller */,
......@@ -1623,6 +1688,8 @@
children = (
C12805011BC42EE9001ECBAA /* VankeCommonModel.h */,
C12805021BC42EE9001ECBAA /* VankeCommonModel.m */,
C1CF9F371BEF2F630033C35E /* VankeNoticeListModel.h */,
C1CF9F381BEF2F630033C35E /* VankeNoticeListModel.m */,
C16BA6251BD39491001ACB26 /* VankePassengerFlowModel.h */,
C16BA6261BD39491001ACB26 /* VankePassengerFlowModel.m */,
C128050D1BC6AA8B001ECBAA /* VankeProjectListModel.h */,
......@@ -1646,6 +1713,8 @@
children = (
C12805071BC55773001ECBAA /* VankeBaseAPI.h */,
C12805081BC55773001ECBAA /* VankeBaseAPI.m */,
C1CF9F3A1BEF30850033C35E /* VankeNoticeListAPI.h */,
C1CF9F3B1BEF30850033C35E /* VankeNoticeListAPI.m */,
C16BA6281BD3952E001ACB26 /* VankePassengerFlowAPI.h */,
C16BA6291BD3952E001ACB26 /* VankePassengerFlowAPI.m */,
C128050A1BC5920F001ECBAA /* VankeProjectListAPI.h */,
......@@ -1658,6 +1727,8 @@
C19ADE371BC80DD400206213 /* VankeSaleVolumeAPI.m */,
C12804E41BC2DDDA001ECBAA /* VankeUserLoginAPI.h */,
C12804E51BC2DDDA001ECBAA /* VankeUserLoginAPI.m */,
C1CF9F5A1BF4D6EB0033C35E /* VankeVersionAPI.h */,
C1CF9F5B1BF4D6EB0033C35E /* VankeVersionAPI.m */,
C12804D81BC12A67001ECBAA /* VankeWeatherController.h */,
C12804D91BC12A67001ECBAA /* VankeWeatherController.m */,
);
......@@ -1686,6 +1757,7 @@
C1D58B3D1BB1BC9200D297FE /* templates */ = {
isa = PBXGroup;
children = (
C1CF9F2C1BEF1DB20033C35E /* notice */,
C1A069FB1BE1046B0082006F /* affairs */,
C19BBBDE1BBE85B300831290 /* common */,
C19BBBDD1BBE857600831290 /* floor-detail */,
......@@ -1740,39 +1812,28 @@
C1D594761BB2E5B000D297FE /* img */ = {
isa = PBXGroup;
children = (
C1CF9F581BF23FED0033C35E /* right_arrow.png */,
C1CF9F441BEFB1520033C35E /* AnnounceTitleBG.png */,
C1CF9F451BEFB1520033C35E /* AnnounceTitleBG@2x.png */,
C1CF9F461BEFB1520033C35E /* PriorityTagGreen.png */,
C1CF9F471BEFB1520033C35E /* PriorityTagGreen@2x.png */,
C1CF9F481BEFB1520033C35E /* PriorityTagGrey.png */,
C1CF9F491BEFB1520033C35E /* PriorityTagGrey@2x.png */,
C1CF9F4A1BEFB1530033C35E /* PriorityTagOrange.png */,
C1CF9F4B1BEFB1530033C35E /* PriorityTagOrange@2x.png */,
C1CF9F4C1BEFB1530033C35E /* PriorityTagRed.png */,
C1CF9F4D1BEFB1530033C35E /* PriorityTagRed@2x.png */,
C14D6F591BB8071700210172 /* aboutme_unchecked.png */,
C14D6F5A1BB8071700210172 /* aboutme_unchecked@2x.png */,
C1D594771BB2E5DD00D297FE /* arrow-down@2x.png */,
C1A06A011BE10B080082006F /* bill.png */,
C1A06A021BE10B080082006F /* bill@2x.png */,
C1A06A031BE10B080082006F /* notice.png */,
C1A06A041BE10B080082006F /* notice@2x.png */,
C1A06A051BE10B080082006F /* sale_input.png */,
C1A06A061BE10B080082006F /* sale_input@2x.png */,
C1A06A071BE10B080082006F /* service_apply.png */,
C1A06A081BE10B080082006F /* service_apply@2x.png */,
C1DED31F1BCEC4B40049BB2D /* blue_bg.png */,
C1DED3201BCEC4B40049BB2D /* blue_bg@2x.png */,
C1DED3211BCEC4B40049BB2D /* business_checked.png */,
C1DED3221BCEC4B40049BB2D /* business_checked@2x.png */,
C1DED3231BCEC4B40049BB2D /* business.png */,
C1DED3241BCEC4B40049BB2D /* business@2x.png */,
C1DED3251BCEC4B40049BB2D /* home_bg.png */,
C1DED3261BCEC4B40049BB2D /* home_bg@2x.png */,
C1DED3271BCEC4B40049BB2D /* home.png */,
C1DED3281BCEC4B40049BB2D /* home@2x.png */,
C1DED3291BCEC4B40049BB2D /* user_checked.png */,
C1DED32A1BCEC4B40049BB2D /* user_checked@2x.png */,
C1DED32B1BCEC4B40049BB2D /* user.png */,
C1DED32C1BCEC4B40049BB2D /* user@2x.png */,
C1DED2AB1BCEAC530049BB2D /* location_icon.png */,
C1DED2AC1BCEAC530049BB2D /* location_icon@2x.png */,
C19ADE441BC82ADB00206213 /* nav_orange_bg.png */,
C19ADE391BC8147800206213 /* left_arrow.png */,
C19ADE3A1BC8147800206213 /* left_arrow@2x.png */,
C19ADE3B1BC8147800206213 /* search.png */,
C19ADE3C1BC8147800206213 /* search@2x.png */,
C19ADE341BC6C71F00206213 /* floor-def.jpg */,
C14D6F591BB8071700210172 /* aboutme_unchecked.png */,
C14D6F5A1BB8071700210172 /* aboutme_unchecked@2x.png */,
C1D594771BB2E5DD00D297FE /* arrow-down@2x.png */,
C14D6F6D1BB8098400210172 /* car.png */,
C14D6F6E1BB8098400210172 /* car@2x.png */,
C14D6F6F1BB8098400210172 /* complaint.png */,
......@@ -1780,38 +1841,60 @@
C1D594781BB2E5DD00D297FE /* contact-them@2x.png */,
C14D6F711BB8098400210172 /* energy.png */,
C14D6F721BB8098400210172 /* energy@2x.png */,
C19ADE341BC6C71F00206213 /* floor-def.jpg */,
C1DED3251BCEC4B40049BB2D /* home_bg.png */,
C1DED3261BCEC4B40049BB2D /* home_bg@2x.png */,
C14D6F5B1BB8071700210172 /* home_checked.png */,
C14D6F5C1BB8071700210172 /* home_checked@2x.png */,
C1DED3271BCEC4B40049BB2D /* home.png */,
C1DED3281BCEC4B40049BB2D /* home@2x.png */,
C14D6F551BB8041B00210172 /* homepage_logo.png */,
C14D6F561BB8041B00210172 /* homepage_logo@2x.png */,
C1D599AE1BB58FD600D297FE /* icon_password@2x.png */,
C1D599AF1BB58FD600D297FE /* icon_username@2x.png */,
C19ADE391BC8147800206213 /* left_arrow.png */,
C19ADE3A1BC8147800206213 /* left_arrow@2x.png */,
C14D6F7D1BB813D300210172 /* little_down_icon.png */,
C14D6F7E1BB813D300210172 /* little_down_icon@2x.png */,
C14D6F7F1BB813D300210172 /* little_up_icon.png */,
C14D6F801BB813D300210172 /* little_up_icon@2x.png */,
C1DED2AB1BCEAC530049BB2D /* location_icon.png */,
C1DED2AC1BCEAC530049BB2D /* location_icon@2x.png */,
C165077F1BB96C2800CB2FC1 /* login_bg.png */,
C16507801BB96C2800CB2FC1 /* login_bg@2x.png */,
C16507811BB96C2800CB2FC1 /* logo.png */,
C16507821BB96C2800CB2FC1 /* logo@2x.png */,
C19ADE441BC82ADB00206213 /* nav_orange_bg.png */,
C1D594831BB2E5DD00D297FE /* navigation-back@2x.png */,
C1D5950D1BB42A7200D297FE /* navigation-forward@2x.png */,
C1D5950E1BB42A7200D297FE /* navigation-menu@2x.png */,
C1A06A031BE10B080082006F /* notice.png */,
C1A06A041BE10B080082006F /* notice@2x.png */,
C14D6F731BB8098400210172 /* people.png */,
C14D6F741BB8098400210172 /* people@2x.png */,
C16507831BB96C2800CB2FC1 /* pwd_icon.png */,
C16507841BB96C2800CB2FC1 /* pwd_icon@2x.png */,
C14D6F851BB8268800210172 /* right_icon.png */,
C14D6F861BB8268800210172 /* right_icon@2x.png */,
C1A06A051BE10B080082006F /* sale_input.png */,
C1A06A061BE10B080082006F /* sale_input@2x.png */,
C14D6F5D1BB8071700210172 /* sales_orange.png */,
C14D6F5E1BB8071700210172 /* sales_orange@2x.png */,
C14D6F5F1BB8071700210172 /* sales_purple.png */,
C14D6F601BB8071700210172 /* sales_purple@2x.png */,
C14D6F611BB8071700210172 /* sales_red.png */,
C14D6F621BB8071700210172 /* sales_red@2x.png */,
C19ADE3B1BC8147800206213 /* search.png */,
C19ADE3C1BC8147800206213 /* search@2x.png */,
C1A06A071BE10B080082006F /* service_apply.png */,
C1A06A081BE10B080082006F /* service_apply@2x.png */,
C1D5950F1BB42A7200D297FE /* spinner@2x.png */,
C1DED3291BCEC4B40049BB2D /* user_checked.png */,
C1DED32A1BCEC4B40049BB2D /* user_checked@2x.png */,
C19BBC271BBE894D00831290 /* user_icon.png */,
C19BBC281BBE894D00831290 /* user_icon@2x.png */,
C1DED32B1BCEC4B40049BB2D /* user.png */,
C1DED32C1BCEC4B40049BB2D /* user@2x.png */,
);
name = img;
sourceTree = "<group>";
......@@ -2060,6 +2143,8 @@
C1D595B91BB44B1F00D297FE /* extension */ = {
isa = PBXGroup;
children = (
C1CF9F291BEE5C690033C35E /* UISearchBar+BeeUIStyle.h */,
C1CF9F2A1BEE5C690033C35E /* UISearchBar+BeeUIStyle.m */,
C1D595BA1BB44B1F00D297FE /* BeeUIStyle+Builder.h */,
C1D595BB1BB44B1F00D297FE /* BeeUIStyle+Builder.m */,
C1D595BC1BB44B1F00D297FE /* BeeUIStyle+Property.h */,
......@@ -3188,6 +3273,7 @@
C19BBC261BBE869500831290 /* PullLoader.xml in Resources */,
C1A06A0A1BE10B080082006F /* bill@2x.png in Resources */,
C19BBC001BBE85F500831290 /* VankeServiceDashBoard_iPhone.xml in Resources */,
C1CF9F561BEFB1530033C35E /* PriorityTagRed.png in Resources */,
C1A06A0C1BE10B080082006F /* notice@2x.png in Resources */,
C1DED3301BCEC4B40049BB2D /* business_checked@2x.png in Resources */,
C14D6F571BB8041B00210172 /* homepage_logo.png in Resources */,
......@@ -3195,7 +3281,9 @@
C16BA6241BD393B7001ACB26 /* VankePassengerDetailBoard_iPhone.xml in Resources */,
C19BBC1A1BBE865400831290 /* VankeFloorListBoard_iPhone.xml in Resources */,
C1D5948C1BB2E5DD00D297FE /* contact-them@2x.png in Resources */,
C1CF9F571BEFB1530033C35E /* PriorityTagRed@2x.png in Resources */,
C14D6F881BB8268800210172 /* right_icon@2x.png in Resources */,
C1CF9F311BEF20DB0033C35E /* VankeNoticeBoard_iPhone.xml in Resources */,
C19ADE401BC8147800206213 /* search@2x.png in Resources */,
C1A06A0E1BE10B080082006F /* sale_input@2x.png in Resources */,
C1A06A091BE10B080082006F /* bill.png in Resources */,
......@@ -3205,6 +3293,8 @@
C1A06A0B1BE10B080082006F /* notice.png in Resources */,
C1D595051BB42A6800D297FE /* splash2.xml in Resources */,
C14D6F6C1BB8071700210172 /* sales_red@2x.png in Resources */,
C1CF9F411BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.xml in Resources */,
C1CF9F521BEFB1530033C35E /* PriorityTagGrey.png in Resources */,
C165078C1BB96C2800CB2FC1 /* pwd_icon.png in Resources */,
C1DED3381BCEC4B40049BB2D /* user_checked@2x.png in Resources */,
C1A06A0D1BE10B080082006F /* sale_input.png in Resources */,
......@@ -3218,6 +3308,7 @@
C19BBBFC1BBE85F500831290 /* VankeMainTabBoard_iPhone.xml in Resources */,
C19ADE3D1BC8147800206213 /* left_arrow.png in Resources */,
C19ADE4A1BC82ADB00206213 /* nav_orange_bg.png in Resources */,
C1CF9F531BEFB1530033C35E /* PriorityTagGrey@2x.png in Resources */,
C14D6F671BB8071700210172 /* sales_orange.png in Resources */,
C1DED32F1BCEC4B40049BB2D /* business_checked.png in Resources */,
C19BBC2A1BBE894D00831290 /* user_icon@2x.png in Resources */,
......@@ -3229,6 +3320,7 @@
C1D595171BB42A7200D297FE /* spinner@2x.png in Resources */,
C165078D1BB96C2800CB2FC1 /* pwd_icon@2x.png in Resources */,
C1D595161BB42A7200D297FE /* navigation-menu@2x.png in Resources */,
C1CF9F361BEF232A0033C35E /* VankeNoticeListBoard_iPhone.xml in Resources */,
C1DED2AE1BCEAC530049BB2D /* location_icon@2x.png in Resources */,
C14D6F681BB8071700210172 /* sales_orange@2x.png in Resources */,
C1DED33A1BCEC4B40049BB2D /* user@2x.png in Resources */,
......@@ -3241,10 +3333,12 @@
C14D6F831BB813D300210172 /* little_up_icon.png in Resources */,
C14D6F761BB8098400210172 /* car@2x.png in Resources */,
C1DED3371BCEC4B40049BB2D /* user_checked.png in Resources */,
C1CF9F591BF23FED0033C35E /* right_arrow.png in Resources */,
C19BBC041BBE85F500831290 /* VankeTopMenuBoardCell_iPhone.xml in Resources */,
C14D6F811BB813D300210172 /* little_down_icon.png in Resources */,
C16BA62F1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.xml in Resources */,
C14D6F641BB8071700210172 /* aboutme_unchecked@2x.png in Resources */,
C1CF9F541BEFB1530033C35E /* PriorityTagOrange.png in Resources */,
C14D6F581BB8041B00210172 /* homepage_logo@2x.png in Resources */,
C19ADE3E1BC8147800206213 /* left_arrow@2x.png in Resources */,
C19BBBFE1BBE85F500831290 /* VankeServiceBoardCell_iPhone.xml in Resources */,
......@@ -3266,10 +3360,12 @@
C1DED32E1BCEC4B40049BB2D /* blue_bg@2x.png in Resources */,
C14D6F771BB8098400210172 /* complaint.png in Resources */,
C1D595021BB42A6800D297FE /* page-last@2x.png in Resources */,
C1CF9F551BEFB1530033C35E /* PriorityTagOrange@2x.png in Resources */,
C1D595011BB42A6800D297FE /* page-active@2x.png in Resources */,
C1DED3331BCEC4B40049BB2D /* home_bg.png in Resources */,
C14D6F7A1BB8098400210172 /* energy@2x.png in Resources */,
C165078B1BB96C2800CB2FC1 /* logo@2x.png in Resources */,
C1CF9F4E1BEFB1530033C35E /* AnnounceTitleBG.png in Resources */,
C1D58B511BB1BC9200D297FE /* Images.xcassets in Resources */,
C14D6F7C1BB8098400210172 /* people@2x.png in Resources */,
C14D6F691BB8071700210172 /* sales_purple.png in Resources */,
......@@ -3282,8 +3378,11 @@
C19BBBE31BBE85D000831290 /* VankeLoginBoard_iPhone.xml in Resources */,
C1A06A0F1BE10B080082006F /* service_apply.png in Resources */,
C1DED3341BCEC4B40049BB2D /* home_bg@2x.png in Resources */,
C1CF9F501BEFB1530033C35E /* PriorityTagGreen.png in Resources */,
C1CF9F4F1BEFB1530033C35E /* AnnounceTitleBG@2x.png in Resources */,
C14D6F6A1BB8071700210172 /* sales_purple@2x.png in Resources */,
C1DED3361BCEC4B40049BB2D /* home@2x.png in Resources */,
C1CF9F511BEFB1530033C35E /* PriorityTagGreen@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -3412,6 +3511,7 @@
C1D599201BB44B2100D297FE /* Bee_CacheProtocol.mm in Sources */,
C1D598571BB44B2000D297FE /* UIFont+BeeExtension.m in Sources */,
C1D599331BB44B2100D297FE /* Bee_Assertion.mm in Sources */,
C1CF9F2B1BEE5C690033C35E /* UISearchBar+BeeUIStyle.m in Sources */,
C1D598F71BB44B2000D297FE /* BeeUIQuery+Miscellaneous.m in Sources */,
C1D598A81BB44B2000D297FE /* Bee_UIPageControl.m in Sources */,
C1D599541BB44B2100D297FE /* Bee_HTTPPackage.mm in Sources */,
......@@ -3422,11 +3522,13 @@
C1D598FD1BB44B2000D297FE /* Bee_UITransitionCube.m in Sources */,
C1D58B4F1BB1BC9200D297FE /* AppBoard_iPad.m in Sources */,
C1D5987E1BB44B2000D297FE /* UIViewController+BeeUIStyle.m in Sources */,
C1CF9F5C1BF4D6EB0033C35E /* VankeVersionAPI.m in Sources */,
C1D5989E1BB44B2000D297FE /* Bee_UICheck.m in Sources */,
C16BA62E1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.m in Sources */,
C1D598E71BB44B2000D297FE /* UIViewController+BeeUILayout.m in Sources */,
C19BBC251BBE869500831290 /* PullLoader.m in Sources */,
C1D598CA1BB44B2000D297FE /* Bee_UIMatrixView.m in Sources */,
C1CF9F351BEF232A0033C35E /* VankeNoticeListBoard_iPhone.m in Sources */,
C1D598EA1BB44B2000D297FE /* UILabel+LayoutParser.m in Sources */,
C19ADE521BC837C200206213 /* VankeBaseBoard.m in Sources */,
C1D599071BB44B2000D297FE /* Bee_PagingViewModel.mm in Sources */,
......@@ -3457,6 +3559,7 @@
C1D599551BB44B2100D297FE /* Bee_HTTPClient.m in Sources */,
C1D5995A1BB44B2100D297FE /* NSObject+BeeHTTPRequest.m in Sources */,
C1D598A71BB44B2000D297FE /* Bee_UINavigationBar.m in Sources */,
C1CF9F3C1BEF30850033C35E /* VankeNoticeListAPI.m in Sources */,
C1D5995E1BB44B2100D297FE /* Bee_HTTPRequest2.m in Sources */,
C1D5990E1BB44B2000D297FE /* Bee_UITemplateParser.m in Sources */,
C1D598BE1BB44B2000D297FE /* UIView+PanGesture.m in Sources */,
......@@ -3498,6 +3601,7 @@
C1D598FA1BB44B2000D297FE /* BeeUIQuery+Traversing.m in Sources */,
C1D598491BB44B2000D297FE /* Bee_Routine.mm in Sources */,
C1D598B91BB44B2000D297FE /* UIView+Background.m in Sources */,
C1CF9F391BEF2F630033C35E /* VankeNoticeListModel.m in Sources */,
C1D598C31BB44B2000D297FE /* UIView+TapGesture.m in Sources */,
C1D598831BB44B2000D297FE /* CSSStyleSheet.m in Sources */,
C1D5985B1BB44B2000D297FE /* Bee_UIRouter.m in Sources */,
......@@ -3507,6 +3611,7 @@
C1D598F61BB44B2000D297FE /* BeeUIQuery+Manipulation.m in Sources */,
C19BBBFD1BBE85F500831290 /* VankeServiceBoardCell_iPhone.m in Sources */,
C1D599701BB44B2100D297FE /* Bee_Service.m in Sources */,
C1CF9F301BEF20DB0033C35E /* VankeNoticeBoard_iPhone.m in Sources */,
C1D5988D1BB44B2000D297FE /* Bee_UIDataBinding.m in Sources */,
C1D598551BB44B2000D297FE /* Bee_UIMetrics.m in Sources */,
C1D598E31BB44B2000D297FE /* UIScrollView+BeeUILayout.m in Sources */,
......@@ -3649,6 +3754,7 @@
C1D598DF1BB44B2000D297FE /* UIButton+BeeUILayout.m in Sources */,
C1D599761BB44B2100D297FE /* ASIHTTPRequest.m in Sources */,
C1D599661BB44B2100D297FE /* Bee_HTTPWorklet2.m in Sources */,
C1CF9F401BEF4A770033C35E /* VankeNoticeListBoardCell_iPhone.m in Sources */,
C1D5984D1BB44B2000D297FE /* BeeMessage+BeeNetwork.mm in Sources */,
C1D599391BB44B2100D297FE /* Bee_Singleton.mm in Sources */,
C1D598501BB44B2000D297FE /* Bee_Model.mm in Sources */,
......
#import "AppDelegate.h"
#import "VankeFloorListBoard_iPhone.h"
#import "VankeLoginBoard_iPhone.h"
#import "VankeMainBoard_iPhone.h"
#import "VankeAppBoard_iPhone.h"
#import "VankeVersionAPI.h"
#import "GEToast.h"
@interface AppDelegate ()
@property (strong, nonatomic) NSString *newVersionUrl;//Ipa下载地址
@end
#pragma mark -
......@@ -47,15 +54,82 @@
// bee.ui.config.cacheAsyncLoad = YES;
// bee.ui.config.cacheAsyncSave = YES;
[self checkNewVersion];
[BeeUINavigationBar setTitleColor:[UIColor whiteColor]];
self.window.rootViewController = [BeeUIStack stackWithFirstBoardClass:[VankeAppBoard_iPhone class]];
// self.window.rootViewController = [BeeUIStack stackWithFirstBoardClass:[AppBoard_iPhone class]];
}
- (void)unload
{
}
-(void) checkNewVersion {
[VankeVersionAPI cancel];
VankeVersionAPI *api = [VankeVersionAPI api];
@weakify(api);
@weakify(self);
api.whenSucceed = ^{
@normalize(api);
@normalize(self);
if (api.succeed) {
[GEToast hideProgress];
if (nil == api.serverResp) {
api.failed = YES;
} else {
VersionResponse *resp = (VersionResponse*) api.serverResp;
[self performSelector:@selector(tryToUpdate:) withObject:resp];
}
}
};
api.whenFailed = ^{
@normalize(api);
@normalize(self);
[GEToast hideProgress];
};
[GEToast showProgress:self.window];
[api send];
}
-(void) tryToUpdate: (VersionResponse*) resp {
VersionNumber *newVersion = [resp newVersion];
if (nil == newVersion) {
INFO(@"没有新版本");
} else {
INFO(@"发现新版本: %@", [newVersion toString]);
self.newVersionUrl = resp.data.url;
NSString *msg = [NSString stringWithFormat:@"发现新版本: %@, 请前往下载!", [newVersion toString]];
if ([resp isForceUpdate]) {
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: msg delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil];
alertV.tag = 1001;
[alertV show];
} else {
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: msg delegate:self cancelButtonTitle:@"下次再说"otherButtonTitles: @"去下载", nil];
alertV.tag = 1002;
[alertV show];
}
}
}
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (alertView.tag == 1001) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.newVersionUrl]];
} else if (alertView.tag == 1002) {
if (buttonIndex == 1) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.newVersionUrl]];
} else {
// TODO
}
}
}
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
......
......@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>1.0.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
//
// VankeNoticeListAPI.h
// vanke
//
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#import "VankeBaseAPI.h"
#import "VankeResponse.h"
@class NoticeListResponse;
/*
* 查询项目列表
* http://.../wanke-server/rest/project/queryprojectsby?classificationEquals={classificationEquals}&nameLike={nameLike}&salesDateEquals={salesDateEquals}& passengerDateEquals={passengerDateEquals}&trafficDateEquals={trafficDateEquals}
*/
@interface VankeNoticeListAPI : VankeBaseAPI
// 发布日期大于等于
@property (nonatomic, strong) NSString *publishTimeBegin;
@end
// 公告信息
@interface Notice : BeeActiveObject
// 标识
@property (nonatomic, strong) NSString *noticeId;
// 标题
@property (nonatomic, strong) NSString *title;
// 发布人
@property (nonatomic, strong) NSString *publisher;
// 发布时间
@property (nonatomic, strong) NSString *publishTime;
// 优先级
@property (nonatomic, strong) NSString *priority;
// 内容
@property (nonatomic, strong) NSString *content;
// 附件
@property (nonatomic, strong) NSString *attachment;
// 是否已读
@property (nonatomic, assign) BOOL readed;
-(NSString*) getAttachmentUrl;
@end
@interface NoticeListResponse : VankeResponse
@property (nonatomic, strong) NSArray *data;
-(int) total;
@end
\ No newline at end of file
//
// VankeNoticeListAPI.m
// vanke
//
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeNoticeListAPI.h"
#import "VankeConfig.h"
#import "VankeUtil.h"
@implementation VankeNoticeListAPI
@synthesize publishTimeBegin;
-(void) route:(BeeMessage *)msg {
if (self.sending)
{
if (![self checkToQuery]) {
return;
}
[self http_get:@"/project/queryprojectsby"].PARAM(@"publishTimeBegin", self.publishTimeBegin).TIMEOUT(10);
}
else if (self.succeed)
{
NSLog(@"response: %@", self.responseString);
// self.serverResp = [NoticeListResponse objectFromDictionary: self.responseJSONDictionary];
NoticeListResponse *resp = [[NoticeListResponse alloc] init];
NSMutableArray *ary = [[NSMutableArray alloc] initWithCapacity:10];
for (int i = 0; i < 10; ++i) {
Notice *obj = [[Notice alloc]init];
obj.noticeId = [NSString stringWithFormat:@"%d", i];
obj.title = [NSString stringWithFormat:@"重要通知%d", i];
obj.publishTime = @"2015-11-15";
obj.publisher = @"张三";
if (i % 3 == 0) {
obj.priority = @"低";
} else if (i % 3 == 1) {
obj.priority = @"中";
} else if (i % 3 == 2) {
obj.priority = @"高";
}
obj.content = @"销售录入对账单...";
obj.attachment = @"a.png";
[ary addObject:obj];
}
resp.data = ary;
self.serverResp = resp;
if ( nil == self.serverResp )
{
self.failed = YES;
return;
}
} else if (self.failed) {
NSLog(@"response: %@", self.responseString);
self.serverResp = [NoticeListResponse objectFromDictionary: self.responseJSONDictionary];
}
}
-(BOOL) checkToQuery {
// if ([VankeUtil isBlankString:self.publishTimeBegin]) {
// [self setClientError: @"发布日期不能为空"];
// return NO;
// }
return YES;
}
@end
#pragma Notice
@implementation Notice
@synthesize noticeId;
@synthesize title;
@synthesize publisher;
@synthesize publishTime;
@synthesize priority;
@synthesize content;
@synthesize attachment;
-(NSString*) getAttachmentUrl {
if ([VankeUtil isBlankString:self.attachment]) {
return nil;
} else {
return [NSString stringWithFormat:@"%@/%@", VANKE_SERVER_MEDIA_BASE_URL, self.attachment];
}
}
@end
#pragma NoticeListResponse
@implementation NoticeListResponse
@synthesize data;
CONVERT_PROPERTY_CLASS(data, Notice)
-(int) total {
return nil == data ? 0 :[data count];
}
@end
//
// VankeVersionAPI.h
// vanke
//
// Created by xiaomi on 15/11/12.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeBaseAPI.h"
#import "VankeUtil.h"
@class VersionInfo;
@class VersionResponse;
@interface VankeVersionAPI : VankeBaseAPI
@end
// 版本信息
@interface VersionInfo: BeeActiveObject
// 版本标识
@property (nonatomic, strong) NSString *uuid;
// 版本类型
@property (nonatomic, strong) NSString *type;
// 版本号
@property (nonatomic, strong) NSString *version;
// 版本下载 url
@property (nonatomic, strong) NSString *url;
// 是否强制下载
@property (nonatomic, strong) NSString *forceUpdate;
@end
// 响应
@interface VersionResponse : VankeResponse
@property (nonatomic, strong) VersionInfo *data;
/**
* 最新版本
*
* @return 如果没有更新版本,则返回nil
*/
-(VersionNumber*) newVersion;
/**
* 是否强制更新
*
* @return 是否强制更新
*/
-(BOOL) isForceUpdate;
@end
//
// VankeVersionAPI.m
// vanke
//
// Created by xiaomi on 15/11/12.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeVersionAPI.h"
@implementation VankeVersionAPI
-(void) route:(BeeMessage *)msg {
if (self.sending)
{
[self http_get:@"/ipapk"].PARAM(@"type", @"ipa").TIMEOUT(10);
}
else if (self.succeed)
{
NSLog(@"response: %@", self.responseString);
self.serverResp = [VersionResponse objectFromDictionary: self.responseJSONDictionary];
if ( nil == self.serverResp )
{
self.failed = YES;
return;
}
}
}
@end
#pragma VersionInfo
@implementation VersionInfo
@synthesize uuid;
@synthesize type;
@synthesize version;
@synthesize url;
@synthesize forceUpdate;
@end
#pragma VersionResponse
@implementation VersionResponse
@synthesize data;
-(VersionNumber*) newVersion {
if (![self isOk]) {
return nil;
}
VersionNumber *localVersion = [VankeUtil getCurrentVersion];
VersionNumber *svrVersion = [VersionNumber initWithVersion:data.version];
if ([svrVersion compareTo:localVersion] > 0) {
return svrVersion;
} else {
return nil;
}
}
-(BOOL) isForceUpdate {
return nil != data && [@"1" eq: data.forceUpdate];
}
@end
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
//
// Copyright (c) 2014-2015, Geek Zoo Studio
// http://www.bee-framework.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
#import "Bee_UIStyle.h"
#import "Bee_UICapability.h"
#pragma mark -
@interface UITextField(BeeUIStyle)
@end
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
//
// Copyright (c) 2014-2015, Geek Zoo Studio
// http://www.bee-framework.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
#import "UITextField+BeeUIStyle.h"
#import "UIImage+BeeExtension.h"
#import "UIColor+BeeExtension.h"
#import "UIFont+BeeExtension.h"
#import "Bee_UIStyleParser.h"
#pragma mark -
@implementation UITextField(BeeUIStyle)
+ (BOOL)supportForUIStyling
{
return YES;
}
#pragma mark -
- (void)applyInputContent:(NSMutableDictionary *)properties
{
self.font = [properties parseFontWithDefaultValue:[UIFont systemFontOfSize:12.0f]];
self.textColor = [properties parseColorWithKeys:@[@"color", @"text-color"] defaultValue:[UIColor blackColor]];
self.textAlignment = [properties parseTextAlignmentWithKeys:@[@"text-align"] defaultValue:UITextAlignmentLeft];
}
- (void)applyInputKeyboard:(NSMutableDictionary *)properties
{
self.returnKeyType = [properties parseReturnKeyTypeWithKeys:@[@"return", @"input-return", @"return-key", @"input-return-key"] defaultValue:UIReturnKeyDefault];
self.keyboardType = [properties parseKeyboardTypeWithKeys:@[@"keyboard", @"input-keyboard"] defaultValue:UIKeyboardTypeDefault];
}
- (void)applyInputValue:(NSMutableDictionary *)properties
{
self.text = [properties parseTextWithKeys:@[@"text"] defaultValue:self.text];
self.placeholder = [properties parseTextWithKeys:@[@"placeholder", @"input-placeholder"] defaultValue:self.placeholder];
self.enabled = [properties parseBoolWithKeys:@[@"disabled"] defaultValue:NO] ? NO : YES;
self.userInteractionEnabled = [properties parseBoolWithKeys:@[@"readonly"] defaultValue:NO] ? NO : YES;
NSInteger maxLength = [properties parseIntegerWithKeys:@[@"maxlength", @"input-max-length"] defaultValue:0];
if ( [self respondsToSelector:@selector(setMaxLength:)] )
{
[(BeeUITextField *)self setMaxLength:maxLength];
}
}
#pragma mark -
- (void)applyInputCorrection:(NSMutableDictionary *)properties
{
self.autocapitalizationType = [properties parseAutocapitalizationTypeWithKeys:@[@"capital", @"input-capitalization"] defaultValue:UITextAutocapitalizationTypeNone];
self.autocorrectionType = [properties parseAutocorrectionTypeWithKeys:@[@"correction", @"input-correction"] defaultValue:UITextAutocorrectionTypeDefault];
self.clearButtonMode = [properties parseTextFieldViewModeWithKeys:@[@"clear", @"input-clear"] defaultValue:UITextFieldViewModeWhileEditing];
}
- (void)applyInputAppearance:(NSMutableDictionary *)properties
{
self.secureTextEntry = [properties parseBoolWithKeys:@[@"secure", @"input-secure"] defaultValue:NO];
self.borderStyle = [properties parseTextBorderStyleWithKeys:@[@"border-style", @"input-border", @"input-border-style"] defaultValue:UITextBorderStyleNone];
}
#pragma mark -
- (void)applyUIStyling:(NSDictionary *)properties
{
NSMutableDictionary * propertiesCopy = [NSMutableDictionary dictionaryWithDictionary:properties];
[self applyInputContent:propertiesCopy];
[self applyInputKeyboard:propertiesCopy];
[self applyInputValue:propertiesCopy];
[self applyInputCorrection:propertiesCopy];
[self applyInputAppearance:propertiesCopy];
[super applyUIStyling:propertiesCopy];
}
@end
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
//
// Copyright (c) 2014-2015, Geek Zoo Studio
// http://www.bee-framework.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
#import "Bee_UIStyle.h"
#import "Bee_UICapability.h"
#pragma mark -
@interface UISearchBar(BeeUIStyle)
@end
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
//
// Copyright (c) 2014-2015, Geek Zoo Studio
// http://www.bee-framework.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//
#if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
#import "UISearchBar+BeeUIStyle.h"
#import "UIImage+BeeExtension.h"
#import "UIColor+BeeExtension.h"
#import "UIFont+BeeExtension.h"
#import "Bee_UIStyleParser.h"
#pragma mark -
@implementation UISearchBar(BeeUIStyle)
+ (BOOL)supportForUIStyling
{
return YES;
}
#pragma mark -
- (void)applyInputContent:(NSMutableDictionary *)properties
{
// self.font = [properties parseFontWithDefaultValue:[UIFont systemFontOfSize:12.0f]];
// self.textColor = [properties parseColorWithKeys:@[@"color", @"text-color"] defaultValue:[UIColor blackColor]];
// self.textAlignment = [properties parseTextAlignmentWithKeys:@[@"text-align"] defaultValue:UITextAlignmentLeft];
}
- (void)applyInputKeyboard:(NSMutableDictionary *)properties
{
// self.returnKeyType = [properties parseReturnKeyTypeWithKeys:@[@"return", @"input-return", @"return-key", @"input-return-key"] defaultValue:UIReturnKeyDefault];
// self.keyboardType = [properties parseKeyboardTypeWithKeys:@[@"keyboard", @"input-keyboard"] defaultValue:UIKeyboardTypeDefault];
}
- (void)applyInputValue:(NSMutableDictionary *)properties
{
// self.text = [properties parseTextWithKeys:@[@"text"] defaultValue:self.text];
self.placeholder = [properties parseTextWithKeys:@[@"placeholder", @"input-placeholder"] defaultValue:self.placeholder];
// self.enabled = [properties parseBoolWithKeys:@[@"disabled"] defaultValue:NO] ? NO : YES;
// self.userInteractionEnabled = [properties parseBoolWithKeys:@[@"readonly"] defaultValue:NO] ? NO : YES;
//
// NSInteger maxLength = [properties parseIntegerWithKeys:@[@"maxlength", @"input-max-length"] defaultValue:0];
//
// if ( [self respondsToSelector:@selector(setMaxLength:)] )
// {
// [(BeeUITextField *)self setMaxLength:maxLength];
// }
}
#pragma mark -
- (void)applyInputCorrection:(NSMutableDictionary *)properties
{
// self.autocapitalizationType = [properties parseAutocapitalizationTypeWithKeys:@[@"capital", @"input-capitalization"] defaultValue:UITextAutocapitalizationTypeNone];
// self.autocorrectionType = [properties parseAutocorrectionTypeWithKeys:@[@"correction", @"input-correction"] defaultValue:UITextAutocorrectionTypeDefault];
// self.clearButtonMode = [properties parseTextFieldViewModeWithKeys:@[@"clear", @"input-clear"] defaultValue:UITextFieldViewModeWhileEditing];
}
- (void)applyInputAppearance:(NSMutableDictionary *)properties
{
// self.secureTextEntry = [properties parseBoolWithKeys:@[@"secure", @"input-secure"] defaultValue:NO];
// self.borderStyle = [properties parseTextBorderStyleWithKeys:@[@"border-style", @"input-border", @"input-border-style"] defaultValue:UITextBorderStyleNone];
}
#pragma mark -
- (void)applyUIStyling:(NSDictionary *)properties
{
NSMutableDictionary * propertiesCopy = [NSMutableDictionary dictionaryWithDictionary:properties];
[self applyInputContent:propertiesCopy];
[self applyInputKeyboard:propertiesCopy];
[self applyInputValue:propertiesCopy];
[self applyInputCorrection:propertiesCopy];
[self applyInputAppearance:propertiesCopy];
[super applyUIStyling:propertiesCopy];
}
@end
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
......@@ -39,6 +39,9 @@
#pragma mark -
@interface BeeUISearchBar : UISearchBar
AS_SIGNAL( SEARCH ) // 点击搜索按钮
@end
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
......@@ -34,9 +34,84 @@
#import "Bee_UISearchBar.h"
#import "UIView+BeeUISignal.h"
@interface BeeUISearchBar () <UISearchBarDelegate>
@end
#pragma mark -
@implementation BeeUISearchBar
{
BOOL _inited;
}
DEF_SIGNAL( SEARCH )
- (id)init
{
self = [super initWithFrame:CGRectZero];
if ( self )
{
[self initSelf];
}
return self;
}
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if ( self )
{
[self initSelf];
}
return self;
}
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if ( self )
{
[self initSelf];
}
return self;
}
- (void)initSelf
{
if ( NO == _inited )
{
self.delegate = self;
_inited = YES;
[self performLoad];
}
}
#pragma UISearchBarDelegate
-(BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {
return YES;
}
-(void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar {
}
-(BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar {
return YES;
}
-(void)searchBarTextDidEndEditing:(UISearchBar *)searchBar {
}
-(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
}
-(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
[self sendUISignal:BeeUISearchBar.SEARCH];
}
@end
#endif // #if (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
......@@ -98,7 +98,9 @@ DEF_SINGLETON( BeeUITemplateParserXML );
[self map:@"pager" toClass:NSClassFromString(@"BeeUIPageControl")];
[self map:@"web" toClass:NSClassFromString(@"BeeUIWebView")];
[self map:@"progress" toClass:NSClassFromString(@"BeeUIProgressView")];
[self map:@"searchbar" toClass:NSClassFromString(@"BeeUISearchBar")];
[self map:@"segment" toClass:NSClassFromString(@"BeeUISegmentedControl")];
[self loadResource:RESOURCE_NAME];
}
......
//
// VankeNoticeListModel.h
// vanke
//
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
@interface VankeNoticeListModel : BeeStreamViewModel
// 发布时间大于
@property (nonatomic, strong) NSString *publishTimeBegin;
// 是否已读
@property (nonatomic, assign) BOOL readed;
// 公告列表
@property (nonatomic, strong) NSMutableArray *notices;
@end
//
// VankeNoticeListModel.m
// vanke
//
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeNoticeListModel.h"
#import "VankeNoticeListAPI.h"
#undef PER_PAGE
#define PER_PAGE (30)
@implementation VankeNoticeListModel
@synthesize publishTimeBegin = _publishTimeBegin;
@synthesize notices = _notices;
@synthesize readed = _readed;
- (void)load
{
self.autoSave = YES;
self.autoLoad = YES;
self.notices = [NSMutableArray array];
}
- (void)unload
{
self.publishTimeBegin = nil;
self.notices = nil;
}
#pragma mark - cache
- (void)loadCache
{
[self.notices removeAllObjects];
[self.notices addUniqueObjectsFromArray:[Notice readObjectForKey:self.publishTimeBegin]
compare:^NSComparisonResult(id left, id right) {
return [((Notice*)left).noticeId compare:((Notice*)right).noticeId];
}];
}
- (void)saveCache
{
[Notice saveObject:self.notices forKey:self.publishTimeBegin];
}
- (void)clearCache
{
[self.notices removeAllObjects];
[Notice removeObjectForKey:self.publishTimeBegin];
}
#pragma mark - paging query
- (void)firstPage
{
[self gotoPage:1];
}
- (void)nextPage
{
if ( self.notices.count )
{
[self gotoPage:(self.notices.count / PER_PAGE + 1)];
}
}
- (void)gotoPage:(NSUInteger)page {
[VankeNoticeListAPI cancel];
VankeNoticeListAPI *api = [VankeNoticeListAPI api];
@weakify(api);
@weakify(self);
api.publishTimeBegin = self.publishTimeBegin;
api.whenUpdate = ^
{
@normalize(api);
@normalize(self);
if ( api.sending )
{
[self sendUISignal:self.RELOADING];
}
else
{
if ( api.succeed )
{
NoticeListResponse *resp = (NoticeListResponse*) api.serverResp;
if ( nil == resp || nil == resp.data )
{
api.failed = YES;
}
else
{
if ( page <= 1 )
{
[self.notices removeAllObjects];
[self.notices addObjectsFromArray:resp.data];
}
else
{
[self.notices addObjectsFromArray:resp.data];
[self.notices unique:^NSComparisonResult(id left, id right) {
return [((Notice *)left).noticeId compare:((Notice *)right).noticeId];
}];
}
self.more = (self.notices.count >= [resp total]) ? NO : YES;
self.loaded = YES;
[self saveCache];
}
}
[self sendUISignal:self.RELOADED];
}
};
[api send];
}
@end
......@@ -31,7 +31,7 @@
@implementation VankeWeatherModel
-(void) removeAll {
WeekWeather.DB.EMPTY();
DayWeather.DB.EMPTY();
self.weather = nil;
}
......@@ -44,7 +44,7 @@
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSString *currentDateStr = [dateFormatter stringFromDate:[NSDate date]];
self.weather = [WeekWeather.DB.WHERE(@"city", city, @"date", currentDateStr).GET_RECORDS() lastObject];
self.weather = [DayWeather.DB.WHERE(@"city", city, @"date", currentDateStr).GET_RECORDS() lastObject];
return _weather != nil;
}
......@@ -59,7 +59,7 @@
}
// delete first
WeekWeather.DB.WHERE(@"city", _weather.city, @"date", _weather.date).DELETE();
DayWeather.DB.WHERE(@"city", _weather.city, @"date", _weather.date).DELETE();
// insert new
_weather.SAVE();
......
......@@ -11,6 +11,8 @@
#import "Bee.h"
@class VersionNumber;
@interface VankeUtil : NSObject
AS_SINGLETON( VankeUtil )
......@@ -40,6 +42,47 @@ AS_SINGLETON( VankeUtil )
+ (NSString *)getHexStringForColor:(UIColor*)color;
+ (void)drawDashedBorderAroundView:(UIView *) v cornerRadius: (CGFloat) cornerRadius borderWidth: (CGFloat) borderWidth borderColor: (UIColor*) borderColor;
/**
* 当前版本
*
* @return 当前版本
*/
+ (VersionNumber*) getCurrentVersion;
@end
// 版本号
@interface VersionNumber: NSObject
@property (nonatomic, assign) NSInteger major; // 主版本
@property (nonatomic, assign) NSInteger minor; // 小版本
@property (nonatomic, assign) NSInteger build; // 编译版本号
/**
* 构造函数
*
* @param version 版本号字符串,格式:major.minor.build,如: 1.0.1
*/
+(instancetype) initWithVersion: (NSString*) version;
/**
* 版本号比较
*
* @param version 版本号
*
* @return 0:相等 1: 大于传入版本 -1: 小于传入版本
*/
-(int) compareTo: (VersionNumber*) version;
/**
* 输出版本号字符串
*
* @return 版本号字符串,格式:major.minor.build,如: 1.0.1
*/
-(NSString*) toString;
@end
......
......@@ -10,6 +10,62 @@
#import <CocoaSecurity.h>
#import "VankeUtil.h"
#pragma Version
@implementation VersionNumber
@synthesize major = _major;
@synthesize minor = _minor;
@synthesize build = _build;
+(instancetype) initWithVersion: (NSString*) version {
VersionNumber *instance = [VersionNumber alloc];
instance.major = 0;
instance.minor = 0;
instance.build = 0;
NSArray *ary = [version componentsSeparatedByString:@"."];
if (nil != ary) {
NSInteger len = [ary count];
if (len > 0) {
instance.major = [[ary objectAtIndex:0] intValue];
}
if (len > 1) {
instance.minor = [[ary objectAtIndex:1] intValue];
}
if (len > 2) {
instance.build = [[ary objectAtIndex:2] intValue];
}
}
return instance;
}
-(int) compareTo: (VersionNumber*) version {
if (nil == version) {
return 1;
}
NSInteger diff = _major - version.major;
if (diff != 0) {
return diff;
}
diff = _minor - version.minor;
if (diff != 0) {
return diff;
}
return _build - version.build;
}
-(NSString*) toString {
return [NSString stringWithFormat:@"%ld.%ld.%ld", _major, _minor, _build];
}
@end
@implementation VankeUtil
DEF_SINGLETON(VankeUtil)
......@@ -129,5 +185,57 @@ DEF_SINGLETON(VankeUtil)
return numberValue;
}
+ (void)drawDashedBorderAroundView:(UIView *) v cornerRadius: (CGFloat) cornerRadius borderWidth: (CGFloat) borderWidth borderColor: (UIColor*) borderColor {
//border definitions
// CGFloat cornerRadius = 5;
// CGFloat borderWidth = 1;
NSInteger dashPattern1 = 8;
NSInteger dashPattern2 = 8;
// UIColor *lineColor = [UIColor grayColor];
//drawing
CGRect frame = v.bounds;
CAShapeLayer *_shapeLayer = [CAShapeLayer layer];
//creating a path
CGMutablePathRef path = CGPathCreateMutable();
//drawing a border around a view
CGPathMoveToPoint(path, NULL, 0, frame.size.height - cornerRadius);
CGPathAddLineToPoint(path, NULL, 0, cornerRadius);
CGPathAddArc(path, NULL, cornerRadius, cornerRadius, cornerRadius, M_PI, -M_PI_2, NO);
CGPathAddLineToPoint(path, NULL, frame.size.width - cornerRadius, 0);
CGPathAddArc(path, NULL, frame.size.width - cornerRadius, cornerRadius, cornerRadius, -M_PI_2, 0, NO);
CGPathAddLineToPoint(path, NULL, frame.size.width, frame.size.height - cornerRadius);
CGPathAddArc(path, NULL, frame.size.width - cornerRadius, frame.size.height - cornerRadius, cornerRadius, 0, M_PI_2, NO);
CGPathAddLineToPoint(path, NULL, cornerRadius, frame.size.height);
CGPathAddArc(path, NULL, cornerRadius, frame.size.height - cornerRadius, cornerRadius, M_PI_2, M_PI, NO);
//path is set as the _shapeLayer object's path
_shapeLayer.path = path;
CGPathRelease(path);
_shapeLayer.backgroundColor = [[UIColor clearColor] CGColor];
_shapeLayer.frame = frame;
_shapeLayer.masksToBounds = NO;
[_shapeLayer setValue:[NSNumber numberWithBool:NO] forKey:@"isCircle"];
_shapeLayer.fillColor = [[UIColor clearColor] CGColor];
_shapeLayer.strokeColor = [borderColor CGColor];
_shapeLayer.lineWidth = borderWidth;
_shapeLayer.lineDashPattern = [NSArray arrayWithObjects:[NSNumber numberWithInt:dashPattern1], [NSNumber numberWithInt:dashPattern2], nil];
_shapeLayer.lineCap = kCALineCapRound;
//_shapeLayer is added as a sublayer of the view, the border is visible
[v.layer addSublayer:_shapeLayer];
v.layer.cornerRadius = cornerRadius;
}
+ (VersionNumber*) getCurrentVersion {
NSString *path = [[NSBundle mainBundle]pathForResource:@"Info" ofType:@"plist"];
NSDictionary* content =[NSDictionary dictionaryWithContentsOfFile:path];
NSString *version = [content valueForKey:@"CFBundleVersion"];
return [VersionNumber initWithVersion:version];
}
@end
......@@ -27,3 +27,5 @@ AS_NOTIFICATION( HIDE_MENU )
- (void)hideMenu;
@end
......@@ -121,7 +121,7 @@ ON_NOTIFICATION3( VankeLoginBoard_iPhone, SUCC_LOGIN, notification )
[UIView commitAnimations];
// 打开默认页面
[_router open:@"home" animated:NO];
[_router open:@"home" animated:YES];
BeeUIBoard *curBoard = _router.currentBoard;
if (nil != curBoard && [curBoard isKindOfClass:[VankeMainBoard_iPhone class]]) {
[((VankeMainBoard_iPhone*) curBoard).summaryModel reload];
......@@ -204,4 +204,4 @@ ON_SIGNAL3( VankeMainTabBoard_iPhone, me, signal )
_login = nil;
}
@end
@end
\ No newline at end of file
......@@ -16,6 +16,7 @@
//
#import "VankeAffairsBoard_iPhone.h"
#import "VankeNoticeListBoard_iPhone.h"
#pragma mark -
......@@ -82,15 +83,9 @@ ON_DID_DISAPPEAR( signal )
{
}
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnNotice, signal) {
// VankeServiceBoardCell_iPhone *cell = (VankeServiceBoardCell_iPhone *)signal.sourceCell;
// if ([@"当前客流" eq:[cell name]]) {
// [[VankeAppBoard_iPhone sharedInstance] hideMenu];
// [self showListView: CELL_TYPE_PASSENGER];
// } else {
// [GEToast showWithText:@"正在研发中..." bottomOffset:50.0f duration:1.0f];
// }
INFO(@"button notice pressed.");
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnNotice, signal) {
VankeNoticeListBoard_iPhone * board = [VankeNoticeListBoard_iPhone board];
[self.stack pushBoard:board animated:YES];
}
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
......
......@@ -10,7 +10,8 @@
AS_MODEL( VankeProjectListModel, model );
AS_OUTLET( BeeUIScrollView, list );
AS_OUTLET( BeeUITextField, txtQuery);
//AS_OUTLET( BeeUITextField, txtQuery);
AS_OUTLET( BeeUISearchBar, searchBar);
@property (assign, nonatomic) CellType listType;
......
......@@ -11,7 +11,7 @@
#import "VankeFloorListBoardCell_iPhone.h"
#import "VankePassengerDetailBoard_iPhone.h"
@interface VankeFloorListBoard_iPhone ()
@interface VankeFloorListBoard_iPhone () <UISearchBarDelegate>
@end
#pragma mark -
......@@ -31,7 +31,9 @@ SUPPORT_AUTOMATIC_LAYOUT(YES)
DEF_MODEL( VankeProjectListModel, model );
DEF_OUTLET( BeeUIScrollView, list );
DEF_OUTLET( BeeUITextField, txtQuery);
//DEF_OUTLET( BeeUITextField, txtQuery);
//DEF_OUTLET( BeeUIView, searchView);
DEF_OUTLET( BeeUISearchBar, searchBar);
+ (id)boardWithType: (CellType) type {
VankeFloorListBoard_iPhone *board = [super board];
......@@ -58,7 +60,12 @@ ON_CREATE_VIEWS( signal )
self.navigationBarShown = YES;
self.title = _projectCategory;
[self addLeftIconToTextField:_txtQuery icon:@"search"];
// [self addLeftIconToTextField:_txtQuery icon:@"search"];
// self.searchBar = [[UITextField alloc] initWithFrame:_searchView.frame];
// _searchBar.placeholder = @"请输入楼盘名称";
// _searchBar.keyboardType = UIKeyboardTypeDefault;
// _searchBar.delegate = self;
// [_searchView addSubview:_searchBar];
self.allowedSwipeToBack = YES;
......@@ -131,8 +138,7 @@ ON_CREATE_VIEWS( signal )
self.model.classificationEquals = _projectCategory;
self.model.nameLike = _projectNameLike;
self.model.salesDateEquals = _salesDate;
$(self.txtQuery).DATA(_projectNameLike);
_searchBar.text = _projectNameLike;
}
ON_DELETE_VIEWS( signal )
......@@ -141,6 +147,7 @@ ON_DELETE_VIEWS( signal )
ON_LAYOUT_VIEWS( signal )
{
// _searchBar.frame = _searchView.frame;
}
ON_WILL_APPEAR( signal )
......@@ -169,16 +176,16 @@ ON_DID_DISAPPEAR( signal )
{
}
ON_SIGNAL3( VankeFloorListBoard_iPhone, txtQuery, signal )
#pragma mark VankeFloorListBoard_iPhone
ON_SIGNAL3( VankeFloorListBoard_iPhone, searchBar, signal )
{
if ([signal is:BeeUITextField.RETURN]) {
NSString *nameLike = [VankeUtil trim:$(self.txtQuery).data];
self.model.nameLike = nameLike;
[self.model firstPage];
}
NSString *nameLike = [VankeUtil trim:_searchBar.text];
self.model.nameLike = nameLike;
[self.model firstPage];
}
#pragma mark -
#pragma mark VankeFloorListBoardCell_iPhone
ON_SIGNAL3( VankeFloorListBoardCell_iPhone, mask, signal )
{
......@@ -197,10 +204,9 @@ ON_SIGNAL3( VankeFloorListBoardCell_iPhone, mask, signal )
board.theme = self.theme;
[self.stack pushBoard:board animated:YES];
}
}
#pragma mark -
#pragma mark model
ON_SIGNAL3( VankeProjectListModel, RELOADING, signal )
{
......@@ -218,12 +224,13 @@ ON_SIGNAL3( VankeProjectListModel, RELOADED, signal )
[self.list reloadData];
}
-(void) addLeftIconToTextField: (BeeUITextField*) textField icon: (NSString*) icon {
UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:icon]];
img.frame = CGRectMake(0, 0, 35, 25);
img.contentMode = UIViewContentModeCenter;
textField.leftView = img;
textField.leftViewMode = UITextFieldViewModeAlways;
#pragma UISearchBarDelegate
-(void) searchBarSearchButtonClicked:(UISearchBar *)searchBar {
NSString *nameLike = [VankeUtil trim:_searchBar.text];
self.model.nameLike = nameLike;
[self.model firstPage];
}
@end
......@@ -4,13 +4,7 @@
<linear class="wrapper">
<image class="bg" />
<list id="list"/>
<linear orientation="v" class="head-wrapper">
<image class="bg" />
<linear orientation="h" class="search-wrapper">
<input id="txtQuery" placeholder="请输入楼盘名称" />
</linear>
</linear>
<searchbar id="searchBar" class="search-wrapper" />
</linear>
<style type="text/css">
......@@ -40,37 +34,14 @@
height: 100%;
}
.head-wrapper {
height: 48px;
.search-wrapper {
height: 45px;
width: 100%;
position: absolute;
left: 0px;
top: 64px;
}
.head-wrapper > .bg {
background-color: #fafafa;
placeholder: "请输入楼盘名称";
}
.search-wrapper {
height: 100%;
width: 100%;
v-align: center;
padding-left: 5px;
padding-right: 5px;
}
#txtQuery {
width: 100%;
height: 40px;
background-color: white;
border-width: 1px;
border-radius: 5px;
border-color: gray;
shadow-offset: 5px;
shadow-radius: 2px;
shadow-color: gray;
input-return-key: search;
}
</style>
</style>
</template>
......@@ -189,11 +189,10 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
if (self.communityDashBoard == nil) {
self.communityDashBoard = [VankeServiceDashBoard_iPhone communityDashBarod];
self.communityDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
}
if (self.currDashBoard != nil) {
self.currDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
self.currDashBoard.frame = CGRectMake(0, 0, 0, 0);
[self.currDashBoard removeFromSuperview];
}
......@@ -222,11 +221,10 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
if (self.centerDashBoard == nil) {
self.centerDashBoard = [VankeServiceDashBoard_iPhone centerDashBarod];
self.centerDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
}
if (self.currDashBoard != nil) {
self.currDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
self.currDashBoard.frame = CGRectMake(0, 0, 0, 0);
[self.currDashBoard removeFromSuperview];
}
......@@ -256,11 +254,10 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
if (self.squreDashBoard == nil) {
self.squreDashBoard = [VankeServiceDashBoard_iPhone squreDashBarod];
// self.squreDashBoard.frame = CGRectMake(frame.size.height/2, frame.size.height/2, frame.size.width, 0);
}
if (self.currDashBoard != nil) {
self.currDashBoard.frame = CGRectMake(0, 0, 0, frame.size.height);
self.currDashBoard.frame = CGRectMake(0, 0, 0, 0);
[self.currDashBoard removeFromSuperview];
}
......
......@@ -101,7 +101,7 @@
image-mode: center;
width: auto;
height: auto;
margin-top: 18px;
margin-top: 13px;
margin-right: 5px;
}
......@@ -117,7 +117,7 @@
width: auto;
height: auto;
color: white;
font-size: 30px;
font-size: 25px;
font-weight: bold;
line-num: 1;
fit-width: true;
......@@ -129,7 +129,7 @@
height: auto;
color: #fbd6d7;
font-size: 12px;
margin-top: 15px;
margin-top: 10px;
margin-left: 5px;
line-num: 1;
fit-width: true;
......
......@@ -48,9 +48,9 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
{
self.salesInfo.imgRightBg.backgroundColor = [UIColor colorWithRed:237/255.0 green:27/255.0 blue:35/255.0 alpha:1];
[self.passenger loadDefaults:@"people.png" title:@"当前客流" bgColor:[UIColor colorWithRed:0 green:195/255.0 blue:230/255.0 alpha:1] unit:@"人" defValue:[NSNumber numberWithInt:0]];
[self.traffic loadDefaults:@"car.png" title:@"当前车流" bgColor:[UIColor colorWithRed:79/255.0 green:143/255.0 blue:248/255.0 alpha:1] unit:@"次" defValue:[NSNumber numberWithInt:0]];
[self.energy loadDefaults:@"energy.png" title:@"能耗" bgColor:[UIColor colorWithRed:149/255.0 green:200/255.0 blue:8/255.0 alpha:1] unit:@"单位" defValue:[NSNumber numberWithInt:0]];
[self.complaint loadDefaults:@"complaint.png" title:@"投诉" bgColor:[UIColor colorWithRed:252/255.0 green:67/255.0 blue:62/255.0 alpha:1] unit:@"次" defValue:[NSNumber numberWithInt:0]];
[self.traffic loadDefaults:@"car.png" title:@"租售比" bgColor:[UIColor colorWithRed:79/255.0 green:143/255.0 blue:248/255.0 alpha:1] unit:@"%" defValue:[NSNumber numberWithInt:0]];
[self.energy loadDefaults:@"energy.png" title:@"坪效" bgColor:[UIColor colorWithRed:149/255.0 green:200/255.0 blue:8/255.0 alpha:1] unit:@"元" defValue:[NSNumber numberWithInt:0]];
[self.complaint loadDefaults:@"complaint.png" title:@"客单价" bgColor:[UIColor colorWithRed:252/255.0 green:67/255.0 blue:62/255.0 alpha:1] unit:@"元" defValue:[NSNumber numberWithInt:0]];
}
- (void)unload
......@@ -66,9 +66,9 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
if (nil != summary) {
[self.salesInfo setData:summary.salesAmount];
[self.passenger setData:summary.passengerFlowVolume];
[self.traffic setData:summary.trafficVolume];
[self.energy setData:[NSNumber numberWithInt:0]];
[self.complaint setData:[NSNumber numberWithInt:0]];
[self.traffic setData:[NSNumber numberWithFloat:15.16]];
[self.energy setData:[NSNumber numberWithInt:789]];
[self.complaint setData:[NSNumber numberWithInt:103]];
}
}
......
......@@ -155,7 +155,7 @@
image-mode: center;
width: 20px;
height: auto;
margin-top: 18px;
margin-top: 13px;
margin-right: 5px;
}
......@@ -171,7 +171,7 @@
width: auto;
height: auto;
color: white;
font-size: 30px;
font-size: 25px;
font-weight: bold;
line-num: 1;
fit-width: true;
......@@ -183,7 +183,7 @@
height: auto;
color: #fbd6d7;
font-size: 12px;
margin-top: 15px;
margin-top: 10px;
margin-left: 5px;
line-num: 1;
fit-width: true;
......
......@@ -41,6 +41,7 @@ DEF_MODEL(VankeWeatherModel, model)
if (!force) {
if([_model loadCache:curCity]) {
[self refreshUI];
return;
}
}
......
......@@ -12,7 +12,7 @@
<image id="imgWeatherIcon" />
<label id="lblCityName">上海</label>
<image id="imgPosIcon" src="location_icon.png" />
</linear/>
</linear>
</linear>
<linear class="sec-row" orientation="h">
......
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeNoticeBoard_iPhone.h
// vanke
//
// Created by xiaomi on 15/11/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#import "VankeNoticeListAPI.h"
#import "VankeBaseBoard.h"
#pragma mark -
@interface VankeNoticeBoard_iPhone : VankeBaseBoard
@property (strong, nonatomic) Notice* data;
AS_OUTLET( BeeUIView, viewAtts )
@end
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeNoticeBoard_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeNoticeBoard_iPhone.h"
#import "VankeUtil.h"
#pragma mark -
@interface VankeNoticeBoard_iPhone()
{
BOOL addBordered;
}
@end
@implementation VankeNoticeBoard_iPhone
@synthesize data = _data;
SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )
DEF_OUTLET( BeeUIView, viewAtts )
- (void)load
{
}
- (void)unload
{
}
#pragma mark - Signal
ON_CREATE_VIEWS( signal )
{
[UIApplication sharedApplication].statusBarHidden = NO;
self.navigationBarShown = YES;
self.title = @"公告";
self.allowedSwipeToBack = YES;
addBordered = NO;
}
ON_DELETE_VIEWS( signal )
{
}
ON_LAYOUT_VIEWS( signal )
{
if (!addBordered) {
[VankeUtil drawDashedBorderAroundView:self.viewAtts cornerRadius:5 borderWidth:1 borderColor:[UIColor grayColor]];
addBordered = YES;
}
}
ON_WILL_APPEAR( signal )
{
}
ON_DID_APPEAR( signal )
{
}
ON_WILL_DISAPPEAR( signal )
{
}
ON_DID_DISAPPEAR( signal )
{
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeNoticeBoard_iPhone">
<linear orientation="v" class="wrapper">
<image class="bg" />
<linear orientation="h" class="title-wrapper">
<image class="bg" />
<label id="lblTitle" class="title">通知标题</title>
</linear>
<linear orientation="h" class="row lbl-row">
<label class="label">发布人</label>
<label class="label">发布日期</label>
</linear>
<linear orientation="h" class="row">
<label id="lblPublisher" class="value">张三</label>
<label id="lblPublishTime" class="value">2014-03-01</label>
</linear>
<linear orientation="v" class="row lbl-row">
<label class="label">内容</label>
</linear>
<linear orientation="v" class="row multi-row">
<label id="lblContent" class="value">这里是重要通知</label>
</linear>
<linear orientation="v" class="row lbl-row">
<label class="label">附件</label>
</linear>
<view id="viewAtts" class="att-wrapper"></view>
</linear>
<style type="text/css">
.wrapper {
width: 100%;
height: 100%;
}
.wrapper > .bg {
position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background-color: #fafafa;
}
.title-wrapper {
width: 100%;
height: 50px;
align: center;
v-align: center;
margin-top: 80px;
margin-bottom: 10px;
}
.title-wrapper > .bg {
position: absolute;
top: 5px;
left: 0px;
image-src: url(AnnounceTitleBG.png);
image-mode: fit;
}
.title-wrapper .title {
width: 100%;
height: auto;
text-align: center;
color: white;
font-weight: bold;
font-size: 17px;
}
.row {
width: 100%;
height: 30px;
padding-left: 20px;
padding-right: 20px;
}
.lbl-row {
margin-top: 10px;
}
.row .label,
.row .value {
height: 100%;
width: 50%;
}
.row .label {
font-size: 15px;
color: rgb(71,143,241);
}
.row .value {
font-size: 15px;
color: gray;
}
.multi-row {
height: auto;
width: 100%;
}
.multi-row .value {
height: auto;
width: 100%;
line-num: 5;
}
.att-wrapper {
height: 120px;
width: 100%;
padding: 0px 20px 0px 20px;
/*border-width: 1px;
border-radius: 5px;
border-color: gray;*/
background-color: white;
}
</style>
</ui>
#import "Bee.h"
#import "VankeNoticeListAPI.h"
#pragma mark -
@interface VankeNoticeListBoardCell_iPhone : BeeUICell
AS_OUTLET( BeeUIImageView, imgPriority )
AS_OUTLET( BeeUILabel, lblPriority )
AS_OUTLET( BeeUILabel, lblTitle )
AS_OUTLET( BeeUILabel, lblPublisher )
AS_OUTLET( BeeUILabel, lblPublishTime )
@end
#import "VankeNoticeListBoardCell_iPhone.h"
#import "VankeUtil.h"
#pragma mark -
@implementation VankeNoticeListBoardCell_iPhone
SUPPORT_RESOURCE_LOADING(YES)
SUPPORT_AUTOMATIC_LAYOUT(YES)
DEF_OUTLET( BeeUIImageView, imgPriority )
DEF_OUTLET( BeeUILabel, lblPriority )
DEF_OUTLET( BeeUILabel, lblTitle )
DEF_OUTLET( BeeUILabel, lblPublisher )
DEF_OUTLET( BeeUILabel, lblPublishTime )
- (BOOL)dataWillChange:(id)newData
{
return newData != self.data;
}
- (void)dataDidChanged
{
Notice *obj = self.data;
if (nil == obj) {
return;
}
$(self.lblTitle).DATA(obj.title);
[self setPriority:obj.priority];
$(self.lblPublisher).DATA([NSString stringWithFormat:@"发布人: %@", obj.publisher]);
$(self.lblPublishTime).DATA([NSString stringWithFormat:@"发布时间: %@", obj.publishTime]);
}
-(void) setPriority: (NSString*) priority {
$(self.imgPriority).REMOVE_CLASS(@"low");
$(self.imgPriority).REMOVE_CLASS(@"medium");
$(self.imgPriority).REMOVE_CLASS(@"high");
if ([priority eq:@"低"]) {
$(self.imgPriority).ADD_CLASS(@"low");
} else if ([priority eq:@"中"]) {
$(self.imgPriority).ADD_CLASS(@"medium");
} else if ([priority eq:@"高"]) {
$(self.imgPriority).ADD_CLASS(@"high");
}
$(self.lblPriority).DATA(priority);
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeNoticeListBoardCell_iPhone">
<linear orientation="h" class="wrapper">
<button id="mask" class="mask"/>
<linear orientation="v" class="flag-wrapper">
<image id="imgPriority" class="flag" />
<label id="lblPriority" class="desc" />
</linear>
<linear orientation="v" class="content-wrapper">
<linear orientation="h" class="title-wrapper">
<label id="lblTitle" class="title" />
</linear>
<linear orientation="h" class="publish-wrapper">
<label id="lblPublisher" class="publisher" />
<label id="lblPublishTime" class="publish-time" />
</linear>
</linear>
<linear orientation="v" class="indicator-wrapper">
<image class="indicator" />
</linear>
</linear>
<style type="text/css">
.wrapper {
width: 100%;
height: 100%;
padding-bottom: 1px;
}
.mask {
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
background-color: white;
}
.flag-wrapper {
width: 50px;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
align: center;
}
.flag-wrapper .flag {
}
.flag-wrapper .desc {
color: white;
width: 100%;
text-align: center;
}
.low {
image-src: url(PriorityTagGreen.png);
}
.medium {
image-src: url(PriorityTagOrange.png);
}
.high {
image-src: url(PriorityTagRed.png);
}
.content-wrapper {
width: 100%;
height: 100%;
padding: 10px 40px 0px 50px;
}
.content-wrapper .title-wrapper,
.content-wrapper .publish-wrapper {
width: 100%;
height: 50%;
}
.publisher, .publish-time {
width: auto;
height: auto;
color: gray;
}
.publish-time {
float: right;
}
.indicator-wrapper {
width: 30px;
height: 100%;
position: absolute;
right: 0px;
top: 0px;
v-align: center;
}
.indicator-wrapper .indicator {
image-src: url(right_arrow.png);
width: auto;
height: auto;
}
</style>
</ui>
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeNoticeListBoard_iPhone.h
// vanke
//
// Created by xiaomi on 15/11/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#import "VankeBaseBoard.h"
#import "VankeNoticeListModel.h"
#pragma mark -
@interface VankeNoticeListBoard_iPhone : VankeBaseBoard
AS_MODEL( VankeNoticeListModel, model )
AS_OUTLET( BeeUISegmentedControl, segment )
AS_OUTLET( BeeUIScrollView, list );
@end
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeNoticeListBoard_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeNoticeListBoard_iPhone.h"
#import "GEToast.h"
#import "VankeUtil.h"
#import "PullLoader.h"
#import "FootLoader.h"
#import "NoDataCell_iPhoneCell.h"
#import "VankeNoticeBoard_iPhone.h"
#import "VankeNoticeListBoardCell_iPhone.h"
#define SEGMENT_UNREAD 0
#define SEGMENT_READED 1
#pragma mark -
@interface VankeNoticeListBoard_iPhone()
{
//<#@private var#>
}
@end
@implementation VankeNoticeListBoard_iPhone
SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )
DEF_MODEL( VankeNoticeListModel, model )
DEF_OUTLET( BeeUISegmentedControl, segment )
DEF_OUTLET( BeeUIScrollView, list )
- (void)load
{
self.model = [VankeNoticeListModel modelWithObserver:self];
}
- (void)unload
{
self.model = nil;
}
#pragma mark - Signal
ON_CREATE_VIEWS( signal )
{
[UIApplication sharedApplication].statusBarHidden = NO;
self.navigationBarShown = YES;
self.title = @"公告";
self.allowedSwipeToBack = YES;
[self.segment addTitle:@"未读" tag: SEGMENT_UNREAD];
[self.segment addTitle:@"已读" tag: SEGMENT_READED];
self.segment.tintColor = [UIColor whiteColor];
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor blackColor],NSForegroundColorAttributeName, nil];
[self.segment setTitleTextAttributes:dic forState:UIControlStateSelected];
NSDictionary *dic2 = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor blackColor],NSForegroundColorAttributeName, nil];
[self.segment setTitleTextAttributes:dic2 forState:UIControlStateNormal];
self.segment.selectedTag = SEGMENT_UNREAD;
self.list.headerClass = [PullLoader class];
self.list.headerShown = YES;
self.list.footerClass = [FootLoader class];
self.list.footerShown = YES;
self.list.lineCount = 1;
self.list.animationDuration = 0.2f;
self.list.baseInsets = bee.ui.config.baseInsets;
self.list.whenReloading = ^
{
self.list.total = self.model.notices.count;
if (self.model.loaded && self.list.total <= 0) {
self.list.total = 1;
BeeUIScrollItem * item = self.list.items[0];
item.size = CGSizeMake( self.list.width, 50);
item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [NoDataCell_iPhoneCell class];
item.data = @"没有数据,请稍后重试!";
} else {
for ( BeeUIScrollItem * item in self.list.items )
{
item.size = CGSizeMake( self.list.width, 80 );
item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [VankeNoticeListBoardCell_iPhone class];
item.data = [self.model.notices safeObjectAtIndex:item.index];
}
}
};
self.list.whenReloaded = ^
{
};
self.list.whenAnimated = ^
{
};
self.list.whenScrolling = ^
{
};
self.list.whenStop = ^
{
};
self.list.whenHeaderRefresh = ^
{
[self.model firstPage];
};
self.list.whenFooterRefresh = ^
{
[self.model nextPage];
};
self.model.publishTimeBegin = @"";
}
ON_DELETE_VIEWS( signal )
{
}
ON_LAYOUT_VIEWS( signal )
{
}
ON_WILL_APPEAR( signal )
{
self.navigationBarShown = YES;
if ( NO == self.model.loaded )
{
[self.model firstPage];
}
[BeeUIRouter sharedInstance].view.pannable = YES;
}
ON_DID_APPEAR( signal )
{
}
ON_WILL_DISAPPEAR( signal )
{
[BeeUIRouter sharedInstance].view.pannable = NO;
}
ON_DID_DISAPPEAR( signal )
{
}
ON_SIGNAL3( BeeUINavigationBar, LEFT_TOUCHED, signal )
{
}
ON_SIGNAL3( BeeUINavigationBar, RIGHT_TOUCHED, signal )
{
}
#pragma UISegmentedControl
ON_SIGNAL3( VankeNoticeListBoard_iPhone, segment, signal )
{
NSLog(@"Seg.selectedSegmentTag:%d",self.segment.selectedTag);
}
#pragma mark VankeNoticeListBoardCell_iPhone
ON_SIGNAL3( VankeNoticeListBoardCell_iPhone, mask, signal )
{
VankeNoticeBoard_iPhone *board = [VankeNoticeBoard_iPhone board];
board.data = signal.sourceCell.data;
[self.stack pushBoard:board animated:YES];
}
#pragma mark model
ON_SIGNAL3( VankeNoticeListModel, RELOADING, signal )
{
[GEToast showProgress:self.view];
self.list.headerLoading = YES;
self.list.footerLoading = YES;
}
ON_SIGNAL3( VankeNoticeListModel, RELOADED, signal )
{
[GEToast hideProgress];
self.list.headerLoading = NO;
self.list.footerLoading = NO;
self.list.footerMore = self.model.more;
[self.list reloadData];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeNoticeListBoard_iPhone">
<linear orientation="v" class="wrapper">
<image class="bg" />
<list id="list"/>
<linear orientation="v" class="segment-wrapper">
<image class="bg" />
<segment id="segment" />
</linear/>
</linear>
<style type="text/css">
.wrapper {
width: 100%;
height: 100%;
}
.bg {
position: absolute;
width: 100%;
height: 100%;
background-color: #fafafa;
}
.segment-wrapper {
height: 45px;
width: 100%;
position: absolute;
left: 0px;
top: 64px;
}
#segment {
height: 100%;
width: 100%;
}
#list {
position: absolute;
left: 0px;
top: 45px;
width: 100%;
height: 100%;
}
</style>
</ui>
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