• 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: iOS TableView moving down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS TableView moving down


  • Subject: Re: iOS TableView moving down
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 23 Apr 2017 00:45:13 -0700

On Apr 22, 2017, at 23:55 , Gerriet M. Denkmann <email@hidden> wrote:
>
> But now I want to move the table view down 1 cm (leaving 1 cm unused space at the top of the screen above the table view).
> Reason: top of the table view (which contains a SearchField) is rather hard to reach.
>
> But I cannot find a way to do this.

Since UITableView is a subclass of UIScrollView, you can just set the “contentOffset” property to move its contents away from the top of its container.

If you need to put a different view in the 1 cm of space above the table view, then I guess you need to change the structure. Instead of the the root view being or containing a table view, it would have two child views, or two container subviews with “embed” segues to child view controllers.

> The “Add New Constraints” thingy is all greyed out.

Because you can’t move the root view away from the edges of the window (screen). If content offsets won’t do what you want, you have to use subviews, which can be laid out.

_______________________________________________

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: iOS TableView moving down
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >iOS TableView moving down (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: iOS TableView moving down
  • Next by Date: Re: Translating KVO-ed property to Swift
  • Previous by thread: iOS TableView moving down
  • Next by thread: Re: iOS TableView moving down
  • Index(es):
    • Date
    • Thread