PagingMenuController icon indicating copy to clipboard operation
PagingMenuController copied to clipboard

Change menu background color on-the-fly

Open Sorix opened this issue 9 years ago • 5 comments

Changing PagingMenuController's option

Call setup method with new options again. It creates a new paging menu controller. Do not forget to cleanup properties in child view controller.

How can I change some properties of menu (for example background color of items / bar) on the fly? If I call .setup() method again with parameters -- than all my subviews are reloaded with flickr animation, it's not a good option.

Also if user have entering something inside subview -- all data is lost, because it's reloaded.

I've read that you had method .rebuild() but it was deprecated. Have framework any other methods to access PagingMenuController's options with ability to change it without view reloading?

Especially I need item's background color (not only current item).

Sorix avatar Oct 12 '16 18:10 Sorix

+1, I'm currently looking for the same option.

flohei avatar Nov 21 '16 11:11 flohei

+1 I am also looking for same option.

markoengelman avatar Dec 13 '16 15:12 markoengelman

you guys find any good option for this i facing same problem ?? let me know help needed @kitasuke

thanks chitaranjan

TheCodeTalker avatar Jan 27 '17 08:01 TheCodeTalker

anyone found a solution?

mapplics avatar Feb 13 '17 14:02 mapplics

i debugged it i found there is no method like to change to setup new color like this . i imp my own.. i found one solution i force full update the menuview like this self.pagingMenuController?.menuView.backgroundColor = UIColor.red For menu bar
self.pagingMenuController?.menuView.updateUnderLine(flagForUnderLine: scrollRGB(percent: Double((1 - ratio))))

i wrote a method inside MenuView.swift for changing color.

func updateUnderLine( flagForUnderLine: UIColor){ underlineView.backgroundColor = flagForUnderLine
}

my sol'n is working for me

TheCodeTalker avatar Feb 14 '17 11:02 TheCodeTalker