i tried like this but same problem
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "identifierSeasons", for: indexPath) as! SeasonCell
cell.backgroundColor = .clear
let arreglo = arraySeasonsEpisodes[indexPath.item]
cell.model = arreglo
cell.setupViews()
print(indexPath.item, arreglo.episode_number)
return cell
Post
Replies
Boosts
Views
Activity
Here's the data as JSON
ArrayJson - https://developer.apple.com/forums/content/attachment/d8cce88e-66d4-423d-9f1d-58001fa799f4
here's the whole VC
ViewController - https://developer.apple.com/forums/content/attachment/6791613a-fb72-4d34-adfd-9f1a6f2c6138
Especially, we need to know how arregloDeArreglos, modelOfSeason or any other data used for dataSource.
var modelOfSeason = arraySeasonsEpisodes
its only used as a global variable
and arregloDeArreglos
it's only used in cellForRowAt
I think the following code would be able to make your collection views work
i'm sorry how can update with the following code my cellForRowAt for the UITable and the cellForItemAt for the UICollection
i didn't quite understand
how can i use this part
arrayOfArraySeasonsEpisodes = .init(repeating: [], count: 10) //#- Use Array (of Array)
Thank you guys for your help i learn a lot problem solve
tons of thank you
yes all of then are global 😅
var imagenArraaay: [String] = []
var arrayPoster_path: [String] = []
var arrayOverview: [String] = []
var arrayCreatorName: [String] = []
var season_number: String = ""
var season_number2: Int = 0
var air_date: String = ""
var still_path: String = ""
var arrayName: [String] = []
var arrayFirst_air_date: [String] = []
var arrayBackdrop_path: [String] = []
var arrayVote_average: [NSNumber] = []
var arrayid: [NSNumber] = []
var arrayShows: [tvshows] = []
var arrayCast: [castt] = []
var arrayCreator: [created] = []
var arrayAiringSeason: [episode] = []
var arraySeasonsEpisodes: [episodess] = []
var arraySeasonsEpisodes2: [episodess] = []
var arraySeasonsEpisodes3: [episodess] = []
var arraySeasonsEpisodes4: [episodess] = []
var arraySeasonsEpisodes5: [episodess] = []
var arraySeasonsEpisodes6: [episodess] = []
var arraySeasonsEpisodes7: [episodess] = []
var arraySeasonsEpisodes8: [episodess] = []
var arraySeasonsEpisodes9: [episodess] = []
var arraySeasonsEpisodes10: [episodess] = []
var arregloDeArreglos: [[arregloBidimencional]] = []
var arregloDeArreglosTri: [arregloTridimencional] = []
var arrayOfSeasonsInt: [Int] = []
here's the structs
struct tvshows: Initiable {
let poster_path: String?
let name: String?
let first_air_date: String?
let vote_average: Double?
let overview: String?
let id: Int?
let backdrop_path: String?
init() {
self.poster_path = ""
self.name = ""
self.first_air_date = ""
self.vote_average = 0.0
self.overview = ""
self.id = 0
self.backdrop_path = ""
}
init(dictionary: NSDictionary) {
self.poster_path = dictionary["poster_path"] as? String ?? ""
self.name = dictionary["name"] as? String ?? ""
self.first_air_date = dictionary["first_air_date"] as? String ?? ""
self.vote_average = dictionary["vote_average"] as? Double ?? 0.0
self.overview = dictionary["overview"] as? String ?? ""
self.backdrop_path = dictionary["backdrop_path"] as? String ?? ""
self.id = dictionary["id"] as? Int ?? 0
}
}
struct imageStruct: Initiable {
private var image: [String] = [""]
init() {
}
init(image: [String]) {
self.image = image
}
}
struct castt: Initiable {
let original_name: String?
let character: String?
let profile_path: String?
init() {
self.original_name = ""
self.character = ""
self.profile_path = ""
}
init(dictionary: NSDictionary) {
self.original_name = dictionary["original_name"] as? String ?? ""
self.character = dictionary["character"] as? String ?? ""
self.profile_path = dictionary["profile_path"] as? String ?? ""
}
}
struct created: Initiable {
let name: String?
init() {
self.name = ""
}
init(dictionary: NSDictionary) {
self.name = dictionary["name"] as? String ?? ""
}
}
struct episodess: Initiable {
let episode_number: Int?
let name: String?
let still_path: String?
let seasonNumerEpisode: Int?
init() {
self.episode_number = 0
self.name = ""
self.still_path = ""
self.seasonNumerEpisode = 0
}
init(dictionary: NSDictionary, seasonInt: Int) {
self.episode_number = dictionary["episode_number"] as? Int ?? 0
self.name = dictionary["name"] as? String ?? ""
self.still_path = dictionary["still_path"] as? String ?? ""
self.seasonNumerEpisode = seasonInt
}
}
struct arregloBidimencional: Initiable {
let arregloDeEpisodios: [episodess]?
let seasonNumber: Int?
init() {
self.arregloDeEpisodios = [episodess]()
self.seasonNumber = 0
}
init(arreglo: [episodess], tag: Int) {
self.arregloDeEpisodios = arreglo
self.seasonNumber = tag
}
}
struct arregloTridimencional: Initiable {
let arregloDeArreglos: [arregloBidimencional]?
let seasonNumberArreglo: Int?
init() {
self.arregloDeArreglos = [arregloBidimencional]()
self.seasonNumberArreglo = 0
}
init(arregloTri: [arregloBidimencional], tag: Int) {
self.arregloDeArreglos = arregloTri
self.seasonNumberArreglo = tag
}
}
one is missing but i don't used it
😅 sorry i have not experienced with this.
i don't have the knowledge to manage information from a UItable to UIcolectionview
so the only way i could solve it is making a global variable to move the previous information and loaded to the UIcollectionview
now i'm trying to investigate how can i send information from the table to collection
i'm trying to make it the same way i treated the information in the UICollectionViewCell
using didSet but still not clue
here's the code so far
import UIKit
var modelOfSeason = arraySeasonsEpisodes //this is the global
class NumberOfSeasonsCell: UITableViewCell, ViewDelegate {
var modelo: arregloBidimencional? {
didSet {
guard let viewModel = modelo else { return }
let array = viewModel.arregloDeEpisodios
}
}
var compactConstraints: [NSLayoutConstraint] = [NSLayoutConstraint]()
var regularConstraints: [NSLayoutConstraint] = [NSLayoutConstraint]()
var largeConstraints: [NSLayoutConstraint] = [NSLayoutConstraint]()
lazy var seasonsCollectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .horizontal
layout.minimumLineSpacing = 30
let cv = UICollectionView(frame: .zero, collectionViewLayout: layout)
cv.backgroundColor = UIColor.clear
cv.register(SeasonCell.self, forCellWithReuseIdentifier: "identifierSeasons")
cv.showsHorizontalScrollIndicator = false
cv.translatesAutoresizingMaskIntoConstraints = false
return cv
}()
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
func contenido(array: arregloBidimencional){
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
initComponents()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setCollectionViewDataSourceDelegateD: UICollectionViewDataSource & UICollectionViewDelegate(_ dataSourceDelegate: D, forRow row: Int) {
seasonsCollectionView.delegate = dataSourceDelegate
seasonsCollectionView.dataSource = dataSourceDelegate
seasonsCollectionView.tag = row
seasonsCollectionView.setContentOffset(seasonsCollectionView.contentOffset, animated:false) // Stops collection view if it was scrolling.
seasonsCollectionView.reloadData()
}
var collectionViewOffset: CGFloat {
set { seasonsCollectionView.contentOffset.x = newValue }
get { return seasonsCollectionView.contentOffset.x }
}
func initComponents() {
addComponents()
setAutolayout()
activateCurrentLayout()
}
func addComponents() {
self.addSubview(seasonsCollectionView)
}
func setAutolayout() {
largeConstraints = [
seasonsCollectionView.centerYAnchor.constraint(equalTo: self.centerYAnchor),
seasonsCollectionView.centerXAnchor.constraint(equalTo: self.centerXAnchor),
seasonsCollectionView.widthAnchor.constraint(equalTo: self.widthAnchor),
seasonsCollectionView.heightAnchor.constraint(equalTo: self.heightAnchor),
]
}
func activateCurrentLayout() {
NSLayoutConstraint.activate(largeConstraints)
}
}
extension UITableViewCell {
open override func addSubview(_ view: UIView) {
super.addSubview(view)
sendSubviewToBack(contentView)
}
}
this is the entire code of the cell
import UIKit
class SeasonCell: UICollectionViewCell {
var model: episodess? {
didSet {
guard let viewModel = model else { return }
let episodio = viewModel.episode_number
let nombre = viewModel.name
let guardado = viewModel.still_path
episodeNumber.text = "Episode Number: \(episodio ?? 0)"
episodeName.text = "Episode Name: \(nombre ?? "")"
let image = "w500\(guardado ?? "")"
if image == "" || image == "undefined" {
seasonImage.image = UIImage()
seasonImage.contentMode = .scaleAspectFill
}else{
seasonImage.downloaded(from: image)
seasonImage.contentMode = .scaleAspectFill
}
print("model", viewModel.episode_number) //
}
}
override func prepareForReuse() {
super.prepareForReuse()
}
override init(frame: CGRect) {
super.init(frame: frame)
setupViews()
}
let seasonImage: UIImageView = {
let iv = UIImageView()
iv.contentMode = .scaleToFill
iv.backgroundColor = .clear
iv.image = UIImage(named: "")
iv.translatesAutoresizingMaskIntoConstraints = false
return iv
}()
var episodeNumber: UILabel = {
let label = UILabel()
label.text = ""
label.numberOfLines = 1
label.textAlignment = .left
label.font = Fonts.AVENIR.of(size: 10)
label.translatesAutoresizingMaskIntoConstraints = false
label.textColor = UIColor.white
return label
}()
var episodeName: UILabel = {
let label = UILabel()
label.text = ""
label.numberOfLines = 1
label.textAlignment = .left
label.font = Fonts.AVENIR.of(size: 10)
label.translatesAutoresizingMaskIntoConstraints = false
label.textColor = UIColor.white
return label
}()
func setupViews() {
addSubview(seasonImage)
addSubview(episodeNumber)
addSubview(episodeName)
NSLayoutConstraint.activate([
seasonImage.centerYAnchor.constraint(equalTo: self.centerYAnchor),
seasonImage.centerXAnchor.constraint(equalTo: self.centerXAnchor),
seasonImage.widthAnchor.constraint(equalTo: self.widthAnchor, multiplier: 1),
seasonImage.heightAnchor.constraint(equalTo: self.widthAnchor, multiplier: 0.6),
episodeNumber.leftAnchor.constraint(equalTo: seasonImage.leftAnchor),
episodeNumber.topAnchor.constraint(equalTo: seasonImage.bottomAnchor, constant: 8),
episodeNumber.rightAnchor.constraint(equalTo: seasonImage.rightAnchor),
episodeName.leftAnchor.constraint(equalTo: episodeNumber.leftAnchor),
episodeName.rightAnchor.constraint(equalTo: seasonImage.rightAnchor),
episodeName.topAnchor.constraint(equalTo: episodeNumber.bottomAnchor, constant: 8),
])
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
I'm sorry i didn't copy the entire print
model Optional(1)
0 Optional(1)
model Optional(2)
1 Optional(2)
model Optional(3)
2 Optional(3)
model Optional(4)
3 Optional(4)
model Optional(5)
4 Optional(5)
model Optional(6)
5 Optional(6)
model Optional(7)
6 Optional(7)
model Optional(8)
7 Optional(8)
model Optional(9)
8 Optional(9)
model Optional(10)
9 Optional(10)
model Optional(11)
10 Optional(11)
model Optional(12)
11 Optional(12)
model Optional(1)
12 Optional(1)
model Optional(2)
13 Optional(2)
model Optional(3)
14 Optional(3)
model Optional(4)
15 Optional(4)
model Optional(5)
16 Optional(5)
model Optional(6)
17 Optional(6)
model Optional(7)
18 Optional(7)
model Optional(8)
19 Optional(8)
model Optional(9)
20 Optional(9)
model Optional(10)
21 Optional(10)
model Optional(11)
22 Optional(11)
model Optional(9)
20 Optional(9)
this is how i storage the information from the JSON response
let toneCategories = jsonDictionary["episodes"] as? [NSDictionary] ?? []
for category in toneCategories {
let show = episodess(dictionary: category)
arraySeasonsEpisodes.append(show)
let number = Int(season_number) ?? 0
let reversedCollection = (1 ... number)
for (index, element) in reversedCollection.enumerated() {
let fixed = index - 1
if fixed = 0 {
let arreglo = arregloBidimencional(arreglo: [show], tag: 0)
arregloDeArreglos.append([arreglo])
}else if fixed = 1{
let fixed2 = index
let arreglo = arregloBidimencional(arreglo: [show], tag: fixed2)
arregloDeArreglos.append([arreglo])
}
}
}
the struct for arregloBidimencional
var arregloDeArreglos: [[arregloBidimencional]] = []
struct arregloBidimencional: Initiable {
let episodes: [episodess]?
let tack: Int?
init() {
self.episodes = [episodess]()
self.tack = 0
}
init(arreglo: [episodess], tag: Int) {
self.episodes = arreglo
self.tack = tag
}
}
Why do you need this if-statement?
because i have 2 CollectionsView in the same View
Are you still trying to show UICollectionView inside each UITableViewCell as shown in another thread of yours?
It shows already and can be scrolled horizontally, i solve my problem now the thing is it shows the same cell 0 content in all cells
Please show your latest definition of NumberOfSeasonsCell if you are still using it.
here's the code i'm not using this any more because it detects how may arrows will be display for current show and can be scrolled
class NumberOfSeasonsCell: UITableViewCell, ViewDelegate {
var compactConstraints: [NSLayoutConstraint] = [NSLayoutConstraint]()
var regularConstraints: [NSLayoutConstraint] = [NSLayoutConstraint]()
var largeConstraints: [NSLayoutConstraint] = [NSLayoutConstraint]()
lazy var seasonsCollectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .horizontal
layout.minimumLineSpacing = 30
let cv = UICollectionView(frame: .zero, collectionViewLayout: layout)
cv.backgroundColor = UIColor.clear
cv.register(SeasonCell.self, forCellWithReuseIdentifier: "identifierSeasons")
cv.showsHorizontalScrollIndicator = false
cv.translatesAutoresizingMaskIntoConstraints = false
return cv
}()
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
initComponents()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setCollectionViewDataSourceDelegateD: UICollectionViewDataSource & UICollectionViewDelegate(_ dataSourceDelegate: D, forRow row: Int) {
seasonsCollectionView.delegate = dataSourceDelegate
seasonsCollectionView.dataSource = dataSourceDelegate
seasonsCollectionView.tag = row
seasonsCollectionView.setContentOffset(seasonsCollectionView.contentOffset, animated:false) // Stops collection view if it was scrolling.
seasonsCollectionView.reloadData()
}
var collectionViewOffset: CGFloat {
set { seasonsCollectionView.contentOffset.x = newValue }
get { return seasonsCollectionView.contentOffset.x }
}
func initComponents() {
addComponents()
setAutolayout()
activateCurrentLayout()
}
func addComponents() {
self.addSubview(seasonsCollectionView)
}
func setAutolayout() {
largeConstraints = [
seasonsCollectionView.centerYAnchor.constraint(equalTo: self.centerYAnchor),
seasonsCollectionView.centerXAnchor.constraint(equalTo: self.centerXAnchor),
seasonsCollectionView.widthAnchor.constraint(equalTo: self.widthAnchor),
seasonsCollectionView.heightAnchor.constraint(equalTo: self.heightAnchor),
]
}
func activateCurrentLayout() {
NSLayoutConstraint.activate(largeConstraints)
}
}
extension UITableViewCell {
open override func addSubview(_ view: UIView) {
super.addSubview(view)
sendSubviewToBack(contentView)
}
}
Also all the code related to UI.castCollectionView is needed.
UI.castCollectionView is not part of the problem because its an independent UICollectionView working fine the problem is with cell and cell model of the other UICollectionView inside the else cellForItemAt
let arreglo = arraySeasonsEpisodes[indexPath.item]
cell.model = arreglo
lazy var castCollectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .horizontal
layout.minimumLineSpacing = 20
let cv = UICollectionView(frame: .zero, collectionViewLayout: layout)
cv.backgroundColor = UIColor.clear
cv.register(CastCell.self, forCellWithReuseIdentifier: "identifierCast")
cv.isPagingEnabled = true
cv.showsVerticalScrollIndicator = false
cv.showsHorizontalScrollIndicator = false
cv.translatesAutoresizingMaskIntoConstraints = false
return cv
}()
extension SelectedShowVC: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) - Int {
if collectionView == UI.castCollectionView{
return arrayCast.count
}else{
return arraySeasonsEpisodes.count
//return model[collectionView.tag].count
}
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) - UICollectionViewCell {
if collectionView == UI.castCollectionView{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "identifierCast", for: indexPath) as! CastCell
cell.backgroundColor = .clear
cell.model = arrayCast[indexPath.item]
return cell
}else{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "identifierSeasons", for: indexPath) as! SeasonCell
cell.backgroundColor = .clear
let arreglo = arraySeasonsEpisodes[indexPath.item]
cell.model = arreglo
print(indexPath.item, arreglo.episode_number)
return cell
}
}
Print statements inside CellForItemAt and UICollectionViewCell
model Optional(4)
3 Optional(4)
model Optional(5)
4 Optional(5)
model Optional(6)
5 Optional(6)
model Optional(7)
6 Optional(7)
model Optional(8)
7 Optional(8)
model Optional(9)
8 Optional(9)
model Optional(10)
9 Optional(10)
model Optional(11)
10 Optional(11)
model Optional(12)
11 Optional(12)
model Optional(1)
12 Optional(1)
model Optional(2)
13 Optional(2)
model Optional(3)
14 Optional(3)
model Optional(4)
15 Optional(4)
model Optional(5)
16 Optional(5)
model Optional(6)
17 Optional(6)
model Optional(7)
18 Optional(7)
model Optional(8)
19 Optional(8)
model Optional(9)
20 Optional(9)
model Optional(10)
21 Optional(10)
model Optional(11)
22 Optional(11)
as you can see the items are not the same
[MovieDataBase.episodess(episode_number: Optional(1), name: Optional("121045"), still_path: Optional("/b9hFk5kwRcFUorxLQsOHasJnbDH.jpg")), MovieDataBase.episodess(episode_number: Optional(2), name: Optional("131045"), still_path: Optional("/mSZDdQLHnDousFg35ndlmv42908.jpg")), MovieDataBase.episodess(episode_number: Optional(3), name: Optional("181045"), still_path: Optional("/57bidANnv5zdPmJckmPL9f4Ogb7.jpg")), MovieDataBase.episodess(episode_number: Optional(4), name: Optional("291045"), still_path: Optional("/swmIOzEJ8uIjCdd5B4w9Ln5qXsJ.jpg")), MovieDataBase.episodess(episode_number: Optional(5), name: Optional("301045"), still_path: Optional("/2x9v9YupwZnMBnvCUOwaOv8UEQV.jpg")), MovieDataBase.episodess(episode_number: Optional(6), name: Optional("311045"), still_path: Optional("/uFY25TSNrOxbL18jDV1pSjWPKEK.jpg")), MovieDataBase.episodess(episode_number: Optional(7), name: Optional("011145"), still_path: Optional("/8LGArTKq5oMnKR9AjdRd3ocxJWu.jpg")), MovieDataBase.episodess(episode_number: Optional(8), name: Optional("021145"), still_path: Optional("/yEBAannVEt2QhyUKyjlXhXrEVld.jpg")), MovieDataBase.episodess(episode_number: Optional(9), name: Optional("031145"), still_path: Optional("/nf1zvR7D4kN1Xa1wlxXeuUrWpOo.jpg")), MovieDataBase.episodess(episode_number: Optional(10), name: Optional("130146"), still_path: Optional("/1lTlSWY4chqpv1ibeQz4eYHaePf.jpg")), MovieDataBase.episodess(episode_number: Optional(11), name: Optional("140146"), still_path: Optional("/qTKxjZTbiCqZ6lywwfmfTLX8QnK.jpg")), MovieDataBase.episodess(episode_number: Optional(12), name: Optional("150146"), still_path: Optional("/8duv3ltJa7Olb721zsqcbss0kVx.jpg")), MovieDataBase.episodess(episode_number: Optional(1), name: Optional("Episode 1"), still_path: Optional("/24VlK7Ed5VFa0yE2kEmDPzyYks.jpg")), MovieDataBase.episodess(episode_number: Optional(2), name: Optional("Episode 2"), still_path: Optional("/eoyTsCYEAymTAhBgXIbIfW2jrwz.jpg")), MovieDataBase.episodess(episode_number: Optional(3), name: Optional("Episode 3"), still_path: Optional("/1EgiONNX9CgO6i4DjyeVBvsvT9v.jpg")), MovieDataBase.episodess(episode_number: Optional(4), name: Optional("Episode 4"), still_path: Optional("/4lZnqwPkNmnVEZ6ipID92BiWDkd.jpg")), MovieDataBase.episodess(episode_number: Optional(5), name: Optional("Episode 5"), still_path: Optional("/4wkH3s9d7YFvnjvQ24rS1pj4oUk.jpg")), MovieDataBase.episodess(episode_number: Optional(6), name: Optional("Episode 6"), still_path: Optional("/46XRAOhySNHl1O0qTHMUdUxfDcA.jpg")), MovieDataBase.episodess(episode_number: Optional(7), name: Optional("Episode 7"), still_path: Optional("/lbVYNXOtQSVU69ee7qbHWJ1f7b8.jpg")), MovieDataBase.episodess(episode_number: Optional(8), name: Optional("Episode 8"), still_path: Optional("/95UudD6foD0V7xJc345sJSZ9vUW.jpg")), MovieDataBase.episodess(episode_number: Optional(9), name: Optional("Episode 9"), still_path: Optional("")), MovieDataBase.episodess(episode_number: Optional(10), name: Optional("Episode 10"), still_path: Optional("")), MovieDataBase.episodess(episode_number: Optional(11), name: Optional("Episode 11"), still_path: Optional(""))]
Do you mean it shows only one cell or the same cell 0 content in all cells ?
the same cell 0 content in all cells
Have you defined numberOfCells ?
yes
The problem was an extra UITableViewCellContentView overlay appears in a TableView preventing taps so the UICollectionView couldn't get scrolled horizontally
adding this extension works
extension UITableViewCell {
open override func addSubview(_ view: UIView) {
super.addSubview(view)
sendSubviewToBack(contentView)
}
}
Hi, the exact behaviour is
do you see the full content wrapping around on next lines ? Or part of the collection remains hidden on the right ?
the information charge fine in each UItableViewCell and part of the collection remains hidden on the right because is not scrollable.
What happens when you click and drag in order to scroll ? Any change on the table cell ?
while scrolling the UITableViewCells works fine you can scroll down and up, and cells information charge , but the UICollectionViews inside each UITableViewCells are not scrollable horizontally, and the information charge fine
and about the link that was literally the first solution i tried
Hi 🤙🏻
You miss the /255
should be like this:
UIColor(red: 250/255, green: 190/255, blue: 110/255, alpha: 1)
also try to set the color when you push the view
let view = PasajerosPaso2View()
view.backgroundColor = UIColor.lightGray
navigationController.navigationBar.backgroundColor = UIColor(red: 250/255, green: 190/255, blue: 110/255, alpha: 1)
let vc = factory.makePasajerosPaso2VC(view, coordinator: self)
navigationController.pushViewController(vc, animated: false)