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

RightView height and position. #2

Closed
Dbigshooter opened this issue Aug 24, 2016 · 29 comments
Closed

RightView height and position. #2

Dbigshooter opened this issue Aug 24, 2016 · 29 comments

Comments

@Dbigshooter
Copy link

Hi there, continuing from this thread. https://github.com/John-Lluch/SWRevealViewController/issues/612

Is it possible to get the RightView to stop by a tabBar? Minding that I just have the tabBar in the last controller, not in the navigationscontrollers before PBRevealViewController.

@iDevelopper
Copy link
Owner

Can you provide a screenshot please?

@Dbigshooter
Copy link
Author

sss

@iDevelopper
Copy link
Owner

iDevelopper commented Aug 24, 2016

Do you have the application screenshot too? It is a tab bar? Not a tabbarcontroller?

@Dbigshooter
Copy link
Author

ssss

@Dbigshooter
Copy link
Author

Its is just a tabbar

@iDevelopper
Copy link
Owner

Hi @Dbigshooter , PBRevealViewController don't provide a way to do this yet! You can easily change the rightViewController's frame in your project.

See this sample, in SecondViewController.swift:

Example6Swift.zip

@Dbigshooter
Copy link
Author

Dbigshooter commented Aug 25, 2016

@iDevelopper Can you reduce the height? Can I manually make it go to the tabBar just by declaring the height?

@Dbigshooter
Copy link
Author

Can I get it to scroll under my navigation bar? When I scroll it looks like this:

screen

@iDevelopper
Copy link
Owner

Did you try the last sample? It seems your constraints are not right. I added a text view to the right view controller and all is right:

Example6Swift 2.zip

@Dbigshooter
Copy link
Author

Dbigshooter commented Aug 25, 2016

That is when I'm scrolling. Where did you set the constrains? I can see yours works perfectly.

@iDevelopper
Copy link
Owner

Yes but for me in my sample, it's ok. You can send your project if you want and I'll see.

@Dbigshooter
Copy link
Author

Dbigshooter commented Aug 25, 2016

Can you explain where you set the constraints? I'm using a TableViewController.

@iDevelopper
Copy link
Owner

2016-08-25_14-45-30

@Dbigshooter
Copy link
Author

I see, but how can this be achieved in an TableViewController? I can't seem to do it.

@iDevelopper
Copy link
Owner

Ah ok, I thought it was a scrollView. Then embed your table view controller in a navigation controller, and in this navigation controller uncheck Show navigation bar.

Example6Swift 3.zip

2016-08-25_14-58-13

@iDevelopper
Copy link
Owner

And yes a table view controller and a particular object, it takes the whole screen. By adding a navigation controller in which the bar is not shown, it takes into account the status bar's size. And sorry for my english!

@Dbigshooter
Copy link
Author

You're a genius. Can I make the tableview not dragable? So the line stays where it is, see the last screenshot of mine.

@iDevelopper
Copy link
Owner

Not dragable? Meaning?

@Dbigshooter
Copy link
Author

Dbigshooter commented Aug 25, 2016

If I drag down, like if I want to update it, I don't want it to be dragged, I want it to be fixed.

slice

@iDevelopper
Copy link
Owner

Do you mean bounces property? Uncheck it.

2016-08-25_15-44-53

@Dbigshooter
Copy link
Author

Thanks! Is there a way to get the tabBar above the rightmenu? A hack or such?

@iDevelopper
Copy link
Owner

Try to add a shadow to your tabBar.

@Dbigshooter
Copy link
Author

Dbigshooter commented Aug 25, 2016

Oh I just realized, it's not a tabbar, but a toolbar! Is it possible to do it with that, @iDevelopper?

@iDevelopper
Copy link
Owner

I tried to add a 1px line (UIView with black background color) just above the tabBar in the story board. What about this?

2016-08-25_17-38-12

@Dbigshooter
Copy link
Author

It is a toolbar, not a tabbar, I figured. Does that make any difference?

@iDevelopper
Copy link
Owner

iDevelopper commented Aug 25, 2016

It is the same. They are both UIView.

@Dbigshooter
Copy link
Author

Is that the only solution, or are you working on another?

@iDevelopper
Copy link
Owner

No, as it is not possible! The side view is shown on top of the main view then obviously above all the main view subviews.

@Dbigshooter
Copy link
Author

Dbigshooter commented Aug 31, 2016

But isn't the UIView you added a subview of the mainview? I just want to understand.

On the other hand, how to call a method on my mainView from the RightView?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants