If you need to pass the data between view controllers then :
var secondTab = self.tabBarController?.viewControllers[1] as SecondViewController
secondTab.array = firstArray
More Related Contents:
- Waiting until the task finishes
- @selector() in Swift?
- What is the difference between a weak reference and an unowned reference?
- How can I use String substring in Swift 4? ‘substring(to:)’ is deprecated: Please use String slicing subscript with a ‘partial range from’ operator
- Convert string to date in Swift
- Object X of class Y does not implement methodSignatureForSelector in Swift
- Escaping Closures in Swift
- How to compare enum with associated values by ignoring its associated value in Swift?
- Swift optional escaping closure parameter
- How to make a random color with Swift
- How to create generic protocols in Swift?
- How to get Monday’s date of the current week in swift
- How can I do a Swift for-in loop with a step?
- How do i return coordinates after forward geocoding?
- Swap rootViewController with animation?
- Swift: How to use sizeof?
- What is difference between optional and decodeIfPresent when using Decodable for JSON Parsing?
- LiDAR and RealityKit – Capture a Real World Texture for a Scanned Model
- How to get mathemical PI constant in Swift
- How does collisionBitMask work? Swift/SpriteKit
- What is the difference between functions and closures? [closed]
- Saving Picked Image to CoreData
- Access Firebase variable outside Closure
- Changing navigation title programmatically
- Use resources in unit tests with Swift Package Manager
- Get button pressed id on Swift via sender
- How to remove “row” separators/dividers from a List in SwiftUI?
- Self in init params
- How to convert a binary to decimal in Swift?
- Remove element from collection during iteration with forEach