objective c - Changing UITableCellView appearance before it is highlighted (from UITableView) -
i may have taken million wrong turns question, i'm happy revise if can spot went wrong.
i trying build tableview looks same contacts app. first issue entry have both bolded , unbolded string in given row "john appleseed" or "martin luther king". figured need have 2 uilabels within uitableviewcell (possible first mistake).
all want add second uilabel instead of subclassing add uilabel in uitableviewcell (possible next mistake).
however when row highlighted (but not yet selected) default uilabel text switches white, ad-hoc uilabel remains black. can force uilabel text change white in uitableviewdelegate methods occur after highlighting. cause noticeable flash of white -> black.
now see uitableviewcell method 'sethighlighted:animated:' override if subclassed, hoping way approach it.
thoughts?
i think you're going find difficult keep last name proportionally spaced other portion of name in separate view, given views may resized table view in number of situations (for example, accommodate controls when table view in editing mode).
it should lot easier create custom subclass of uitableviewcell
, override -drawrect:
method draw text itself. take @ uistringdrawing
category on nsstring
list of messages can send instance of nsstring
tell draw either @ given point, or within given rectangle.
Comments
Post a Comment