UICollectionView shows up on simulator but not actual device The 2019 Stack Overflow Developer Survey Results Are InHow to parse html table data to array of string in swift?Xcode 6: Keyboard does not show up in simulatorHow to detect tableView cell touched or clicked in swiftExpand and Collapse tableview cellsHow to show images from API in CollectionViewCan't implement required methods of JSQMessagesViewController Swift 3iAd UICollectionView on every 5 cellIssues with casting celltypes to dequeueHow to optimize UITableViewCell, because my UITableView lagsSwift Error - Use of undeclared type 'cell' - Collection ViewSwift vertical UICollectionView inside UITableView

Why is the Constellation's nose gear so long?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Why was M87 targetted for the Event Horizon Telescope instead of Sagittarius A*?

What is the accessibility of a package's `Private` context variables?

Falsification in Math vs Science

Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?

The difference between dialogue marks

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

For what reasons would an animal species NOT cross a *horizontal* land bridge?

Does the shape of a die affect the probability of a number being rolled?

Right tool to dig six foot holes?

Deal with toxic manager when you can't quit

Is this app Icon Browser Safe/Legit?

Where to refill my bottle in India?

Delete all lines which don't have n characters before delimiter

What did it mean to "align" a radio?

Are there incongruent pythagorean triangles with the same perimeter and same area?

Are spiders unable to hurt humans, especially very small spiders?

Can one be advised by a professor who is very far away?

Is there a symbol for a right arrow with a square in the middle?

Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?

Resizing object distorts it (Illustrator CC 2018)

Do these rules for Critical Successes and Critical Failures seem Fair?

How to deal with fear of taking dependencies



UICollectionView shows up on simulator but not actual device



The 2019 Stack Overflow Developer Survey Results Are InHow to parse html table data to array of string in swift?Xcode 6: Keyboard does not show up in simulatorHow to detect tableView cell touched or clicked in swiftExpand and Collapse tableview cellsHow to show images from API in CollectionViewCan't implement required methods of JSQMessagesViewController Swift 3iAd UICollectionView on every 5 cellIssues with casting celltypes to dequeueHow to optimize UITableViewCell, because my UITableView lagsSwift Error - Use of undeclared type 'cell' - Collection ViewSwift vertical UICollectionView inside UITableView



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















building my first iOS app here and I am stuck. I searched online and did not find anything about this particular issue.



Basically I have a UICollectionView displaying some data. Everything works fine on the simulator, but on the actual iPhone, it's like the UICollectionView is just not there.



No error messages and the app doesn't crash, and all the other elements of the App are functioning properly so I am quite perplexed.



Code:



//
// SecondViewController.swift
//
// Created by pc on 3/5/19.
// Copyright © 2019 BF. All rights reserved.
//

import UIKit
import WebKit
import SwiftSoup

class SecondViewController: UIViewController, WKNavigationDelegate, UICollectionViewDataSource


@IBOutlet var dataTable: UICollectionView!
@IBOutlet weak var viewHeader: UILabel!
@IBOutlet weak var viewFooter: UILabel!

@IBAction func backButtonClicked(_ sender: UIButton)
dismissVC()



var webView: WKWebView!
var tableContent = [[String]]()
var vSpinner : UIView?
var testString = [[String]]()
var submittedValue2: String = ""
var currentSelection2: String = ""


override func viewDidAppear(_ animated: Bool)
let alert = UIAlertController(title: nil, message: "Please wait...", preferredStyle: .alert)

let loadingIndicator = UIActivityIndicatorView(frame: CGRect(x: 10, y: 5, width: 50, height: 50))
loadingIndicator.hidesWhenStopped = true
loadingIndicator.style = UIActivityIndicatorView.Style.gray
loadingIndicator.startAnimating();

alert.view.addSubview(loadingIndicator)
present(alert, animated: true, completion: nil)



override func viewDidLoad()
super.viewDidLoad()


self.dataTable.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
//dataTable.backgroundColor = UIColor.white
dataTable.delegate = self as? UICollectionViewDelegate
dataTable.dataSource = self

if let layout = dataTable.collectionViewLayout as? UICollectionViewFlowLayout
layout.scrollDirection = .horizontal




webView = WKWebView()
webView.navigationDelegate = self
//view = webView



let url = URL(string: "https://someWebsite.com")!
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true



runData()







///////ADDS DELAY
func runData()
DispatchQueue.main.asyncAfter(deadline: .now() + 4) // Change `2.0` to the desired number of seconds.

self.setWebViewValue(name: "txtValue", data: self.submittedValue2, vin: self.currentSelection2)









///////// PULLS DATA
func setWebViewValue(name: String, data: String, vin: String)


if vin == "VIN:"

webView.evaluateJavaScript("document.getElementById('rbRequest_1').click()", completionHandler: nil)

else


webView.evaluateJavaScript("document.getElementById("(name)").value = "(data)"", completionHandler: nil)

webView.evaluateJavaScript("document.getElementById('btnSubmit').click()", completionHandler: nil)

DispatchQueue.main.asyncAfter(deadline: .now() + 1) // Change `2.0` to the desired number of seconds.

self.webView.evaluateJavaScript("document.documentElement.outerHTML.toString()") (result, error) -> Void in
if error != nil
print(error!)

let document = try! SwiftSoup.parse(result as! String)

for row in try! document.select("table[id="gvTests"] tr")
var rowContent = [String]()

for col in try! row.select("td")
let colContent = try! col.text()
rowContent.append(colContent)

self.tableContent.append(rowContent)

if self.tableContent.isEmpty == false
//self.tableContent.remove(at: 0)
self.tableContent[0] = ["Make","Model","Year","Date","Pass/Fail","Certificate","Referee"]

print(self.tableContent)
self.tableContent = self.transpose(input: self.tableContent)
if self.tableContent.isEmpty == false
self.dataTable.reloadData()


self.dismiss(animated: false, completion: nil)





////// Collection View functions
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int

if tableContent.isEmpty == false
return tableContent[0].count

else
return 0



func numberOfSections(in collectionView: UICollectionView) -> Int
if tableContent.isEmpty == false
return tableContent.count

else
return 0



func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)


let title = UILabel(frame: CGRect(x: 0,y: 0,width: cell.bounds.size.width,height: cell.bounds.size.height))



for subview in cell.contentView.subviews

subview.removeFromSuperview()



cell.contentView.addSubview(title)


title.text = tableContent[indexPath.section][indexPath.item]
//title.textColor = UIColor.black

title.layer.borderWidth = 1
title.layer.borderColor = UIColor.black.cgColor
title.textAlignment = NSTextAlignment.center


return cell



public func transpose<T>(input: [[T]]) -> [[T]]
if input.isEmpty return [[T]]()
let count = input[0].count
var out = [[T]](repeating: [T](), count: count)
for outer in input
for (index, inner) in outer.enumerated()
out[index].append(inner)



return out




func dismissVC()
dismiss(animated: true, completion: nil)














share|improve this question
























  • dataTable.delegate = self as? UICollectionViewDelegate ??

    – SPatel
    Mar 22 at 4:24











  • I removed that line, same issue nothing changed

    – Tecra
    Mar 22 at 4:39











  • Don't remove entire line, just keep dataTable.delegate = self

    – SPatel
    Mar 22 at 4:41












  • Then I get the error message "Cannot assign value of type 'SecondViewController' to type 'UICollectionViewDelegate?'"

    – Tecra
    Mar 22 at 4:42











  • Not related but you shouldn't add IBAction next to IBOutlet and then variables after that . You should add IBAction methods generally after ViewController life cycle methods .

    – Shubham Bakshi
    Mar 22 at 5:05

















0















building my first iOS app here and I am stuck. I searched online and did not find anything about this particular issue.



Basically I have a UICollectionView displaying some data. Everything works fine on the simulator, but on the actual iPhone, it's like the UICollectionView is just not there.



No error messages and the app doesn't crash, and all the other elements of the App are functioning properly so I am quite perplexed.



Code:



//
// SecondViewController.swift
//
// Created by pc on 3/5/19.
// Copyright © 2019 BF. All rights reserved.
//

import UIKit
import WebKit
import SwiftSoup

class SecondViewController: UIViewController, WKNavigationDelegate, UICollectionViewDataSource


@IBOutlet var dataTable: UICollectionView!
@IBOutlet weak var viewHeader: UILabel!
@IBOutlet weak var viewFooter: UILabel!

@IBAction func backButtonClicked(_ sender: UIButton)
dismissVC()



var webView: WKWebView!
var tableContent = [[String]]()
var vSpinner : UIView?
var testString = [[String]]()
var submittedValue2: String = ""
var currentSelection2: String = ""


override func viewDidAppear(_ animated: Bool)
let alert = UIAlertController(title: nil, message: "Please wait...", preferredStyle: .alert)

let loadingIndicator = UIActivityIndicatorView(frame: CGRect(x: 10, y: 5, width: 50, height: 50))
loadingIndicator.hidesWhenStopped = true
loadingIndicator.style = UIActivityIndicatorView.Style.gray
loadingIndicator.startAnimating();

alert.view.addSubview(loadingIndicator)
present(alert, animated: true, completion: nil)



override func viewDidLoad()
super.viewDidLoad()


self.dataTable.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
//dataTable.backgroundColor = UIColor.white
dataTable.delegate = self as? UICollectionViewDelegate
dataTable.dataSource = self

if let layout = dataTable.collectionViewLayout as? UICollectionViewFlowLayout
layout.scrollDirection = .horizontal




webView = WKWebView()
webView.navigationDelegate = self
//view = webView



let url = URL(string: "https://someWebsite.com")!
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true



runData()







///////ADDS DELAY
func runData()
DispatchQueue.main.asyncAfter(deadline: .now() + 4) // Change `2.0` to the desired number of seconds.

self.setWebViewValue(name: "txtValue", data: self.submittedValue2, vin: self.currentSelection2)









///////// PULLS DATA
func setWebViewValue(name: String, data: String, vin: String)


if vin == "VIN:"

webView.evaluateJavaScript("document.getElementById('rbRequest_1').click()", completionHandler: nil)

else


webView.evaluateJavaScript("document.getElementById("(name)").value = "(data)"", completionHandler: nil)

webView.evaluateJavaScript("document.getElementById('btnSubmit').click()", completionHandler: nil)

DispatchQueue.main.asyncAfter(deadline: .now() + 1) // Change `2.0` to the desired number of seconds.

self.webView.evaluateJavaScript("document.documentElement.outerHTML.toString()") (result, error) -> Void in
if error != nil
print(error!)

let document = try! SwiftSoup.parse(result as! String)

for row in try! document.select("table[id="gvTests"] tr")
var rowContent = [String]()

for col in try! row.select("td")
let colContent = try! col.text()
rowContent.append(colContent)

self.tableContent.append(rowContent)

if self.tableContent.isEmpty == false
//self.tableContent.remove(at: 0)
self.tableContent[0] = ["Make","Model","Year","Date","Pass/Fail","Certificate","Referee"]

print(self.tableContent)
self.tableContent = self.transpose(input: self.tableContent)
if self.tableContent.isEmpty == false
self.dataTable.reloadData()


self.dismiss(animated: false, completion: nil)





////// Collection View functions
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int

if tableContent.isEmpty == false
return tableContent[0].count

else
return 0



func numberOfSections(in collectionView: UICollectionView) -> Int
if tableContent.isEmpty == false
return tableContent.count

else
return 0



func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)


let title = UILabel(frame: CGRect(x: 0,y: 0,width: cell.bounds.size.width,height: cell.bounds.size.height))



for subview in cell.contentView.subviews

subview.removeFromSuperview()



cell.contentView.addSubview(title)


title.text = tableContent[indexPath.section][indexPath.item]
//title.textColor = UIColor.black

title.layer.borderWidth = 1
title.layer.borderColor = UIColor.black.cgColor
title.textAlignment = NSTextAlignment.center


return cell



public func transpose<T>(input: [[T]]) -> [[T]]
if input.isEmpty return [[T]]()
let count = input[0].count
var out = [[T]](repeating: [T](), count: count)
for outer in input
for (index, inner) in outer.enumerated()
out[index].append(inner)



return out




func dismissVC()
dismiss(animated: true, completion: nil)














share|improve this question
























  • dataTable.delegate = self as? UICollectionViewDelegate ??

    – SPatel
    Mar 22 at 4:24











  • I removed that line, same issue nothing changed

    – Tecra
    Mar 22 at 4:39











  • Don't remove entire line, just keep dataTable.delegate = self

    – SPatel
    Mar 22 at 4:41












  • Then I get the error message "Cannot assign value of type 'SecondViewController' to type 'UICollectionViewDelegate?'"

    – Tecra
    Mar 22 at 4:42











  • Not related but you shouldn't add IBAction next to IBOutlet and then variables after that . You should add IBAction methods generally after ViewController life cycle methods .

    – Shubham Bakshi
    Mar 22 at 5:05













0












0








0








building my first iOS app here and I am stuck. I searched online and did not find anything about this particular issue.



Basically I have a UICollectionView displaying some data. Everything works fine on the simulator, but on the actual iPhone, it's like the UICollectionView is just not there.



No error messages and the app doesn't crash, and all the other elements of the App are functioning properly so I am quite perplexed.



Code:



//
// SecondViewController.swift
//
// Created by pc on 3/5/19.
// Copyright © 2019 BF. All rights reserved.
//

import UIKit
import WebKit
import SwiftSoup

class SecondViewController: UIViewController, WKNavigationDelegate, UICollectionViewDataSource


@IBOutlet var dataTable: UICollectionView!
@IBOutlet weak var viewHeader: UILabel!
@IBOutlet weak var viewFooter: UILabel!

@IBAction func backButtonClicked(_ sender: UIButton)
dismissVC()



var webView: WKWebView!
var tableContent = [[String]]()
var vSpinner : UIView?
var testString = [[String]]()
var submittedValue2: String = ""
var currentSelection2: String = ""


override func viewDidAppear(_ animated: Bool)
let alert = UIAlertController(title: nil, message: "Please wait...", preferredStyle: .alert)

let loadingIndicator = UIActivityIndicatorView(frame: CGRect(x: 10, y: 5, width: 50, height: 50))
loadingIndicator.hidesWhenStopped = true
loadingIndicator.style = UIActivityIndicatorView.Style.gray
loadingIndicator.startAnimating();

alert.view.addSubview(loadingIndicator)
present(alert, animated: true, completion: nil)



override func viewDidLoad()
super.viewDidLoad()


self.dataTable.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
//dataTable.backgroundColor = UIColor.white
dataTable.delegate = self as? UICollectionViewDelegate
dataTable.dataSource = self

if let layout = dataTable.collectionViewLayout as? UICollectionViewFlowLayout
layout.scrollDirection = .horizontal




webView = WKWebView()
webView.navigationDelegate = self
//view = webView



let url = URL(string: "https://someWebsite.com")!
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true



runData()







///////ADDS DELAY
func runData()
DispatchQueue.main.asyncAfter(deadline: .now() + 4) // Change `2.0` to the desired number of seconds.

self.setWebViewValue(name: "txtValue", data: self.submittedValue2, vin: self.currentSelection2)









///////// PULLS DATA
func setWebViewValue(name: String, data: String, vin: String)


if vin == "VIN:"

webView.evaluateJavaScript("document.getElementById('rbRequest_1').click()", completionHandler: nil)

else


webView.evaluateJavaScript("document.getElementById("(name)").value = "(data)"", completionHandler: nil)

webView.evaluateJavaScript("document.getElementById('btnSubmit').click()", completionHandler: nil)

DispatchQueue.main.asyncAfter(deadline: .now() + 1) // Change `2.0` to the desired number of seconds.

self.webView.evaluateJavaScript("document.documentElement.outerHTML.toString()") (result, error) -> Void in
if error != nil
print(error!)

let document = try! SwiftSoup.parse(result as! String)

for row in try! document.select("table[id="gvTests"] tr")
var rowContent = [String]()

for col in try! row.select("td")
let colContent = try! col.text()
rowContent.append(colContent)

self.tableContent.append(rowContent)

if self.tableContent.isEmpty == false
//self.tableContent.remove(at: 0)
self.tableContent[0] = ["Make","Model","Year","Date","Pass/Fail","Certificate","Referee"]

print(self.tableContent)
self.tableContent = self.transpose(input: self.tableContent)
if self.tableContent.isEmpty == false
self.dataTable.reloadData()


self.dismiss(animated: false, completion: nil)





////// Collection View functions
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int

if tableContent.isEmpty == false
return tableContent[0].count

else
return 0



func numberOfSections(in collectionView: UICollectionView) -> Int
if tableContent.isEmpty == false
return tableContent.count

else
return 0



func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)


let title = UILabel(frame: CGRect(x: 0,y: 0,width: cell.bounds.size.width,height: cell.bounds.size.height))



for subview in cell.contentView.subviews

subview.removeFromSuperview()



cell.contentView.addSubview(title)


title.text = tableContent[indexPath.section][indexPath.item]
//title.textColor = UIColor.black

title.layer.borderWidth = 1
title.layer.borderColor = UIColor.black.cgColor
title.textAlignment = NSTextAlignment.center


return cell



public func transpose<T>(input: [[T]]) -> [[T]]
if input.isEmpty return [[T]]()
let count = input[0].count
var out = [[T]](repeating: [T](), count: count)
for outer in input
for (index, inner) in outer.enumerated()
out[index].append(inner)



return out




func dismissVC()
dismiss(animated: true, completion: nil)














share|improve this question
















building my first iOS app here and I am stuck. I searched online and did not find anything about this particular issue.



Basically I have a UICollectionView displaying some data. Everything works fine on the simulator, but on the actual iPhone, it's like the UICollectionView is just not there.



No error messages and the app doesn't crash, and all the other elements of the App are functioning properly so I am quite perplexed.



Code:



//
// SecondViewController.swift
//
// Created by pc on 3/5/19.
// Copyright © 2019 BF. All rights reserved.
//

import UIKit
import WebKit
import SwiftSoup

class SecondViewController: UIViewController, WKNavigationDelegate, UICollectionViewDataSource


@IBOutlet var dataTable: UICollectionView!
@IBOutlet weak var viewHeader: UILabel!
@IBOutlet weak var viewFooter: UILabel!

@IBAction func backButtonClicked(_ sender: UIButton)
dismissVC()



var webView: WKWebView!
var tableContent = [[String]]()
var vSpinner : UIView?
var testString = [[String]]()
var submittedValue2: String = ""
var currentSelection2: String = ""


override func viewDidAppear(_ animated: Bool)
let alert = UIAlertController(title: nil, message: "Please wait...", preferredStyle: .alert)

let loadingIndicator = UIActivityIndicatorView(frame: CGRect(x: 10, y: 5, width: 50, height: 50))
loadingIndicator.hidesWhenStopped = true
loadingIndicator.style = UIActivityIndicatorView.Style.gray
loadingIndicator.startAnimating();

alert.view.addSubview(loadingIndicator)
present(alert, animated: true, completion: nil)



override func viewDidLoad()
super.viewDidLoad()


self.dataTable.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
//dataTable.backgroundColor = UIColor.white
dataTable.delegate = self as? UICollectionViewDelegate
dataTable.dataSource = self

if let layout = dataTable.collectionViewLayout as? UICollectionViewFlowLayout
layout.scrollDirection = .horizontal




webView = WKWebView()
webView.navigationDelegate = self
//view = webView



let url = URL(string: "https://someWebsite.com")!
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true



runData()







///////ADDS DELAY
func runData()
DispatchQueue.main.asyncAfter(deadline: .now() + 4) // Change `2.0` to the desired number of seconds.

self.setWebViewValue(name: "txtValue", data: self.submittedValue2, vin: self.currentSelection2)









///////// PULLS DATA
func setWebViewValue(name: String, data: String, vin: String)


if vin == "VIN:"

webView.evaluateJavaScript("document.getElementById('rbRequest_1').click()", completionHandler: nil)

else


webView.evaluateJavaScript("document.getElementById("(name)").value = "(data)"", completionHandler: nil)

webView.evaluateJavaScript("document.getElementById('btnSubmit').click()", completionHandler: nil)

DispatchQueue.main.asyncAfter(deadline: .now() + 1) // Change `2.0` to the desired number of seconds.

self.webView.evaluateJavaScript("document.documentElement.outerHTML.toString()") (result, error) -> Void in
if error != nil
print(error!)

let document = try! SwiftSoup.parse(result as! String)

for row in try! document.select("table[id="gvTests"] tr")
var rowContent = [String]()

for col in try! row.select("td")
let colContent = try! col.text()
rowContent.append(colContent)

self.tableContent.append(rowContent)

if self.tableContent.isEmpty == false
//self.tableContent.remove(at: 0)
self.tableContent[0] = ["Make","Model","Year","Date","Pass/Fail","Certificate","Referee"]

print(self.tableContent)
self.tableContent = self.transpose(input: self.tableContent)
if self.tableContent.isEmpty == false
self.dataTable.reloadData()


self.dismiss(animated: false, completion: nil)





////// Collection View functions
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int

if tableContent.isEmpty == false
return tableContent[0].count

else
return 0



func numberOfSections(in collectionView: UICollectionView) -> Int
if tableContent.isEmpty == false
return tableContent.count

else
return 0



func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)


let title = UILabel(frame: CGRect(x: 0,y: 0,width: cell.bounds.size.width,height: cell.bounds.size.height))



for subview in cell.contentView.subviews

subview.removeFromSuperview()



cell.contentView.addSubview(title)


title.text = tableContent[indexPath.section][indexPath.item]
//title.textColor = UIColor.black

title.layer.borderWidth = 1
title.layer.borderColor = UIColor.black.cgColor
title.textAlignment = NSTextAlignment.center


return cell



public func transpose<T>(input: [[T]]) -> [[T]]
if input.isEmpty return [[T]]()
let count = input[0].count
var out = [[T]](repeating: [T](), count: count)
for outer in input
for (index, inner) in outer.enumerated()
out[index].append(inner)



return out




func dismissVC()
dismiss(animated: true, completion: nil)











ios swift uicollectionview ios-simulator uicollectionviewcell






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 4:01







Tecra

















asked Mar 22 at 3:47









TecraTecra

33




33












  • dataTable.delegate = self as? UICollectionViewDelegate ??

    – SPatel
    Mar 22 at 4:24











  • I removed that line, same issue nothing changed

    – Tecra
    Mar 22 at 4:39











  • Don't remove entire line, just keep dataTable.delegate = self

    – SPatel
    Mar 22 at 4:41












  • Then I get the error message "Cannot assign value of type 'SecondViewController' to type 'UICollectionViewDelegate?'"

    – Tecra
    Mar 22 at 4:42











  • Not related but you shouldn't add IBAction next to IBOutlet and then variables after that . You should add IBAction methods generally after ViewController life cycle methods .

    – Shubham Bakshi
    Mar 22 at 5:05

















  • dataTable.delegate = self as? UICollectionViewDelegate ??

    – SPatel
    Mar 22 at 4:24











  • I removed that line, same issue nothing changed

    – Tecra
    Mar 22 at 4:39











  • Don't remove entire line, just keep dataTable.delegate = self

    – SPatel
    Mar 22 at 4:41












  • Then I get the error message "Cannot assign value of type 'SecondViewController' to type 'UICollectionViewDelegate?'"

    – Tecra
    Mar 22 at 4:42











  • Not related but you shouldn't add IBAction next to IBOutlet and then variables after that . You should add IBAction methods generally after ViewController life cycle methods .

    – Shubham Bakshi
    Mar 22 at 5:05
















dataTable.delegate = self as? UICollectionViewDelegate ??

– SPatel
Mar 22 at 4:24





dataTable.delegate = self as? UICollectionViewDelegate ??

– SPatel
Mar 22 at 4:24













I removed that line, same issue nothing changed

– Tecra
Mar 22 at 4:39





I removed that line, same issue nothing changed

– Tecra
Mar 22 at 4:39













Don't remove entire line, just keep dataTable.delegate = self

– SPatel
Mar 22 at 4:41






Don't remove entire line, just keep dataTable.delegate = self

– SPatel
Mar 22 at 4:41














Then I get the error message "Cannot assign value of type 'SecondViewController' to type 'UICollectionViewDelegate?'"

– Tecra
Mar 22 at 4:42





Then I get the error message "Cannot assign value of type 'SecondViewController' to type 'UICollectionViewDelegate?'"

– Tecra
Mar 22 at 4:42













Not related but you shouldn't add IBAction next to IBOutlet and then variables after that . You should add IBAction methods generally after ViewController life cycle methods .

– Shubham Bakshi
Mar 22 at 5:05





Not related but you shouldn't add IBAction next to IBOutlet and then variables after that . You should add IBAction methods generally after ViewController life cycle methods .

– Shubham Bakshi
Mar 22 at 5:05












2 Answers
2






active

oldest

votes


















0














This might cause from constraint on your collectionView.






share|improve this answer






























    0














    Turns out the issue is not with the UIcollectionview, but that the data is empty because instead of being extracted from the website like it is when ran in the simulator. I will post another question for that. Thanks all.






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292609%2fuicollectionview-shows-up-on-simulator-but-not-actual-device%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      This might cause from constraint on your collectionView.






      share|improve this answer



























        0














        This might cause from constraint on your collectionView.






        share|improve this answer

























          0












          0








          0







          This might cause from constraint on your collectionView.






          share|improve this answer













          This might cause from constraint on your collectionView.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 22 at 4:23









          Brorsoeu.SenBrorsoeu.Sen

          12




          12























              0














              Turns out the issue is not with the UIcollectionview, but that the data is empty because instead of being extracted from the website like it is when ran in the simulator. I will post another question for that. Thanks all.






              share|improve this answer



























                0














                Turns out the issue is not with the UIcollectionview, but that the data is empty because instead of being extracted from the website like it is when ran in the simulator. I will post another question for that. Thanks all.






                share|improve this answer

























                  0












                  0








                  0







                  Turns out the issue is not with the UIcollectionview, but that the data is empty because instead of being extracted from the website like it is when ran in the simulator. I will post another question for that. Thanks all.






                  share|improve this answer













                  Turns out the issue is not with the UIcollectionview, but that the data is empty because instead of being extracted from the website like it is when ran in the simulator. I will post another question for that. Thanks all.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 22 at 5:59









                  TecraTecra

                  33




                  33



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55292609%2fuicollectionview-shows-up-on-simulator-but-not-actual-device%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현