From 1ee5a37c84d3a44862eb533bc5c7179ba95cb1ef Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Tue, 18 Jun 2024 08:45:47 +0200 Subject: [PATCH] chore: Changed TableViewController to have a Nib file (#4074) TableViewController is now initialized from a Nib file with an extra view. This is an additional test for the changes introduced in #4071. --- .../iOS-Swift.xcodeproj/project.pbxproj | 4 ++ .../ViewControllers/TableViewController.swift | 3 +- .../ViewControllers/TableViewController.xib | 37 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.xib diff --git a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj index 200e118f657..ccbebfb2248 100644 --- a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj +++ b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj @@ -108,6 +108,7 @@ D8F3D05F274E6A8B00B56F8C /* AssertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D05E274E6A8B00B56F8C /* AssertView.swift */; }; D8F3D062274EBD4800B56F8C /* SpanExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F3D061274EBD4800B56F8C /* SpanExtension.swift */; }; D8F57BC527BBD787000D09D4 /* CoreDataViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F57BC427BBD787000D09D4 /* CoreDataViewController.swift */; }; + D8FD68C42C1C86E300A70055 /* TableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D8FD68C32C1C86E300A70055 /* TableViewController.xib */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -360,6 +361,7 @@ D8F3D05E274E6A8B00B56F8C /* AssertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssertView.swift; sourceTree = ""; }; D8F3D061274EBD4800B56F8C /* SpanExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpanExtension.swift; sourceTree = ""; }; D8F57BC427BBD787000D09D4 /* CoreDataViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreDataViewController.swift; sourceTree = ""; }; + D8FD68C32C1C86E300A70055 /* TableViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TableViewController.xib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -573,6 +575,7 @@ D890CD3B26CEE2FA001246CF /* NibViewController.xib */, D890CD3E26CEE31B001246CF /* NibViewController.swift */, D8DBDA75274D591F00007380 /* TableViewController.swift */, + D8FD68C32C1C86E300A70055 /* TableViewController.xib */, D8DBDA77274D5FC400007380 /* SplitViewController.swift */, D8F3D056274E574200B56F8C /* LoremIpsumViewController.swift */, D8F57BC427BBD787000D09D4 /* CoreDataViewController.swift */, @@ -863,6 +866,7 @@ 7B3427F825876A5200056519 /* Tongariro.jpg in Resources */, 637AFDB3243B02770034958B /* Assets.xcassets in Resources */, 637AFDB1243B02760034958B /* Main.storyboard in Resources */, + D8FD68C42C1C86E300A70055 /* TableViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.swift b/Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.swift index 4e55f7ada71..ae085943e7e 100644 --- a/Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.swift +++ b/Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.swift @@ -4,10 +4,11 @@ import UIKit class TableViewController: UITableViewController { var spanObserver: SpanObserver? + @IBOutlet var label: UILabel! override func viewDidLoad() { super.viewDidLoad() - + label.text = "Gradient Table View" spanObserver = createTransactionObserver(forCallback: assertTransaction) } diff --git a/Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.xib b/Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.xib new file mode 100644 index 00000000000..a7a693a6261 --- /dev/null +++ b/Samples/iOS-Swift/iOS-Swift/ViewControllers/TableViewController.xib @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +