Skip to content

Commit 8d9f095

Browse files
committed
添加分段控制偏移的情况,解决自定义tabbarController图片加载问题
1 parent 0abf6c8 commit 8d9f095

File tree

14 files changed

+27
-21
lines changed

14 files changed

+27
-21
lines changed
Binary file not shown.

LLSegmentViewController/Example/CustomItemView/AttributeItemView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class AttributeItemViewController: LLSegmentViewController {
6262
}
6363

6464
func layoutContentView() {
65-
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
65+
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
6666
self.relayoutSubViews()
6767
}
6868

LLSegmentViewController/Example/CustomTableViewController/SimpleTabViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SimpleTabViewController: LLSegmentViewController {
2020
}
2121

2222
func layoutContentView() {
23-
self.layoutInfo.segmentControlPositionType = .bottom(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
23+
self.layoutInfo.segmentControlPositionType = .bottom(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
2424
self.relayoutSubViews()
2525
}
2626

LLSegmentViewController/Example/CustomTableViewController/SinaViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SinaViewController: LLSegmentViewController {
1919
}
2020

2121
func layoutSegmentView() {
22-
self.layoutInfo.segmentControlPositionType = .bottom(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
22+
self.layoutInfo.segmentControlPositionType = .bottom(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
2323
relayoutSubViews()
2424
}
2525

LLSegmentViewController/Example/DetailViewController/GoodsDetailViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class GoodsDetailViewController: LLSegmentViewController {
2727

2828
func layoutContentView() {
2929
self.layoutInfo.headView = loadHeadView()
30-
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
30+
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
3131
self.relayoutSubViews()
3232
}
3333

LLSegmentViewController/Example/DetailViewController/PersonDetailViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class PersonDetailViewController: LLSegmentViewController {
2727
loadLufeiImageView()
2828

2929
self.layoutInfo.headView = lufeiImageView
30-
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
30+
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
3131
self.relayoutSubViews()
3232
}
3333

LLSegmentViewController/Example/IndicatorViewController/BadgeValueViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class BadgeValueViewController: LLSegmentViewController {
1818
}
1919

2020
func layoutContentView() {
21-
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
21+
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
2222
self.relayoutSubViews()
2323
}
2424

LLSegmentViewController/Example/IndicatorViewController/LLMsgViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class LLMsgViewController: LLSegmentViewController {
1919
}
2020

2121
func layoutContentView() {
22-
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
22+
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:100)
2323
self.relayoutSubViews()
2424
}
2525

LLSegmentViewController/Example/IndicatorViewController/TitleViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TitleViewController: LLSegmentViewController {
2020
}
2121

2222
func layoutContentView() {
23-
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
23+
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
2424
self.relayoutSubViews()
2525
}
2626

LLSegmentViewController/Example/SpecialViewController/FootballViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class FootballViewController: LLSegmentViewController {
2020
}
2121

2222
func layoutContentView() {
23-
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50))
23+
self.layoutInfo.segmentControlPositionType = .top(size: CGSize.init(width: UIScreen.main.bounds.width, height: 50),offset:0)
2424
self.relayoutSubViews()
2525
}
2626

0 commit comments

Comments
 (0)