infinitered / ProMotion-menu

RubyMotion gem allowing you to easily setup a facebook or Path style hidden slide menu easily with the ProMotion gem.
74 stars 29 forks source link

Problem with PKRevealController > 2.0.1 #21

Closed moomerman closed 10 years ago

moomerman commented 10 years ago

I've just tried to get this slide menu working in a new project which is using the latest version of everything.

Simply doing this in AppDelegate results in a blank screen:

open_slide_menu HomeScreen.new(nav_bar: true), :left => MenuScreen

Specifying v2.0.1 explicitly seems to fix the problem (I tried all the versions down to 2.0.1 and they didn't work either):

pod 'PKRevealController', '2.0.1'
cheenu commented 10 years ago

Observed the same thing. Anything other than 2.0.1 results in the blank screen.

pollingj commented 10 years ago

I've found that I have to use 1.0b2 still. Whilst 2.0.1 fixes the blank screen issue, as soon as I try to use the navigation controller to switch to a new screen using the following code

class NavigationScreen < ProMotion::TableScreen

  def table_data
    [{
      title: nil,
      cells: [{
        title: 'OVERWRITE THIS METHOD',
        action: :swap_content_controller,
        arguments: CreateAccountScreen
      }]
    }]
  end

  def swap_content_controller(screen_class)
    App.delegate.slide_menu.content_controller = screen_class.new(nav_bar: true)
  end

end

The next screen is just blank. If I switch to the 1.0b2 pod it works fine.

cheenu commented 10 years ago

Try

App.delegate.open_slide_menu screen_class.new(nav_bar:true), left: NavigationScreen

it works for me with 2.0.1. Although seeing other issues now (such as Pixate styling going for a toss when scrolling) so might have to check out 1.0b2.

pollingj commented 10 years ago

Brilliant, thanks, that appears to be working so far for me.

khaledrepos commented 10 years ago

I have been trying for the past few hours to get the slide menu to work with my promotion app. However, All I could see is a blank screen. I also tried changing the version of PKRevealController pod as suggested. I created another ProMotion project in order to test slider menu: https://gist.github.com/khaledalissa/3db265253e314e426b62 but still no luck.

cheenu commented 10 years ago

Try

App.delegate.open_slide_menu HomeScreen.new(nav_bar: true), left: HomeScreen

instead of

open_slide_menu HomeScreen.new(nav_bar: true), left: HomeScreen

Does that work?

If not, uploading the full test ProMotion project would be a good idea so that we can check if you're missing anything obvious.

cheenu commented 10 years ago

Actually, ignore my above comment - I didn't notice that you were making that call in AppDelegate itself :)

macfanatic commented 10 years ago

Although very slow getting around to this, resolving this issue is on my list to investigate. Thanks for chiming in @cheenu, really appreciate it.

cspeer commented 10 years ago

Hey everyone,

I'm running into the same issue here.Using 2.0.1 instead of the latest helps. However using

App.delegate.open_slide_menu HomeScreen.new(nav_bar: true), left: HomeScreen

instead of

App.delegate.slide_menu.content_controller = screen_class.new(nav_bar: true)

does open the new screen but without any closing animation from the slide menu. Is there a way around?

Thanks.

cheenu commented 10 years ago

Same issue here, haven't found a workaround yet.

@macfanatic No problem, thanks for creating this awesome ProMotion extension!

jamonholmgren commented 10 years ago

Weird thing...when I run this in the REPL:

UIApplication.sharedApplication.delegate.slide_menu.show(:left)

I get this (iPad device_family):

ipad

Strange.

jamonholmgren commented 10 years ago

If you want to try a different cocoapod, I have the beginnings of some new code for MMDrawerController. Have not really tested it.

https://gist.github.com/jamonholmgren/10228692

macfanatic commented 10 years ago

Yeah, I'm ready to ditch PKRevealController at this point, it's been nothing but a pain and there are so many outstanding issues.

Let's chat about possible underlying frameworks in a new issue, #25.

pencilcheck commented 10 years ago

https://github.com/macfanatic/promotion_slide_menu/issues/25 This solves the problem at hand. Please consider switching asap.

macfanatic commented 10 years ago

I'll be doing some further testing on PR #25, however at this point I believe I have it on feature parity with the published version of the gem and the specs are passing.

I'd like to set it up in an app and see what it looks like before I release it :)