Skip to content

Instantly share code, notes, and snippets.

@saikat
Created September 22, 2009 22:00
Show Gist options
  • Save saikat/191471 to your computer and use it in GitHub Desktop.
Save saikat/191471 to your computer and use it in GitHub Desktop.
[Widget should: "expand to fit the new font size when the new font size is larger than the old, whether or not autosize is on"
by: function() {
for (var i = 0; i < this.widgetCount; ++i) {
this.widget = [[this.widgetList[i] alloc] init];
this.oldSize = CGSizeMakeCopy([this.widget frame].size);
var font = [this.widget font],
newFont = [CPFont fontWithName:[font familyName] size:[font size]+1];
[this.widget changeFont:newFont];
[Widget should:"Be taller than before" by:function(context) {
print(context);
print(this.widget);
print(currentContext);
}];
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment