What is the correct way to draw a filled rectangle in iOS 6? -


this question has answer here:

i bit confused between different version of ios sdk , information on net. not sure how supposed draw filled rectangle in case of ios 6 sdk. can guide me find answer?

there various ways. try like:

-(void)drawrect:(cgrect)rect  {     cgcontextref cont = uigraphicsgetcurrentcontext();     cgcontextsetrgbfillcolor(cont, 1.0, 1.0, 0.0, 1.0);     cgcontextfillrect(cont, cgrectmake(50.0, 50.0, 50.0, 50.0)); } 

Comments