ios - drawing over a view shades the view? -
i creating custom view display month , date, , looks like:
however, want add small triangle point down beneath blue month label on top. added following code in drawrect
- (void)drawrect:(cgrect)rect { [super drawrect:rect]; cgcontextref context = uigraphicsgetcurrentcontext(); cgcontextbeginpath(context); cgcontextmovetopoint(context, 30 - 5.0, 20); cgcontextaddlinetopoint(context, 30 + 5.0, 20); cgcontextaddlinetopoint(context, 30, 20 + 4.0); cgcontextaddlinetopoint(context, 30 - 5.0, 20); cgcontextsetrgbfillcolor(context, 0, 118/255.0, 166/255.0, 1.0); cgcontextfillpath(context); }
this drawing on white date label add small triangle custom view, , work. has unexpected side effect of shading date label itself. effect following:
also if zoom in image can see round corners filled in black color. looks layer properties messed maybe? happening?
thank much!
Comments
Post a Comment