V5.0.0正式版:

1、加热棒内容修改;
2、首页商品删除,更改为行业资讯;
3、绚多设备更名显示;
4、bugly更换为新版本;
5、摄像头显示bug修复;
6、开屏广告显示不全修复;
This commit is contained in:
wbzhan 2019-08-23 16:11:17 +08:00
parent 374a0fed46
commit 23c5d6f60d
50 changed files with 1499 additions and 897 deletions

View File

@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
3D13F835212FE2C200D725F7 /* IFishWaterChangeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D13F834212FE2C200D725F7 /* IFishWaterChangeView.m */; };
3D13F837212FE2D100D725F7 /* IFishWaterChangeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3D13F836212FE2D100D725F7 /* IFishWaterChangeView.xib */; };
3D13F83B212FE48000D725F7 /* UIView+GetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D13F839212FE47F00D725F7 /* UIView+GetView.m */; };
3D1C17452171BB0700A159A8 /* PNPieChartDataItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D1C17222171BB0600A159A8 /* PNPieChartDataItem.m */; };
3D1C17462171BB0700A159A8 /* PNChartLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D1C17272171BB0600A159A8 /* PNChartLabel.m */; };
@ -230,7 +229,6 @@
3D1C5148221A9EE10096AE43 /* IFISHYooseeImg.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3D1C5034221A9EDD0096AE43 /* IFISHYooseeImg.bundle */; };
3D1C5149221A9EE10096AE43 /* Common-Configuration.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3D1C5035221A9EDD0096AE43 /* Common-Configuration.plist */; };
3D34479A212CF71C00CF3941 /* IfishHotBarVc.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D344798212CF71C00CF3941 /* IfishHotBarVc.m */; };
3D34479B212CF71C00CF3941 /* IfishHotBarVc.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3D344799212CF71C00CF3941 /* IfishHotBarVc.xib */; };
3D3447A0212D113D00CF3941 /* IFishHotBarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D34479E212D113D00CF3941 /* IFishHotBarCell.m */; };
3D3447A1212D113D00CF3941 /* IFishHotBarCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3D34479F212D113D00CF3941 /* IFishHotBarCell.xib */; };
3D3447A5212D1C3800CF3941 /* IfishHotBarVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D3447A4212D1C3800CF3941 /* IfishHotBarVo.m */; };
@ -2115,7 +2113,6 @@
88C1B2D41DD1ADB600C2C99A /* live_navicon_look@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88C1B2D11DD1ADB600C2C99A /* live_navicon_look@2x.png */; };
88C1B2D51DD1ADB600C2C99A /* live_navicon_look@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88C1B2D21DD1ADB600C2C99A /* live_navicon_look@3x.png */; };
88C1B2D71DD1AEEA00C2C99A /* kankan_listbanner.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 88C1B2D61DD1AEEA00C2C99A /* kankan_listbanner.jpg */; };
88C49B4B1EA6270B002BA5A8 /* Bugly.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88C49B4A1EA6270B002BA5A8 /* Bugly.framework */; };
88C598921E9F4E5D00BDC812 /* ShopUserDatailData.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C598911E9F4E5D00BDC812 /* ShopUserDatailData.m */; };
88C598951EA0605600BDC812 /* KebordExternAddTextInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C598941EA0605600BDC812 /* KebordExternAddTextInputView.m */; };
88C598971EA0608200BDC812 /* KebordExternAddTextInputView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88C598961EA0608200BDC812 /* KebordExternAddTextInputView.xib */; };
@ -2399,6 +2396,9 @@
CB7D6AF22296A6910014E5C7 /* UTDID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB7D6AEF2296A68E0014E5C7 /* UTDID.framework */; };
CB7D6AF32296A6910014E5C7 /* AlicloudUtils.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB7D6AF02296A6900014E5C7 /* AlicloudUtils.framework */; };
CB7D6AF42296A6910014E5C7 /* UTMini.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB7D6AF12296A6910014E5C7 /* UTMini.framework */; };
CB8B6468230F7F980032EB24 /* IfishMainInfoCell.h in Headers */ = {isa = PBXBuildFile; fileRef = CB8B6466230F7F980032EB24 /* IfishMainInfoCell.h */; };
CB8B6469230F7F980032EB24 /* IfishMainInfoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CB8B6467230F7F980032EB24 /* IfishMainInfoCell.m */; };
CB8B646C230FAD340032EB24 /* Bugly.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB8B646B230FAD340032EB24 /* Bugly.framework */; };
CBA615FC228E8E5A00ED380D /* MyMessageViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = CBA615FA228E8E5A00ED380D /* MyMessageViewController.h */; };
CBA615FD228E8E5A00ED380D /* MyMessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CBA615FB228E8E5A00ED380D /* MyMessageViewController.m */; };
CBA6164C228F993B00ED380D /* BaseYYModel.h in Headers */ = {isa = PBXBuildFile; fileRef = CBA6164A228F993B00ED380D /* BaseYYModel.h */; };
@ -2547,7 +2547,6 @@
/* Begin PBXFileReference section */
3D13F833212FE2C200D725F7 /* IFishWaterChangeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IFishWaterChangeView.h; sourceTree = "<group>"; };
3D13F834212FE2C200D725F7 /* IFishWaterChangeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IFishWaterChangeView.m; sourceTree = "<group>"; };
3D13F836212FE2D100D725F7 /* IFishWaterChangeView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IFishWaterChangeView.xib; sourceTree = "<group>"; };
3D13F839212FE47F00D725F7 /* UIView+GetView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+GetView.m"; sourceTree = "<group>"; };
3D13F83A212FE47F00D725F7 /* UIView+GetView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+GetView.h"; sourceTree = "<group>"; };
3D1C17202171BB0600A159A8 /* PNChart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PNChart.h; sourceTree = "<group>"; };
@ -2792,7 +2791,6 @@
3D1C5069215CB6F600A2E5D6 /* IfishHotBarHeader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IfishHotBarHeader.m; sourceTree = "<group>"; };
3D344797212CF71C00CF3941 /* IfishHotBarVc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IfishHotBarVc.h; sourceTree = "<group>"; };
3D344798212CF71C00CF3941 /* IfishHotBarVc.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IfishHotBarVc.m; sourceTree = "<group>"; };
3D344799212CF71C00CF3941 /* IfishHotBarVc.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IfishHotBarVc.xib; sourceTree = "<group>"; };
3D34479D212D113D00CF3941 /* IFishHotBarCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IFishHotBarCell.h; sourceTree = "<group>"; };
3D34479E212D113D00CF3941 /* IFishHotBarCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IFishHotBarCell.m; sourceTree = "<group>"; };
3D34479F212D113D00CF3941 /* IFishHotBarCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IFishHotBarCell.xib; sourceTree = "<group>"; };
@ -5418,7 +5416,6 @@
88C1B2D11DD1ADB600C2C99A /* live_navicon_look@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "live_navicon_look@2x.png"; sourceTree = "<group>"; };
88C1B2D21DD1ADB600C2C99A /* live_navicon_look@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "live_navicon_look@3x.png"; sourceTree = "<group>"; };
88C1B2D61DD1AEEA00C2C99A /* kankan_listbanner.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = kankan_listbanner.jpg; sourceTree = "<group>"; };
88C49B4A1EA6270B002BA5A8 /* Bugly.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bugly.framework; sourceTree = "<group>"; };
88C598901E9F4E5D00BDC812 /* ShopUserDatailData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopUserDatailData.h; sourceTree = "<group>"; };
88C598911E9F4E5D00BDC812 /* ShopUserDatailData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopUserDatailData.m; sourceTree = "<group>"; };
88C598931EA0605600BDC812 /* KebordExternAddTextInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KebordExternAddTextInputView.h; sourceTree = "<group>"; };
@ -5796,6 +5793,9 @@
CB7D6AF02296A6900014E5C7 /* AlicloudUtils.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlicloudUtils.framework; sourceTree = "<group>"; };
CB7D6AF12296A6910014E5C7 /* UTMini.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = UTMini.framework; sourceTree = "<group>"; };
CB7D6AF52296A6FF0014E5C7 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
CB8B6466230F7F980032EB24 /* IfishMainInfoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IfishMainInfoCell.h; path = ../../IfishDeviceSelectList/IfishMainInfoCell.h; sourceTree = "<group>"; };
CB8B6467230F7F980032EB24 /* IfishMainInfoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = IfishMainInfoCell.m; path = ../../IfishDeviceSelectList/IfishMainInfoCell.m; sourceTree = "<group>"; };
CB8B646B230FAD340032EB24 /* Bugly.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bugly.framework; sourceTree = "<group>"; };
CBA615FA228E8E5A00ED380D /* MyMessageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyMessageViewController.h; sourceTree = "<group>"; };
CBA615FB228E8E5A00ED380D /* MyMessageViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyMessageViewController.m; sourceTree = "<group>"; };
CBA6164A228F993B00ED380D /* BaseYYModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseYYModel.h; sourceTree = "<group>"; };
@ -5995,10 +5995,10 @@
88C6861A1EA60FD6004CDFD9 /* VideoToolbox.framework in Frameworks */,
3D1C50B5221A9EDF0096AE43 /* YSlider.a in Frameworks */,
88C686181EA60EDA004CDFD9 /* MessageUI.framework in Frameworks */,
88C49B4B1EA6270B002BA5A8 /* Bugly.framework in Frameworks */,
88C686161EA60EB3004CDFD9 /* CoreText.framework in Frameworks */,
88C686141EA60EA9004CDFD9 /* WebKit.framework in Frameworks */,
CB7D6AF32296A6910014E5C7 /* AlicloudUtils.framework in Frameworks */,
CB8B646C230FAD340032EB24 /* Bugly.framework in Frameworks */,
88C686011EA603A8004CDFD9 /* UShareUI.framework in Frameworks */,
88C685F91EA603A8004CDFD9 /* libSocialWeChat.a in Frameworks */,
CB484E4522B8CF9B0075F050 /* UTMini.framework in Frameworks */,
@ -6485,7 +6485,6 @@
3D34479C212D111900CF3941 /* Views */,
3D344797212CF71C00CF3941 /* IfishHotBarVc.h */,
3D344798212CF71C00CF3941 /* IfishHotBarVc.m */,
3D344799212CF71C00CF3941 /* IfishHotBarVc.xib */,
3D8F649821571D7C00F04BD3 /* HitbarWifeVc.h */,
3D8F649921571D7C00F04BD3 /* HitbarWifeVc.m */,
3D8F64C22157791D00F04BD3 /* IfishBaseVc.h */,
@ -6505,7 +6504,6 @@
3D34479F212D113D00CF3941 /* IFishHotBarCell.xib */,
3D13F833212FE2C200D725F7 /* IFishWaterChangeView.h */,
3D13F834212FE2C200D725F7 /* IFishWaterChangeView.m */,
3D13F836212FE2D100D725F7 /* IFishWaterChangeView.xib */,
3D5C436C21339E9D00E15B66 /* IfishHistoryView.h */,
3D5C436D21339E9D00E15B66 /* IfishHistoryView.m */,
3D5C436F21339EAB00E15B66 /* IfishHistoryView.xib */,
@ -10480,6 +10478,8 @@
88653C971E7640CA00FF973E /* View */ = {
isa = PBXGroup;
children = (
CB8B6466230F7F980032EB24 /* IfishMainInfoCell.h */,
CB8B6467230F7F980032EB24 /* IfishMainInfoCell.m */,
887491F01E7921E400CDA284 /* IfishInformationListViewCell.h */,
887491F11E7921E400CDA284 /* IfishInformationListViewCell.m */,
887491F21E7921E400CDA284 /* IfishInformationListViewCell.xib */,
@ -11638,14 +11638,6 @@
path = MineKankan;
sourceTree = "<group>";
};
88C49B491EA6270B002BA5A8 /* Bugly-v2.4.7 */ = {
isa = PBXGroup;
children = (
88C49B4A1EA6270B002BA5A8 /* Bugly.framework */,
);
path = "Bugly-v2.4.7";
sourceTree = "<group>";
};
88C598981EA0965B00BDC812 /* LBLaunchImageAd */ = {
isa = PBXGroup;
children = (
@ -11840,8 +11832,8 @@
88F5ECA41D48C9C400CC7CAF /* ThirdPartUnity */ = {
isa = PBXGroup;
children = (
CB8B646A230FAD250032EB24 /* Bugly */,
CB484E2022B8CF9A0075F050 /* AlibcTradeSDK-3.1.1.96 */,
88C49B491EA6270B002BA5A8 /* Bugly-v2.4.7 */,
88C6860D1EA60A40004CDFD9 /* TalkingDataV2.2.88 */,
88C685C81EA603A8004CDFD9 /* UMSocial */,
883E7BC81EA5FA1A00ED5D89 /* SMS_SDK */,
@ -12382,6 +12374,14 @@
path = AliPush;
sourceTree = "<group>";
};
CB8B646A230FAD250032EB24 /* Bugly */ = {
isa = PBXGroup;
children = (
CB8B646B230FAD340032EB24 /* Bugly.framework */,
);
path = Bugly;
sourceTree = "<group>";
};
CBA615F6228E526C00ED380D /* message */ = {
isa = PBXGroup;
children = (
@ -12563,6 +12563,7 @@
3D1C5116221A9EE00096AE43 /* KTPhotoView+SDWebImage.h in Headers */,
3D1C50BB221A9EE00096AE43 /* RegisterResult.h in Headers */,
CBA6167F228F9AB100ED380D /* MASViewConstraint.h in Headers */,
CB8B6468230F7F980032EB24 /* IfishMainInfoCell.h in Headers */,
CB484E1122B8C8C90075F050 /* version.h in Headers */,
3D1C5122221A9EE00096AE43 /* IfishRecVideoViewCell.h in Headers */,
CB484DFD22B8C8C80075F050 /* old_pix_fmts.h in Headers */,
@ -14112,7 +14113,6 @@
8856B0E91DEC15F5009D384A /* home_popup_cancel@3x.png in Resources */,
882955E01DBDA3A100E9DDD7 /* delete_device.png in Resources */,
8891332A1ECE99B900F52EBC /* recording_iocn_back@3x.png in Resources */,
3D34479B212CF71C00CF3941 /* IfishHotBarVc.xib in Resources */,
881A1D461DD41A1A00BA1AF4 /* MineKanEditSec1firstCell.xib in Resources */,
8856B0E11DEC15F5009D384A /* home_popup_back.png in Resources */,
883518021E6664D200FCBE56 /* fishrank_yaksha@2x.png in Resources */,
@ -14130,7 +14130,6 @@
882956031DBDA3A100E9DDD7 /* neves0006.png in Resources */,
88C1B2111DCC5A1400C2C99A /* personal_iocn_about.png in Resources */,
883283A11EAF4C7300A47157 /* record_label_default@2x.png in Resources */,
3D13F837212FE2D100D725F7 /* IFishWaterChangeView.xib in Resources */,
883283471EAEE60500A47157 /* ifish_look_off@3x.png in Resources */,
8849EFBC1EB883840096CAD7 /* enter_padlock.png in Resources */,
885606B21E320AAF0002C17C /* home_care_popup@3x.png in Resources */,
@ -15069,6 +15068,7 @@
886EAC5C1E2DC87E00A4DF27 /* IfishShopInfo.m in Sources */,
3D1C50C8221A9EE00096AE43 /* Alarm.m in Sources */,
881671A61EA5DE2B00BEBF23 /* UMComLocationListDataController.m in Sources */,
CB8B6469230F7F980032EB24 /* IfishMainInfoCell.m in Sources */,
FA0892F62270BED00084A609 /* XuanduoHuliModel.m in Sources */,
3D1C5106221A9EE00096AE43 /* CameraNoParyBackVideoView.m in Sources */,
881671AD1EA5DE2B00BEBF23 /* UMComUserListDataController.m in Sources */,
@ -15355,6 +15355,7 @@
"$(PROJECT_DIR)/Ifish/AliPush",
"$(PROJECT_DIR)/Ifish/GWP2PSDK",
"$(PROJECT_DIR)/Ifish/AlibcTradeSDK-3.1.1.96/Frameworks",
"$(PROJECT_DIR)/Ifish/Bugly",
);
GCC_PREFIX_HEADER = "Ifish/Ifish-Prefix.pch";
HEADER_SEARCH_PATHS = "";
@ -15468,6 +15469,7 @@
"$(PROJECT_DIR)/Ifish/AliPush",
"$(PROJECT_DIR)/Ifish/GWP2PSDK",
"$(PROJECT_DIR)/Ifish/AlibcTradeSDK-3.1.1.96/Frameworks",
"$(PROJECT_DIR)/Ifish/Bugly",
);
GCC_PREFIX_HEADER = "Ifish/Ifish-Prefix.pch";
HEADER_SEARCH_PATHS = "";

BIN
Ifish/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "change_tep_bottom@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "change_tep_title@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,27 +1,5 @@
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default-1.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x-1.png",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x-2.png",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
@ -32,12 +10,11 @@
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : " Retina5.5-1.png",
"minimum-system-version" : "8.0",
"orientation" : "landscape",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "736h",
"scale" : "3x"
},
{
@ -65,6 +42,28 @@
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default-1.png",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x-1.png",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"filename" : "Default@2x-2.png",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
}
],
"info" : {

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "history_bg@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,144 @@
//
// Bugly.h
//
// Version: 2.5(0)
//
// Copyright (c) 2017年 Tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "BuglyConfig.h"
#import "BuglyLog.h"
BLY_START_NONNULL
@interface Bugly : NSObject
/**
* Bugly,使BuglyConfig
*
* @param appId Bugly分配的应用唯一标识
*/
+ (void)startWithAppId:(NSString * BLY_NULLABLE)appId;
/**
* 使Bugly
*
* @param appId Bugly分配的应用唯一标识
* @param config BuglyConfig
*/
+ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
config:(BuglyConfig * BLY_NULLABLE)config;
/**
* 使Bugly
*
* @param appId Bugly分配的应用唯一标识
* @param development
* @param config BuglyConfig
*/
+ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
developmentDevice:(BOOL)development
config:(BuglyConfig * BLY_NULLABLE)config;
/**
*
*
* @param userId
*/
+ (void)setUserIdentifier:(NSString *)userId;
/**
*
*
* @param version
*/
+ (void)updateAppVersion:(NSString *)version;
/**
*
*
* @param value KEY
* @param key VALUE
*/
+ (void)setUserValue:(NSString *)value
forKey:(NSString *)key;
/**
*
*
* @return
*/
+ (NSDictionary * BLY_NULLABLE)allUserValues;
/**
*
*
* @param tag ID
*/
+ (void)setTag:(NSUInteger)tag;
/**
*
*
* @return ID
*/
+ (NSUInteger)currentTag;
/**
* ID
*
* @return ID
*/
+ (NSString *)buglyDeviceId;
/**
* Objective-C异常
*
* @param exception
*/
+ (void)reportException:(NSException *)exception;
/**
*
*
* @param error
*/
+ (void)reportError:(NSError *)error;
/**
* @brief
*
* @param category (Cocoa=3,CSharp=4,JS=5,Lua=6)
* @param aName
* @param aReason
* @param aStackArray
* @param info
* @param terminate 退
*/
+ (void)reportExceptionWithCategory:(NSUInteger)category
name:(NSString *)aName
reason:(NSString *)aReason
callStack:(NSArray *)aStackArray
extraInfo:(NSDictionary *)info
terminateApp:(BOOL)terminate;
/**
* SDK
*
* @return SDK版本号
*/
+ (NSString *)sdkVersion;
/**
* App 退
* SDK 5 退 3 退
*
* @return 退
*/
+ (BOOL)isAppCrashedOnStartUpExceedTheLimit;
BLY_END_NONNULL
@end

View File

@ -0,0 +1,126 @@
//
// BuglyConfig.h
// Bugly
//
// Copyright (c) 2016年 Tencent. All rights reserved.
//
#pragma once
#define BLY_UNAVAILABLE(x) __attribute__((unavailable(x)))
#if __has_feature(nullability)
#define BLY_NONNULL __nonnull
#define BLY_NULLABLE __nullable
#define BLY_START_NONNULL _Pragma("clang assume_nonnull begin")
#define BLY_END_NONNULL _Pragma("clang assume_nonnull end")
#else
#define BLY_NONNULL
#define BLY_NULLABLE
#define BLY_START_NONNULL
#define BLY_END_NONNULL
#endif
#import <Foundation/Foundation.h>
#import "BuglyLog.h"
BLY_START_NONNULL
@protocol BuglyDelegate <NSObject>
@optional
/**
*
*
* @param exception
*
* @return
*/
- (NSString * BLY_NULLABLE)attachmentForException:(NSException * BLY_NULLABLE)exception;
@end
@interface BuglyConfig : NSObject
/**
* SDK Debug信息开关,
*/
@property (nonatomic, assign) BOOL debugMode;
/**
*
*/
@property (nonatomic, copy) NSString *channel;
/**
*
*/
@property (nonatomic, copy) NSString *version;
/**
*
*/
@property (nonatomic, copy) NSString *deviceIdentifier;
/**
*
*/
@property (nonatomic) BOOL blockMonitorEnable;
/**
*
*/
@property (nonatomic) NSTimeInterval blockMonitorTimeout;
/**
* App Groups Id (使 Bugly iOS Extension SDK)
*/
@property (nonatomic, copy) NSString *applicationGroupIdentifier;
/**
*
*/
@property (nonatomic) BOOL symbolicateInProcessEnable;
/**
* 退
*/
@property (nonatomic) BOOL unexpectedTerminatingDetectionEnable;
/**
*
*/
@property (nonatomic) BOOL viewControllerTrackingEnable;
/**
* Bugly Delegate
*/
@property (nonatomic, assign) id<BuglyDelegate> delegate;
/**
* BuglyLogLevelSilent
* BuglyLogLevelWarnWarnError接口打印的日志
*/
@property (nonatomic, assign) BuglyLogLevel reportLogLevel;
/**
*
* SogouInputIPhone.dylib等
*/
@property (nonatomic, copy) NSArray *excludeModuleFilter;
/**
*
*/
@property (nonatomic, assign) BOOL consolelogEnable;
/**
* 退App一直没有退出abort进程退出
* 5s
* 0abort进程退出
*/
@property (nonatomic, assign) NSUInteger crashAbortTimeout;
@end
BLY_END_NONNULL

View File

@ -0,0 +1,78 @@
//
// BuglyLog.h
// Bugly
//
// Copyright (c) 2017年 Tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
// Log level for Bugly Log
typedef NS_ENUM(NSUInteger, BuglyLogLevel) {
BuglyLogLevelSilent = 0,
BuglyLogLevelError = 1,
BuglyLogLevelWarn = 2,
BuglyLogLevelInfo = 3,
BuglyLogLevelDebug = 4,
BuglyLogLevelVerbose = 5,
};
#pragma mark -
OBJC_EXTERN void BLYLog(BuglyLogLevel level, NSString *format, ...) NS_FORMAT_FUNCTION(2, 3);
OBJC_EXTERN void BLYLogv(BuglyLogLevel level, NSString *format, va_list args) NS_FORMAT_FUNCTION(2, 0);
#pragma mark -
#define BUGLY_LOG_MACRO(_level, fmt, ...) [BuglyLog level:_level tag:nil log:fmt, ##__VA_ARGS__]
#define BLYLogError(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelError, fmt, ##__VA_ARGS__)
#define BLYLogWarn(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelWarn, fmt, ##__VA_ARGS__)
#define BLYLogInfo(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelInfo, fmt, ##__VA_ARGS__)
#define BLYLogDebug(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelDebug, fmt, ##__VA_ARGS__)
#define BLYLogVerbose(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelVerbose, fmt, ##__VA_ARGS__)
#pragma mark - Interface
@interface BuglyLog : NSObject
/**
* @brief
*
* @param level BLYLogLevelSilent
*
* @param printConsole NO
*/
+ (void)initLogger:(BuglyLogLevel) level consolePrint:(BOOL)printConsole;
/**
* @brief BLYLogLevelInfo日志
*
* @param format 30k200
*/
+ (void)log:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2);
/**
* @brief
*
* @param level
* @param message 30k200
*/
+ (void)level:(BuglyLogLevel) level logs:(NSString *)message;
/**
* @brief
*
* @param level
* @param format 30k200
*/
+ (void)level:(BuglyLogLevel) level log:(NSString *)format, ... NS_FORMAT_FUNCTION(2, 3);
/**
* @brief
*
* @param level
* @param tag
* @param format 30k200
*/
+ (void)level:(BuglyLogLevel) level tag:(NSString *) tag log:(NSString *)format, ... NS_FORMAT_FUNCTION(3, 4);
@end

View File

@ -0,0 +1,12 @@
framework module Bugly {
umbrella header "Bugly.h"
export *
module * { export * }
link framework "Foundation"
link framework "Security"
link framework "SystemConfiguration"
link "c++"
link "z"
}

View File

@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.9.9</string>
<string>5.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@ -70,7 +70,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.9.14</string>
<string>10.0.1</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>

View File

@ -156,16 +156,12 @@
}else if ([devicemodel.type isEqualToString:DECICE_TYPE_hotBar]) {
IfishHotBarVc*barVc=[[IfishHotBarVc alloc]initWithNibName:@"IfishHotBarVc" bundle:nil];
IfishHotBarVc*barVc=InitObject(IfishHotBarVc);
barVc.devicemodel = devicemodel;
barVc.hidesBottomBarWhenPushed=YES;
UIApplication*app=[UIApplication sharedApplication];
AppDelegate*app1=(AppDelegate*)app.delegate;
// UINavigationController*nav=[[UINavigationController alloc]initWithRootViewController:barVc];
// [nav.navigationBar setBackgroundImage:[UIImage imageNamed:@"blackbar.png"] forBarMetrics:UIBarMetricsDefault];
// app1.window.rootViewController=nav;
// [((UINavigationController*)app1.window.rootViewController) pushViewController:barVc animated:YES];
UITabBarController*tabVc= (UITabBarController*)app1.window.rootViewController;
tabVc.selectedIndex=0;
UINavigationController*navVc=(UINavigationController*)tabVc.childViewControllers[tabVc.selectedIndex];

View File

@ -561,10 +561,9 @@
NSLog(@"点击绚多的设置的大响应按钮");
}
//
-(void)pushSetTimeVC{
_xuToSetVC=[[XuToSetViewController alloc] init];
_xuToSetVC.currentdevice=self.currentDevice;
[self.navigationController pushViewController:_xuToSetVC animated:YES];
//self.navigationBarHidden=NO;

View File

@ -8,6 +8,11 @@
#import "FatherController.h"
#import "Socketsingleton.h"
/**
*/
@interface XuToSetViewController : FatherController
{
@ -25,5 +30,4 @@
@property(nonatomic)int percent;
@property(nonatomic,strong) DeviceModel* currentdevice;
@end

View File

@ -37,7 +37,8 @@
#import "BrightnessModel.h"
#import "CreatErWeiMaController.h"
#import "UINavigationBar+Background.h"
#import "XuToControlName.h"
#import "UserExtendataArchaver.h"
@interface XuToSetViewController ()
{
@ -61,6 +62,8 @@
@property(nonatomic,strong)setRemindWaterModel*waterInfmodel;
@property(nonatomic) NSInteger tian;
Strong XuToControlName *xutoName;//
@end
@implementation XuToSetViewController
@ -74,7 +77,7 @@
self.navigationController.navigationBar.backItem.title=@"";
[self addTitleViewWithTitle:@"设置"];
[self initData];
self.xutoName = [UserExtendataArchaver currentXuToControlName:self.currentdevice.macAddress];
[self creatIndicatorView];
self.tableView.backgroundColor=COLOR_MIAN;
@ -447,8 +450,8 @@
}
}
[cell setTuToSetCellBackAtIndex:indexPath];
[cell setTuToSetCellBackAtIndex:indexPath andName1:self.xutoName.airPump andName2:self.xutoName.light1 andName3:self.xutoName.light2];
//cell

View File

@ -7,8 +7,9 @@
//
#import <UIKit/UIKit.h>
#import "MessageAlertView.h"
@interface IfishBaseVc : UIViewController
Strong MessageAlertView *popView;
-(void)socketDidGetBackmsgData:(NSData *)data onsoket:(AsyncSocket *)sock;
//已断开连接

View File

@ -7,15 +7,12 @@
//
#import "IfishBaseVc.h"
#import "LXPopView.h"
#import "DXPopover.h"
#import "CreatErWeiMaController.h"
#import "JHRefreshAmazingAniView.h"
#import "UIScrollView+JHRefresh.h"
@interface IfishBaseVc ()<IfishCommuniteDelegate,LxPopViewDelegate>
@property(nonatomic,strong)DXPopover *popover;
@interface IfishBaseVc ()<IfishCommuniteDelegate>
@end
@ -27,6 +24,8 @@
[Socketsingleton sharedInstance].communiteDelegate=self;
// Do any additional setup after loading the view.
//
[self initPopOver];
}
- (void)didReceiveMemoryWarning {
@ -138,76 +137,57 @@
return [str copy];
}
}
#pragma mark-
-(MessageAlertView *)popView{
if (!_popView) {
_popView = [[MessageAlertView alloc]initWithFrame:RECT(screen_width - kSizeFrom750(220), 0, kSizeFrom750(220), kSizeFrom750(270))];
WEAK_SELF;
//
_popView.comboxBlock = ^(NSInteger tag) {
if (tag == 0) {
//
[weakSelf shezhiMingCheng];
}else if (tag == 1){
//
[weakSelf deletDevice];
}else if (tag == 2){
//
[weakSelf fenXiangSheBei];
}
[weakSelf presentPopView];//
};
}
return _popView;
}
//
-(void)presentPopView{
UIImage *image = [UIImage imageNamed:@"popover_background_image_notrangle"];
NSArray *titleImgs = nil;
BOOL isHidden = self.popView.hidden;
if (isHidden) {
self.popView.hidden = NO;
}
[UIView animateWithDuration:0.3 animations:^{
self.popView.transform = CGAffineTransformScale(self.popView.transform,isHidden?100:0.01,isHidden?100:0.01);
} completion:^(BOOL finished) {
self.popView.hidden = !isHidden;
}];
}
-(void)initPopOver{
[self.view addSubview:self.popView];
NSArray *titleImgs =nil;
NSArray *titles=nil;
LXPopView *pop=[[LXPopView alloc] init];
CGFloat popRowH=160*(image.size.height/image.size.width);
if ([self.devicemodel.isMaster isEqualToString:@"1"]) {
//
pop.frame = CGRectMake(0, 0, 160, 160*(image.size.height/image.size.width) + (popRowH -12)/2);
titleImgs = @[@"ifishdropview_edite_device",@"ifishdropview_delect_device",@"Ifish_share_device"];
titles=@[@"修改名称",@"删除设备",@"分享设备"];
}else{
pop.frame = CGRectMake(0,0, 160, 160*(image.size.height/image.size.width));
titleImgs = @[@"ifishdropview_edite_device",@"ifishdropview_delect_device"];
titles=@[@"修改名称",@"删除设备"];
}
pop.delegate = self;
pop.backgroundImage =image
;
pop.titles = titles;
pop.titleImgs =titleImgs;
DXPopover *popover = [DXPopover popover];
self.popover = popover;
popover.arrowSize = CGSizeMake(0.0,0.0);
[popover showAtView:self.navigationItem.rightBarButtonItem.customView withContentView:pop];
NSLog(@"设备右侧pop");
[self.popView loadInfoWithTitle:titles Icons:titleImgs];
}
#pragma mark - PopViewDelagate
-(void)disSelectedPopViewIndex:(NSIndexPath *)Index{
[self.popover dismiss];
if (Index.row == 0) {
//
[self shezhiMingCheng];
}else if (Index.row == 1){
//
[self deletDevice];
}else if (Index.row == 2){
//
[self fenXiangSheBei];
}
}
#pragma mark -

View File

@ -11,6 +11,9 @@
#import "CenterViewController.h"
#import "IfishBaseVc.h"
/**
*/
@interface IfishHotBarVc :IfishBaseVc
@end

View File

@ -28,14 +28,15 @@
@interface IfishHotBarVc ()<UITableViewDelegate,UITableViewDataSource,ChangeWaterDelegate,IfishHistoryViewBottomBarDelete>
@property (weak, nonatomic) IBOutlet UITableView *mainTableView;
@property (strong, nonatomic) UITableView *mainTableView;
@property(nonatomic,strong)NSMutableArray*datas;
@property(nonatomic,strong)IFishWaterChangeView*changeWaterView;
@property(nonatomic,strong)IfishHistoryView*historyView;
@property (weak, nonatomic) IBOutlet UILabel *templetrueLable;
@property(nonatomic,strong)IfishHotBarVo*vo;
@property(nonatomic,strong)IfishHotBarHeader*header;
@property(nonatomic,assign)NSInteger curDay;
Assign BOOL isInitHostoryView;
@end
@implementation IfishHotBarVc
@ -52,9 +53,6 @@
return _header;
}
-(void)initUI{
}
-(void)wenduRequest{//
searchDeviceModel*xinxiModel=[[searchDeviceModel alloc]init];
@ -67,38 +65,23 @@
[[Socketsingleton sharedInstance].clientSocket readDataWithTimeout:-1 tag:0];
[self getHotBarInfo];
}
-(IfishHistoryView *)historyView{
if (_historyView==nil) {
_historyView=[IfishHistoryView getView];
_historyView.frame=self.view.bounds;
if (!_historyView) {
_historyView=InitObject(IfishHistoryView);
_historyView.myDeleget=self;
[self.view addSubview:_historyView];
[_historyView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
// _historyView.hidden=NO;
return _historyView;
}
-(void)clickBottomBarWithIdx:(NSInteger)idx{
if (idx==10) {
self.curDay++;
if (self.curDay>7) {
[SVProgressHUD showInfoWithStatus:@"只能查询前七天数据!"];
self.curDay=7;
return;
}
}else{
self.curDay--;
if(self.curDay<0){
[SVProgressHUD showInfoWithStatus:@"只能查询前七天数据!"];
self.curDay=0;
return;
}
}
//
-(void)getHistoryDataRequest{
self.isInitHostoryView = YES;
NSDate *curDate = [NSDate dateWithTimeInterval:self.curDay*60*60*-24 sinceDate:[NSDate date]];
NSDateFormatter *dateFormatter=[[NSDateFormatter alloc]init];//
@ -106,7 +89,7 @@
NSLog(@"%@",[dateFormatter stringFromDate:curDate]);//2015-11-20 08:24:04
NSString*curDateStr=[dateFormatter stringFromDate:curDate];
// __block NSString*b_dateStr=curDateStr;
// __block NSString*b_dateStr=curDateStr;
[SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeBlack];
NSDictionary*para=@{@"heaterMacAddress":self.devicemodel.macAddress,@"date":curDateStr};//yyyy-mm-dd
self.historyView.curdateStr=curDateStr;
@ -130,15 +113,37 @@
[SVProgressHUD showInfoWithStatus:@"网络在开小差,请稍后!"];
}];
}
-(void)clickBottomBarWithIdx:(NSInteger)idx{
if (idx==10) {
self.curDay++;
if (self.curDay>7) {
[SVProgressHUD showInfoWithStatus:@"只能查询前七天数据!"];
self.curDay=7;
return;
}
}else{
self.curDay--;
if(self.curDay<0){
[SVProgressHUD showInfoWithStatus:@"只能查询前七天数据!"];
self.curDay=0;
return;
}
}
[self getHistoryDataRequest];
}
#pragma mark-------
-(IFishWaterChangeView *)changeWaterView{
if(_changeWaterView==nil){
_changeWaterView=[IFishWaterChangeView getView];
_changeWaterView.frame=self.view.bounds;
_changeWaterView=[[IFishWaterChangeView alloc]init];
[self.view addSubview:_changeWaterView];
// [_changeWaterView.picker reloadAllComponents];
[self.changeWaterView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
_changeWaterView.myDelegate=self;
}
_changeWaterView.hidden=NO;
@ -216,8 +221,9 @@
vo.subTitle=@"";
[_datas addObject:vo];
// add V5.0.0
IfishHotBarVo*vo1=[[IfishHotBarVo alloc]init];
vo1.title=@"鱼缸容量 ";
vo1.title=@"预警温度 ";
vo1.iconUrl=@"容积图标";
vo1.isShowArrow=YES;
vo1.subTitle=@"";
@ -226,7 +232,7 @@
vo2.title=@"水泵流量";
vo2.iconUrl=@"流量标";
vo2.isShowArrow=NO;
vo2.subTitle=@"";
vo2.subTitle=@"无水";
[_datas addObject:vo2];
IfishHotBarVo*vo3=[[IfishHotBarVo alloc]init];
vo3.title=@"历史趋势";
@ -250,11 +256,17 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.isInitHostoryView = NO;
// Do any additional setup after loading the view from its nib.
self.mainTableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain];
[self.mainTableView registerNib:[UINib nibWithNibName:@"IFishHotBarCell" bundle:nil] forCellReuseIdentifier:HOTBARCELL];
self.mainTableView.rowHeight=70;
self.mainTableView.dataSource=self;
self.mainTableView.delegate=self;
[self.view addSubview:self.mainTableView];
[self.mainTableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
[self.mainTableView reloadData];
[self getHotBarInfo];
self.tableView=self.mainTableView;
@ -273,28 +285,15 @@
self.navigationItem.leftBarButtonItem=backItem;
self.navigationItem.rightBarButtonItem=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"ifishnav_dropview_list"] style:0 target:self action:@selector(clickMoreBtn)];
[self.view bringSubviewToFront:self.popView];
}
//-(void)updateNameInLocal{
// NSArray* deviceArr =[dataContorl getallDevices];
// for (DeviceModel *device in deviceArr) {
// if (device.deviceId==self.devicemodel.deviceId) {
// device.defaultShowName=self.title;
// [[DataCenter defaultDtacenter]setValue:deviceArr forKey:@"deviceInfo"];
// break;
// }
// }
//
//
//}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"blackbar.png"] forBarMetrics:UIBarMetricsDefault];
NSString*dTitle=[[NSUserDefaults standardUserDefaults] valueForKey:@"dTitle"];
self.title=self.devicemodel.showName;
// [self updateNameInLocal];
}
@ -457,12 +456,8 @@
self.historyView.datas=self.vo.phs;
self.historyView.hidden=YES;
}
IfishHotBarVo*vo=self.datas[1];
if (self.vo.heater.heaterVolume.length) {
vo.title=[NSString stringWithFormat:@"鱼缸容量 %@L",self.vo.heater.heaterVolume];
vo.subTitle=[NSString stringWithFormat:@"推荐流量:%.1fL--%.1fL",[self.vo.heater.heaterVolume intValue]*1.5,[self.vo.heater.heaterVolume intValue]*2.0];
}
//
IfishHotBarVo*vo1=self.datas[4];
if (self.vo.heater.heaterCycle.length) {
if (self.vo.heater.heaterReminderTime.length) {
@ -497,13 +492,15 @@
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row==3) {
if (!self.isInitHostoryView) {
[self getHistoryDataRequest];
}
self.historyView.hidden=NO;
// self.historyView.datas=self.vo.phs;
}else if (indexPath.row==2){
}
else{
// [self wenduRequest];
[self changeWaterView];
self.changeWaterView.hotVo=self.vo;
self.changeWaterView.viewType=indexPath.row;
@ -541,10 +538,8 @@
-(void)updateUiWithInfo:(NSString*)info{
NSString*templeture=[info substringWithRange:NSMakeRange(36, 4)];
// templeture=[NSString stringWithFormat:@"0x%@",templeture];
UInt64 temp=[dataContorl hexToTen:templeture];
float tempFloat=temp*0.1;
// self.templetrueLable.text=[NSString stringWithFormat:@"%llu°c",temp];
self.header.degreeLable.text=[NSString stringWithFormat:@"%0.1f°c",tempFloat];
// 46
NSString*ph=[info substringWithRange:NSMakeRange(46, 4)];
@ -552,11 +547,11 @@
IfishHotBarVo*vo2=self.datas[2];
// phV=0;
vo2.phv=phV;
vo2.title=[NSString stringWithFormat:@"水循环 %lluL",phV];
if (phV<=120) {
vo2.subTitle=@"流量警告:加热器停止加热,进入保护状态";
//phV499-V5.0.0
if (phV==499) {
vo2.subTitle=@"正常";
}else{
vo2.subTitle=@"";
vo2.subTitle=@"无水";
}
self.vo.heaterNum=[info substringWithRange:NSMakeRange(40, 4)];

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="IfishHotBarVc">
<connections>
<outlet property="mainTableView" destination="EfA-oe-WKg" id="YG8-nm-lV1"/>
<outlet property="templetrueLable" destination="rnv-MK-lkn" id="pQy-GR-9Tu"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="EfA-oe-WKg">
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rnv-MK-lkn">
<rect key="frame" x="188" y="140" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" type="system" pointSize="41"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="EfA-oe-WKg" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="64" id="52C-b0-rq7"/>
<constraint firstItem="rnv-MK-lkn" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Axv-3t-IXc"/>
<constraint firstItem="EfA-oe-WKg" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="m7y-9w-hC6"/>
<constraint firstAttribute="trailing" secondItem="EfA-oe-WKg" secondAttribute="trailing" id="mvQ-gh-J4w"/>
<constraint firstItem="rnv-MK-lkn" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="140" id="rSs-Ny-eZP"/>
<constraint firstAttribute="bottom" secondItem="EfA-oe-WKg" secondAttribute="bottom" id="sEy-3b-Ses"/>
</constraints>
</view>
</objects>
</document>

View File

@ -20,6 +20,11 @@
- (void)awakeFromNib {
[super awakeFromNib];
[self.subTitleLable mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.titleLbale.mas_right).offset(20);
make.centerY.height.mas_equalTo(self.titleLbale);
}];
[self.subTitleLable setTextColor:[UIColor colorWithRed:109/255.0 green:109/255.0 blue:109/255.0 alpha:1.0]];
// Initialization code
}
@ -35,9 +40,9 @@
self.subTitleLable.text=vo.subTitle;
self.iconImgV.image=[UIImage imageNamed:vo.iconUrl];
self.arrowImgV.hidden=!vo.isShowArrow;
if (vo.phv<120&&[vo.title containsString:@"水循环"]) {
if (vo.phv!=499) {//
[self.subTitleLable setTextColor:[UIColor redColor]];
}else{
}else{//
[self.subTitleLable setTextColor:[UIColor colorWithRed:109/255.0 green:109/255.0 blue:109/255.0 alpha:1.0]];
}

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -34,8 +34,9 @@
<constraint firstAttribute="height" constant="10" id="ht2-GT-W7M"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bqk-eu-G7V">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bqk-eu-G7V">
<rect key="frame" x="41" y="46" width="0.0" height="0.0"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.42745098039215684" green="0.42745098039215684" blue="0.42745098039215684" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -43,8 +44,6 @@
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="MDc-Sh-69Z" secondAttribute="trailing" constant="10" id="1u9-YP-oIE"/>
<constraint firstItem="bqk-eu-G7V" firstAttribute="leading" secondItem="JXp-mV-pUz" secondAttribute="leading" id="IHa-is-G3q"/>
<constraint firstItem="bqk-eu-G7V" firstAttribute="top" secondItem="JXp-mV-pUz" secondAttribute="bottom" constant="2" id="KaT-d3-W2s"/>
<constraint firstItem="4bv-OB-vC4" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="QSY-Vc-NAV"/>
<constraint firstItem="JXp-mV-pUz" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="fai-hr-fRt"/>
<constraint firstItem="JXp-mV-pUz" firstAttribute="leading" secondItem="4bv-OB-vC4" secondAttribute="trailing" constant="10" id="ffc-E4-hTy"/>
@ -62,7 +61,7 @@
</tableViewCell>
</objects>
<resources>
<image name="温度图标" width="21" height="26"/>
<image name="箭头" width="21" height="15"/>
<image name="温度图标" width="21.5" height="26"/>
<image name="箭头" width="21.5" height="15.5"/>
</resources>
</document>

View File

@ -17,9 +17,13 @@
-(void)clickWormCode:(NSString*)code;
@end
/**
*/
@interface IFishWaterChangeView : UIView
@property (weak, nonatomic) IBOutlet UIPickerView *picker;
@property(nonatomic,weak)id<ChangeWaterDelegate> myDelegate;
@property(nonatomic,assign)NSInteger viewType;
@property(nonatomic,strong)IfishHotBarVo*hotVo;
@end

View File

@ -10,7 +10,6 @@
@interface IFishWaterChangeView()<UIPickerViewDelegate,UIPickerViewDataSource>
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *pickerBottom;
@property(nonatomic,strong)NSMutableArray*data1;
@property(nonatomic,strong)NSMutableArray*data2;
@property(nonatomic,strong)NSMutableArray*templetrueArr;
@ -20,28 +19,174 @@
@property(nonatomic,copy)NSString*selectVaule2;
@property(nonatomic,copy)NSString*selectVaule3;
@property(nonatomic,copy)NSString*warnCode;
@property (weak, nonatomic) IBOutlet UIView *topTempPicker;
@property (weak, nonatomic) IBOutlet UIView *bottomPicker;
@property (weak, nonatomic) IBOutlet UIView *heightView;
@property (weak, nonatomic) IBOutlet UITextField *longTextF;
@property (weak, nonatomic) IBOutlet UITextField *widthTextF;
@property (weak, nonatomic) IBOutlet UITextField *heightTextF;
@property (weak, nonatomic) IBOutlet UIPickerView *topUiPick;
@property (weak, nonatomic) IBOutlet UIPickerView *bottomUiPicker;
@property (weak, nonatomic) IBOutlet UIButton *openBtn;
@property (weak, nonatomic) IBOutlet UILabel *bottomTextF;
//@property (weak, nonatomic) IBOutlet UIButton *bgButton;
//@property (weak, nonatomic) IBOutlet UIPickerView *topUiPick;
//@property (weak, nonatomic) IBOutlet UIPickerView *bottomUiPicker;
//@property (weak, nonatomic) IBOutlet UIImageView *titleImageView;
//@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
//@property (weak, nonatomic) IBOutlet UIButton *openBtn;//
//@property (weak, nonatomic) IBOutlet UIButton *sureBtn;
//@property (weak, nonatomic) IBOutlet UIImageView *sepImage;
Strong UIButton *bgButton;
Strong UIPickerView *topUiPick;
Strong UIPickerView *bottomUiPicker;
Strong UIImageView *titleImageView;
Strong UILabel *titleLabel;
Strong UIButton *openBtn;//
Strong UIButton *sureBtn;
Strong UIImageView *sepImage;
@end
@implementation IFishWaterChangeView
-(instancetype)init{
self = [super init];
if (self) {
[self addSubview:self.bgButton];
[self addSubview:self.topUiPick];
[self addSubview:self.bottomUiPicker];
[self addSubview:self.sepImage];
[self addSubview:self.titleImageView];
[self.titleImageView addSubview:self.titleLabel];
[self addSubview:self.openBtn];
[self addSubview:self.sureBtn];
[self loadLayout];
}
return self;
}
#pragma mark --lazyLoading
- (UIButton *)bgButton{
if (!_bgButton) {
_bgButton = InitObject(UIButton);
[_bgButton addTarget:self action:@selector(bgButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[_bgButton setBackgroundColor:RGBA(0, 0, 0, 0.3)];
}
return _bgButton;
}
- (UIPickerView *)topUiPick{
if (!_topUiPick) {
_topUiPick = [[UIPickerView alloc]init];
_topUiPick.delegate = self;
_topUiPick.backgroundColor = [UIColor whiteColor];
}
return _topUiPick;
}
- (UIPickerView *)bottomUiPicker{
if (!_bottomUiPicker) {
_bottomUiPicker = InitObject(UIPickerView);
_bottomUiPicker.delegate = self;
_bottomUiPicker.backgroundColor = [UIColor whiteColor];
}
return _bottomUiPicker;
}
- (UIImageView *)sepImage{
if (!_sepImage) {
_sepImage = InitObject(UIImageView);
[_sepImage setImage:IMAGEBYENAME(@"虚线")];
}
return _sepImage;
}
- (UIButton *)openBtn{
if (!_openBtn) {
_openBtn = InitObject(UIButton);
[_openBtn setBackgroundImage:IMAGEBYENAME(@"graybtn_big") forState:UIControlStateNormal];
[_openBtn setBackgroundImage:IMAGEBYENAME(@"greenbtn_big") forState:UIControlStateSelected];
[_openBtn addTarget:self action:@selector(openBtnClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _openBtn;
}
- (UIImageView *)titleImageView{
if (!_titleImageView) {
_titleImageView = InitObject(UIImageView);
[_titleImageView setImage:IMAGEBYENAME(@"change_tep_title")];
}
return _titleImageView;
}
- (UIButton *)sureBtn{
if (!_sureBtn) {
_sureBtn = InitObject(UIButton);
[_sureBtn setBackgroundImage:IMAGEBYENAME(@"change_tep_bottom") forState:UIControlStateNormal];
[_sureBtn.titleLabel setFont:[UIFont systemFontOfSize:13]];
[_sureBtn setTitleColor:XWhite forState:UIControlStateNormal];
[_sureBtn setTitle:@"确 定" forState:UIControlStateNormal];
[_sureBtn addTarget:self action:@selector(sureBtnClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _sureBtn;
}
- (UILabel *)titleLabel{
if (!_titleLabel) {
_titleLabel = InitObject(UILabel);
_titleLabel.textColor = XWhite;
_titleLabel.font = [UIFont systemFontOfSize:13];
_titleLabel.text = @"设置水温";
}
return _titleLabel;
}
//masonry
-(void)loadLayout{
[self.bgButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
[self.topUiPick mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kSizeFrom750(690));
make.height.mas_equalTo(kSizeFrom750(280));
make.centerY.centerX.mas_equalTo(self);
}];
[self.titleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.width.mas_equalTo(self.topUiPick);
make.bottom.mas_equalTo(self.topUiPick.mas_top);
make.height.mas_equalTo(kSizeFrom750(60));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.height.mas_equalTo(self.titleImageView);
make.left.mas_equalTo(kSizeFrom750(30));
}];
[self.openBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kSizeFrom750(86));
make.height.mas_equalTo(kSizeFrom750(50));
make.right.mas_equalTo(self.titleImageView.mas_right).offset(-kSizeFrom750(40));
make.centerY.mas_equalTo(self.titleImageView);
}];
[self.bottomUiPicker mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.width.height.centerX.mas_equalTo(self.topUiPick);
}];
[self.sepImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.mas_equalTo(self.bottomUiPicker);
make.width.mas_equalTo(kSizeFrom750(24));
make.height.mas_equalTo(kSizeFrom750(264));
}];
[self.sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.width.height.mas_equalTo(self.titleImageView);
make.top.mas_equalTo(self.bottomUiPicker.mas_bottom);
}];
}
-(NSMutableArray *)data1{
if (_data1==nil) {
_data1=[NSMutableArray array];
_data2=[NSMutableArray array];
if (!_data1) {
_data1=InitObject(NSMutableArray);
}
return _data1;
}
-(NSMutableArray *)data2{
if (!_data2) {
_data2=InitObject(NSMutableArray);
}
return _data2;
}
-(NSMutableArray *)timeArr{
if (_timeArr==nil) {
_timeArr=[NSMutableArray array];
@ -78,34 +223,36 @@
-(void)setViewType:(NSInteger)viewType{
_viewType=viewType;
self.topTempPicker.hidden=YES;
self.heightView.hidden=YES;
self.bottomPicker.hidden=YES;
self.topUiPick.hidden=YES;
self.bottomUiPicker.hidden=YES;
self.sepImage.hidden = YES;
self.openBtn.hidden = YES;
[self.data1 removeAllObjects];
[self.data2 removeAllObjects];
if (viewType==0) {//
self.topTempPicker.hidden=NO;
self.bottomPicker.hidden=NO;
self.bottomTextF.text=@"请输设置预警温度";
self.topUiPick.hidden=NO;
[self.data1 addObjectsFromArray:self.templetrueArr];
[self.data2 addObjectsFromArray:self.templetrueArr];
[self.topUiPick reloadAllComponents];
[self.bottomUiPicker reloadAllComponents];
self.openBtn.hidden=NO;
self.pickerBottom.constant=240.0;
if ([self.hotVo.wornCode isEqualToString:@"01"]) {
self.openBtn.selected=YES;
}else{
self.openBtn.selected=NO;
}
if ( self.hotVo.heaterNum) {
self.hotVo.heaterNum=[self.hotVo.heaterNum stringByReplacingOccurrencesOfString:@"°c" withString:@""];
NSInteger heaterNum=round([self.hotVo.heaterNum integerValue]-20) ;
[self.topUiPick selectRow:heaterNum inComponent:0 animated:NO];
self.selectVaule1=self.hotVo.heaterNum;
}
}else if(viewType==1){//
[self.data1 addObjectsFromArray:self.templetrueArr];
[self.data2 addObjectsFromArray:self.templetrueArr];
self.bottomUiPicker.hidden=NO;
self.sepImage.hidden = NO;
self.openBtn.hidden = NO;
self.titleLabel.text=@"请设置预警温度:";
[self.bottomUiPicker reloadAllComponents];
if ([self.hotVo.wornCode isEqualToString:@"01"]) {
self.openBtn.selected=YES;
}else{
self.openBtn.selected=NO;
}
if (self.hotVo.downTeamp) {
self.hotVo.downTeamp=[self.hotVo.downTeamp stringByReplacingOccurrencesOfString:@"°c" withString:@""];
NSInteger downTeamp=round([self.hotVo.downTeamp integerValue]-20);
@ -113,7 +260,6 @@
[self.bottomUiPicker selectRow:downTeamp inComponent:0 animated:NO];
self.selectVaule2=self.hotVo.downTeamp;
}
if (self.hotVo.upTeamp) {
self.hotVo.upTeamp=[self.hotVo.upTeamp stringByReplacingOccurrencesOfString:@"°c" withString:@""];
NSInteger upTeamp=round([self.hotVo.upTeamp integerValue]-20) ;
@ -121,37 +267,17 @@
[self.bottomUiPicker selectRow:upTeamp inComponent:1 animated:NO];
self.selectVaule3=self.hotVo.upTeamp;
}
}else if(viewType==1){//
self.bottomTextF.text=@"请输入水体部分尺寸:";
self.heightView.hidden=NO;
self.bottomPicker.hidden=NO;
self.openBtn.hidden=YES;
[self.longTextF becomeFirstResponder];
self.pickerBottom.constant=340.0;
if (self.hotVo.heater) {
if(self.hotVo.heater.heaterLong.length){
self.longTextF.text=self.hotVo.heater.heaterLong;
}
if(self.hotVo.heater.heaterWidth.length){
self.widthTextF.text=self.hotVo.heater.heaterWidth;
}
if(self.hotVo.heater.heaterHeight.length){
self.heightTextF.text=self.hotVo.heater.heaterHeight;
}
}
}else if (viewType==2){//
self.bottomPicker.hidden=NO;
// self.bottomUiPicker.hidden=NO;
}else if (viewType==4){//
self.bottomPicker.hidden=NO;
self.bottomUiPicker.hidden=NO;
self.openBtn.hidden = NO;
self.sepImage.hidden = NO;
[self.data1 addObjectsFromArray:self.dayArr];
[self.data2 addObjectsFromArray:self.timeArr];
[self.topUiPick reloadAllComponents];
[self.bottomUiPicker reloadAllComponents];
self.bottomTextF.text=@"换水周期选择:";
self.openBtn.hidden=NO;
self.titleLabel.text=@"换水周期选择:";
self.selectVaule2=self.data1[0];
if (self.hotVo.heater.heaterCycle!=nil) {
@ -169,21 +295,22 @@
self.openBtn.selected=NO;
self.selectVaule3=@"5";
}
}
// if(self.data1.count>0){
// self.selectVaule1=self.data1[0];
// self.selectVaule2=self.data1[0];
// }
// if (self.data2.count>0) {
// self.selectVaule3=self.data2[0];
// }
}
- (IBAction)clickSubmit:(id)sender {
//open
- (void)openBtnClick:(UIButton *)sender {
sender.selected=!sender.selected;
if(self.viewType==0){
self.hotVo.wornCode=sender.selected?@"01":@"00";
[self.myDelegate clickWormCode:self.hotVo.wornCode];
}
}
//
- (void)bgButtonClick:(UIButton *)sender {
self.hidden=YES;
}
//
- (void)sureBtnClick:(UIButton *)sender{
self.hidden=YES;
if(_viewType==5){
[self.myDelegate didSelectRow1:self.selectVaule2 andRow2:self.selectVaule3];
@ -192,8 +319,6 @@
NSString*code=self.openBtn.selected?@"01":@"00";
[self.myDelegate didSelectTeamptrue:self.selectVaule3 andDown:self.selectVaule2 andT:self.selectVaule1 andWarnCode:code];
}else if (_viewType==1){
[self.myDelegate submitText:self.widthTextF.text andh:self.heightTextF.text andV:self.longTextF.text];
}else if(_viewType==4){
// [self.myDelegate didSelectRemindTime:self.selectVaule2];
if(self.openBtn.selected==NO){
@ -205,13 +330,6 @@
}
-(void)awakeFromNib{
[super awakeFromNib];
}
- (IBAction)clickBg:(id)sender {
self.hidden=YES;
}
//
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
if (pickerView==self.topUiPick) {
@ -239,7 +357,6 @@
//
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
// self.selectValue = self.data[row];
if (pickerView==self.topUiPick) {
self.selectVaule1=self.data1[row];
}else{
@ -254,29 +371,10 @@
//
-(CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component{
return 35.0f;
return kSizeFrom750(50);
}
//
//-(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{
// return ZYAppWidth;
//}
//-(UIView*)pickerView:(UIPickerView*)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView*)view {
// UIView *cellView = view;
// if (!cellView) {
// cellView = [[UIView alloc] init];
// }
// cellView.backgroundColor = [UIColor redColor];
// return cellView;
//}
- (IBAction)clickOpenBtn:(UIButton *)sender {
sender.selected=!sender.selected;
if(self.viewType==0){
self.hotVo.wornCode=sender.selected?@"01":@"00";
[self.myDelegate clickWormCode:self.hotVo.wornCode];
}
}
@end

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,261 +15,89 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fFD-6v-pYn">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fFD-6v-pYn">
<rect key="frame" x="13" y="0.0" width="348" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<connections>
<action selector="clickBg:" destination="iN0-l3-epB" eventType="touchUpInside" id="74b-Bj-5Fq"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sS3-bH-IDb">
<rect key="frame" x="12" y="239" width="351" height="188"/>
<subviews>
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RVp-L7-2i4">
<rect key="frame" x="2" y="30" width="347" height="121"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="121" id="IpS-8R-glg"/>
</constraints>
<connections>
<outlet property="dataSource" destination="iN0-l3-epB" id="bpf-F0-O6b"/>
<outlet property="delegate" destination="iN0-l3-epB" id="Iu9-eg-yXC"/>
</connections>
</pickerView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C1u-7E-RB7">
<rect key="frame" x="0.0" y="0.0" width="351" height="32"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="请设置预警温度" translatesAutoresizingMaskIntoConstraints="NO" id="xAc-ty-lpS">
<rect key="frame" x="0.0" y="0.0" width="351" height="32"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="换水预警温度" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4pR-AW-f8n">
<rect key="frame" x="23" y="7.5" width="92" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="S6l-x3-P2c">
<rect key="frame" x="304" y="4" width="43" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="43" id="loB-UO-c2h"/>
<constraint firstAttribute="height" constant="25" id="mhg-Yr-ruS"/>
</constraints>
<state key="normal" backgroundImage="graybtn_big">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<state key="selected" backgroundImage="greenbtn_big"/>
<connections>
<action selector="clickOpenBtn:" destination="iN0-l3-epB" eventType="touchUpInside" id="xHx-yK-bIy"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="4pR-AW-f8n" firstAttribute="centerY" secondItem="C1u-7E-RB7" secondAttribute="centerY" id="CRt-1B-fzV"/>
<constraint firstItem="S6l-x3-P2c" firstAttribute="top" secondItem="C1u-7E-RB7" secondAttribute="top" constant="4" id="Fnv-H5-nRL"/>
<constraint firstAttribute="trailing" secondItem="S6l-x3-P2c" secondAttribute="trailing" constant="4" id="IMy-aI-aAJ"/>
<constraint firstAttribute="bottom" secondItem="xAc-ty-lpS" secondAttribute="bottom" id="K6j-dv-bHW"/>
<constraint firstAttribute="trailing" secondItem="xAc-ty-lpS" secondAttribute="trailing" id="M5l-nx-wBd"/>
<constraint firstItem="4pR-AW-f8n" firstAttribute="leading" secondItem="C1u-7E-RB7" secondAttribute="leading" constant="23" id="QDK-TY-a4v"/>
<constraint firstItem="xAc-ty-lpS" firstAttribute="top" secondItem="C1u-7E-RB7" secondAttribute="top" id="iLT-E1-Khh"/>
<constraint firstAttribute="height" constant="32" id="sdG-zg-Ubs"/>
<constraint firstItem="xAc-ty-lpS" firstAttribute="leading" secondItem="C1u-7E-RB7" secondAttribute="leading" id="uv8-Vh-cfq"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="确定" translatesAutoresizingMaskIntoConstraints="NO" id="uSM-gf-3du">
<rect key="frame" x="0.0" y="149" width="351" height="39"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DFn-St-4KQ">
<rect key="frame" x="0.0" y="149" width="351" height="39"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="确定">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="clickSubmit:" destination="iN0-l3-epB" eventType="touchUpInside" id="OjP-Px-OoZ"/>
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="虚线" translatesAutoresizingMaskIntoConstraints="NO" id="QsD-Cm-E7o">
<rect key="frame" x="169" y="38" width="12" height="112"/>
<constraints>
<constraint firstAttribute="height" constant="112" id="Jgo-Kw-3Zi"/>
<constraint firstAttribute="width" constant="12" id="rvZ-WU-Mep"/>
</constraints>
</imageView>
</subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="请设置加热温度" translatesAutoresizingMaskIntoConstraints="NO" id="F6q-ri-gcL">
<rect key="frame" x="63" y="117" width="250" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="设置加热温度" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SXA-fW-bql" userLabel="设置加热温度">
<rect key="frame" x="31" y="123" width="115" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<pickerView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QZi-AX-KLU">
<rect key="frame" x="37" y="273" width="300" height="120"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="dataSource" destination="iN0-l3-epB" id="zHJ-Xe-CPh"/>
<outlet property="delegate" destination="iN0-l3-epB" id="aDE-0l-Fdd"/>
</connections>
</pickerView>
<pickerView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RVp-L7-2i4">
<rect key="frame" x="62" y="149" width="250" height="120"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="dataSource" destination="iN0-l3-epB" id="bpf-F0-O6b"/>
<outlet property="delegate" destination="iN0-l3-epB" id="Iu9-eg-yXC"/>
</connections>
</pickerView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DFn-St-4KQ">
<rect key="frame" x="13" y="385" width="351" height="39"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="uSM-gf-3du" firstAttribute="top" secondItem="DFn-St-4KQ" secondAttribute="top" id="2Mm-TX-Ho8"/>
<constraint firstItem="QsD-Cm-E7o" firstAttribute="centerY" secondItem="sS3-bH-IDb" secondAttribute="centerY" id="3Jk-ON-XOc"/>
<constraint firstItem="DFn-St-4KQ" firstAttribute="top" secondItem="RVp-L7-2i4" secondAttribute="bottom" constant="-2" id="72H-6i-OnZ"/>
<constraint firstAttribute="trailing" secondItem="RVp-L7-2i4" secondAttribute="trailing" constant="2" id="BSX-ha-MSF"/>
<constraint firstItem="RVp-L7-2i4" firstAttribute="leading" secondItem="sS3-bH-IDb" secondAttribute="leading" constant="2" id="Duh-mE-cF7"/>
<constraint firstItem="DFn-St-4KQ" firstAttribute="leading" secondItem="sS3-bH-IDb" secondAttribute="leading" id="KP6-ro-VqG"/>
<constraint firstAttribute="height" constant="188" id="QO6-Fn-SJj"/>
<constraint firstAttribute="trailing" secondItem="uSM-gf-3du" secondAttribute="trailing" id="RRq-Hk-N77"/>
<constraint firstAttribute="trailing" secondItem="C1u-7E-RB7" secondAttribute="trailing" id="cG9-V3-y7h"/>
<constraint firstAttribute="bottom" secondItem="DFn-St-4KQ" secondAttribute="bottom" id="dMR-sN-atJ"/>
<constraint firstAttribute="bottom" secondItem="uSM-gf-3du" secondAttribute="bottom" id="fMd-o1-a2o"/>
<constraint firstItem="RVp-L7-2i4" firstAttribute="top" secondItem="C1u-7E-RB7" secondAttribute="bottom" constant="-2" id="jUy-wH-ERt"/>
<constraint firstAttribute="trailing" secondItem="DFn-St-4KQ" secondAttribute="trailing" id="ltS-Cj-2lG"/>
<constraint firstItem="C1u-7E-RB7" firstAttribute="top" secondItem="sS3-bH-IDb" secondAttribute="top" id="nWv-t9-wGe"/>
<constraint firstItem="QsD-Cm-E7o" firstAttribute="centerX" secondItem="sS3-bH-IDb" secondAttribute="centerX" id="zBn-X6-4WK"/>
<constraint firstItem="C1u-7E-RB7" firstAttribute="leading" secondItem="sS3-bH-IDb" secondAttribute="leading" id="zFi-SE-D7e"/>
<constraint firstItem="uSM-gf-3du" firstAttribute="leading" secondItem="sS3-bH-IDb" secondAttribute="leading" id="zwB-mw-2xl"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UWW-Ib-xQ3" userLabel="设置容器高度">
<rect key="frame" x="14" y="274" width="347" height="118"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="长宽" translatesAutoresizingMaskIntoConstraints="NO" id="VGT-Vs-9H2">
<rect key="frame" x="0.0" y="0.0" width="347" height="118"/>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="8cR-O7-A7z">
<rect key="frame" x="58" y="67" width="49" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="49" id="ITT-cl-rS3"/>
<constraint firstAttribute="height" constant="20" id="SZ5-OH-yXi"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="AC4-7c-ujI">
<rect key="frame" x="221" y="30" width="48" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="B1X-7U-tcD"/>
<constraint firstAttribute="width" constant="48" id="LVS-he-GHZ"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="2LO-Mp-im1">
<rect key="frame" x="58" y="30" width="49" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="2yd-7Q-Ykb"/>
<constraint firstAttribute="width" constant="49" id="ynt-rK-riP"/>
</constraints>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="VGT-Vs-9H2" secondAttribute="bottom" id="9TD-pz-c2u"/>
<constraint firstItem="2LO-Mp-im1" firstAttribute="top" secondItem="UWW-Ib-xQ3" secondAttribute="top" constant="30" id="9r2-wR-fa1"/>
<constraint firstItem="8cR-O7-A7z" firstAttribute="top" secondItem="2LO-Mp-im1" secondAttribute="bottom" constant="17" id="FoN-Ym-ygh"/>
<constraint firstItem="2LO-Mp-im1" firstAttribute="leading" secondItem="UWW-Ib-xQ3" secondAttribute="leading" constant="58" id="LeA-cK-gXT"/>
<constraint firstItem="VGT-Vs-9H2" firstAttribute="top" secondItem="UWW-Ib-xQ3" secondAttribute="top" id="ZMR-fp-1b0"/>
<constraint firstItem="AC4-7c-ujI" firstAttribute="top" secondItem="UWW-Ib-xQ3" secondAttribute="top" constant="30" id="eBB-wB-pPq"/>
<constraint firstAttribute="trailing" secondItem="VGT-Vs-9H2" secondAttribute="trailing" id="fwJ-As-qhZ"/>
<constraint firstItem="8cR-O7-A7z" firstAttribute="centerX" secondItem="2LO-Mp-im1" secondAttribute="centerX" id="iST-gw-MgC"/>
<constraint firstItem="VGT-Vs-9H2" firstAttribute="leading" secondItem="UWW-Ib-xQ3" secondAttribute="leading" id="rHT-K0-Jjm"/>
<constraint firstAttribute="trailing" secondItem="AC4-7c-ujI" secondAttribute="trailing" constant="78" id="tVe-FM-oCk"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GUi-mC-ZWy" userLabel="设置加热器">
<rect key="frame" x="12" y="89" width="351" height="150"/>
<subviews>
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QZi-AX-KLU">
<rect key="frame" x="2" y="32" width="347" height="121"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="121" id="2En-mk-g0A"/>
</constraints>
<connections>
<outlet property="dataSource" destination="iN0-l3-epB" id="zHJ-Xe-CPh"/>
<outlet property="delegate" destination="iN0-l3-epB" id="aDE-0l-Fdd"/>
</connections>
</pickerView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4IT-77-VkG">
<rect key="frame" x="0.0" y="0.0" width="351" height="32"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="请设置加热温度" translatesAutoresizingMaskIntoConstraints="NO" id="F6q-ri-gcL">
<rect key="frame" x="0.0" y="0.0" width="351" height="32"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="设置加热温度" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SXA-fW-bql" userLabel="设置加热温度">
<rect key="frame" x="23" y="7.5" width="92" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="F6q-ri-gcL" firstAttribute="top" secondItem="4IT-77-VkG" secondAttribute="top" id="8WV-X9-ZJM"/>
<constraint firstItem="SXA-fW-bql" firstAttribute="centerY" secondItem="4IT-77-VkG" secondAttribute="centerY" id="LIY-Xa-PVU"/>
<constraint firstItem="F6q-ri-gcL" firstAttribute="leading" secondItem="4IT-77-VkG" secondAttribute="leading" id="PSm-cp-l4I"/>
<constraint firstItem="SXA-fW-bql" firstAttribute="leading" secondItem="4IT-77-VkG" secondAttribute="leading" constant="23" id="Q12-gY-Hxf"/>
<constraint firstAttribute="trailing" secondItem="F6q-ri-gcL" secondAttribute="trailing" id="fzk-zq-gy8"/>
<constraint firstAttribute="height" constant="32" id="tQQ-CZ-UJn"/>
<constraint firstAttribute="bottom" secondItem="F6q-ri-gcL" secondAttribute="bottom" id="xCl-An-0fg"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="4IT-77-VkG" firstAttribute="top" secondItem="GUi-mC-ZWy" secondAttribute="top" id="3cb-gI-b1F"/>
<constraint firstAttribute="height" constant="150" id="5dQ-pp-J3A"/>
<constraint firstItem="QZi-AX-KLU" firstAttribute="top" secondItem="4IT-77-VkG" secondAttribute="bottom" id="C0u-k6-ihz"/>
<constraint firstItem="4IT-77-VkG" firstAttribute="leading" secondItem="GUi-mC-ZWy" secondAttribute="leading" id="Mqi-2O-6Gj"/>
<constraint firstItem="QZi-AX-KLU" firstAttribute="leading" secondItem="GUi-mC-ZWy" secondAttribute="leading" constant="2" id="NYh-fM-kU2"/>
<constraint firstAttribute="trailing" secondItem="QZi-AX-KLU" secondAttribute="trailing" constant="2" id="kEl-iA-pC4"/>
<constraint firstAttribute="trailing" secondItem="4IT-77-VkG" secondAttribute="trailing" id="zq2-39-h2m"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<state key="normal" title="确 定" backgroundImage="确定">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="clickSubmit:" destination="iN0-l3-epB" eventType="touchUpInside" id="OjP-Px-OoZ"/>
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="虚线" translatesAutoresizingMaskIntoConstraints="NO" id="QsD-Cm-E7o">
<rect key="frame" x="181" y="273" width="12" height="112"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="S6l-x3-P2c">
<rect key="frame" x="306" y="120" width="43" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="graybtn_big">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<state key="selected" backgroundImage="greenbtn_big"/>
<connections>
<action selector="clickOpenBtn:" destination="iN0-l3-epB" eventType="touchUpInside" id="xHx-yK-bIy"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.1347388698630137" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="fFD-6v-pYn" secondAttribute="trailing" id="2Ku-hM-Gmb"/>
<constraint firstItem="sS3-bH-IDb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="12" id="47Y-la-C7u"/>
<constraint firstItem="sS3-bH-IDb" firstAttribute="top" secondItem="GUi-mC-ZWy" secondAttribute="bottom" id="51h-Fe-bOX"/>
<constraint firstItem="UWW-Ib-xQ3" firstAttribute="top" secondItem="sS3-bH-IDb" secondAttribute="top" constant="35" id="C3d-Jz-gnZ"/>
<constraint firstItem="fFD-6v-pYn" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="M3n-S0-Lmj"/>
<constraint firstItem="UWW-Ib-xQ3" firstAttribute="bottom" secondItem="sS3-bH-IDb" secondAttribute="bottom" constant="-35" id="N6X-0h-OQp"/>
<constraint firstAttribute="bottom" secondItem="sS3-bH-IDb" secondAttribute="bottom" constant="240" id="Wvv-fr-my6"/>
<constraint firstAttribute="bottom" secondItem="fFD-6v-pYn" secondAttribute="bottom" id="Xm7-Ep-fOQ"/>
<constraint firstAttribute="trailing" secondItem="sS3-bH-IDb" secondAttribute="trailing" constant="12" id="dTS-pW-dyJ"/>
<constraint firstItem="GUi-mC-ZWy" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="12" id="fUb-aa-feS"/>
<constraint firstAttribute="trailing" secondItem="UWW-Ib-xQ3" secondAttribute="trailing" constant="14" id="qxd-yx-0wN"/>
<constraint firstItem="UWW-Ib-xQ3" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="vEs-Cc-e6u"/>
<constraint firstItem="fFD-6v-pYn" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="vX9-W8-fdB"/>
<constraint firstAttribute="trailing" secondItem="GUi-mC-ZWy" secondAttribute="trailing" constant="12" id="xnk-A8-mY0"/>
</constraints>
<connections>
<outlet property="bottomPicker" destination="sS3-bH-IDb" id="dA5-DG-v9K"/>
<outlet property="bottomTextF" destination="4pR-AW-f8n" id="yMf-aj-etI"/>
<outlet property="bgButton" destination="fFD-6v-pYn" id="XRu-5N-NxG"/>
<outlet property="bottomUiPicker" destination="RVp-L7-2i4" id="n8s-6e-Ybu"/>
<outlet property="heightTextF" destination="8cR-O7-A7z" id="VIW-tJ-uOr"/>
<outlet property="heightView" destination="UWW-Ib-xQ3" id="cBM-Tc-aUU"/>
<outlet property="longTextF" destination="2LO-Mp-im1" id="UXa-Ec-lE2"/>
<outlet property="openBtn" destination="S6l-x3-P2c" id="rFd-hL-k2Q"/>
<outlet property="picker" destination="RVp-L7-2i4" id="kaf-wt-kXj"/>
<outlet property="pickerBottom" destination="Wvv-fr-my6" id="AR9-Ii-lU1"/>
<outlet property="topTempPicker" destination="GUi-mC-ZWy" id="wou-bx-Jr6"/>
<outlet property="sepImage" destination="QsD-Cm-E7o" id="Xh1-IW-SPc"/>
<outlet property="sureBtn" destination="DFn-St-4KQ" id="mVU-eX-94h"/>
<outlet property="titleImageView" destination="F6q-ri-gcL" id="Pm2-5L-NGm"/>
<outlet property="titleLabel" destination="SXA-fW-bql" id="95p-nV-DEx"/>
<outlet property="topUiPick" destination="QZi-AX-KLU" id="svk-gv-AnC"/>
<outlet property="widthTextF" destination="AC4-7c-ujI" id="oxg-lr-VbK"/>
</connections>
<point key="canvasLocation" x="33.5" y="103.5"/>
<point key="canvasLocation" x="32.799999999999997" y="102.99850074962519"/>
</view>
</objects>
<resources>
<image name="graybtn_big" width="86" height="47"/>
<image name="greenbtn_big" width="86" height="47"/>
<image name="确定" width="375" height="55"/>
<image name="虚线" width="12" height="111"/>
<image name="虚线" width="12" height="111.5"/>
<image name="请设置加热温度" width="375" height="48"/>
<image name="请设置预警温度" width="375" height="52"/>
<image name="长宽" width="347" height="120"/>
</resources>
</document>

View File

@ -10,4 +10,5 @@
@interface IfishChatView : UIView
@property(nonatomic,strong)NSArray*datas;
-(void)reloadHeater;//刷新流量状态
@end

View File

@ -9,13 +9,13 @@
#import "IfishChatView.h"
#import "IfishHistroyVo.h"
#define Normal_heaterPh 499 //499
#define Rect_Width 248.f
@interface IfishChatView()
@property(nonatomic,strong)NSMutableArray*line1;
@property(nonatomic,strong)NSMutableArray*line2;
@property(nonatomic,strong)UIView *lablesView;
@property(nonatomic,strong)UILabel*numLable;
Strong NSMutableArray * heaterPhArray;//
@end
@ -29,35 +29,24 @@
return _numLable;
}
-(UIView *)lablesView{
if (_lablesView==nil) {
_lablesView=[[UIView alloc]init];
_lablesView.frame=CGRectMake(290, 0, 28, 190);
_lablesView.backgroundColor=[UIColor clearColor];
[self addSubview:_lablesView];
}
return _lablesView;
}
-(NSArray *)line1{
if (_line1==nil) {
_line1=[NSMutableArray array];
}
[_line1 removeAllObjects];
if (_datas.count) {
NSSortDescriptor *ageSD = [NSSortDescriptor sortDescriptorWithKey:@"heaterGatheringTime_int" ascending:YES];
self.datas = [self.datas sortedArrayUsingDescriptors:@[ageSD]];
// CGFloat gapW= 357*scale*0.1;
for (int i=0; i<self.datas.count; i++) {
IfishHistroyVo*vo=self.datas[i];
CGFloat x=(([vo.heaterGatheringTime floatValue]/24)*270+19);
CGFloat x=32 +([vo.heaterGatheringTime floatValue]/24)*Rect_Width;
if(vo.heaterWaterTemperature.integerValue>350){
vo.heaterWaterTemperature=@"350";
}else if(vo.heaterWaterTemperature.integerValue<250){
continue;
}
CGFloat y=188*(1-((vo.heaterWaterTemperature.integerValue*0.1-25)/10))+36.5;//*-1*+158;
CGFloat y=80*(1-((vo.heaterWaterTemperature.integerValue*0.1-25)/10))+19;//*-1*+158;
CGPoint p1=CGPointMake(x, y);
// NSLog(@"%f-------%f--%f-",y,vo.heaterWaterTemperature.integerValue*0.1,x);
[_line1 addObject:NSStringFromCGPoint(p1)];
@ -66,74 +55,53 @@
return _line1;
}
-(NSArray *)line2{
if (_line2==nil) {
_line2=[NSMutableArray array];
}
if (_datas.count) {
NSSortDescriptor *PhSD = [NSSortDescriptor sortDescriptorWithKey:@"heaterPh_int" ascending:YES];
NSMutableArray*arr = [[self.datas sortedArrayUsingDescriptors:@[PhSD]] mutableCopy];
IfishHistroyVo*vo=arr[0];
NSInteger miniPh=vo.heaterPh_int-50;
IfishHistroyVo*vo1=arr[arr.count-1];
NSInteger maxPh=vo1.heaterPh_int+50;
NSInteger range=maxPh-miniPh;
[_line2 removeAllObjects];
for (int i=0; i<self.datas.count; i++) {
IfishHistroyVo*vo=self.datas[i];
CGFloat x=(([vo.heaterGatheringTime floatValue]/24)*270+19);
CGFloat y=(1-((vo.heaterPh.floatValue-miniPh)/range))*188+36.5;
CGPoint p1=CGPointMake(x, y);
[_line2 addObject:NSStringFromCGPoint(p1)];
}
}
return _line2;
}
-(void)setLables{
NSSortDescriptor *PhSD = [NSSortDescriptor sortDescriptorWithKey:@"heaterPh_int" ascending:YES];
NSMutableArray*arr = [[self.datas sortedArrayUsingDescriptors:@[PhSD]] mutableCopy];
IfishHistroyVo*vo=arr[0];
NSInteger miniPh=vo.heaterPh_int-50;
IfishHistroyVo*vo1=arr[arr.count-1];
NSInteger maxPh=vo1.heaterPh_int+50;
NSInteger range=maxPh-miniPh;
if (_lablesView) {
[self.lablesView removeFromSuperview];
_lablesView=nil;
}
// [self addSubview:self.lablesView];
for (int i=0; i<10; i++) {
UILabel*lable=[[UILabel alloc]init];
NSInteger pos=10-i;
lable.frame=CGRectMake(0, i*9+i*10+33, 24, 9);
lable.text=[NSString stringWithFormat:@"%.0f",miniPh+range*0.1*pos];
lable.font=[UIFont systemFontOfSize:8];
[self.lablesView addSubview:lable];
}
NSLog(@"lable=================");
}
-(void)setDatas:(NSArray *)datas{
NSSortDescriptor *ageSD = [NSSortDescriptor sortDescriptorWithKey:@"heaterGatheringTime_int" ascending:YES];
datas = [datas sortedArrayUsingDescriptors:@[ageSD]];
_datas=datas;
[self setLables];
[self layoutIfNeeded];
}
-(NSMutableArray *)heaterPhArray{
if (!_heaterPhArray) {
_heaterPhArray = InitObject(NSMutableArray);
//
for (int i=0; i<23; i++) {
CGFloat x=(i*(Rect_Width/24)+32);
CGFloat y=104;
UIView *lineView = [[UIView alloc] initWithFrame:RECT(x, y, Rect_Width/24, 1)];
lineView.tag = i+1000;
[self addSubview:lineView];
[_heaterPhArray addObject:lineView];
}
}
return _heaterPhArray;
}
//
-(void)reloadHeater{
for (UIView *view in self.heaterPhArray) {
[view.layer removeAllAnimations];
}
for (int i=0; i<self.datas.count-1; i++) {
IfishHistroyVo*vo=self.datas[i];
IfishHistroyVo*nextVo=self.datas[i+1];
//使线
if ([nextVo.heaterGatheringTime integerValue]-[vo.heaterGatheringTime integerValue]>1) {
for (int i=[vo.heaterGatheringTime intValue]; i<[nextVo.heaterGatheringTime intValue]; i++) {
UIView *emptyView = [self viewWithTag:i+1000];
[self drawDashLine:emptyView lineLength:2 lineSpacing:1 lineColor:[UIColor redColor]];
}
}else{
UIView *lineView = [self viewWithTag:[vo.heaterGatheringTime integerValue]+1000];
if([vo.heaterPh integerValue]==Normal_heaterPh&&[nextVo.heaterPh integerValue]==Normal_heaterPh){//
lineView.layer.backgroundColor = [UIColor greenColor].CGColor;
}else{
[self drawDashLine:lineView lineLength:2 lineSpacing:1 lineColor:[UIColor redColor]];
}
}
}
}
-(void)drawLine{
UIColor *color = [UIColor redColor];
[color set]; //线
@ -143,9 +111,6 @@
path.lineCapStyle = kCGLineCapRound; //线
path.lineJoinStyle = kCGLineJoinRound; //
// Draw the lines
for (int i=0; i<self.line1.count; i++) {
@ -159,53 +124,32 @@
// [path closePath];//线closePath
[path stroke];//Draws line 线
for (int i=0; i<self.line1.count; i++) {
NSString* p=self.line1[i];
CGPoint point=CGPointFromString(p);
UIBezierPath *path0 = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(point.x-2, point.y-2, 4, 4) cornerRadius:2];
[path0 stroke];
[path0 fill];
// UIButton*btn0=[UIButton buttonWithType:1];
// btn0.frame=CGRectMake(point.x-3, point.x-3, 6, 6);
// [btn0 addTarget:self action:@selector(clickPoint:) forControlEvents:UIControlEventTouchUpInside];
// [self addSubview:btn0];
}
UIColor *color1 = [UIColor blueColor];
[color1 set]; //线
UIBezierPath* path1 = [UIBezierPath bezierPath];
path1.lineWidth = 1.0;
path1.lineCapStyle = kCGLineCapRound; //线
path1.lineJoinStyle = kCGLineJoinRound; //
// [path1 moveToPoint:CGPointMake(0.0, 0.0)];//
// Draw the lines
for (int i=0; i<self.line2.count; i++) {
NSString* p=self.line2[i];
if (i==0) {
[path1 moveToPoint:CGPointFromString(p)];//
}
[path1 addLineToPoint:CGPointFromString(p)];
}
//
// for (int i=0; i<self.line1.count; i++) {
//
// NSString* p=self.line1[i];
// CGPoint point=CGPointFromString(p);
// UIBezierPath *path0 = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(point.x-1, point.y-1, 2, 2) cornerRadius:1];
// [path0 stroke];
// [path0 fill];
//
// }
// UIColor *color1 = [UIColor greenColor];
// [color1 set]; //线
//
// UIBezierPath* path1 = [UIBezierPath bezierPath];
// path1.lineWidth = 1.0;
//
// path1.lineCapStyle = kCGLineCapRound; //线
// path1.lineJoinStyle = kCGLineJoinRound; //
// // Draw the lines
// for (int i=0; i<self.line2.count; i++) {
// NSString* p=self.line2[i];
// if (i==0) {
// [path1 moveToPoint:CGPointFromString(p)];//
// }
// [path1 addLineToPoint:CGPointFromString(p)];
// }
// [path closePath];//线closePath
@ -213,25 +157,53 @@
// CGFloat dashPattern[] = {3,1};// 3线1
// [path1 setLineDash:dashPattern count:1 phase:1];
[path1 stroke];//
// [path1 stroke];//
for (int i=0; i<self.line1.count; i++) {
NSString* p=self.line2[i];
CGPoint point=CGPointFromString(p);
UIBezierPath *path01 = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(point.x-1.5, point.y-1.5, 3, 3) cornerRadius:2];
[path01 stroke];
[path01 fill];
// UIButton*btn1=[UIButton buttonWithType:1];
// btn1.frame=CGRectMake(point.x-3, point.x-3, 6, 6);
// btn1.tag=i;
// btn1.backgroundColor=[UIColor blackColor];
// [btn1 addTarget:self action:@selector(clickPoint:) forControlEvents:UIControlEventTouchUpInside];
// [self addSubview:btn1];
}
//
// for (int i=0; i<self.line1.count; i++) {
//
// NSString* p=self.line2[i];
// CGPoint point=CGPointFromString(p);
// UIBezierPath *path01 = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(point.x-1, point.y-1, 2, 2) cornerRadius:1];
// [path01 stroke];
// [path01 fill];
//
// }
}
/**
** lineView: 线view
** lineLength: 线
** lineSpacing: 线
** lineColor: 线
**/
-(void)drawDashLine:(UIView *)lineView lineLength:(int)lineLength lineSpacing:(int)lineSpacing lineColor:(UIColor *)lineColor
{
CAShapeLayer *shapeLayer = [CAShapeLayer layer];
[shapeLayer setBounds:lineView.bounds];
[shapeLayer setPosition:CGPointMake(CGRectGetWidth(lineView.frame) / 2, CGRectGetHeight(lineView.frame))];
[shapeLayer setFillColor:[UIColor clearColor].CGColor];
// 线blackColor
[shapeLayer setStrokeColor:lineColor.CGColor];
// 线
[shapeLayer setLineWidth:CGRectGetHeight(lineView.frame)];
[shapeLayer setLineJoin:kCALineJoinRound];
// 线线
[shapeLayer setLineDashPattern:[NSArray arrayWithObjects:[NSNumber numberWithInt:lineLength], [NSNumber numberWithInt:lineSpacing], nil]];
//
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, 0, 0);
CGPathAddLineToPoint(path, NULL, CGRectGetWidth(lineView.frame), 0);
[shapeLayer setPath:path];
CGPathRelease(path);
// 线
[lineView.layer addSublayer:shapeLayer];
}
-(void)clickPoint:(UIButton*)btn{
IfishHistroyVo*vo=self.datas[btn.tag];
self.numLable.text=vo.heaterWaterTemperature;

View File

@ -13,18 +13,142 @@
#import "SVProgressHUD.h"
@interface IfishHistoryView()
@property (strong, nonatomic)IfishChatView *chartView;
@property (weak, nonatomic) IBOutlet IfishChatView *chartHolder;
Strong UIButton *bgButton;
Strong UIView *bgView;
Strong IfishChatView *chartView;
Strong IfishChatView *chartHolder;
Strong UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *chartHeight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *chartWidth;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lableHeight;
@property (weak, nonatomic) IBOutlet UILabel *curDatetitle;
Strong UIButton *predayButton;
Strong UIButton *nextdayButton;
Strong UIImageView *bgImage;
@property(nonatomic,strong)NSMutableArray*line1;
@end
@implementation IfishHistoryView
- (instancetype)init
{
self = [super init];
if (self) {
[self addSubview:self.bgButton];
[self addSubview:self.bgView];
[self.bgView addSubview:self.titleLabel];
[self.bgView addSubview:self.bgImage];
[self.bgView addSubview:self.chartHolder];
[self.bgView addSubview:self.predayButton];
[self.bgView addSubview:self.nextdayButton];
[self loadLayout];
}
return self;
}
- (UIButton *)bgButton{
if (!_bgButton) {
_bgButton = InitObject(UIButton);
[_bgButton setBackgroundColor:RGBA(0, 0, 0, 0.3)];
[_bgButton addTarget:self action:@selector(bgButtonClick:) forControlEvents:UIControlEventTouchUpInside];
}
return _bgButton;
}
- (UIView *)bgView{
if (!_bgView) {
_bgView = InitObject(UIView);
_bgView.backgroundColor = XWhite;
_bgView.layer.masksToBounds = YES;
_bgView.layer.cornerRadius = 15;
}
return _bgView;
}
- (UIImageView *)bgImage{
if (!_bgImage) {
_bgImage = InitObject(UIImageView);
[_bgImage setImage:IMAGEBYENAME(@"history_bg")];
}
return _bgImage;
}
- (IfishChatView *)chartHolder{
if (!_chartHolder) {
_chartHolder = InitObject(IfishChatView);
}
return _chartHolder;
}
- (UILabel *)titleLabel{
if (!_titleLabel) {
_titleLabel = InitObject(UILabel);
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.textColor = RGB(51, 51, 51);
_titleLabel.font = [UIFont systemFontOfSize:13];
}
return _titleLabel;
}
- (UIButton *)predayButton{
if (!_predayButton) {
_predayButton = InitObject(UIButton);
// [_predayButton setTitle:@"前一天" forState:UIControlStateNormal];
[_predayButton addTarget:self action:@selector(dayChangeClick:) forControlEvents:UIControlEventTouchUpInside];
[_predayButton.titleLabel setFont:[UIFont systemFontOfSize:13]];
// [_predayButton setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal];
_predayButton.tag = 10;
}
return _predayButton;
}
- (UIButton *)nextdayButton{
if (!_nextdayButton) {
_nextdayButton = InitObject(UIButton);
// [_nextdayButton setTitle:@"后一天" forState:UIControlStateNormal];
[_nextdayButton addTarget:self action:@selector(dayChangeClick:) forControlEvents:UIControlEventTouchUpInside];
[_nextdayButton.titleLabel setFont:[UIFont systemFontOfSize:13]];
// [_nextdayButton setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal];
_nextdayButton.tag = 11;
}
return _nextdayButton;
}
-(void)loadLayout{
[self.bgButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(315);
make.center.mas_equalTo(self);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.bgView);
make.top.mas_equalTo(4);
make.height.mas_equalTo(20);
}];
[self.bgImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(8);
make.centerX.width.mas_equalTo(self.bgView);
make.height.mas_equalTo(147);
make.bottom.mas_equalTo(self.bgView.mas_bottom).offset(-10);
}];
[self.chartHolder mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.width.mas_equalTo(self.bgImage);
make.height.mas_equalTo(130);
}];
[self.predayButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(10);
make.height.mas_equalTo(30);
make.width.mas_equalTo(60);
make.bottom.mas_equalTo(self.bgView.mas_bottom);
}];
[self.nextdayButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.centerY.mas_equalTo(self.predayButton);
make.right.mas_equalTo(-20);
}];
[self.bgImage layoutIfNeeded];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
@ -56,20 +180,17 @@
_chartView=nil;
}
self.chartView.datas=datas;
self.curDatetitle.text=self.curdateStr;
[self.chartView reloadHeater];
self.titleLabel.text=self.curdateStr;
// [self initLineChart];
}
- (IBAction)clickBg:(id)sender {
#pragma mark --buttonClick
-(void)bgButtonClick:(UIButton *)sender{
self.hidden=YES;
}
- (IBAction)clickBottomBar:(UIButton*)sender {
-(void)dayChangeClick:(UIButton *)sender{
[self.myDeleget clickBottomBarWithIdx:sender.tag];
}
@end

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -21,7 +21,7 @@
<action selector="clickBg:" destination="iN0-l3-epB" eventType="touchUpInside" id="d08-z9-v9h"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gCt-ke-ZyH">
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gCt-ke-ZyH">
<rect key="frame" x="10" y="164.5" width="355" height="338"/>
<subviews>
<button opaque="NO" tag="10" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wvo-bU-MzQ">
@ -35,7 +35,7 @@
</connections>
</button>
<button opaque="NO" tag="11" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="867-ay-tug">
<rect key="frame" x="305" y="300" width="40" height="28"/>
<rect key="frame" x="265" y="300" width="40" height="28"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="后一天">
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@ -44,11 +44,11 @@
<action selector="clickBottomBar:" destination="iN0-l3-epB" eventType="touchUpInside" id="ULN-iZ-cCh"/>
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="走势图" translatesAutoresizingMaskIntoConstraints="NO" id="KOt-M2-Dd2">
<rect key="frame" x="20" y="9.5" width="315" height="270"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="history_bg" translatesAutoresizingMaskIntoConstraints="NO" id="KOt-M2-Dd2">
<rect key="frame" x="0.0" y="10" width="315" height="270"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qbs-BN-bJI" customClass="IfishChatView">
<rect key="frame" x="20" y="10" width="315" height="270"/>
<rect key="frame" x="0.0" y="10" width="315" height="270"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dIS-Dw-qe1">
<rect key="frame" x="157.5" y="4" width="0.0" height="0.0"/>
@ -66,7 +66,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="图表中温度流量为0或不存在时图表中不体现" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gwB-Ff-4Go">
<rect key="frame" x="72" y="288" width="211" height="12"/>
<rect key="frame" x="52" y="288" width="211" height="12"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
@ -84,6 +84,7 @@
<constraint firstItem="gwB-Ff-4Go" firstAttribute="top" secondItem="Qbs-BN-bJI" secondAttribute="bottom" constant="8" id="c6L-8J-cWA"/>
<constraint firstItem="KOt-M2-Dd2" firstAttribute="height" secondItem="Qbs-BN-bJI" secondAttribute="height" id="dld-AE-g6d"/>
<constraint firstItem="Wvo-bU-MzQ" firstAttribute="leading" secondItem="gCt-ke-ZyH" secondAttribute="leading" constant="10" id="e1d-jF-7D0"/>
<constraint firstAttribute="width" constant="315" id="gGB-dF-pUn"/>
<constraint firstItem="KOt-M2-Dd2" firstAttribute="centerX" secondItem="Qbs-BN-bJI" secondAttribute="centerX" id="kVe-Gj-il4"/>
<constraint firstItem="KOt-M2-Dd2" firstAttribute="top" secondItem="Qbs-BN-bJI" secondAttribute="top" id="sZQ-CQ-LGw"/>
<constraint firstAttribute="bottom" secondItem="867-ay-tug" secondAttribute="bottom" constant="10" id="ySi-fC-9Of"/>
@ -93,21 +94,20 @@
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.20994755993150685" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="gCt-ke-ZyH" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="3wc-85-00z"/>
<constraint firstItem="gCt-ke-ZyH" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="55m-6M-dcc"/>
<constraint firstAttribute="bottom" secondItem="69h-Z5-zDB" secondAttribute="bottom" id="8ZV-V1-tgA"/>
<constraint firstItem="69h-Z5-zDB" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="OcJ-PS-bmM"/>
<constraint firstAttribute="trailing" secondItem="69h-Z5-zDB" secondAttribute="trailing" id="TYK-Fj-3Kv"/>
<constraint firstAttribute="trailing" secondItem="gCt-ke-ZyH" secondAttribute="trailing" constant="10" id="eMu-Wt-oOw"/>
<constraint firstItem="69h-Z5-zDB" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="lLw-5d-kFj"/>
</constraints>
<connections>
<outlet property="bgView" destination="gCt-ke-ZyH" id="iMM-jo-xud"/>
<outlet property="chartHolder" destination="Qbs-BN-bJI" id="FDp-Om-vbH"/>
<outlet property="curDatetitle" destination="dIS-Dw-qe1" id="brm-O7-fOG"/>
</connections>
<point key="canvasLocation" x="33.5" y="122.5"/>
<point key="canvasLocation" x="-102" y="120"/>
</view>
</objects>
<resources>
<image name="走势图" width="526" height="453"/>
<image name="history_bg" width="526" height="453.5"/>
</resources>
</document>

View File

@ -79,11 +79,9 @@
//[weakSelf.view addSubview:imgAdView];
//
[[UIApplication sharedApplication].delegate.window addSubview:imgAdView];
//广
imgAdView.getLBlaunchImageAdViewType(LogoAdType);
imgAdView.getLBlaunchImageAdViewType(FullScreenAdType);
//
//imgAdView.localAdImgName = @"Ifishlaunch_adView.jpg";
imgAdView.imgUrl = weakSelf.imgUrl;
//

View File

@ -0,0 +1,17 @@
//
// IfishMainInfoCell.h
// Ifish
//
// Created by wbzhan on 2019/8/23.
// Copyright © 2019 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface IfishMainInfoCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,175 @@
//
// IfishMainInfoCell.m
// Ifish
//
// Created by wbzhan on 2019/8/23.
// Copyright © 2019 lianlian. All rights reserved.
//
#import "IfishMainInfoCell.h"
@interface IfishMainInfoCell()
Strong UIImageView *iconImage;
Strong UILabel *titleLabel;
Strong UILabel *subTitle;
Strong UIImageView *watchImage;//
Strong UILabel *watchLabel;
Strong UIImageView *favImage;//
Strong UILabel *favLabel;
Strong UIView *sepLine;
@end
@implementation IfishMainInfoCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self.contentView addSubview:self.sepLine];
[self.contentView addSubview:self.iconImage];
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.subTitle];
[self.contentView addSubview:self.watchImage];
[self.contentView addSubview:self.watchLabel];
[self.contentView addSubview:self.favImage];
[self.contentView addSubview:self.favLabel];
[self.contentView addSubview:self.sepLine];
}
return self;
}
- (UIView *)sepLine{
if (!_sepLine) {
_sepLine = InitObject(UIView);
_sepLine.backgroundColor = RGB(222, 222, 222);
}
return _sepLine;
}
-(UIImageView *)iconImage{
if (!_iconImage) {
_iconImage = InitObject(UIImageView);
_iconImage.contentMode = UIViewContentModeScaleAspectFill;
_iconImage.clipsToBounds = YES;
}
return _iconImage;
}
-(UILabel *)titleLabel{
if (!_titleLabel) {
_titleLabel= InitObject(UILabel);
_titleLabel.font = FontSize(15);
_titleLabel.textColor=RGB(51, 51, 51);
}
return _titleLabel;
}
-(UIImageView *)watchImage{
if (!_watchImage) {
_watchImage = InitObject(UIImageView);
[_watchImage setImage:IMAGEBYENAME(@"icons_watch")];
}
return _watchImage;
}
-(UILabel *)watchLabel{
if (!_watchLabel) {
_watchLabel= InitObject(UILabel);
_watchLabel.font = FontSize(11);
_watchLabel.textColor=RGB(153, 153, 153);
_watchLabel.textAlignment = NSTextAlignmentCenter;
}
return _watchLabel;
}
-(UIImageView *)favImage{
if (!_favImage) {
_favImage = InitObject(UIImageView);
[_favImage setImage:IMAGEBYENAME(@"icons_fav")];
}
return _favImage;
}
-(UILabel *)favLabel{
if (!_favLabel) {
_favLabel= InitObject(UILabel);
_favLabel.font = FontSize(11);
_favLabel.textColor=RGB(153, 153, 153);
_favLabel.textAlignment = NSTextAlignmentCenter;
}
return _favLabel;
}
-(void)loadLayout{
[self.sepLine mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.width.mas_equalTo(self.contentView);
make.height.mas_equalTo(ONE_PIXEL_SIZE);
}];
[self.iconImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(15);
make.height.mas_equalTo(75);
make.left.mas_equalTo(23);
make.width.mas_equalTo(89);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.iconImage.mas_right).offset(9);
make.top.mas_equalTo(self.iconImage);
make.right.mas_equalTo(15);
}];
[self.watchImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.mas_bottom);
make.right.mas_equalTo(self.favImage.mas_left).offset(-kSizeFrom750(30));
make.width.mas_equalTo(kSizeFrom750(24));
make.height.mas_equalTo(kSizeFrom750(14));
}];
[self.watchLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.watchImage.mas_centerY);
make.height.mas_equalTo(kSizeFrom750(14));
make.left.mas_equalTo(self.watchImage.mas_centerX);
make.width.mas_greaterThanOrEqualTo(kSizeFrom750(14));
}];
[self.favImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.watchImage);
make.width.mas_equalTo(kSizeFrom750(22));
make.height.mas_equalTo(kSizeFrom750(20));
make.right.mas_equalTo(-kSizeFrom750(35));
}];
[self.favLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.height.mas_equalTo(self.watchLabel);
make.left.mas_equalTo(self.favImage.mas_centerX);
make.width.mas_greaterThanOrEqualTo(kSizeFrom750(14));
}];
}
//
//-(void)loadInfoWithModel:(GoodsModel *)model{
//
// NSString *soldTxt = [NSString stringWithFormat:@"已销售%@件",model.sales_num];
//
// NSMutableAttributedString *priceAttr = [CommonUtils diffierentFontWithString:soldTxt rang:[soldTxt rangeOfString:model.sales_num] font:self.soldLabel.font color:Color_Pink spacingBeforeValue:0 lineSpace:0];
// [self.soldLabel setAttributedText:priceAttr];
// if ([model.collection_num integerValue]>1000) {
// model.collection_num = @"999+";
// }
// if ([model.click integerValue]>1000) {
// model.click = @"999+";
// }
// self.favLabel.text = [NSString stringWithFormat:@" %@ ",model.collection_num];
// self.watchLabel.text = [NSString stringWithFormat:@" %@ ",model.click];
// self.titleLabel.text = model.title;
// [self.iconImage setImageWithString:model.img_url];
//}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end

View File

@ -41,6 +41,8 @@
#import "RunSunChangeNameViewController.h"
#import "IfishMessageViewController.h"
#import "PushMessageModel.h"
#import "IfishInformationListViewCell.h"//
#import "JHRefresh.h"//refresh
@interface IfishDeviceViewController ()<UITableViewDelegate,UITableViewDataSource,LxPopViewDelegate,ShopTtemListDelegate>
@property(nonatomic,strong)UITableView *tableView;
@ -56,9 +58,6 @@
@property(nonatomic,strong) UIView *tabHeaderImgView;
@property(nonatomic,strong) UIImageView *userImgView;
@property(nonatomic,strong) UILabel *userNameLabel;
@property(nonatomic,strong) UIButton *newsButton;
@property(nonatomic,strong) UIView *newsRedPoint;
@property(nonatomic,strong) UILabel *newsLabel;
@property(nonatomic,strong) UIView *orangeView;
@property(nonatomic,strong) UIButton *qianDaoBtn;
@property(nonatomic,strong) UIView *qianDaoRedPoint;
@ -78,6 +77,12 @@
@property (nonatomic,strong) UILabel *mesglabel;
@property(nonatomic,assign)NSInteger curDeviceIdx;
Assign NSInteger messageCount;//
Assign BOOL isLoadMore;
Assign BOOL isPush;
@property (nonatomic,strong) NSMutableArray *listDataArr;
@property(nonatomic,copy) NSString* total;
@property(nonatomic) int page;
@property(nonatomic) NSIndexPath *didSelectIndexPath;
//@property (nonatomic,strong) UIView *redView;
@end
@ -85,8 +90,9 @@ Assign NSInteger messageCount;//消息个数
- (void)viewDidLoad {
[super viewDidLoad];
self.messageCount = 0;
[super viewDidLoad];
self.messageCount = 0;
self.isPush = NO;
// Do any additional setup after loading the view.
//self.view.backgroundColor = [];
_adViewData = [[NSMutableArray alloc] init];
@ -99,6 +105,7 @@ Assign NSInteger messageCount;//消息个数
[self showProgress];
[self addDataRequestQueue];
[self checkNotification];
[self creatReatRefreshView];//
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteCurDevice) name:@"DeleteCurDevice" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateDevice) name:@"updateDevice" object:nil];
}
@ -121,7 +128,7 @@ Assign NSInteger messageCount;//消息个数
dispatch_async(dispatch_get_main_queue(), ^{
[self getMoreUserData];
[self initBannerData];
[self loadGoodsData];
[self loadDataWith:0 pageSize:10 isRefres:NO];
});
}
@ -196,7 +203,74 @@ Assign NSInteger messageCount;//消息个数
}];
}
#pragma mark --
//
-(void)loadDataWith:(NSInteger)firstResult pageSize:(NSInteger)pageSize isRefres:(BOOL)isRefresh
{
__weak typeof (self)weakSelf = self;
NSString *userId= [dataContorl dataControlGetUserIdInfo];
[AFHttpTool ifishGetInformations:firstResult pageSize:pageSize userId:userId success:^(id response) {
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
NSString *result=reDic[@"result"];
_total = reDic[@"total"];
if ([result isEqualToString:@"100"]) {
NSArray *dataarr =reDic[@"data"];
for (NSDictionary *dic in dataarr) {
IfishInformations *info =[[IfishInformations alloc] initWithDict:dic];
[self.listDataArr addObject:info];
//[[IfishDatabaseManager sharedManager] insertIfishInformations:model];
}
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];
[weakSelf.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationNone];
}
[weakSelf endRefreshing];
} failure:^(NSError *err) {
[weakSelf endRefreshing];
}];
}
-(void)creatReatRefreshView{
__weak typeof (self)weakSelf=self;
//
[weakSelf.tableView addRefreshFooterViewWithAniViewClass:[JHRefreshCommonAniView class] beginRefresh:^{
if (weakSelf.isLoadMore) {
return ;
}
weakSelf.isLoadMore=YES;
NSInteger pagecount =[self.total integerValue]/10+1;
if (weakSelf.page<pagecount-1) {
weakSelf.page++;
NSInteger first=(NSInteger)weakSelf.page*10;
NSInteger pageSize = 5;//5
[weakSelf loadDataWith:first pageSize:pageSize isRefres:YES];
}else{
[weakSelf endRefreshing];
[weakSelf.view makeToast:@"已无更多数据"];
}
}];
}
//
-(void)endRefreshing{
if (self.isLoadMore) {
self.isLoadMore=NO;
[self.tableView footerEndRefreshing];
}
}
#pragma mark -
-(void)addClicknumber:(int)infoId{
[AFHttpTool ifishAdditionClickNum:infoId success:^(id response) {
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
NSString *result=reDic[@"result"];
if ([result isEqualToString:@"100"]) {
}
} failure:^(NSError *err) {
}];
}
#pragma mark - ()
-(void)getMoreUserData{
@ -477,27 +551,10 @@ Assign NSInteger messageCount;//消息个数
[_userImgView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kGetIconUrl,umodel.userImg]]];
}
//
IfishNewsModel *newsModel=[[DataCenter defaultDtacenter] valueForKey:@"informationNews"];
self.newsModel = newsModel;
NSString *newsTitle= self.newsModel.title;
_newsLabel.text =newsTitle;
//
_qianDaoRedPoint.hidden = userAsset.toDaySignin ? YES : NO;
//
NSString *infoId =[IfishUserDefaultHelper getDefualtInfoId];
if (infoId) {
if (infoId.intValue <self.newsModel.infoId.intValue) {
_newsRedPoint.hidden = NO;
}else{
_newsRedPoint.hidden = YES;
}
}
}
@ -511,51 +568,12 @@ Assign NSInteger messageCount;//消息个数
}
return _orangeView;
}
-(UIButton*)newsButton{
CGFloat SapceH= TabContentHeaght *0.086;
//CGFloat SapceH= TabContentHeaght *0.06;
CGFloat newsButtonW= CGRectGetWidth(_userImgView.frame);
CGFloat newsButtonH =newsButtonW*0.46;
if (!_newsButton) {
_newsButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_newsButton setBackgroundImage:[UIImage imageNamed:@"tab_device_message"] forState:UIControlStateNormal];
_newsButton.frame = CGRectMake(CGRectGetMinX(_userImgView.frame),CGRectGetMaxY(_userImgView.frame) + SapceH ,newsButtonW, newsButtonH);
[_newsButton addTarget:self action:@selector(newsButtonAction) forControlEvents:UIControlEventTouchUpInside];
CGFloat pointW =8;
NSString *renwu= @"资讯";
CGSize size = [renwu sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10]}];
_newsRedPoint = [[UIView alloc] initWithFrame:CGRectMake(newsButtonW/2 + size.width/2 , -2, pointW , pointW )];
_newsRedPoint.backgroundColor = RGB(252, 89, 89);
_newsRedPoint.layer.masksToBounds = YES;
_newsRedPoint.layer.cornerRadius = pointW /2;
[_newsButton addSubview:self.newsRedPoint];
- (NSMutableArray *)listDataArr{
if (!_listDataArr) {
_listDataArr = InitObject(NSMutableArray);
}
return _newsButton;
return _listDataArr;
}
-(UILabel *)newsLabel{
if (!_newsLabel) {
_newsLabel = [[UILabel alloc] init];
_newsLabel.frame = CGRectMake(CGRectGetMaxX(_newsButton.frame) + 5,CGRectGetMidY(_newsButton.frame) -22, kScreenSize.width - CGRectGetMaxX(_newsButton.frame) - 5,44);
UITapGestureRecognizer *labelTapGestureRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(newsTitleBtnAction)];
_newsLabel.textColor = [UIColor whiteColor];
_newsLabel.font =[UIFont systemFontOfSize:15];
_newsLabel.userInteractionEnabled = YES;
[_newsLabel addGestureRecognizer:labelTapGestureRecognizer];
}
return _newsLabel;
}
-(void)newsButtonAction{
[self pushZiXunVC];
@ -669,8 +687,7 @@ Assign NSInteger messageCount;//消息个数
[self.tableView registerNib:[UINib nibWithNibName:@"TabBarDeviceShouYeCell" bundle:nil] forCellReuseIdentifier:@"TabBarDeviceShouYeCell"];
[self.tableView registerNib:[UINib nibWithNibName:@"TabbarDeiceSecdCell" bundle:nil] forCellReuseIdentifier:@"TabbarDeiceSecdCell"];
//CGFloat sapce=TabContentHeaght*0.011;//20/1776
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height) style:UITableViewStyleGrouped];
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
@ -684,11 +701,7 @@ Assign NSInteger messageCount;//消息个数
[self.tabHeaderImgView addSubview:self.orangeView];
[self.tabHeaderImgView addSubview:self.goldBtn];
[self.tabHeaderImgView addSubview:self.levelBtn];
[self.tabHeaderImgView addSubview:self.newsButton];
[self.tabHeaderImgView addSubview:self.newsLabel];
[self.tabHeaderImgView addSubview:self.qianDaoBtn];
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
[self.view addSubview:self.tableView];
UILongPressGestureRecognizer *longpress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(addLongPressGesture:)];
[self.tableView addGestureRecognizer:longpress];
@ -697,6 +710,10 @@ Assign NSInteger messageCount;//消息个数
if (@available(iOS 11.0, *)) {
self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
-(void)addLongPressGesture:(UILongPressGestureRecognizer *)guesture
@ -730,11 +747,24 @@ Assign NSInteger messageCount;//消息个数
[self scrollViewDidScroll:self.tableView];
//
//[self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
[self refreshUI];
//
[self setRedViewData];
[self getMessageCount];
//
if (_isPush) {
NSIndexPath *indexPath =[NSIndexPath indexPathForRow:0 inSection:0];
NSArray *arr =nil;
if (_didSelectIndexPath) {
arr =@[indexPath,_didSelectIndexPath];
}else{
arr =@[indexPath];
}
[self.tableView reloadRowsAtIndexPaths:arr withRowAnimation:UITableViewRowAnimationNone];
}
}
-(void)refreshUI{
@ -798,6 +828,8 @@ Assign NSInteger messageCount;//消息个数
return total ;
}else if(section==2){
return self.listDataArr.count;
}
return 1;
@ -805,19 +837,9 @@ Assign NSInteger messageCount;//消息个数
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
CGFloat listrowH=TabContentHeaght*0.074;
if (indexPath.section ==2 &&indexPath.row ==0){
CGFloat Itemwidth = (kScreenSize.width-1)/2;
CGFloat ItemH = Itemwidth*1.38 +1;
if (_goodsArr.count!=0) {
int total = (int)[_goodsArr count];
int rowCount =total%2==0?total/2:total/2+1;
return ItemH*rowCount;
}
return ItemH*2;
//
if (indexPath.section ==2){
return 95;
}else if (indexPath.section ==1){
CGFloat wH=kScreenSize.width*0.184;
return wH;
@ -843,28 +865,15 @@ Assign NSInteger messageCount;//消息个数
return tCell;
}else if (indexPath.section== 2){
/*TabbarDeiceSecdCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TabbarDeiceSecdCell"];
if(cell==nil){
cell = [[TabbarDeiceSecdCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"TabbarDeiceSecdCell"];
cell.backgroundColor = [UIColor whiteColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}*/
static NSString *identfire=@"IfishAiLiShopGoodsViewCell";
IfishAiLiShopGoodsViewCell *cell=[tableView dequeueReusableCellWithIdentifier:identfire];
}else if (indexPath.section== 2){//
IfishInformationListViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishInformationListViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"IfishInformationListViewCell" owner:self options:nil] lastObject];
cell=[[IfishAiLiShopGoodsViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identfire];
}
cell.delegate = self;
[cell setGoodsdataArr:_goodsArr];
[cell refreshCollellction];
IfishInformations *model =self.listDataArr[indexPath.row];
[cell loadCellDataWith:model];
return cell;
}else if (indexPath.section== 1){
@ -944,7 +953,7 @@ Assign NSInteger messageCount;//消息个数
return 4;
}else if (section==2){
return 100;
}
return 0;
@ -1026,15 +1035,10 @@ Assign NSInteger messageCount;//消息个数
CGFloat remaiLabelW = 70;
UILabel *remaiLabel = [[UILabel alloc] init];
remaiLabel.frame = CGRectMake(CGRectGetMaxX(hotImgView.frame) + Space,0, remaiLabelW, remaiLabelH);
remaiLabel.text = @"爱鱼严选";
remaiLabel.text = @"行业资讯";
remaiLabel.font = [UIFont systemFontOfSize:16];
remaiLabel.textAlignment = NSTextAlignmentLeft;
//remaiLabel.backgroundColor = [UIColor redColor];
UILabel *yanxuanDetail = [[UILabel alloc] init];
yanxuanDetail.frame = CGRectMake(CGRectGetMaxX(remaiLabel.frame),0, 200, remaiLabelH);
yanxuanDetail.text = @"爱鱼奇为您严格挑选的优质宝贝";
yanxuanDetail.font = [UIFont systemFontOfSize:11];
yanxuanDetail.textColor = RGB(153, 153, 153);
UIView*backview=[[UIView alloc] initWithFrame:CGRectMake(0,0, kScreenSize.width,remaiLabelH)];
backview.backgroundColor = [UIColor whiteColor];
@ -1044,7 +1048,7 @@ Assign NSInteger messageCount;//消息个数
[backview addSubview:lineview];
[backview addSubview:hotImgView];
[backview addSubview: remaiLabel];
[backview addSubview: yanxuanDetail];
// [backview addSubview: yanxuanDetail];
[backview bringSubviewToFront:lineview];
[header1view addSubview:backview];
@ -1101,9 +1105,7 @@ Assign NSInteger messageCount;//消息个数
return view;
}else if (section ==2){
UIView *Footerback=[[UIView alloc] init];
Footerback.backgroundColor = RGB(242, 242, 242);
return Footerback;
}
return nil;
}
@ -1168,8 +1170,34 @@ Assign NSInteger messageCount;//消息个数
}
}else if (indexPath.section == 2){
}else if (indexPath.section == 2){//
//
[[IfishUserObsever sharedInstance] addGoldWith:READINFORMATION addType:IFISHADDGOLDTYPE0];
_isPush = YES;
PushMasssageWebViewController*webVC=[[PushMasssageWebViewController alloc]init];
webVC.pushtitle = @"资讯详情";
IfishInformations *model =self.listDataArr[indexPath.row];
webVC.pushlink = model.link;
//
model.clickNum ++;
_didSelectIndexPath = indexPath;
[self addClicknumber:model.infoId];
NSString *infoIdstr = [NSString stringWithFormat:@"%d",model.infoId];
//
//
NSString *oldId = [IfishUserDefaultHelper getDefualtInfoId];
if (!oldId) {
oldId = @"";
}
if (infoIdstr.intValue >= oldId.intValue) {
[IfishUserDefaultHelper saveinfoId:infoIdstr];
}
self.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:webVC animated:YES];
self.hidesBottomBarWhenPushed = NO;
}else if (indexPath.section == 1)
{
@ -1326,10 +1354,7 @@ Assign NSInteger messageCount;//消息个数
#pragma mark -
-(void)delectTankWith:(FormatTankAddCamera*)deviceListModel AtIndexPath:(NSIndexPath *)indexPath
{
AFHTTPRequestOperationManager*mannager=[AFHTTPRequestOperationManager manager];
mannager.responseSerializer=[AFHTTPResponseSerializer serializer];
NSMutableDictionary * para = [NSMutableDictionary dictionary];

View File

@ -294,18 +294,20 @@ Strong UIImage *screenShotImage;//截图
_isconnecting = YES;//
[[GWP2PClient sharedClient] getMultipleDeviceStatusWithDeviceID:self.contact.cameraId password:self.contact.cameraPass completionBlock:^(GWP2PClient *client, BOOL success, NSDictionary<NSString *,id> *dataDictionary) {
_isconnecting = NO;
//
//add V5.0.0
if (success) {
_isConnectCamera = YES;
[self monitorP2PCall];
NSLog(@"当前连接设备信息:%@",dataDictionary);
}else{
_isConnectCamera = NO;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.view makeToast:@"连接设备失败"];
[self hiddenMonitoringUI:NO callWithErrorType:100 isReCall:NO];
});
return;
_isConnectCamera = YES;
[self monitorP2PCall];
// _isConnectCamera = NO;
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// [self.view makeToast:@"连接设备失败"];
// [self hiddenMonitoringUI:NO callWithErrorType:100 isReCall:NO];
// });
// return;
}
}];
}else{

View File

@ -60,6 +60,9 @@
#define kSizeFrom750(x) ((x) * ([UIScreen mainScreen].bounds.size.width/750.f))
#define SYSTEMSIZE(x) [UIFont systemFontOfSize:kSizeFrom750(x)]
#define FontSize(x) [UIFont systemFontOfSize:x]
//设置图片
#define IMAGEBYENAME(name) [UIImage imageNamed:name]
//alloc

View File

@ -22,8 +22,7 @@
-(void)setSixTimercellBackAtIndext:(NSIndexPath *)indexPath;
//炫多
-(void)setTuToSetCellBackAtIndex:(NSIndexPath *)indexPath;
-(void)setTuToSetCellBackAtIndex:(NSIndexPath *)indexPath andName1:(NSString *)name1 andName2:(NSString *)name2 andName3:(NSString *)name3;
//四定时器
-(void)SetFourTimerBackAtIndex:(NSIndexPath *)indexPath;

View File

@ -56,15 +56,11 @@
}else if (indexPath.section ==3 && indexPath.row ==1){
[self.setHeaderBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:@"UV/冲浪" forState:UIControlStateNormal];
}
}
// cell
-(void)setTuToSetCellBackAtIndex:(NSIndexPath *)indexPath{
-(void)setTuToSetCellBackAtIndex:(NSIndexPath *)indexPath andName1:(NSString *)name1 andName2:(NSString *)name2 andName3:(NSString *)name3{
if (indexPath.row ==0) {
//cell
@ -82,7 +78,7 @@
[self.setHeaderBtn setTitle:@"" forState:UIControlStateNormal];
}else if (indexPath.section ==1 && indexPath.row ==1){
[self.setHeaderBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:@"气泵" forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:IsEmptyStr(name1)?@"气泵":name1 forState:UIControlStateNormal];
}else if (indexPath.section ==2 && indexPath.row ==0){
[self.setHeaderBtn setBackgroundImage:[UIImage imageNamed:@"set_lightoff"] forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:@"" forState:UIControlStateNormal];
@ -91,7 +87,7 @@
[self
.setHeaderBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:@"灯1" forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:IsEmptyStr(name2)?@"灯1":name2 forState:UIControlStateNormal];
}else if (indexPath.section ==3 && indexPath.row ==0){
@ -100,7 +96,7 @@
}else if (indexPath.section ==3 && indexPath.row ==1){
[self.setHeaderBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:@"灯2" forState:UIControlStateNormal];
[self.setHeaderBtn setTitle:IsEmptyStr(name1)?@"灯2":name3 forState:UIControlStateNormal];
}