Sha256: 8e6a2fdeef3e4bded53ca4636ae99e04ee4c84cf1246b83201ca9c64a27c067e
Contents?: true
Size: 842 Bytes
Versions: 8
Compression:
Stored size: 842 Bytes
Contents
include SugarCube::Adjust class AppDelegate def application(application, didFinishLaunchingWithOptions:launchOptions) @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) ctlr = MyController.new first = UINavigationController.alloc.initWithRootViewController(ctlr) @window.rootViewController = first @window.makeKeyAndVisible true end end Teacup::Stylesheet.new(:teacup) do style :label, color: :white, background: :clear, constraints: [ :center_x, :center_y, ] style :button, title: 'neat.', constraints: [ :center_x, constrain_below(:label).plus(0), ] end class MyController < UIViewController stylesheet :teacup layout do @label = subview(UILabel, :label, text: 'nifty?') @button = subview(UIButton, :button) end end
Version data entries
8 entries across 8 versions & 1 rubygems