Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup and following Apple's "super" call paradigm for initializers

  • Loading branch information...
commit 745cce4624b4b5d294c17c2ec99835a8b1c7307f 1 parent 8f7f433
Jonathan Penn authored
View
2  app/views/countdown_label.rb
@@ -2,7 +2,7 @@ class CountdownLabel < UILabel
attr_accessor :colorScheme
def initWithFrame frame
- super
+ return nil unless super
self.backgroundColor = UIColor.blackColor
self.textAlignment = UITextAlignmentCenter
self.color = UIColor.whiteColor
View
3  app/views/custom_label.rb
@@ -1,6 +1,6 @@
class CustomLabel < UILabel
def initWithFrame frame
- super
+ return nil unless super
self.backgroundColor = UIColor.clearColor
self.textAlignment = UITextAlignmentCenter
self.shadowColor = UIColor.blackColor
@@ -10,7 +10,6 @@ def initWithFrame frame
self.adjustsFontSizeToFitWidth = true
self.font = UIFont.systemFontOfSize(18)
self.opaque = false
-
self
end
end
View
1  app/views/swipe_to_go_back_instructions_label.rb
@@ -8,7 +8,6 @@ def initWithFrame frame
setupSelf
setupAnimationView
end
-
self
end
View
3  app/views/title_label.rb
@@ -1,6 +1,6 @@
class TitleLabel < UILabel
def initWithFrame frame
- super
+ return nil unless super
self.backgroundColor = UIColor.clearColor
self.opaque = false
self.textAlignment = UITextAlignmentCenter
@@ -10,7 +10,6 @@ def initWithFrame frame
self.numberOfLines = 1
self.adjustsFontSizeToFitWidth = true
self.font = UIFont.systemFontOfSize(20)
-
self
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.