self.font = Font(FontFamily.Label, FontSize.RegularControl)
+ self.usesSingleLineMode = False
return Control.dependencies(self) + [self.textColor]
# If it's false, as soon as you type a character that overflows the field, the whole line
# disappears and is replaced by the new character. With scrollable to True, the text scrolls
# and makes editing smoother.
- self.properties['cell.scrollable'] = True
+ # In xibless, we differ a bit from XCode's default behavior in that by default, a textfield
+ # wraps (in XCode, it scrolls by default and you have to explicitly tell it to wrap). We
+ # want most textfields (particularly labels) to wrap.
+ # However, if usesSingleLineMode is True, we scroll because that's the behavior that makes
+ if self.usesSingleLineMode:
+ self.properties['cell.scrollable'] = True