#import "XDImage.h" XDImage *image = [XDImage imageWithContentsOfFile:@"button.png"]; image.scale9Grid = [SPRectangle rectangleCenteredToBounds:image.bounds width:100.0f height:10.0f]; [self addChild:image];