Re: height of UITableView with exactly two rows
Re: height of UITableView with exactly two rows
- Subject: Re: height of UITableView with exactly two rows
- From: Koen van der Drift <email@hidden>
- Date: Fri, 19 Jul 2013 12:30:58 -0400
On Jul 19, 2013, at 10:15 AM, Kyle Sluder <email@hidden> wrote:
> On Jul 19, 2013, at 6:03 AM, Koen van der Drift <email@hidden> wrote:
>
>> I have a follow up question. I decided to make the UITableView with the grouped style. Of course, now it is higher because of the additional space that is drawn above and under the two rows. After doing some searching, an additional height of 22 points seems to be appropriate to make it fit perfectly.
>>
>> Does this seem ok,
>
> No.
>
>> and will it still work with all devices and/or future versions of iOS?
>
> Almost certainly not. Have you read about the Dynamic Type feature in iOS 7? Http://apple.com/ios/ios7
>> Maybe there is a #define that I can use that will always be correct?
>
> No.
>
> Have you tried just asking the table view for its -contentSize?
Not yet, but I will look into it later.
The problem I foresee though is that at the time I create the tableView, the dataSource method for the number of rows (= 2) hasn't been called yet, and therefore the table doesn't know what the contentSize will be.
An alternative I just thought of could be to create a tableView with three rows, where the top one contains my customView.
- Koen.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden