• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: height of UITableView with exactly two rows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 09:03:11 -0400

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, and will it still work with all devices and/or future versions of iOS?  Maybe there is a #define that I can use that will always be correct?

Thanks,

- Koen.


On Jul 15, 2013, at 10:17 AM, Koen van der Drift <email@hidden> wrote:

>
> On Jul 15, 2013, at 10:01 AM, Roland King <email@hidden> wrote:
>
>> In many ways. If you are using autolayout then set the height of the view to 88 points (points != pixels). You can use autolayout without storyboards, you can implement your own layout if you aren't using Autolayout. If you actually know your view needs an 88 pixel height then that's pretty easy.
>
> Thanks.
>
> In the end, I just created the CGRects for both views based on the screen size, and their relative position.  I also played with autolayout, but by using something like this:
>
>    NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings(_customView, _infoTable);
>
>    [self.view addConstraints:  [NSLayoutConstraint constraintsWithVisualFormat: @"V:|-0-[_customView]-0-[_infoTable(==88)]-0-|"
>                                                                       options: 0
>                                                                       metrics: nil
>                                                                         views: viewsDictionary]];
>
>
> I just didn't see anything on the screen, I probably messed up somewhere. So I went with the former solution.
>
> - 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


  • Follow-Ups:
    • Re: height of UITableView with exactly two rows
      • From: Kyle Sluder <email@hidden>
References: 
 >height of UITableView with exactly two rows (From: Koen van der Drift <email@hidden>)
 >Re: height of UITableView with exactly two rows (From: Koen van der Drift <email@hidden>)
 >Re: height of UITableView with exactly two rows (From: Roland King <email@hidden>)
 >Re: height of UITableView with exactly two rows (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: LATIN SMALL LETTER U WITH DIAERESIS
  • Next by Date: Re: height of UITableView with exactly two rows
  • Previous by thread: Re: height of UITableView with exactly two rows
  • Next by thread: Re: height of UITableView with exactly two rows
  • Index(es):
    • Date
    • Thread