ios - UITableView - SelectedBackgroundView not working in iOS7 with Auto-Layout -


I am using UITableVeiw with static cells in IOS7. Before using the autollections of my storyboard, the table view would look like this

Enter the image details here Like

https://i.stack.imgur.com/YqJjv.png "alt =" After enabling auto layout in the recorded storyboard, the layout goes to the bower and this is what I have been living with.

Enter image details here < / P>

I do not have any automatic layout problem that has been presented to me just now that I am not looking at foreground and background with auto-layout.

Any help?

After the text "itemprop =" text ">

The auto-layout seems like the problem was causing me. I added a background view and selected background view programmatically and it works.

  - (zero) tableView: (UITableView *) tableView willDisplayCell: (UITableViewCell *) cell forRowAtIndexPath: (NSIndexPath *) indexPath {UIView * selectedView = [UIView new]; SelectedView.backgroundColor = [UIColor colorWithRed: 0.604 green: 0.812 blue color: 0.059 alpha: 1.000]; Cell.selectedBackgroundView = selectedView; UIView * defaultView = [UIView new]; defaultView.backgroundColor = [UIColor colorWithRed: 0.396 green: 0.404 blue color: 0.404 alpha: 1.000]; Cell.backgroundView = defaultView; }    

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -