2

Yesterday I updated to Xcode 6.1.1 and now I'm experiencing some strange behavior. Placing a datepicker in a table view cell causes the datepicker to be rendered strange.

Day is missing and month is cut off

As you can see the day is completely missing and the month is cut off. This is happening on iPad 2 simulator with iOS 8.1.1. I don't have a device with me to test more.

I filled a bugreport at bugreport.apple.com with the No. 19141277.

Some workaround available?

Edit:

Thanks to cocoanut there seems to be a workaround. In my case I wanted the datepicker to be centered in the table view cell. I had a centerX, centerY, height and width constraint. That didn't worked. Now I played with it and the following constraints seems to work:

  • Top Space to Content View Equals 0
  • Bottom Space to Content View Equals 0
  • Align Center X to Content View Equals 0
  • Width Equals 320
  • Height Equals 216 @ Priority 999
Community
  • 1
  • 1
testing
  • 19,681
  • 50
  • 236
  • 417

2 Answers2

1

I spent quite a while on this, including trying your constraints workaround, but had no luck.

Eventually I switched to creating the date picker in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath instead of in the storyboard and it worked fine, so I would suggest that to anyone who is having the same issue.

0

I had the same issue actually picker not work correctly if we put leading trailing, instead we should put fixed width and height and center with alignments horizontal to superview. Apply these constraints

enter image description here

enter image description here

user1039695
  • 981
  • 11
  • 20