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

Displaying a limited number of lines in the menu #6

Closed folivi closed 11 years ago

folivi commented 11 years ago

Hi, How to avoid having more cells than the number of items in the menu table? I'd like the table to contain only 5 cells if my cells array only contains 5 items thanks for your help

macfanatic commented 11 years ago

I assume you are seeing the UITableViewCellSeparator itself, even if there is only 1 row the divider is drawn down the rest of the screen.

http://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html#//apple_ref/doc/c_ref/UITableViewCellSeparatorStyle

# inside your menu controller
self.separatorStyle = UITableViewCellSeparatorStyleNone
folivi commented 11 years ago

thanks for the quick reply. but I've already tried this by doing self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone in the will_appear method but the result of this is no separtor is displayed at all which not really what I'm trying to achieve

jamonholmgren commented 11 years ago

This is probably helpful, @folivi : http://stackoverflow.com/questions/1633966/can-i-force-a-uitableview-to-hide-the-separator-between-empty-cells

folivi commented 11 years ago

thanks @jamonholmgren one solution is (in the navigation tableScreen)

    def on_create(args={})
      super
      self.tableView.setTableFooterView(UIView.new)
    end

Maybe this can be added by default in the pro_motion_slide_menu gem? :) Any news about the bug while invoking remote_image in a tableView that I reported a while ago? This might be something really easy. As reminder, the issue is the imageView in a the tableView is nil untill you tap on a cell or scroll up and down cheers guys.

jamonholmgren commented 11 years ago

Unfortunately, I haven't had time to do much with it. New baby, business growth, yadda yadda. I'm hoping someone else will take the time to dig into it.

folivi commented 11 years ago

cool for now I use the classic tableView way to make it work Cheers