开发者

draw line over uilable after loading from nib

here is my code

CGContextRef c = UIG开发者_如何学编程raphicsGetCurrentContext();
CGContextBeginPath(c);
CGContextMoveToPoint(c, 277.0f, 21.0f);
CGFloat newpoint = 277.0f + (CGFloat)(self.msrp.text.length * 8);
//NSLog(@"%f", newpoint);
CGContextAddLineToPoint(c, newpoint, 21.0f);
CGContextStrokePath(c);

i am trying to draw a line over UIlabel, i am loading my view from nib.i dont know what i am doing wrong. i just work fine if i draw entire view instead loading from nib.(but i dont wanna do that)..i hope my question is clear..


ok , finally i end up subclassing UIlabel. and then place my code in drawTextInRect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜