Saturday, 15 June 2013

ios - Change background of frame -



ios - Change background of frame -

i have "frame within frame" scenario. there 600x600 area within of main screen. color 600x600 area can visualize working. have tried using self.backgroundcolor = [uicolor whitecolor]; colors whole screen instead of 600x600 area.

what best way color background of 600x600 area?

- (id)initwithframe:(cgrect)frame { self = [super initwithframe: cgrectmake(84, 0, 600, 600)]; if (self) { //initialization code tilearray = [[nsmutablearray alloc]initwithcapacity: 9]; tile1 = [[tileview alloc] initwithframe:cgrectmake(100, 100, 128, 128) withimagenamed:@"yellow1.png"]; [self addsubview:tile1]; int x = [self frame].size.width; int y = [self frame].size.width; nslog(@" width: %i. height: %i.", x,y); } homecoming self; }

ios objective-c uiview frame

No comments:

Post a Comment