Top Level Namespace
Defined Under Namespace
Modules: Teacup Classes: AppDelegate, CALayer, ConstraintsController, CustomAppearanceContainer, CustomAppearanceController, CustomAppearanceLabel, CustomCell, CustomTeacupClass, CustomView, DependencyController, DummyActivityIndicatorView, DummyButton, DummyLabel, DummyLayer, DummyPickerView, DummyScrollView, DummySwitch, DummyTableColumn, DummyTableView, DummyTextField, DummyTextView, DummyView, GradientController, LandscapeOnlyController, MainController, MemoryLeakController, MotionLayoutController, NSView, NSViewController, NSWindow, NSWindowController, PresentModalController, TableViewController, 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 |
# File 'lib/teacup-osx/core_extensions/teacup_handlers.rb', line 4 Teacup.handler NSView, :constraints do |target, constraints| target.add_uniq_constraints(constraints) end |
#UIButton ⇒ Object
| | UIButton |
148 149 150 151 152 153 154 |
# File 'lib/teacup-ios/core_extensions/teacup_handlers.rb', line 148 Teacup.handler UIButton, :title do |target, title| if title.is_a?(NSAttributedString) target.setAttributedTitle(title, forState: UIControlStateNormal) else target.setTitle(title.to_s, forState: UIControlStateNormal) end end |
#UINavigationBar ⇒ Object
| | UINavigationBar |
180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/teacup-ios/core_extensions/teacup_handlers.rb', line 180 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 |