mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-04-28 12:15:29 +08:00
Added a note to specify self as the receiver for PM::Screen#title=
This commit is contained in:
@@ -212,13 +212,13 @@ class MyScreen < PM::Screen
|
||||
|
||||
#### title=(title)
|
||||
|
||||
Sets the text title of current screen instance.
|
||||
Sets the text title of current screen instance. Note that you must declare `self` as the receiver.
|
||||
|
||||
```ruby
|
||||
class SomeScreen
|
||||
def on_load
|
||||
# This sets this instance's title
|
||||
title = "Something else"
|
||||
self.title = "Something else"
|
||||
end
|
||||
end
|
||||
```
|
||||
@@ -455,4 +455,4 @@ Alias for self.view.bounds
|
||||
|
||||
#### frame
|
||||
|
||||
Alias for self.view.frame
|
||||
Alias for self.view.frame
|
||||
|
||||
Reference in New Issue
Block a user