Closed smartweb closed 12 years ago
hmm, this code looks like it's pulling in a few directions... if you are just styling a view, you can use the Teacup::View#style
method without using a stylesheet:
# in a view controller
@button = UIButton. buttonWithType(UIButtonTypeRoundedRect)
# use teacup style method
@button.style({
text: '',
backgroundColor: UIColor.whiteColor,
width: 150,
height: 30,
delegate: self
})
...
def textFieldShoudReturn(textfield)
textfield.resignFirstResponder
true
end
Your call to style UITextField
looks out of place - what is the value of self
at that point?
closing, for lack of information. if you're still having trouble, let me or someone know!
I write like this, but not work
style UITextField, text: '', backgroundColor: UIColor.whiteColor, width: 150, height: 30, delegate: self
def textFieldShoudReturn(textfield) textfield.resignFirstResponder true end