I have two VCs. One as navigationController, and other as modal view. I am using segue to show modal view.
dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.performSegueWithIdentifier("openFilterSegue", sender: nil)
});
and opening something like this
class FilterVC: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource, AlertMessage {
override func viewDidLoad() {
pickerView.dataSource = self
pickerView.delegate = self
}
func pickerView(pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusingView view: UIView!) -> UIView {
let pickerLabel = UILabel()
pickerLabel.textColor = UIColor.blackColor()
pickerLabel.text = arrShopCentrum[row].nazev
pickerLabel.font = UIFont(name: "Roboto-Regular", size: 15)
pickerLabel.textAlignment = NSTextAlignment.Center
return pickerLabel
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return arrPlace.count
}
}
when I am opening that VC for the 1st time it takes about 3 SECONDS to load. Then I close it and it will open quicker.
BTW I am using there a REALM
object DB but I think that is not the problem.
Its in storyboards and Delegate + datasource are connected