一键喂鱼界面
This commit is contained in:
parent
6f426c320f
commit
a46a054ab2
|
|
@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@class Xuanduo2Model;
|
||||
|
||||
@interface XuanduoTempratueCorrectViewController : FatherController
|
||||
@interface XuanduoTempratueCorrectViewController : BaseViewController<UITextFieldDelegate>
|
||||
|
||||
@property (nonatomic,strong) UIActivityIndicatorView*indicatorView;
|
||||
@property (nonatomic ,strong) id dataModel;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -11,6 +11,7 @@
|
|||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XuanduoTempratureCorrectView : UIView
|
||||
@property (weak, nonatomic) IBOutlet UITextField *textField;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
|||
|
|
@ -17,5 +17,10 @@
|
|||
// Drawing code
|
||||
}
|
||||
*/
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
|
@ -66,11 +67,38 @@
|
|||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Stf-9K-Vtb">
|
||||
<rect key="frame" x="10" y="99.5" width="224" height="1"/>
|
||||
<color key="backgroundColor" systemColor="systemGray2Color"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="9xP-a6-ibF"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="tlB-Qi-mvx">
|
||||
<rect key="frame" x="122" y="79.5" width="50" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="A0g-vd-yrY"/>
|
||||
<constraint firstAttribute="height" constant="20" id="DHM-iB-dEw"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
|
||||
</textField>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="校准温度" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UAM-uW-zwv">
|
||||
<rect key="frame" x="72" y="79.5" width="50" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="scj-ny-6pE"/>
|
||||
<constraint firstAttribute="width" constant="50" id="tvn-he-WQh"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="DJa-9i-S0t"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="eZR-Ff-N9f" firstAttribute="top" secondItem="eTc-I0-xrM" secondAttribute="top" id="4fq-TT-hO4"/>
|
||||
<constraint firstItem="Stf-9K-Vtb" firstAttribute="centerY" secondItem="2c8-dl-t76" secondAttribute="centerY" id="5Ir-kf-aph"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eZR-Ff-N9f" secondAttribute="trailing" constant="10" id="5ab-XC-dFT"/>
|
||||
<constraint firstItem="lNj-YX-wf8" firstAttribute="leading" secondItem="eTc-I0-xrM" secondAttribute="leading" id="7vR-O8-blu"/>
|
||||
<constraint firstItem="lNj-YX-wf8" firstAttribute="height" secondItem="eTc-I0-xrM" secondAttribute="height" id="8cN-BY-Je5"/>
|
||||
|
|
@ -79,17 +107,32 @@
|
|||
<constraint firstItem="2pv-Tc-pht" firstAttribute="trailing" secondItem="eZR-Ff-N9f" secondAttribute="trailing" id="KCi-JG-Lj0"/>
|
||||
<constraint firstItem="wKE-qN-OPf" firstAttribute="trailing" secondItem="2pv-Tc-pht" secondAttribute="leading" id="LAK-dc-8E0"/>
|
||||
<constraint firstItem="wKE-qN-OPf" firstAttribute="bottom" secondItem="lNj-YX-wf8" secondAttribute="bottom" id="LwB-xN-V0k"/>
|
||||
<constraint firstItem="Stf-9K-Vtb" firstAttribute="top" secondItem="UAM-uW-zwv" secondAttribute="bottom" id="Mnp-sZ-5r2"/>
|
||||
<constraint firstItem="2pv-Tc-pht" firstAttribute="height" secondItem="lNj-YX-wf8" secondAttribute="height" id="QED-df-WAt"/>
|
||||
<constraint firstItem="UAM-uW-zwv" firstAttribute="bottom" secondItem="tlB-Qi-mvx" secondAttribute="bottom" id="SG0-B0-jvm"/>
|
||||
<constraint firstItem="Stf-9K-Vtb" firstAttribute="leading" secondItem="DJa-9i-S0t" secondAttribute="leading" constant="10" id="WG8-b7-TFf"/>
|
||||
<constraint firstItem="wKE-qN-OPf" firstAttribute="width" secondItem="lNj-YX-wf8" secondAttribute="width" id="aVX-zi-E9e"/>
|
||||
<constraint firstItem="eZR-Ff-N9f" firstAttribute="width" secondItem="eTc-I0-xrM" secondAttribute="width" id="akQ-uf-l8S"/>
|
||||
<constraint firstItem="eTc-I0-xrM" firstAttribute="leading" secondItem="DJa-9i-S0t" secondAttribute="leading" constant="10" id="hcQ-6T-XJu"/>
|
||||
<constraint firstItem="wKE-qN-OPf" firstAttribute="height" secondItem="lNj-YX-wf8" secondAttribute="height" id="lZH-Lf-c2W"/>
|
||||
<constraint firstItem="eTc-I0-xrM" firstAttribute="top" secondItem="2c8-dl-t76" secondAttribute="top" constant="10" id="mZ3-zX-X38"/>
|
||||
<constraint firstItem="eZR-Ff-N9f" firstAttribute="height" secondItem="eTc-I0-xrM" secondAttribute="height" id="njJ-Xg-nZV"/>
|
||||
<constraint firstItem="tlB-Qi-mvx" firstAttribute="leading" secondItem="UAM-uW-zwv" secondAttribute="trailing" id="qKW-8X-Jdb"/>
|
||||
<constraint firstItem="Stf-9K-Vtb" firstAttribute="centerX" secondItem="2c8-dl-t76" secondAttribute="centerX" id="qaD-6J-CIh"/>
|
||||
<constraint firstItem="UAM-uW-zwv" firstAttribute="centerX" secondItem="2c8-dl-t76" secondAttribute="centerX" constant="-25" id="rsP-yf-UVU"/>
|
||||
<constraint firstItem="DJa-9i-S0t" firstAttribute="trailing" secondItem="Stf-9K-Vtb" secondAttribute="trailing" constant="10" id="rsc-LH-byn"/>
|
||||
<constraint firstItem="DJa-9i-S0t" firstAttribute="bottom" secondItem="lNj-YX-wf8" secondAttribute="bottom" constant="10" id="wlC-yW-gQi"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="textField" destination="tlB-Qi-mvx" id="aZk-GW-RxM"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-1346.376811594203" y="-94.419642857142847"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<systemColor name="systemGray2Color">
|
||||
<color red="0.68235294117647061" green="0.68235294117647061" blue="0.69803921568627447" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@class Xuanduo2Model;
|
||||
|
||||
@interface XuanduofishFeedViewController : FatherController
|
||||
@interface XuanduofishFeedViewController : BaseViewController<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@property (nonatomic,strong) UIActivityIndicatorView*indicatorView;
|
||||
@property (nonatomic ,strong) id dataModel;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell";
|
|||
@property(nonatomic,strong) setRemindWaterModel *waterInfmodel;
|
||||
@property(nonatomic,strong) Xuanduo2TimerModel *timerModel;
|
||||
@property(nonatomic,strong) XuanduoCycleModel *cycleModel;
|
||||
|
||||
@property(nonatomic,strong)UITableView*tableView;
|
||||
@property (nonatomic,strong) NSMutableDictionary *timeDic;
|
||||
@property(nonatomic,copy) NSString *nextChangeDateLabel;
|
||||
@property(nonatomic,strong) MyHud *XuTohud;
|
||||
|
|
@ -126,6 +126,7 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell";
|
|||
|
||||
- (void)setupTable {
|
||||
|
||||
self.view.backgroundColor=COLOR_MIAN;
|
||||
XuToControlName *name = [UserExtendataArchaver currentNewXuToControlName:self.currentdevice.macAddress];
|
||||
if ([self.currentdevice.type isEqualToString:DECICE_TYPE_XUANDUO3F])
|
||||
{
|
||||
|
|
@ -156,6 +157,14 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell";
|
|||
|
||||
[self.timeDic setObject:dataArr forKey:_titieArr[i]];
|
||||
}
|
||||
UITableView*tableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, 300) style:UITableViewStylePlain];
|
||||
if (@available(iOS 15.0, *))
|
||||
{
|
||||
tableView.sectionHeaderTopPadding=0;
|
||||
}
|
||||
tableView.delegate=self;
|
||||
tableView.dataSource=self;
|
||||
self.tableView=tableView;
|
||||
self.tableView.backgroundColor=COLOR_MIAN;
|
||||
self.tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
|
||||
[self.tableView registerNib:[UINib nibWithNibName:temperatureCellid bundle:nil] forCellReuseIdentifier:temperatureCellid];
|
||||
|
|
@ -163,9 +172,19 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell";
|
|||
[self.tableView registerNib:[UINib nibWithNibName:addCellid bundle:nil] forCellReuseIdentifier:addCellid];
|
||||
//[self.tableView registerNib:[UINib nibWithNibName:timerTypeFlag bundle:nil] forCellReuseIdentifier:timerTypeFlag];
|
||||
[self.tableView registerNib:[UINib nibWithNibName:setTimerflag bundle:nil] forCellReuseIdentifier:setTimerflag];
|
||||
|
||||
UILabel*label=[[UILabel alloc]initWithFrame:CGRectZero];
|
||||
label.textColor=[UIColor whiteColor];
|
||||
label.font=[UIFont systemFontOfSize:12];
|
||||
label.numberOfLines=0;
|
||||
label.text=@"将设备关联至一键喂鱼功能后,点击一键喂鱼开关时,所有关联的设备会同时按照设置好的操作执行,如您将循环泵、增氧泵、灯光1三个设备关联至一键喂鱼功能,并将循环泵设置关闭,增氧泵设置关闭,灯光1设置打开,喂鱼时,点击一键喂鱼按钮,系统将会把循环泵和增氧泵进行关闭,灯光1打开,方便鱼儿进食10分钟后,喂鱼结束,系统会自动恢复喂鱼前的设备状态(如果关联的设备有定时,会按照定时执行)。";
|
||||
CGSize size= [label.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:(NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName: label.font} context:NULL].size;
|
||||
label.frame=CGRectMake((kScreenWidth-size.width)/2.0, CGRectGetMaxY(self.tableView.frame)+20, size.width, size.height);
|
||||
[self.view addSubview:label];
|
||||
|
||||
}
|
||||
|
||||
-(void)clickCell:(TimerTypeTableViewCell *)cell button:(UIButton *)button timerType:(NSInteger *)type
|
||||
-(void)clickCell:(TimerTypeTableViewCell *)cell button:(UIButton *)button timerType:(NSInteger )type
|
||||
{
|
||||
XuanduoTimerSettingViewController *_settingVC = [[XuanduoTimerSettingViewController alloc] init];
|
||||
_settingVC.currentdevice = self.currentdevice;
|
||||
|
|
|
|||
Loading…
Reference in New Issue