Commit c877a173 authored by yqz's avatar yqz

Merge branch 'develop_0409' into yQz0507

* develop_0409:
  【新增】充电修改,相似详情新增下一行
parents 30be5b5f d042d63e
{
"images" : [
{
"filename" : "Group_1171275119.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group_1171275119@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group_1171275119@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "Group_1171275120.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group_1171275120@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group_1171275120@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "image_76.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "image_76@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "image_76@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "img_phone_battery_02.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_phone_battery_02@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_phone_battery_02@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "Frame_1171276289.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame_1171276289@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame_1171276289@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -12,7 +12,7 @@ class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigati
let imageString : [String] = [
"img_phone_battery_02",
"img_phone_battery_02 1",
"img_phone_battery_03",
"img_phone_battery_04",
"img_phone_battery_05",
......
......@@ -13,7 +13,7 @@ class ChargeGuideStartController : BaseViewController {
lazy var backView : UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "img_bj_battery")
view.image = UIImage(named: "image_76")
return view
}()
......@@ -40,7 +40,7 @@ class ChargeGuideStartController : BaseViewController {
lazy var chargeView : UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "img_phone_battery_01")
view.image = UIImage(named: "Group_1171275119")
return view
}()
......@@ -96,15 +96,15 @@ class ChargeGuideStartController : BaseViewController {
self.startButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(15)
make.right.equalToSuperview().offset(-15)
make.top.equalTo(self.chargeView.snp.bottom)
make.bottom.equalToSuperview().offset(-safeHeight-37)
make.height.equalTo(50)
}
self.chargeView.snp.makeConstraints { make in
make.top.equalTo(self.detailTipTitleLabel.snp.bottom).offset(42)
make.height.equalTo(476)
make.left.equalToSuperview().offset(27)
make.right.equalToSuperview().offset(-26)
make.top.equalTo(self.detailTipTitleLabel.snp.bottom).offset(32)
make.height.equalTo(453.5 * RScreenH())
make.width.equalTo(345 * RScreenH())
make.centerX.equalToSuperview()
}
self.closeButton.snp.makeConstraints { make in
......
......@@ -12,7 +12,7 @@ class ChargeGuideEndView : UIView{
lazy var backView : UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "img_bj_battery")
view.image = UIImage(named: "image_76")
return view
}()
......@@ -39,7 +39,7 @@ class ChargeGuideEndView : UIView{
lazy var chargeView : UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "img_phone_battery_08")
view.image = UIImage(named: "Group_1171275120")
return view
}()
......@@ -88,15 +88,15 @@ class ChargeGuideEndView : UIView{
self.startButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(15)
make.right.equalToSuperview().offset(-15)
make.top.equalTo(self.chargeView.snp.bottom).offset(66)
make.bottom.equalToSuperview().offset(-safeHeight-37)
make.height.equalTo(50)
}
self.chargeView.snp.makeConstraints { make in
make.top.equalTo(self.detailTipTitleLabel.snp.bottom).offset(42)
make.height.equalTo(352)
make.left.equalToSuperview().offset(27)
make.right.equalToSuperview().offset(-26)
make.height.equalTo(445 * RScreenH())
make.width.equalTo(338 * RScreenH())
make.centerX.equalToSuperview()
}
}
......
......@@ -15,7 +15,7 @@ class ChargeGuideNormalView : UIView{
lazy var backView : UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "img_bj_battery")
view.image = UIImage(named: "image_76")
return view
}()
......
......@@ -47,6 +47,14 @@ class HomeInfoView :UIView {
return sview
}()
lazy var nextRowButton : UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "Frame_1171276289"), for: .normal)
button.backgroundColor = .clear
button.addTarget(self, action: #selector(nextRowButtonAction), for: .touchUpInside)
return button
}()
lazy var deleteView:HomeInfoDeleteView = {
let cH:CGFloat = 48 + 2 * marginLR + safeHeight
......@@ -149,6 +157,15 @@ class HomeInfoView :UIView {
self.addSubview(tableView)
self.addSubview(deleteView)
self.addSubview(self.nextRowButton)
self.nextRowButton.snp.makeConstraints { make in
make.bottom.equalToSuperview().offset(-safeHeight - 106)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(38)
make.width.equalTo(24)
}
}
func changeValue() {
......@@ -286,6 +303,26 @@ class HomeInfoView :UIView {
extension HomeInfoView:UITableViewDataSource,UITableViewDelegate {
@objc func nextRowButtonAction(){
self.tableScrollToNextRow()
}
/// 让表格自动滚动一行
private func tableScrollToNextRow(){
if let indexPath = tableView.indexPathsForVisibleRows?.first {
// 计算下一行的索引
let nextRow = indexPath.row + 1
let nextSection = indexPath.section
// 检查下一行是否存在
if nextRow < tableView.numberOfRows(inSection: nextSection) {
let nextIndexPath = IndexPath(row: nextRow, section: nextSection)
// 滚动到下一行
tableView.scrollToRow(at: nextIndexPath, at: .top, animated: true)
}
}
}
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let OffsetY = scrollView.contentOffset.y
let top = CGRectGetMaxY(self.headerView.titleLabel.frame) + 8
......
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