2

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

Mihriban Minaz
  • 3,043
  • 2
  • 32
  • 52
Pan Mluvčí
  • 1,242
  • 2
  • 21
  • 42

1 Answers1

0

I've been having this same issue for quite some time now. It seems to be bug while connected to Xcode.

Other instances of this bug can be found here:

Best of luck!

Community
  • 1
  • 1
ZGski
  • 2,398
  • 1
  • 21
  • 34
  • I may very well be incorrect in assuming this is simply a bug with Xcode. However, if it is just slow performance due to Xcode being inefficient, there's not really much I can do in terms of advice, aside from letting you know that you're not alone in experiencing this issue which is what my answer attempts to do. – ZGski Apr 26 '16 at 16:13
  • But its not inside Xcode. But in real device running iOS 8.4 and 9.2.1 :-/ – Pan Mluvčí Apr 26 '16 at 16:24
  • Does it still take a long time to show the Picker after you've installed the application, unplugged the device from your computer, restarted, and re-ran the application? – ZGski Apr 26 '16 at 16:29
  • well yes. Thats my issue. :-) – Pan Mluvčí Apr 26 '16 at 16:33
  • If this really is the case, then I would be incorrect in assuming its a bug from Xcode. This sounds more like a leak in my opinion. – ZGski Apr 26 '16 at 18:44