{"id":703,"date":"2010-12-03T15:02:52","date_gmt":"2010-12-03T06:02:52","guid":{"rendered":"http:\/\/yamazon.org\/?p=703"},"modified":"2010-12-03T15:02:52","modified_gmt":"2010-12-03T06:02:52","slug":"7sqlite%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6todo%e3%83%aa%e3%82%b9%e3%83%88%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92%e4%bd%9c%e6%88%902","status":"publish","type":"post","link":"https:\/\/apr20.net\/?p=703","title":{"rendered":"[7]:SQLite\u3092\u4f7f\u3063\u3066ToDo\u30ea\u30b9\u30c8\u30a2\u30d7\u30ea\u3092\u4f5c\u6210(2)"},"content":{"rendered":"<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001\u30bf\u30a4\u30c8\u30eb\u306e\u901a\u308a\u3001SQLite\u3092\u4f7f\u3063\u3066ToDo\u30ea\u30b9\u30c8\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u306e\u4e8c\u56de\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002<a href=\"http:\/\/yamazon.org\/iphone-app-develop-tips\/681\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u3092\u8aad\u3093\u3067\u306a\u3044\u65b9\u306f\u3001<a href=\"http:\/\/yamazon.org\/iphone-app-develop-tips\/681\">\u305d\u3061\u3089<\/a>\u304b\u3089\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001SQL\u30c7\u30fc\u30bf\u3092UITableView\u3067\u8868\u793a\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u753b\u50cf\u3084\u6587\u5b57\u5217\u3092\u4f7f\u3063\u305f\u8907\u5408\u7684\u306a\u30ab\u30e9\u30e0\u306e\u4f5c\u6210\u3092\u884c\u3044\u307e\u3059\u3002\u4eca\u56de\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u753b\u50cf\u3092\u4f7f\u3044\u307e\u3059\u306e\u3067\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/high.png\"><img loading=\"lazy\" decoding=\"async\" title=\"high\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/high.png\" alt=\"high\" width=\"20\" height=\"20\" \/>\u512a\u5148\u5ea6\uff1a\u9ad8<br \/>\n<\/a><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/medium.png\"><img loading=\"lazy\" decoding=\"async\" title=\"medium\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/medium.png\" alt=\"medium\" width=\"20\" height=\"20\" \/>\u512a\u5148\u5ea6\uff1a\u666e\u901a<br \/>\n<\/a><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/low.png\"><img loading=\"lazy\" decoding=\"async\" title=\"low\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/low.png\" alt=\"low\" width=\"20\" height=\"20\" \/>\u512a\u5148\u5ea6\uff1a\u4f4e<\/a><\/p>\n<p>\u3053\u308c\u3089\u306e\u753b\u50cf\u306f\u3001\u512a\u5148\u5ea6\u3092\u8868\u793a\u3059\u308b\u306e\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p><!--more-->\u512a\u5148\u5ea6\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306b\u3001<strong>Todo.h<\/strong> \u3068 <strong>Todo.m <\/strong>\u306b\u3044\u304f\u3064\u304b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><strong>Todo.h<\/strong>\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@interface<\/span> Todo : NSObject {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #703daa;\">sqlite3<\/span><span style=\"color: #000000;\"> *<\/span>database<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #703daa;\">NSInteger<\/span><span style=\"color: #000000;\"> <\/span>primaryKey<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>NSString<span style=\"color: #000000;\"> *<\/span><span style=\"color: #4e8187;\">text<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #703daa;\">NSInteger<\/span> priority;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">@property<span style=\"color: #000000;\"> (<\/span>assign<span style=\"color: #000000;\">,<\/span>nonatomic<span style=\"color: #000000;\">,<\/span>readonly<span style=\"color: #000000;\">)NSInteger primaryKey;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">@property<span style=\"color: #000000;\"> (<\/span>nonatomic<span style=\"color: #000000;\">,<\/span>retain<span style=\"color: #000000;\">)NSString *text;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@property<\/span> (<span style=\"color: #bb2da2;\">nonatomic<\/span>) NSInteger priority;<\/p>\n<\/blockquote>\n<p>NSInteger priority \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u4e0e\u3048\u3089\u308c\u305ftodo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u512a\u5148\u5ea6\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u306e\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001<strong>Todo.m<\/strong>\u3092\u958b\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@synthesize<\/span> primaryKey,text,<em><strong>priority<\/strong><\/em>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">-(<span style=\"color: #bb2da2;\">id<\/span>)initWithPrimaryKey:(<span style=\"color: #703daa;\">NSInteger<\/span>)pk database:(<span style=\"color: #703daa;\">sqlite3<\/span> *)db {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>if<span style=\"color: #000000;\">(<\/span>self<span style=\"color: #000000;\"> = [<\/span>super<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">init<\/span><span style=\"color: #000000;\">]){<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>primaryKey<span style=\"color: #000000;\"> = pk;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #4e8187;\">database<\/span> = db;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">if<\/span><span style=\"color: #000000;\"> (<\/span>init_statement<span style=\"color: #000000;\"> == <\/span><span style=\"color: #bb2da2;\">nil<\/span><span style=\"color: #000000;\">) {<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">const<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #bb2da2;\">char<\/span><span style=\"color: #000000;\"> *sql = <\/span>&#8220;SELECT text<em><strong>,priority<\/strong><\/em> FROM todo WHERE pk=?&#8221;<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">if<\/span>(<span style=\"color: #3d1e81;\">sqlite3_prepare_v2<\/span>(<span style=\"color: #4e8187;\">database<\/span>, sql, &#8211;<span style=\"color: #252bd8;\">1<\/span>, &amp;<span style=\"color: #4e8187;\">init_statement<\/span>,<span style=\"color: #bb2da2;\">NULL<\/span>) != <span style=\"color: #78492a;\">SQLITE_OK<\/span>){<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #78492a;\">NSAssert1<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #252bd8;\">0<\/span><span style=\"color: #000000;\">, <\/span>@&#8221;Error:failed to prepare statement with message &#8216;%s&#8217;.&#8221;<span style=\"color: #000000;\">, <\/span><span style=\"color: #3d1e81;\">sqlite3_errmsg<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #4e8187;\">database<\/span><span style=\"color: #000000;\">));<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #3d1e81;\">sqlite3_bind_int<\/span><span style=\"color: #000000;\">(<\/span>init_statement<span style=\"color: #000000;\">, <\/span><span style=\"color: #252bd8;\">1<\/span><span style=\"color: #000000;\">, <\/span>primaryKey<span style=\"color: #000000;\">);<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">if<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #3d1e81;\">sqlite3_step<\/span><span style=\"color: #000000;\">(<\/span>init_statement<span style=\"color: #000000;\">)== <\/span><span style=\"color: #78492a;\">SQLITE_ROW<\/span><span style=\"color: #000000;\">){<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">text<\/span><span style=\"color: #000000;\"> = [<\/span><span style=\"color: #703daa;\">NSString<\/span><span style=\"color: #000000;\"> <\/span>stringWithUTF8String<span style=\"color: #000000;\">\ud83d\ude41<\/span><span style=\"color: #bb2da2;\">char<\/span><span style=\"color: #000000;\"> *)<\/span>sqlite3_column_text<span style=\"color: #000000;\">(<\/span><span style=\"color: #4e8187;\">init_statement<\/span><span style=\"color: #000000;\">, <\/span><span style=\"color: #252bd8;\">0<\/span><span style=\"color: #000000;\">)];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\"><em><strong>self<\/strong><\/em><\/span><em><strong>.priority = <\/strong><\/em><span style=\"color: #3d1e81;\"><em><strong>sqlite3_column_int<\/strong><\/em><\/span><em><strong>(<\/strong><\/em><span style=\"color: #4e8187;\"><em><strong>init_statement<\/strong><\/em><\/span><em><strong>, <\/strong><\/em><span style=\"color: #252bd8;\"><em><strong>1<\/strong><\/em><\/span><em><strong>);<\/strong><\/em><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<span style=\"color: #bb2da2;\">else<\/span> {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">text<\/span><span style=\"color: #000000;\"> = <\/span>@&#8221;Nothing&#8221;<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #3d1e81;\">sqlite3_reset<\/span><span style=\"color: #000000;\">(<\/span>init_statement<span style=\"color: #000000;\">);<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span> <\/span>return<span style=\"color: #000000;\"> <\/span>self<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">@end<\/p>\n<\/blockquote>\n<p>\u6700\u521d\u306esynthesize\u306e\u884c\u3092\u5909\u66f4\u3057\u307e\u3057\u305f\u3002\u30b2\u30c3\u30bf\u30fc\uff06\u30bb\u30c3\u30bf\u30fc\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u3001priority \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b\u3001SQL\u8a18\u8ff0\u3092\u5c11\u3057\u5909\u66f4\u3057\u307e\u3057\u305f\u3002todo\u30c6\u30fc\u30d6\u30eb\u306b\u512a\u5148\u5ea6\u3092\u52a0\u3048\u308b\u305f\u3081\u306b\u3001priority\u3092\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u3002\u6700\u5f8c\u306b\u3001todo\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u9078\u629e\u3055\u308c\u305f\u512a\u5148\u9806\u4f4d\u306e\u5024\u306b self.priority \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306fsqlite3_column_int\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>init_statement \u3068 \u300c\uff11\u300d\u3092\u6e21\u3057\u307e\u3059\u3002\u300c\uff11\u300d\u306f\u3001\u512a\u5148\u5ea6\u306e\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u308bSQL\u914d\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3067\u3059\u3002<\/p>\n<p>\u5148\u307b\u3069\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u512a\u5148\u5ea6\u306e\u753b\u50cf\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u306eResource\u30d5\u30a9\u30eb\u30c0\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001\u8ffd\u52a0 \uff1e \u65e2\u5b58\u306e\u30d5\u30a1\u30a4\u30eb \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\u3059\u3079\u3066\u306e\u753b\u50cf\u3092\u9078\u629e\u3057\u3001\u8ffd\u52a0\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u9762\u3067\u300c\u30c7\u30b9\u30c6\u30a3\u30cd\u30fc\u30b7\u30e7\u30f3&#8230;\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u8ffd\u52a0\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-711\" title=\"7-1\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-1-300x181.png\" alt=\"7-1\" width=\"300\" height=\"181\" \/><\/a>\u5148\u307b\u3069\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\uff13\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u304cRecource\u30d5\u30a9\u30eb\u30c0\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-712\" title=\"7-2\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-2-300x179.png\" alt=\"7-2\" width=\"300\" height=\"179\" \/><\/a><\/p>\n<p>UITableView\u5185\u306e\u5217\u306e\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u6211\u3005\u306f\u3001\u8868\u793a\u3059\u308b\u30c7\u30fc\u30bf\u306e\u7a2e\u985e\u3092\u5b9a\u7fa9\u3059\u308b\u72ec\u81ea\u306e\u30bb\u30eb\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\uff11\u3064\u306e\u30c6\u30ad\u30b9\u30c8\u5217\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u7c21\u5358\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u81ea\u8eab\u306f\u3068\u3066\u3082\u3001\u6709\u7528\u306a\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u3001\uff13\u5217\u306e\u69cb\u9020\u3092\u3082\u3063\u305f\u3082\u306e\u304c\u5fc5\u8981\u306a\u306e\u3067\u3001\u72ec\u81ea\u306e\u30bb\u30eb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<p>XCode\u4e0a\u304b\u3089\u3001\u30d5\u30a1\u30a4\u30eb \uff1e \u65b0\u898f\u30d5\u30a1\u30a4\u30eb \u3092\u30af\u30ea\u30c3\u30af\u3057\u3001UITableView \u306e\u30b5\u30d6\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-713\" title=\"7-3\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-3-300x245.png\" alt=\"7-3\" width=\"300\" height=\"245\" \/><\/a>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001<strong>TodoCell<\/strong>\u3068\u3044\u3046\u540d\u524d\u306b\u3057\u307e\u3059\u3002\u201d\u540c\u6642\u306b.h\u30d5\u30a1\u30a4\u30eb\u3082\u4f5c\u6210\u201d\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001\u57fa\u672c\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u304c\u542b\u307e\u308c\u305fUITableView\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u9aa8\u7d44\u307f\u304c\u51fa\u6765\u307e\u3057\u305f\u3002<\/p>\n<p><strong>TodoCell.h<\/strong>\u3092\u958b\u304d\u3001\u3044\u304f\u3064\u304b\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #78492a;\">#import <\/span>&lt;UIKit\/UIKit.h&gt;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #78492a;\">#import <span style=\"color: #d12e1b;\">&#8220;Todo.h&#8221;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@interface<\/span> TodoCell : UITableViewController {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #4e8187;\">Todo<\/span><span style=\"white-space: pre;\"> <\/span>*todo;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #703daa;\">UILabel<\/span><span style=\"white-space: pre;\"> <\/span>*todoTextLabel;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #703daa;\">UILabel<\/span><span style=\"white-space: pre;\"> <\/span>*todoPriorityLabel;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #703daa;\">UIImageView<\/span> *todoPriorityImageview;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@property<\/span> (<span style=\"color: #bb2da2;\">nonatomic<\/span>, <span style=\"color: #bb2da2;\">retain<\/span>) UILabel *todoTextLabel;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@property<\/span> (<span style=\"color: #bb2da2;\">nonatomic<\/span>, <span style=\"color: #bb2da2;\">retain<\/span>) UILabel *todoPriorityLabel;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@property<\/span> (<span style=\"color: #bb2da2;\">nonatomic<\/span>, <span style=\"color: #bb2da2;\">retain<\/span>) UIImageView *todoPriorityImageView;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">-(<span style=\"color: #703daa;\">UIImage<\/span> *)imageForPriority:(<span style=\"color: #703daa;\">NSInteger<\/span>)priority;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">-(<span style=\"color: #4e8187;\">Todo<\/span> *)todo;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">-(<span style=\"color: #bb2da2;\">void<\/span>)setTodo:(<span style=\"color: #4e8187;\">Todo<\/span> *)newTodo;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">@end<\/p>\n<\/blockquote>\n<p>\u307e\u305a\u3001Todo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5404\u30bb\u30eb\u306f\u3001\u3069\u306eTodo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u304b\u3092\u77e5\u3063\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u5404\u30bb\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u6642\u306b\u3001\u3053\u308c\u306f\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\uff12\u3064\u306eUILabel \u3068 UIImageView\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u8981\u7d20\u304c\u3069\u3046\u3057\u3066\u5fc5\u8981\u306a\u306e\u304b\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u753b\u50cf\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p style=\"text-align: center; \"><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-715\" title=\"7-4\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/7-4-300x42.png\" alt=\"7-4\" width=\"300\" height=\"42\" \/><\/a><\/p>\n<p style=\"text-align: left; \">\u6c34\u8272\u306e\u30a2\u30a4\u30b3\u30f3\u753b\u50cf\u306f\u3001UIImageView\u306b\u3088\u308a\u914d\u7f6e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300c\u4f4e\u300d\u3068\u300cTodo\u30ea\u30b9\u30c8\u9805\u76ee\u300d\u306e\u7b87\u6240\u306f\u3001\u305d\u308c\u305e\u308c\u3001UILabel\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u308c\u3089\u306e\u5ba3\u8a00\u3092\u3057\u305f\u5f8c\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002Todo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f5c\u6210\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002synthesize\u3082\u884c\u3044\u307e\u305b\u3093\u3002\u3053\u306e\u7406\u7531\u3068\u3057\u3066\u306f\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5909\u6570\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u305d\u306e\u4e0b\u306b\u3044\u304f\u3064\u304b\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6700\u521d\u306f <strong>imageForPriority<\/strong> \u3067\u3059\u3002\u3053\u308c\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u3069\u306e\u753b\u50cf(\u8d64\u3001\u9752\u3001\u9ec4\u8272)\u3092\u8868\u793a\u3059\u308b\u306e\u304b\u3092\u6307\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306f\u3001Todo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u00a0getter \uff06 setter \u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002setter \u30e1\u30bd\u30c3\u30c9\u306f\u3001todo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u4ee5\u5916\u306b\u3001\u8ffd\u52a0\u30b3\u30fc\u30c9\u3092\u542b\u307f\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \"><strong>TodoCell.m<\/strong>\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #78492a;\">#import <\/span>&#8220;TodoCell.h&#8221;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">static<\/span> UIImage *priority1Image = <span style=\"color: #bb2da2;\">nil<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">static<\/span> UIImage *priority2Image = <span style=\"color: #bb2da2;\">nil<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">static<\/span> UIImage *priority3Image = <span style=\"color: #bb2da2;\">nil<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@interface<\/span> TodoCell ()<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">-(<span style=\"color: #703daa;\">UILabel<\/span> *)newLabelWithPrimaryColor:(<span style=\"color: #703daa;\">UIColor<\/span> *)primaryColor selectedColor:(<span style=\"color: #703daa;\">UIColor<\/span> *)selectedColor fontSize:(<span style=\"color: #703daa;\">CGFloat<\/span>)fontSize bold:(<span style=\"color: #bb2da2;\">BOOL<\/span>)<span style=\"color: #3d1e81;\">bold<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">@end<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\">@implementation<span style=\"color: #000000;\"> TodoCell<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">@synthesize<\/span> todoTextLabel,todoPriorityLabel,todoPriorityImageView;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">+ (<span style=\"color: #bb2da2;\">void<\/span>)initialize{<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>priority1Image = [[<span style=\"color: #703daa;\">UIImage<\/span> <span style=\"color: #3d1e81;\">imageNamed<\/span>:<span style=\"color: #d12e1b;\">@&#8221;high.png&#8221;<\/span>] <span style=\"color: #3d1e81;\">retain<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>priority2Image = [[<span style=\"color: #703daa;\">UIImage<\/span> <span style=\"color: #3d1e81;\">imageNamed<\/span>:<span style=\"color: #d12e1b;\">@&#8221;medium.png&#8221;<\/span>] <span style=\"color: #3d1e81;\">retain<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>priority3Image = [[<span style=\"color: #703daa;\">UIImage<\/span> <span style=\"color: #3d1e81;\">imageNamed<\/span>:<span style=\"color: #d12e1b;\">@&#8221;low.png&#8221;<\/span>] <span style=\"color: #3d1e81;\">retain<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \">\u3044\u304f\u3064\u304b\u65b0\u3057\u3044\u3082\u306e\u304c\u51fa\u3066\u304d\u3066\u3044\u307e\u3059\u3002\u307e\u305a\u3001static UIImage \u304c\uff13\u3064\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u3001\u4e09\u3064\u306e\u753b\u50cf(\u8d64\u3001\u9752\u3001\u9ec4\u8272)\u3092\u305d\u308c\u305e\u308c\u6271\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u305d\u308c\u3089\u3092\u4e00\u5ea6\u3060\u3051\u3001\u5272\u308a\u5f53\u3066\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u9759\u7684\u306b\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">Static\u306e\u610f\u5473\u306f\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u306f\u306a\u304f\u3001\u30af\u30e9\u30b9\u306b\u95a2\u9023\u3065\u3051\u3089\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">Todo\u30bb\u30eb\u306f\u597d\u304d\u306a\u3060\u3051\u4f5c\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u304c\u3001\uff13\u3064\u306eUIImage\u3060\u3051\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306e\u884c\u3067\u306f\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5ba3\u8a00\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u308c\u306f\u3001\u3053\u306e\u30af\u30e9\u30b9\u3092\u9664\u3044\u3066\u3001\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u306a\u3044\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30e1\u30bd\u30c3\u30c9\u3092\u5ba3\u8a00\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306e\u3001synthesize\u884c\u306f\u3001todo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u306f\u306a\u3044\u3053\u3068\u3092\u518d\u5ea6\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left; \">initialize\u30e1\u30bd\u30c3\u30c9\u3092\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u3053\u3067\u884c\u308f\u308c\u3066\u3044\u308b\u306e\u306f\u3001\u4e0e\u3048\u3089\u308c\u305f\u512a\u5148\u5ea6\u306b\u6cbf\u3063\u3066\u3001\u305d\u308c\u305e\u308c\u306eUIImage\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u306einitialize\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6700\u521d\u306etodo\u30bb\u30eb\u30af\u30e9\u30b9\u304c\u30d3\u30eb\u30c9\u3055\u308c\u305f\u3068\u304d\u306b\u4e00\u56de\u3060\u3051\u547c\u3070\u308c\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #bb2da2;\">id<\/span>)initWithFrame:(<span style=\"color: #703daa;\">CGRect<\/span>)<span style=\"color: #703daa;\">frame<\/span> reuseIdentifier:(<span style=\"color: #703daa;\">NSString<\/span> *)<span style=\"color: #703daa;\">reuseIdentifier<\/span> {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">if<\/span><span style=\"color: #000000;\"> (<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\"> = [<\/span><span style=\"color: #bb2da2;\">super<\/span><span style=\"color: #000000;\"> <\/span>initWithFrame<span style=\"color: #000000;\">:<\/span><span style=\"color: #703daa;\">frame<\/span><span style=\"color: #000000;\"> <\/span>reuseIdentifier<span style=\"color: #000000;\">:<\/span><span style=\"color: #703daa;\">reuseIdentifier<\/span><span style=\"color: #000000;\">]) {<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #703daa;\">UIView<\/span> *myContentView = <span style=\"color: #bb2da2;\">self<\/span>.<span style=\"color: #703daa;\">contentView<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityImageView<span style=\"color: #000000;\"> = [[<\/span><span style=\"color: #703daa;\">UIImageView<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">alloc<\/span><span style=\"color: #000000;\">] <\/span><span style=\"color: #3d1e81;\">initWithImage<\/span><span style=\"color: #000000;\">:<\/span>priority1Image<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>[myContentView <span style=\"color: #3d1e81;\">addSubview<\/span>:<span style=\"color: #bb2da2;\">self<\/span>.<span style=\"color: #31595e;\">todoPriorityImageView<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"> [<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityImageView<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">release<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #31595e;\"><span style=\"color: #000000;\"> <\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoTextLabel<\/span><span style=\"color: #000000;\"> = [<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\"> <\/span>newLabelWithPrimaryColor<span style=\"color: #000000;\">:[<\/span><span style=\"color: #703daa;\">UIColor<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">blackColor<\/span><span style=\"color: #000000;\">] <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #31595e;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span> <\/span>selectedColor<span style=\"color: #000000;\">:[<\/span><span style=\"color: #703daa;\">UIColor<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">whiteColor<\/span><span style=\"color: #000000;\">] <\/span>fontSize<span style=\"color: #000000;\">:<\/span><span style=\"color: #252bd8;\">14.0<\/span><span style=\"color: #000000;\"> <\/span>bold<span style=\"color: #000000;\">:<\/span><span style=\"color: #bb2da2;\">YES<\/span><span style=\"color: #000000;\">]; <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoTextLabel<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">textAlignment<\/span><span style=\"color: #000000;\"> = <\/span>UITextAlignmentLeft<span style=\"color: #000000;\">; <\/span><span style=\"color: #008400;\">\/\/ default<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>[myContentView <span style=\"color: #3d1e81;\">addSubview<\/span>:<span style=\"color: #bb2da2;\">self<\/span>.<span style=\"color: #31595e;\">todoTextLabel<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span>[<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoTextLabel<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">release<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #31595e;\"><span style=\"color: #000000;\"> <\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoPriorityLabel<\/span><span style=\"color: #000000;\"> = [<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\"> <\/span>newLabelWithPrimaryColor<span style=\"color: #000000;\">:[<\/span><span style=\"color: #703daa;\">UIColor<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">blackColor<\/span><span style=\"color: #000000;\">] <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #31595e;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span> <\/span>selectedColor<span style=\"color: #000000;\">:[<\/span><span style=\"color: #703daa;\">UIColor<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">whiteColor<\/span><span style=\"color: #000000;\">] <\/span>fontSize<span style=\"color: #000000;\">:<\/span><span style=\"color: #252bd8;\">10.0<\/span><span style=\"color: #000000;\"> <\/span>bold<span style=\"color: #000000;\">:<\/span><span style=\"color: #bb2da2;\">YES<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoPriorityLabel<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">textAlignment<\/span><span style=\"color: #000000;\"> = <\/span>UITextAlignmentRight<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>[myContentView <span style=\"color: #3d1e81;\">addSubview<\/span>:<span style=\"color: #bb2da2;\">self<\/span>.<span style=\"color: #31595e;\">todoPriorityLabel<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span>[<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">release<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ Position the todoPriorityImageView above all of the other views so<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ it&#8217;s not obscured. It&#8217;s a transparent image, so any views<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ that overlap it will still be visible.<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">[myContentView <span style=\"color: #3d1e81;\">bringSubviewToFront<\/span>:<span style=\"color: #bb2da2;\">self<\/span>.<span style=\"color: #31595e;\">todoPriorityImageView<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"> <\/span>return<span style=\"color: #000000;\"> <\/span>self<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \">\u3053\u308c\u306f\u3001UITableViewCell \u306e\u521d\u671f\u5316\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002\u307e\u305a\u3001\u30bb\u30eb\u306e\u57fa\u790e\u3068\u306a\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u9069\u5207\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u305f\u3081\u306b\u3001\u89aa\u30af\u30e9\u30b9(UITableViewCell)\u306einitWithFrame \u3092\u547c\u3073\u51fa\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306b\u3001contentView\u3092\u53c2\u7167\u3057\u307e\u3059\u3002contentView \u306f\u5404\u30bb\u30eb\u306eview\u3067\u3059\u3002\u3059\u3079\u3066\u306eUI\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3053\u306eview\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306e\u4e09\u884c\u306f\u3001UIImageView \u3092\u521d\u671f\u5316\u3057\u3001\u305d\u308c\u3092view\u306b\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002priority1Image \u3092\u95a2\u9023\u3065\u3051\u3066\u3044\u308b\u3053\u3068\u306b\u3001\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001\u66f4\u65b0\u3055\u308c\u308b\u307e\u3048\u306e\u30c0\u30df\u30fc\u306e\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u30fc\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u306e\u5f8c\u306b\u3001todoTextLabel\u3092\u521d\u671f\u5316\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30e9\u30d9\u30eb\u306f\u3001\u201d\u30b4\u30df\u3092\u6368\u3066\u306b\u884c\u304f\u201d\u306a\u3069\u306eto do\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">newLabelWithPrimaryColor \u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3064\u3044\u3066\u3001\u5c11\u3057\u8a73\u3057\u304f\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u3053\u308c\u306f\u3001\u547c\u3073\u51fa\u3057\u305f\u6642\u306b\u3001\u6307\u5b9a\u3057\u305f\u5c5e\u6027\u3092\u6301\u3064\u65b0\u3057\u3044\u30e9\u30d9\u30eb\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002\u30a2\u30c3\u30d7\u30eb\u306e\u201dSeismic XML\u201d\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u3068\u3066\u3082\u304a\u624b\u8efd\u3067\u3059\u3002\u3053\u308c\u304c\u547c\u3070\u308c\u305f\u5f8c\u3001view\u306b\u65b0\u3057\u3044\u30e9\u30d9\u30eb\u3092\u8ffd\u52a0\u3057\u3001todoPriorityLabel\u306b\u5bfe\u3057\u3066\u7e70\u308a\u8fd4\u3057\u3001\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u304c\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6700\u5f8c\u306b\u3001bringSubviewToFront \u30e1\u30bd\u30c3\u30c9\u304c\u3001priority \u306e UIImageView \u306b\u547c\u3070\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30a4\u30e1\u30fc\u30b8\u306e\u6a2a\u306b\u6587\u5b57\u5217\u3092\u8868\u793a\u3055\u305b\u308b\u306e\u306b\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u6587\u5b57\u5217\u306e\u4e0a\u306b\u753b\u50cf\u3092\u8868\u793a\u3055\u305b\u3066\u3044\u307e\u3059\u3002\u968e\u5c64\u306b\u306a\u3063\u3066\u3044\u308bUI\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">todo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u201cgetter\u201d \u3068 \u201csetter\u201d\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #4e8187;\">Todo<\/span> *)todo<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">{<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"> <\/span>return<span style=\"color: #000000;\"> <\/span>self<span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todo<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #bb2da2;\">void<\/span>)setTodo:(<span style=\"color: #4e8187;\">Todo<\/span> *)newTodo<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">{<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #4e8187;\">todo<\/span> = newTodo;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">self<\/span>.<span style=\"color: #4e8187;\">todoTextLabel<\/span>.<span style=\"color: #703daa;\">text<\/span> = newTodo.<span style=\"color: #703daa;\">text<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #31595e;\"><span style=\"color: #000000;\"> <\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoPriorityImageView<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">image<\/span><span style=\"color: #000000;\"> = [<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\"> <\/span>imageForPriority<span style=\"color: #000000;\">:newTodo.<\/span>priority<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">switch<\/span>(newTodo.<span style=\"color: #4e8187;\">priority<\/span>) {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">case<\/span> <span style=\"color: #252bd8;\">2<\/span>:<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">text<\/span><span style=\"color: #000000;\"> = <\/span><span style=\"color: #d12e1b;\">@&#8221;<\/span><span style=\"font: 11.0px 'Hiragino Kaku Gothic ProN'; color: #d12e1b;\">\u4e2d<\/span><span style=\"color: #d12e1b;\">&#8220;<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>break<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">case<\/span> <span style=\"color: #252bd8;\">3<\/span>:<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">text<\/span><span style=\"color: #000000;\"> = <\/span><span style=\"color: #d12e1b;\">@&#8221;<\/span><span style=\"font: 11.0px 'Hiragino Kaku Gothic ProN'; color: #d12e1b;\">\u4f4e<\/span><span style=\"color: #d12e1b;\">&#8220;<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>break<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>default<span style=\"color: #000000;\">:<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">text<\/span><span style=\"color: #000000;\"> = <\/span><span style=\"color: #d12e1b;\">@&#8221;<\/span><span style=\"font: 11.0px 'Hiragino Kaku Gothic ProN'; color: #d12e1b;\">\u9ad8<\/span><span style=\"color: #d12e1b;\">&#8220;<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>break<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"> [<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\"> <\/span>setNeedsDisplay<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \">\u6700\u521d\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u7c21\u5358\u3067\u3059\u306d\u3002todo\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059\u3060\u3051\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">setter\u306e\u65b9\u306esetTodo\u30e1\u30bd\u30c3\u30c9\u306f\u5c11\u3057\u8907\u96d1\u3067\u3059\u306d\u3002<\/p>\n<p style=\"text-align: left; \">\u307e\u305a\u3001\u65b0\u3057\u304f\u4f5c\u3089\u308c\u305fnewTodo\u3092todo \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002\u6b21\u306b\u3001todo\u306e\u8a73\u7d30\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u3001UITextLabel\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002\u3053\u306e\u5f8c\u306b\u3001imageforPriority\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u3001UIImageView\u306e\u753b\u50cf\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u4e0e\u3048\u3089\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u753b\u50cf\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6700\u5f8c\u306bswitch\u6587\u304c\u3042\u308a\u307e\u3059\u3002switch\u306e\u7528\u6cd5\u306f\u3001Objective-C\u3067\u3082\u3001\u4ed6\u306e\u8a00\u8a9e\u3068\u540c\u69d8\u3067\u3059\u3002\u3082\u3057\u3001\u4e0d\u5b89\u306a\u65b9\u306f\u3001\u691c\u7d22\u3057\u3066\u8abf\u3079\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left; \">newTodo\u306e\u512a\u5148\u9806\u4f4d\u306b\u57fa\u3065\u3044\u3066\u3001\u512a\u5148\u9806\u4f4d\u306e\u30e9\u30d9\u30eb\u306f\uff13\u3064\u306e\u4e2d\u306e\uff11\u3064\uff08\u9ad8\u3001\u4e2d\u3001\u4f4e\uff09\u3067\u66f4\u65b0\u3055\u308c\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">[self setNeedsDisplay]\u306b\u3088\u3063\u3066\u3001todo\u304c\u30bb\u30c3\u30c8\u3055\u308c\u305f\u3089\u3001\u30bb\u30eb\u306b\u518d\u8868\u793a\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3055\u3089\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #bb2da2;\">void<\/span>)layoutSubviews {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #78492a;\">#define LEFT_COLUMN_OFFSET <span style=\"color: #252bd8;\">1<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #78492a;\">#define LEFT_COLUMN_WIDTH <span style=\"color: #252bd8;\">50<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #78492a;\">#define RIGHT_COLUMN_OFFSET <span style=\"color: #252bd8;\">75<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #78492a;\">#define RIGHT_COLUMN_WIDTH <span style=\"color: #252bd8;\">240<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #78492a;\">#define UPPER_ROW_TOP <span style=\"color: #252bd8;\">4<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"> [<\/span><span style=\"color: #bb2da2;\">super<\/span><span style=\"color: #000000;\"> <\/span>layoutSubviews<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"> <\/span>CGRect<span style=\"color: #000000;\"> contentRect = <\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>contentView<span style=\"color: #000000;\">.<\/span>bounds<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">if<\/span> (!<span style=\"color: #bb2da2;\">self<\/span>.<span style=\"color: #703daa;\">editing<\/span>) {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #703daa;\">CGFloat<\/span> boundsX = contentRect.<span style=\"color: #703daa;\">origin<\/span>.<span style=\"color: #703daa;\">x<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>CGRect<span style=\"color: #000000;\"> <\/span>frame<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ Place the Text label.<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #78492a;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #703daa;\">frame<\/span><span style=\"color: #000000;\"> = <\/span><span style=\"color: #3d1e81;\">CGRectMake<\/span><span style=\"color: #000000;\">(boundsX +<\/span>RIGHT_COLUMN_OFFSET<span style=\"color: #000000;\"> , <\/span>UPPER_ROW_TOP<span style=\"color: #000000;\">, <\/span>RIGHT_COLUMN_WIDTH<span style=\"color: #000000;\">, <\/span><span style=\"color: #252bd8;\">13<\/span><span style=\"color: #000000;\">);<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>frame<span style=\"color: #000000;\">.<\/span>origin<span style=\"color: #000000;\">.<\/span>y<span style=\"color: #000000;\"> = <\/span><span style=\"color: #252bd8;\">15<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoTextLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">frame<\/span><span style=\"color: #000000;\"> = <\/span><span style=\"color: #703daa;\">frame<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ Place the priority image.<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"> <\/span><span style=\"color: #703daa;\">UIImageView<\/span><span style=\"color: #000000;\"> *<\/span><span style=\"color: #703daa;\">imageView<\/span><span style=\"color: #000000;\"> = <\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityImageView<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #703daa;\">frame<\/span> = [<span style=\"color: #703daa;\">imageView<\/span> <span style=\"color: #3d1e81;\">frame<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #703daa;\">frame<\/span>.<span style=\"color: #703daa;\">origin<\/span>.<span style=\"color: #703daa;\">x<\/span> = boundsX + <span style=\"color: #78492a;\">LEFT_COLUMN_OFFSET<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>frame<span style=\"color: #000000;\">.<\/span>origin<span style=\"color: #000000;\">.<\/span>y<span style=\"color: #000000;\"> = <\/span><span style=\"color: #252bd8;\">10<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"> <span style=\"white-space: pre;\"> <\/span><\/span>imageView<span style=\"color: #000000;\">.<\/span>frame<span style=\"color: #000000;\"> = <\/span>frame<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"> <\/span>\/\/ Place the priority label.<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"> <\/span><span style=\"color: #703daa;\">CGSize<\/span><span style=\"color: #000000;\"> prioritySize = [<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">text<\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">sizeWithFont<\/span><span style=\"color: #000000;\">:<\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">font<\/span><span style=\"color: #000000;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span> <\/span>forWidth<span style=\"color: #000000;\">:<\/span><span style=\"color: #78492a;\">RIGHT_COLUMN_WIDTH<\/span><span style=\"color: #000000;\"> <\/span>lineBreakMode<span style=\"color: #000000;\">:<\/span>UILineBreakModeTailTruncation<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"> <\/span>CGFloat<span style=\"color: #000000;\"> priorityX = <\/span>frame<span style=\"color: #000000;\">.<\/span>origin<span style=\"color: #000000;\">.<\/span>x<span style=\"color: #000000;\"> + <\/span>imageView<span style=\"color: #000000;\">.<\/span>frame<span style=\"color: #000000;\">.<\/span>size<span style=\"color: #000000;\">.<\/span>width<span style=\"color: #000000;\"> + <\/span><span style=\"color: #252bd8;\">8.0<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #703daa;\">frame<\/span> = <span style=\"color: #3d1e81;\">CGRectMake<\/span>(priorityX, <span style=\"color: #78492a;\">UPPER_ROW_TOP<\/span>, prioritySize.<span style=\"color: #703daa;\">width<\/span>, prioritySize.<span style=\"color: #703daa;\">height<\/span>);<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>frame<span style=\"color: #000000;\">.<\/span>origin<span style=\"color: #000000;\">.<\/span>y<span style=\"color: #000000;\"> = <\/span><span style=\"color: #252bd8;\">15<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"> <\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">frame<\/span><span style=\"color: #000000;\"> = <\/span><span style=\"color: #703daa;\">frame<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \">\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001UITableViewCell \u304c\u8868\u793a\u3055\u308c\u308b\u3068\u81ea\u52d5\u7684\u306b\u547c\u3073\u51fa\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306fUITableView\u306b\u3069\u306e\u3088\u3046\u306b\u8868\u793a\u3059\u3079\u304d\u304b\u3092\u6559\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">define\u6587\u306f\u3001C\u306edefine\u3092\u540c\u69d8\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3057\u305f\u7406\u7531\u306f\u3001\u597d\u307f\u306b\u5408\u308f\u305b\u3066\u8868\u793a\u3092\u5f97\u308b\u305f\u3081\u306b\u3001\u3053\u308c\u3089\u306e\u5909\u6570\u3092\u8abf\u6574\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6700\u521d\u306b\u3001layoutSubviews \u306e\u89aa\u30af\u30e9\u30b9\u3092\u547c\u3073\u307e\u3059\u3002\u6b21\u306b\u3001contentView.bounds \u3092\u53c2\u7167\u3057\u307e\u3059\u3002\u3053\u306e\u5909\u6570\u306f\u3001\u3069\u308c\u3050\u3089\u3044\u306e\u63cf\u753b\u9818\u57df\u304c\u3042\u308b\u306e\u304b\u3092\u5206\u304b\u308b\u3088\u3046\u306b\u3057\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u9069\u5207\u306b\u6574\u5217\u51fa\u6765\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">if(!self.editing) \u306e\u7b87\u6240\u306f\u3001\u5fc5\u8981\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u63a8\u5968\u3057\u307e\u3059\u3002\u30bb\u30eb\u3092\u7de8\u96c6\u3059\u308b\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002\u307e\u305a\u3001\u53f3\u7aef\u306e\u30ab\u30e9\u30e0\u3092\u5ba3\u8a00\u3057\u307e\u3059\u3002\u30b3\u30f3\u30c6\u30f3\u30c8\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306b\u3001frame\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30ab\u30e9\u30e0\u306ftodo\u30a2\u30a4\u30c6\u30e0\u306e\u6587\u5b57\u5217\u3092\u6271\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u306e\u30b3\u30fc\u30c9\u306e\u307b\u3068\u3093\u3069\u306f\u4f4d\u7f6e\u8a2d\u5b9a\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u6570\u5024\u3092\u5909\u66f4\u3057\u3001\u3069\u306e\u3088\u3046\u306a\u52d5\u4f5c\u3092\u3059\u308b\u306e\u304b\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left; \">\u4e00\u65e6\u3001\u4f4d\u7f6e\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001todo TextLabel\u306e\u30d5\u30ec\u30fc\u30e0\u306f\u3001\u3053\u306e\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305f\u30d5\u30ec\u30fc\u30e0\u306b\u30bb\u30c3\u30c8\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u5404 UI components \u3067\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u306e\u8a2d\u5b9a\u4f8b\u304c\u3059\u3079\u3066\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001\u30ec\u30a4\u30a2\u30a6\u30c8\u306f\u3054\u81ea\u7531\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left; \">\u3082\u3046\u4e00\u3064\u3001\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u306f\u3001setSelected\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #bb2da2;\">void<\/span>)setSelected:(<span style=\"color: #bb2da2;\">BOOL<\/span>)<span style=\"color: #703daa;\">selected<\/span> animated:(<span style=\"color: #bb2da2;\">BOOL<\/span>)animated {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span>[<\/span><span style=\"color: #bb2da2;\">super<\/span><span style=\"color: #000000;\"> <\/span>setSelected<span style=\"color: #000000;\">:<\/span><span style=\"color: #703daa;\">selected<\/span><span style=\"color: #000000;\"> <\/span>animated<span style=\"color: #000000;\">:animated];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>UIColor<span style=\"color: #000000;\"> *<\/span>backgroundColor<span style=\"color: #000000;\"> = <\/span><span style=\"color: #bb2da2;\">nil<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">if<\/span><span style=\"color: #000000;\"> (<\/span>selected<span style=\"color: #000000;\">) {<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span> <\/span>backgroundColor<span style=\"color: #000000;\"> = [<\/span>UIColor<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">clearColor<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>} <span style=\"color: #bb2da2;\">else<\/span> {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>backgroundColor<span style=\"color: #000000;\"> = [<\/span>UIColor<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">whiteColor<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoTextLabel<\/span><span style=\"color: #000000;\">.<\/span>backgroundColor<span style=\"color: #000000;\"> = <\/span>backgroundColor<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoTextLabel<\/span><span style=\"color: #000000;\">.<\/span>highlighted<span style=\"color: #000000;\"> = <\/span>selected<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoTextLabel<\/span><span style=\"color: #000000;\">.<\/span>opaque<span style=\"color: #000000;\"> = !<\/span>selected<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoPriorityLabel<\/span><span style=\"color: #000000;\">.<\/span>backgroundColor<span style=\"color: #000000;\"> = <\/span>backgroundColor<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span><span style=\"color: #4e8187;\">todoPriorityLabel<\/span><span style=\"color: #000000;\">.<\/span>highlighted<span style=\"color: #000000;\"> = <\/span>selected<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">self<\/span><span style=\"color: #000000;\">.<\/span>todoPriorityLabel<span style=\"color: #000000;\">.<\/span><span style=\"color: #703daa;\">opaque<\/span><span style=\"color: #000000;\"> = !<\/span><span style=\"color: #703daa;\">selected<\/span><span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \">\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30e6\u30fc\u30b6\u304c\u30bb\u30eb\u3092\u30bf\u30c3\u30d7\u3057\u305f\u6642\u306b\u547c\u3073\u51fa\u3055\u308c\u307e\u3059\u3002\u79c1\u305f\u3061\u306f\u3001\u30bb\u30eb\u304c\u30bf\u30c3\u30d7\u3055\u308c\u305f\u6642\u306e\u52d5\u4f5c\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u76f4\u611f\u7684\u3067\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u306d\u3002\u307e\u305a\u3001\u89aa\u30af\u30e9\u30b9\u306esetSelected \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u307e\u3059\u3002\u6b21\u306b\u3001\u30bb\u30eb\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u306b\u5fdc\u3058\u3066\u3001\u80cc\u666f\u8272\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6700\u5f8c\u306b\u3001\u30bb\u30eb\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u6642\u306e\u30e9\u30d9\u30eb\uff08\u6587\u5b57\uff1f\uff09\u3092\u767d\u306b\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002\u30bb\u30eb\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u6642\u306e\u9752\u8272\u306b\u5bfe\u3057\u3066\u30b3\u30f3\u30b9\u30c8\u30e9\u30b9\u30c8\u3055\u305b\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u3053\u308c\u304b\u3089\u8aac\u660e\u3059\u308b\u6700\u5f8c\u306e\uff12\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30b3\u30fc\u30c9\u5185\u3067\u4f7f\u7528\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u88dc\u52a9\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\uff08<span style=\"color: #888888;\">This last 2 methods that I want to talk about are the helper methods that we used earlier in the code.<\/span>\uff09<\/p>\n<p style=\"text-align: left; \">\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #703daa;\">UILabel<\/span> *)newLabelWithPrimaryColor:(<span style=\"color: #703daa;\">UIColor<\/span> *)primaryColor<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>selectedColor:(<span style=\"color: #703daa;\">UIColor<\/span> *)selectedColor fontSize:(<span style=\"color: #703daa;\">CGFloat<\/span>)fontSize bold:(<span style=\"color: #bb2da2;\">BOOL<\/span>)<span style=\"color: #3d1e81;\">bold<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">{<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"> <\/span>UIFont<span style=\"color: #000000;\"> *<\/span>font<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">if<\/span> (<span style=\"color: #3d1e81;\">bold<\/span>) {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #703daa;\">font<\/span> = [<span style=\"color: #703daa;\">UIFont<\/span> <span style=\"color: #3d1e81;\">boldSystemFontOfSize<\/span>:fontSize];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">} <span style=\"color: #bb2da2;\">else<\/span> {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #703daa;\">font<\/span> = [<span style=\"color: #703daa;\">UIFont<\/span> <span style=\"color: #3d1e81;\">systemFontOfSize<\/span>:fontSize];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>UILabel<span style=\"color: #000000;\"> *newLabel = [[<\/span>UILabel<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">alloc<\/span><span style=\"color: #000000;\">] <\/span><span style=\"color: #3d1e81;\">initWithFrame<\/span><span style=\"color: #000000;\">:<\/span>CGRectZero<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #703daa;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span>newLabel.<\/span>backgroundColor<span style=\"color: #000000;\"> = [<\/span>UIColor<span style=\"color: #000000;\"> <\/span><span style=\"color: #3d1e81;\">whiteColor<\/span><span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>newLabel.<span style=\"color: #703daa;\">opaque<\/span> = <span style=\"color: #bb2da2;\">YES<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>newLabel.<span style=\"color: #703daa;\">textColor<\/span> = primaryColor;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>newLabel.<span style=\"color: #703daa;\">highlightedTextColor<\/span> = selectedColor;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>newLabel.<span style=\"color: #703daa;\">font<\/span> = <span style=\"color: #703daa;\">font<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">return<\/span> newLabel;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\">\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #703daa;\">UIImage<\/span> *)imageForPriority:(<span style=\"color: #703daa;\">NSInteger<\/span>)priority<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">{<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">switch<\/span> (priority) {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">case<\/span> <span style=\"color: #252bd8;\">2<\/span>:<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">return<\/span><span style=\"color: #000000;\"> <\/span>priority2Image<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>break<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">case<\/span> <span style=\"color: #252bd8;\">3<\/span>:<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">return<\/span><span style=\"color: #000000;\"> <\/span>priority3Image<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>break<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>default<span style=\"color: #000000;\">:<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #bb2da2;\">return<\/span><span style=\"color: #000000;\"> <\/span>priority1Image<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>break<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #bb2da2;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>return<span style=\"color: #000000;\"> <\/span>nil<span style=\"color: #000000;\">;<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \"><strong>newLabelWithPrimaryColor &#8211; <\/strong>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001UILabel \u304c\u521d\u671f\u5316\u3055\u308c\u305f\u6642\u306b\u547c\u3070\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3044\u304f\u3064\u304b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u3082\u3061\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3092\u898b\u308b\u3068\u3001\u6307\u5b9a\u3057\u305f\u30b5\u30a4\u30ba\u3067font\u304c\u521d\u671f\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u592a\u5b57\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u305f\u5834\u5408\u306f\u3001\u305d\u308c\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306b\u3001UILabel \u306b\u3044\u304f\u3064\u304b\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4e0e\u3048\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6700\u5f8c\u306b\u3001\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305fUILabel \u304c\u8fd4\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \"><strong>imageForPriority &#8211; <\/strong>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u3068\u3066\u3082\u5358\u7d14\u3067\u3059\u3002priority\u306e\u5024\u306b\u5bfe\u3057\u3066\u3001\u95a2\u9023\u3059\u308bpriority\u306eUIImage\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">default\u7bc0\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p style=\"text-align: left;\"><span style=\"color: #888888;\">I decided to handle it like this instead of doing \u201ccase 1\u2033 to handle all other cases.\u00a0 For whatever reason, if there is ever a priority that is not 1,2 or 3 it will, by default, have low priority.<\/span><\/p>\n<p style=\"text-align: left; \">UITableViewCell \u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u30c6\u30fc\u30d6\u30eb\u306b\u8868\u793a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \"><strong>RootViewController.m <\/strong>\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306eimport\u6587\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3067TodoCell\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6271\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12e1b;\"><span style=\"color: #78492a;\">#import <\/span>&#8220;TodoCell.h&#8221;<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \"><strong>numberOfRowsInSection<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u63a2\u3057\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #703daa;\">NSInteger<\/span>)tableView:(<span style=\"color: #703daa;\">UITableView<\/span> *)<span style=\"color: #703daa;\">tableView<\/span> numberOfRowsInSection:(<span style=\"color: #703daa;\">NSInteger<\/span>)section {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #4e8187;\">todoAppDelegate<\/span> *appDelegate = (<span style=\"color: #4e8187;\">todoAppDelegate<\/span> *)[[<span style=\"color: #703daa;\">UIApplication<\/span> <span style=\"color: #3d1e81;\">sharedApplication<\/span>] delegate];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"color: #bb2da2;\">return<\/span> appDelegate.<span style=\"color: #4e8187;\">todos<\/span>.<span style=\"color: #703daa;\">count<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \">\u3053\u308c\u306f\u30d5\u30eb\u30fc\u30c4\u306e\u4f8b\u3068\u307b\u3068\u3093\u3069\u540c\u3058\u30b3\u30fc\u30c9\u3067\u3059\u3002\u57fa\u672c\u7684\u306btodo\u30a2\u30a4\u30c6\u30e0\u306e\u6570\u3092\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002TodoCell\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306bTodoCell\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \"><strong>cellForRowAtIndexPath<\/strong>\u30e1\u30bd\u30c3\u30c9\u3092\u898b\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3001\u305d\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u52a0\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">&#8211; (<span style=\"color: #703daa;\">UITableViewCell<\/span> *)tableView:(<span style=\"color: #703daa;\">UITableView<\/span> *)<span style=\"color: #703daa;\">tableView<\/span> cellForRowAtIndexPath:(<span style=\"color: #703daa;\">NSIndexPath<\/span> *)indexPath {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">static<\/span> <span style=\"color: #703daa;\">NSString<\/span> *MyIdentifier = <span style=\"color: #d12e1b;\">@&#8221;MyIdentifier&#8221;<\/span>;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span><span style=\"color: #4e8187;\">TodoCell<\/span><span style=\"color: #000000;\"> *cell = (<\/span><span style=\"color: #4e8187;\">TodoCell<\/span><span style=\"color: #000000;\"> *)[<\/span><span style=\"color: #703daa;\">tableView<\/span><span style=\"color: #000000;\"> <\/span>dequeueReusableCellWithIdentifier<span style=\"color: #000000;\">:MyIdentifier];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">if<\/span> (cell == <span style=\"color: #bb2da2;\">nil<\/span>) {<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3d1e81;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span>cell = [[[<\/span><span style=\"color: #4e8187;\">TodoCell<\/span><span style=\"color: #000000;\"> <\/span>alloc<span style=\"color: #000000;\">] <\/span>initWithFrame<span style=\"color: #000000;\">:<\/span><span style=\"color: #703daa;\">CGRectZero<\/span><span style=\"color: #000000;\"> <\/span>reuseIdentifier<span style=\"color: #000000;\">:MyIdentifier] <\/span>autorelease<span style=\"color: #000000;\">];<\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>}<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #4e8187;\">todoAppDelegate<\/span> *appDelegate = (<span style=\"color: #4e8187;\">todoAppDelegate<\/span> *)[[<span style=\"color: #703daa;\">UIApplication<\/span> <span style=\"color: #3d1e81;\">sharedApplication<\/span>] delegate];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #4e8187;\">Todo<\/span> *td = [appDelegate.<span style=\"color: #4e8187;\">todos<\/span> <span style=\"color: #3d1e81;\">objectAtIndex<\/span>:indexPath.<span style=\"color: #3d1e81;\">row<\/span>];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span>[cell <span style=\"color: #31595e;\">setTodo<\/span>:td];<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px;\"><span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008400;\"><span style=\"color: #000000;\"><span style=\"white-space: pre;\"> <\/span><\/span>\/\/ Set up the cell<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\"><span style=\"white-space: pre;\"> <\/span><span style=\"color: #bb2da2;\">return<\/span> cell;<\/p>\n<p style=\"margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;\">}<\/p>\n<\/blockquote>\n<p style=\"text-align: left; \">\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30a2\u30c3\u30d7\u30eb\u304c\u4e0e\u3048\u3066\u304f\u308c\u3066\u3044\u308b\u30b3\u30fc\u30c9\u306b\u3068\u3066\u3082\u4f3c\u3066\u3044\u307e\u3059\u3002\u9055\u3044\u306f\u3001TodoCell\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u3066\u3044\u308b\u70b9\u3067\u3059\u3002\u8b58\u5225\u5b50\u3092\u6e21\u3057\u3066\u3001initWithFrame\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u6b21\u306e\u9055\u3044\u306f\u3001appDelegate \u3092\u53c2\u7167\u3057\u3001\u305d\u308c\u3092\u4f7f\u3063\u3066\u3001\u6e21\u3055\u308c\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306etodo\u30a2\u30a4\u30c6\u30e0\u3092\u898b\u3064\u3051\u3066\u3044\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001\u6211\u3005\u306f\u884c\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4f4d\u7f6e\u306b\u3042\u308b\u306eToDo\u30a2\u30a4\u30c6\u30e0\u306b\u30bb\u30eb\u306eToDo\u30a2\u30a4\u30c6\u30e0\u3092\u8a2d\u5b9a\u3057\u3001\u30bb\u30eb\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u4ee5\u4e0a\u3067\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \">\u30d3\u30eb\u30c9\uff06\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/p>\n<p style=\"text-align: left; \"><a href=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/703-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-789\" title=\"703-1\" src=\"http:\/\/yamazon.org\/wp-content\/uploads\/2010\/12\/703-1-158x300.png\" alt=\"703-1\" width=\"158\" height=\"300\" \/><\/a><\/p>\n<p style=\"text-align: left; \">\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001\u30bf\u30a4\u30c8\u30eb\u306e\u901a\u308a\u3001SQLite\u3092\u4f7f\u3063\u3066ToDo\u30ea\u30b9\u30c8\u30a2\u30d7\u30ea\u3092&#8230;<\/p>\n","protected":false},"author":1,"featured_media":711,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-703","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-old-blog"],"_links":{"self":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=703"}],"version-history":[{"count":0,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/703\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}