Search code examples
iphoneuitableviewios7ios9xcode7

Custom UITableViewCell containing label not displayed in iOS 7


I have created a UITableView using xib that contains a UILabel of height 3. It has been displayed fine in iPhone 6 Device with iOS 9 and all simulators. But the label is not displayed in iPhone 4 and iPhone 5c that is working in iOS 7 !!! I checked the label visibility in custom cell's layoutSubviews and table's didSelectRowAtIndexPath: method . It shows the label is visible and it's frame correctly in iOS 7 as well as iOS 9, but it is not visible in iOS 7 ?? It works fine in iPad with ios 9 also . . . .


Solution

  • I got the answer after hours of testing. The label was there ! It has the same frame and visibility as in iPhone 6. The label contained just a dotted line.As it had only height 1 it was not visible in iPhone 4s !!!! Guys remember controls that have smaller size wont be displayed same in 4s