Skip to content

Commit 844260e

Browse files
Merge branch 'optimizeArray'
2 parents a40b0ea + f5a7529 commit 844260e

10 files changed

+22
-14
lines changed

Example/Example/BarExampleViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BarExampleViewController: BarPagerTabStripViewController {
4343

4444
// MARK: - PagerTabStripDataSource
4545

46-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
46+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
4747

4848
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: "Table View")
4949
let child_2 = ChildExampleViewController(itemInfo: "View")
@@ -63,7 +63,7 @@ class BarExampleViewController: BarPagerTabStripViewController {
6363
}
6464
}
6565
let nItems = 1 + (arc4random() % 4)
66-
return Array(childViewControllers.prefix(Int(nItems)))
66+
return ContiguousArray(childViewControllers.prefix(Int(nItems)))
6767
}
6868

6969
override func reloadPagerTabStripView() {

Example/Example/ButtonBarExampleViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ButtonBarExampleViewController: ButtonBarPagerTabStripViewController {
3838

3939
// MARK: - PagerTabStripDataSource
4040

41-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
41+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
4242
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: "Table View")
4343
let child_2 = ChildExampleViewController(itemInfo: "View")
4444
let child_3 = TableChildExampleViewController(style: .grouped, itemInfo: "Table View 2")
@@ -62,7 +62,7 @@ class ButtonBarExampleViewController: ButtonBarPagerTabStripViewController {
6262
}
6363
}
6464
let nItems = 1 + (arc4random() % 8)
65-
return Array(childViewControllers.prefix(Int(nItems)))
65+
return ContiguousArray(childViewControllers.prefix(Int(nItems)))
6666
}
6767

6868
override func reloadPagerTabStripView() {

Example/Example/Instagram/InstagramExampleViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class InstagramExampleViewController: ButtonBarPagerTabStripViewController {
5353

5454
// MARK: - PagerTabStripDataSource
5555

56-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
56+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
5757
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: "FOLLOWING")
5858
let child_2 = ChildExampleViewController(itemInfo: "YOU")
5959
return [child_1, child_2]

Example/Example/NavButtonBarExampleViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class NavButtonBarExampleViewController: ButtonBarPagerTabStripViewController {
5858

5959
// MARK: - PagerTabStripDataSource
6060

61-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
61+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
6262
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: "Table View")
6363
let child_2 = ChildExampleViewController(itemInfo: "View")
6464
let child_3 = TableChildExampleViewController(style: .grouped, itemInfo: "Table View 2")
@@ -82,7 +82,7 @@ class NavButtonBarExampleViewController: ButtonBarPagerTabStripViewController {
8282
}
8383
}
8484
let nItems = 1 + (arc4random() % 8)
85-
return Array(childViewControllers.prefix(Int(nItems)))
85+
return ContiguousArray(childViewControllers.prefix(Int(nItems)))
8686
}
8787

8888
override func reloadPagerTabStripView() {

Example/Example/SegmentedExampleViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SegmentedExampleViewController: SegmentedPagerTabStripViewController {
3737

3838
// MARK: - PagerTabStripDataSource
3939

40-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
40+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
4141
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: "Table View")
4242
let child_2 = ChildExampleViewController(itemInfo: "View")
4343
let child_3 = TableChildExampleViewController(style: .grouped, itemInfo: "Table View 2")
@@ -58,7 +58,7 @@ class SegmentedExampleViewController: SegmentedPagerTabStripViewController {
5858
}
5959
}
6060
let nItems = 1 + (arc4random() % 4)
61-
return Array(childViewControllers.prefix(Int(nItems)))
61+
return ContiguousArray(childViewControllers.prefix(Int(nItems)))
6262
}
6363

6464
@IBAction func reloadTapped(_ sender: UIBarButtonItem) {

Example/Example/Spotify/SpotifyExampleViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class SpotifyExampleViewController: ButtonBarPagerTabStripViewController {
5656

5757
// MARK: - PagerTabStripDataSource
5858

59-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
59+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
6060
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: "FRIENDS"))
6161
child_1.blackTheme = true
6262
let child_2 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: "FEATURED"))

Example/Example/TwitterExampleViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import XLPagerTabStrip
2828
class TwitterExampleViewController: TwitterPagerTabStripViewController {
2929
var isReload = false
3030

31-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
31+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
3232

3333
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: "TableView")
3434
let child_2 = ChildExampleViewController(itemInfo: "View")
@@ -53,7 +53,7 @@ class TwitterExampleViewController: TwitterPagerTabStripViewController {
5353
}
5454
}
5555
let nItems = 1 + (arc4random() % 8)
56-
return Array(childViewControllers.prefix(Int(nItems)))
56+
return ContiguousArray(childViewControllers.prefix(Int(nItems)))
5757
}
5858

5959
@IBAction func reloadTapped(_ sender: AnyObject) {

Example/Example/Youtube/YoutubeExampleViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class YoutubeExampleViewController: BaseButtonBarPagerTabStripViewController<You
6666

6767
// MARK: - PagerTabStripDataSource
6868

69-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
69+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
7070
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: " HOME", image: UIImage(named: "home")))
7171
let child_2 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: " TRENDING", image: UIImage(named: "trending")))
7272
let child_3 = ChildExampleViewController(itemInfo: IndicatorInfo(title: " ACCOUNT", image: UIImage(named: "profile")))

Example/Example/YoutubeWithLabel/YoutubeWithLabelExampleViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class YoutubeWithLabelExampleViewController: BaseButtonBarPagerTabStripViewContr
6868

6969
// MARK: - PagerTabStripDataSource
7070

71-
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
71+
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> ContiguousArray<UIViewController> {
7272
let child_1 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: " HOME", image: UIImage(named: "home")))
7373
let child_2 = TableChildExampleViewController(style: .plain, itemInfo: IndicatorInfo(title: " TRENDING", image: UIImage(named: "trending")))
7474
let child_3 = ChildExampleViewController(itemInfo: IndicatorInfo(title: " ACCOUNT", image: UIImage(named: "profile")))
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)