Monday 3 November 2014

Assertion failure in -[UIPickerTableView _createPreparedCellForGlobalRow:withIndexPath:]

Assertion failure in -[UIPickerTableView _createPreparedCellForGlobalRow:withIndexPath:]
You are thinking that Ohh! what the hell is going on. App crashing at some other place, which could not happen. Oh I didn't use UITableView. What is wrong now. Then you can go with simple 
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view layoutIfNeeded];
} 

What happen If it not works, then try 
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view layoutIfNeeded];

    picker.frame = datePickerTargetFrame;
    [self.view addSubview:picker];


}


IF YOU WANT TO LEARN ABOUT MORE WHAT IS THE MAGIC IN layoutIfNeeded THEN READ PREVIOUS ARTICLE.

No comments:

Post a Comment