John-Lluch / SWRevealViewController

A UIViewController subclass for presenting side view controllers inspired on the FaceBook and Wunderlist apps, done right !
Other
4.52k stars 989 forks source link

Problem with Navigation Bar Item position. (Swift, XCode 6 b3). This message include GIF 1Mb #290

Closed tsybanov closed 10 years ago

tsybanov commented 10 years ago

Hi. I have problem with navigationBarItem position when work with SWRevealViewController and Swift.

When I call some Navigation View Controller (first page of Navigation VIew Controller) from menu (SWRevealViewController), Navigation Bar Item on this page move so close to the left. When I've pressed home button and open application - it is move to correctly position. When I've try call something again from menu (SWRevealViewController) Navigation Bar Item move to left so close again.

Please, give some advice for solve this problem.

Here gif for best description:

This is real effect (not montage). Button moves after open application again.

John-Lluch commented 10 years ago

Hi, I am aware of at least another user who found the same issue. However I am currently lost on what could do that on iOS8. The class does not intervene at all on navigation controllers layout, so to be honest I do not get what is going on. As far as I can tell this does not happen on the examples, at least on iOS8 beta2. So the more you can narrow the issue the better. You mention this is running swift, is this important?. Thanks

tsybanov commented 10 years ago

I mention about swift because you should know that I'd converted your original code from example (obj-c) to swift. And if it will be important I could give it to you. Second important thing: even I work with XCode 6 and Swift I deploy project on iOS7 (not 7.1 and not 8). I hope it is help you.

Maybe it sounds brazenly but I think this problem is important because there no workarounds. If I will move the button "before click home button" it's will move also "after click home button"

John-Lluch commented 10 years ago

Hi. What example did you convert to swift?. I understand you mean one of the examples, not the controller. Please, can you clarify if this only happens with your "converted" example?.

I just ran the story board 2 example and the example 3 on iOS8 beta 2 and they both work just fine. I am downloading beta 3 now.

You can push your swift code to the repo if you wish. I will certainly have a look at it.

Thanks.

tsybanov commented 10 years ago

I just send you a project. Can I do it to joan.lluch@sweetwilliamsl.com ?

John-Lluch commented 10 years ago

PLEASE, do not send emails directly to me. I am contributing to the open source community for fun and my pleasure, but I do not want my business email to be flooded with this. Use GitHub. Thanks.

Anyway, I found that this is possibly a bug on iOS8 beta3, so not particularly related with SWRevealViewController or swift. See this:

https://devforums.apple.com/message/1000324#1000324

Thanks.

tsybanov commented 10 years ago

I fully understand you. Thats why I asked you about it. Thanks for your useful for community "fun" :)

tsybanov commented 10 years ago

I want inform you that this problem solved in XCode 6 Beta 4. Thank you for your time, John!

John-Lluch commented 10 years ago

My pleasure.

StudentUnion commented 10 years ago

@MaximDroy how did you record that gif of your actions? It's fantastic for communication.

MultX commented 9 years ago

Hello, This bug is still repeated in my project builded by xcode 6.1 release. How can i solve my problem?

Gregusse commented 9 years ago

@MaximDroy could contact me cause I have some trouble with SWReveal and swift? Thx

kumararvind commented 7 years ago

I am getting the same issue. I have spend around 2 days But I did'nt get Solution. I am using Objective C Language with Xcode 8.1, Please share your thought how I can resolve this issue. Thanks,

simulator screen shot 06-dec-2016 3 48 53 pm

iDevelopper commented 7 years ago

I wrote a lot of samples with SWRevealViewController in Swift and Objective-c. I have never seen that! Could you upload a sample reproducing this issue?

kumararvind commented 7 years ago

Thanks for your reply Its not possible to create Sample for now I will share later when I will get time. In my Project I am using Custom Tabbar, It happen When I tap any tabbbar and then click on Left Menu button and then options of Menus Listed in Reveal after that Left and Right bar button offset changed as I Shared Screenshots.

iDevelopper commented 7 years ago

Is the custom tab bar controller is your? Otherwise where can I find it?

kumararvind commented 7 years ago

here is the my custom Tabbar code link: https://drive.google.com/file/d/0B6u1v7u3YkatcHlTbEJCSldwQWs/view?usp=sharing

kumararvind commented 7 years ago

// Calling Method HelpViewController *helpTaskViewController = GET_VIEW_CONTROLLER(kHelpViewController); [self push:helpTaskViewController];

Here is the SWReveal method

pragma mark - Push Using SWRevealViewController

-(void)push:(UIViewController )controller { SWRevealViewController revealController = self.revealViewController; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:controller];

[revealController pushFrontViewController:navigationController animated:YES]; }

iDevelopper commented 7 years ago

Ok I will try a test

iDevelopper commented 7 years ago

Don't have the macros GET_VIEW_CONTROLLER_STORYBOARD, GET_VIEW_CONTROLLER

kumararvind commented 7 years ago

define GET_VIEW_CONTROLLER(viewController) [self.storyboard instantiateViewControllerWithIdentifier:viewController]

static NSString *const kHelpViewController = @"HelpViewController";