Slide 13
Slide 13 text
%JSFDU%SBXJOH
class
CustomCellContentView
<
UIView
def
drawRect(rect)
self.superview.superview.drawRectContent(rect)
end
end
class
BookmarkCell
<
UITableViewCell
def
initWithStyle(style,
reuseIdentifier:reuseIdentifier)
if
super
@contentView
=
CustomCellContentView.alloc.initWithFrame(CGRectZero)
...
end
def
drawRectContent(rect)
...
font
=
UIFront.boldSystemFontOfSize(16)
size
=
@text.sizeWithFont(font)
@text.drawInRect([[x,
y],
size],
withFont:font)
end
DPOUFOU7JFXͷ
ESBX3FDUͰ
ESBX*O3FDUͰඳը