--------------- tire.m-------------------

- (id) init { if ( self = [slef initWithPressure:34 treadDepth:30] ) { } return (self); }

- (id) initWithPressure : (float)p
{
if(self = [self initWithPressure:p treadDepth:20.0])
{
}

return (self);
}

-(id) initWithTreadDepth : (float)td
{
if(self = [self initWithPressure:34.0 threadDepth:td])
{
}
return (self);
}

-(id) initWithPressure:(float)p threadDepth:(float)td
{
if(self = [super init])
{
pressure = p;
treadDepth = td;
}
return (self);
}


------------------------- subClassing --------------------------------

-(id)initWithPressure:(float)p threadDepth:(float)td
{
if(self = [super initWithPressure:p treadDepth:td])
{
rainHandling = 23.7;
snowHandling = 43.5;
}

return (self);
}

'Object-C' 카테고리의 다른 글

adHoc  (0) 2010.12.13
category  (0) 2010.12.03
textbox 글자수에 따른 height 가져오기  (0) 2010.11.26
HIG  (0) 2010.11.07
Memory Management  (0) 2010.11.02

int nMaxWidth = 220

int nMaxHeight = 400;   

UIFont *chatFont = [UIFont systemFontOfSize:14];

_tagDetail.text = @"";

CGSize chatTextSize = [_tagDetail.text sizeWithFont:  chatFont

  constrainedToSize: CGSizeMake(nMaxWidth, nMaxHeight)

  lineBreakMode: UILineBreakModeWordWrap];

int height = chatTextSize.height;

'Object-C' 카테고리의 다른 글

category  (0) 2010.12.03
init  (0) 2010.12.03
HIG  (0) 2010.11.07
Memory Management  (0) 2010.11.02
StanFord Lecture PDF  (0) 2010.10.29
http://blog.naver.com/wwind18/20110361242

'Object-C' 카테고리의 다른 글

init  (0) 2010.12.03
textbox 글자수에 따른 height 가져오기  (0) 2010.11.26
Memory Management  (0) 2010.11.02
StanFord Lecture PDF  (0) 2010.10.29
테이블뷰 정렬  (0) 2010.10.23

+ Recent posts