Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weekview layout constraints #2

Closed
ezmegy opened this issue Aug 15, 2017 · 2 comments
Closed

weekview layout constraints #2

ezmegy opened this issue Aug 15, 2017 · 2 comments

Comments

@ezmegy
Copy link

ezmegy commented Aug 15, 2017

Hi,

I'm not sure how I should set the weekview's constraints:

  • If I set my weekview to occupy the full screen (center it and size == parent view's size), the top bar (with the day labels) disappears, see screenshot.
  • If I set the weekview's height to a percentage less than 1 (say 0.9) of the parent's size, than there will be a small gap rendered on top: see screenshot.

Is the top bar's size fixed maybe? How to set it to support different screen sizes?

Cheers

@reilem
Copy link
Member

reilem commented Aug 15, 2017

This is due to the fact that your the default subview of a viewcontroller extends underneath the navigation bar. I would recommend not using the default subview in this case and either attaching the weekView to the viewController directly in the storyboard and using the graphical interface to add constraints (see image).
screen shot 2017-08-15 at 16 20 36
Or you could do it programatically and add constraints to your weekView, but this is quite tricky to do programmatically, you can find out how to here.

@ezmegy
Copy link
Author

ezmegy commented Aug 22, 2017

Thanks, it did the trick!

@reilem reilem closed this as completed Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants