Skip to content

Instantly share code, notes, and snippets.

@ainame
Last active December 19, 2015 16:39
Show Gist options
  • Save ainame/5985146 to your computer and use it in GitHub Desktop.
Save ainame/5985146 to your computer and use it in GitHub Desktop.
class HogeScreen < TabScreenBase
tab_icon icon: "fuga_image"
end
class TabScreenBase < PM::Screen
class << self
def config
@config ||= {}
end
def tab_icon(args)
config[:tab_icon] = args
end
end
def config
self.class.config
end
def on_create(args={})
set_tab_bar_item(config[:tab_icon])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment