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

Gap with custom title view #47

Open
gdetari opened this issue Nov 15, 2018 · 0 comments
Open

Gap with custom title view #47

gdetari opened this issue Nov 15, 2018 · 0 comments

Comments

@gdetari
Copy link

gdetari commented Nov 15, 2018

I am trying to achieve a custom look for the overlay view.

My goal is to have the information about the photo in the top , and the navigation stuff in the bottom (basically the reverse of the default).

As far as I understand there are two ways to customize the appearance of the overlay:

  1. Add views to the top and bottom stackview containers of the AXOverlayView. This doesn't do what I want, since the title view will still remain, and any views will be added below

  2. Replace the title view, by supplying a custom UIView, conforming to AXOverlayTitleViewProtocol.
    Now this is what I want. However, when I do so, it seems that no matter what I do, there is a gap between the edge of the view controller and my custom view like so:

Screenshot

Here is the code I use:

class CustomView: UIView, AXOverlayTitleViewProtocol {
//empty
}

...

let v = CustomView(frame: self.view.frame) //no matter what frame I use
v.backgroundColor = UIColor.red
photosViewController.overlayView.titleView = v
self.present(photosViewController, animated: true)

Please let me know what am I missing.

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

1 participant