Q:

Why does the code return empty picker view

I'm trying to build a screen with two dependent components in a picker view. I connected picker with property, dataSource and delegate with yellow button of view controller on the top of the scene, and I also connected button action with buttonPressed method. 
After building I receive white screen with empty picker without data. Why does it happen?
     #import "BIDDependentComponentPickerViewController.h"

     #define kStateComponent 0
     #define kZipComponent   1

     @interface BIDDependentComponentPickerViewController ()

     @property (strong, nonatomic) NSDictionary *stateZips;
     @property (strong, nonatomic) NSArray *states;
     @property (strong, nonatomic) NSArray *zips;
     @property (weak, nonatomic) IBOutlet UIPickerView *dependentPicker;

     @end

     @implementation BIDDependentComponentPickerViewController

     - (void)viewDidLoad
 {
     [super viewDidLoad];
      // Do any additional setup after loading the view.
      NSBundle *bundle = [NSBundle mainBundle];
      NSURL *plistURL = [bundle URLForResource:@"statedictionary"     
                                 withExtension:@"plist"];

      self.stateZips = [NSDictionary dictionaryWithContentsOfURL:plistURL];

      NSArray *allStates = [self.stateZips allKeys];
      NSArray *sortedStates = [allStates sortedArrayUsingSelector:   
      @selector(compare:)];

      self.states = sortedStates;

      NSString *selectedState = self.states[0];
      self.zips = self.stateZips[selectedState];
      }

      - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
      }

       - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender     
       {

       }

       - (IBAction)buttonPressed:(id)sender {
       NSInteger stateRow = [self.dependentPicker
                      selectedRowInComponent:kStateComponent];
       NSInteger zipRow = [self.dependentPicker
                    selectedRowInComponent:kZipComponent];
       NSString *state = self.states[stateRow];
       NSString *zip = self.zips[zipRow];
       NSString *title = [[NSString alloc] initWithFormat:
                   @"You selected zip code %@.", zip];
       NSString *message = [[NSString alloc] initWithFormat:
                     @"%@ is in %@", zip, state];
       UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
                                                message:message
                                               delegate:nil
                                      cancelButtonTitle:@"OK"
                                      otherButtonTitles:nil];
       [alert show];

      }

      - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
       {
        return 2;
        }

     - (NSInteger)pickerView:(UIPickerView *)pickerView
       numberOfRowsInComponent:(NSInteger)component {
       if (component == kStateComponent) {
         return [self.states count];
       } else {
        return [self.zips count];
       }
      }

     - (NSString *)pickerView:(UIPickerView *)pickerView
         titleForRow:(NSInteger)row
        forComponent:(NSInteger)component
     {
        if (component == kStateComponent) {
           return self.states[row];
        } else {
           return self.zips[row];
        }
     }
       - (void)pickerView:(UIPickerView *)pickerView
         didSelectRow:(NSInteger)row
         inComponent:(NSInteger)component
    {
        if (component == kStateComponent) {
    NSString *selectedState = self.states[row];
    self.zips = self.stateZips[selectedState];
    [self.dependentPicker reloadComponent:kZipComponent];
    [self.dependentPicker selectRow:0
                        inComponent:kZipComponent
                           animated:YES];
     } }

    @end

A:

Make sure you have added statedictionary file in bundle.
Also you can Log the array/dictionary to check if values are there.

