Commit 7504dca6 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

Merge branch 'master' into lmj_branch

# Conflicts:
#	.DS_Store
parents 181f9f14 826ca8ae
......@@ -58,10 +58,13 @@ static NSString * const ZJReminderTimeCellID = @"ZJReminderTimeCellID";
[self.view addSubview:self.sureButton];
self.sureButton.layer.cornerRadius = 22;
[self.sureButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
CGFloat bottomMargin = IPHONE_X ? (-20 - 39) : -20;
[self.sureButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(@20);
make.right.bottom.equalTo(@(-20));
make.right.equalTo(@(-20));
make.height.equalTo(@44);
make.bottom.equalTo(@(bottomMargin));
}];
}
......
......@@ -160,10 +160,22 @@
pickerView.dataSource = self;
pickerView.backgroundColor = [UIColor whiteColor];
NSDate *currentDate = [NSDate date];
NSCalendar *currentCalendar = [NSCalendar currentCalendar];
NSUInteger integer = NSCalendarUnitYear | NSCalendarUnitMonth |NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond;
NSDateComponents *dataCom = [currentCalendar components:integer fromDate:currentDate];
NSInteger hour = [dataCom hour];
NSInteger minute = [dataCom minute];
//设置pickerView默认第一行 这里也可默认选中其他行 修改selectRow即可
[pickerView selectRow:0 inComponent:0 animated:YES];
[pickerView selectRow:0 inComponent:1 animated:YES];
if (hour < 24 && minute < 60) {
[pickerView selectRow:hour inComponent:0 animated:YES];
[pickerView selectRow:minute inComponent:1 animated:YES];
selectedHour = hourArray[hour];
selectedMin = minArray[minute];
}else{
[pickerView selectRow:0 inComponent:0 animated:YES];
[pickerView selectRow:0 inComponent:1 animated:YES];
}
[contentView addSubview:pickerView];
}
......
......@@ -28,29 +28,20 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="温馨提醒:添加提醒后,约定时间会向关心的人发起" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gph-CG-J9S">
<rect key="frame" x="20" y="104" width="335" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提醒消息" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0mH-sk-88b">
<rect key="frame" x="20" y="123.5" width="335" height="14.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="温馨提醒:添加提醒后,约定时间会向关心的人发起提醒消息" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gph-CG-J9S">
<rect key="frame" x="40" y="104" width="295" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="Gph-CG-J9S" secondAttribute="trailing" constant="20" id="2CA-VO-Xc2"/>
<constraint firstAttribute="trailing" secondItem="0mH-sk-88b" secondAttribute="trailing" constant="20" id="2bm-g0-idw"/>
<constraint firstItem="0mH-sk-88b" firstAttribute="top" secondItem="Gph-CG-J9S" secondAttribute="bottom" constant="5" id="97w-MJ-gZe"/>
<constraint firstAttribute="trailing" secondItem="Gph-CG-J9S" secondAttribute="trailing" constant="40" id="2CA-VO-Xc2"/>
<constraint firstItem="Gph-CG-J9S" firstAttribute="top" secondItem="VBe-rX-7pd" secondAttribute="bottom" constant="20" id="9sH-8Q-IrK"/>
<constraint firstItem="VBe-rX-7pd" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="40" id="Q4B-wP-e7r"/>
<constraint firstItem="0mH-sk-88b" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="dCY-oj-k1M"/>
<constraint firstItem="VBe-rX-7pd" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="rKU-ig-hLw"/>
<constraint firstAttribute="trailing" secondItem="VBe-rX-7pd" secondAttribute="trailing" constant="20" id="vwa-NO-B9g"/>
<constraint firstItem="Gph-CG-J9S" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="whS-vc-bxT"/>
<constraint firstItem="Gph-CG-J9S" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="40" id="whS-vc-bxT"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment