Top Level Namespace
Defined Under Namespace
Modules: Teacup Classes: AppDelegate, CALayer, ConstraintsController, CustomAppearanceContainer, CustomAppearanceController, CustomAppearanceLabel, CustomTeacupClass, CustomView, DummyActivityIndicatorView, DummyButton, DummyLabel, DummyLayer, DummyPickerView, DummyScrollView, DummySwitch, DummyTableColumn, DummyTableView, DummyTextField, DummyTextView, DummyView, GradientController, LandscapeOnlyController, MainController, MotionLayoutController, NSView, NSViewController, NSWindow, NSWindowController, PresentModalController, TeacupWindowController, UIView, UIViewController
Instance Method Summary collapse
-
#NSView ⇒ Object
| | NSView.frame |.
-
#UIButton ⇒ Object
| | UIButton |.
-
#UINavigationBar ⇒ Object
| | UINavigationBar |.
-
#UIView ⇒ Object
| | UIView.frame |.
Instance Method Details
#NSView ⇒ Object
| | NSView.frame |
4 5 6 7 8 |
# File 'lib/teacup-osx/core_extensions/teacup_handlers.rb', line 4 Teacup.handler NSView, :left, :x do |target, x| f = target.frame f.origin.x = Teacup::calculate(target, :width, x) target.frame = f end |
#UIButton ⇒ Object
| | UIButton |
136 137 138 |
# File 'lib/teacup-ios/core_extensions/teacup_handlers.rb', line 136 Teacup.handler UIButton, :title do |target, title| target.setTitle(title, forState: UIControlStateNormal) end |
#UINavigationBar ⇒ Object
| | UINavigationBar |
164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/teacup-ios/core_extensions/teacup_handlers.rb', line 164 Teacup.handler UINavigationBar, :backgroundImage do |styles| if styles.is_a?(UIImage) styles = { portrait: styles } end styles.each do |metric, image| case metric when UIBarMetricsDefault, :portrait self.setBackgroundImage(image && image.uiimage, forBarMetrics:UIBarMetricsDefault) when UIBarMetricsLandscapePhone, :landscape self.setBackgroundImage(image && image.uiimage, forBarMetrics:UIBarMetricsLandscapePhone) end end end |