{"id":205734,"date":"2020-11-14T13:34:10","date_gmt":"2020-11-14T05:34:10","guid":{"rendered":"http:\/\/4563.org\/?p=205734"},"modified":"2020-11-26T21:17:58","modified_gmt":"2020-11-26T13:17:58","slug":"%e5%ba%94%e7%94%a8%e5%86%85%e9%9b%86%e6%88%90%e6%8f%92%e4%bb%b6%e8%ae%be%e7%bd%ae%e9%a1%b9-iphone-xs","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=205734","title":{"rendered":"\u5e94\u7528\u5185\u96c6\u6210\u63d2\u4ef6\u8bbe\u7f6e\u9879-         iPhone XS"},"content":{"rendered":"\n<div>\n<div>\n<div>\n<h1>                  \u5e94\u7528\u5185\u96c6\u6210\u63d2\u4ef6\u8bbe\u7f6e\u9879-         iPhone XS               <\/h1>\n<\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : \u950b\u53cb131 <\/span> <span><i><\/i> 22<\/span> <\/div>\n<div> <\/div>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div isfirst=\"1\">\n<p>\u8fd9\u4e2a\u6b65\u9aa4\u5176\u5b9e\u6ca1\u6709\u4ec0\u4e48\u7279\u522b\u503c\u5f97\u8bf4\u7684\uff0c\u56e0\u4e3a\u8fd9\u5b8c\u5168\u5c31\u662f\u6b63\u5411\u7684\u5185\u5bb9\uff0c\u6211\u76f8\u4fe1\u53ea\u8981\u5b66\u8fc7OC\u548ciOS\u7684\u5f00\u53d1\u7684\uff0c\u5bf9\u4ed6\u4eec\u6765\u8bf4\u90fd\u662f\u975e\u5e38\u719f\u6089\u4e14\u7b80\u5355\u7684\u4e1c\u897f\u3002\u6211\u662f\u6ca1\u6709\u5b66\u8fc7iOS\u5f00\u53d1\u751a\u81f3\u662fOC\u8bed\u8a00\u7684\uff0c\u90a3\u4e48\u5f53\u6211\u6709\u8fd9\u4e2a\u9700\u6c42\u7684\u65f6\u5019\uff0c\u6211\u505a\u4e86\u4e9b\u4ec0\u4e48\u5462\uff1f<\/p>\n<ul>\n<li>\u7814\u7a76\u4e86\u534a\u5929\uff0c\u5662\u8981\u5728tableview\u4e0a\u505a\u6587\u7ae0\uff0c\u4e4b\u540e\u6253\u5f00bilibili\uff0c\u641c\u7d22iOS\u5f00\u53d1\uff0c\u5f3a\u884c\u903c\u81ea\u5df1\u770b\u4e86\u4e00\u5929\u7684tableview\u6559\u7a0b\u89c6\u9891\u3002<\/li>\n<li>\u6709\u4e86\u6700\u6700\u6700\u57fa\u672c\u7684\u77e5\u8bc6\u540e\uff0c\u8fd8\u5dee\u70b9\u4e1c\u897f\uff0c\u56e0\u4e3a\u8ba9\u4f60\u7528xcode\u505a\u4e00\u4e2atableview\u754c\u9762\u51fa\u6765\uff0c\u7b80\u5355\u554a\uff0c\u62d6\u4e2atableview\u51fa\u6765\uff0c\u5c31\u90a3\u51e0\u4e2a\u65b9\u6cd5\uff0c\u5199\u4e00\u5199\u5c31\u597d\u4e86\u3002\u4f46\u8fd9\u91cc\u662f\u9006\u5411\uff0c\u662f\u6539\u522b\u4eba\u7684\u754c\u9762\uff0c\u4f60\u62ff\u4ec0\u4e48\u62d6\uff1fhook\u54ea\u4e2a\u7c7b\uff1f\u4ec0\u4e48\u65b9\u6cd5\uff1f<\/li>\n<\/ul>\n<p>\u90a3\u4e48\u6839\u636etableview\u7684\u57fa\u672c\u5199\u6cd5\uff0c\u8981\u786e\u5b9a\u7684\u6709\u5982\u4e0b\u51e0\u4e2a\u57fa\u672c\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li>\u6709\u51e0\u7ec4- (long long)numberOfSectionsInTableView:(UITableView *)tableView<\/li>\n<li>\u6bcf\u7ec4\u6709\u591a\u5c11\u884c- (long long)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section<\/li>\n<li>\u6bcf\u884c\u8981\u663e\u793a\u7684\u5185\u5bb9\u662f\u4ec0\u4e48- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath<\/li>\n<li>cell\u7684\u70b9\u51fb\u4e8b\u4ef6- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(id)indexPath<\/li>\n<\/ul>\n<p>\u4e0a\u9762\u8fd9\u51e0\u4e2a\u662f\u4e00\u822c\u662f\u5fc5\u987b\u8981hook\u7684\u65b9\u6cd5\uff0c\u90a3\u4e48\u8fd8\u5269\u4e0b\u4e00\u4e2a\u95ee\u9898\uff0chook\u54ea\u4e2a\u7c7b\uff1f \u8fd9\u4e2a\u95ee\u9898\u6bd4\u8f83\u5bb9\u6613\uff0c\u56e0\u4e3a\u6b63\u5411\u5f00\u53d1\u8005\u4eec\u4f1a\u5728\u4ec0\u4e48\u7c7b\u91cc\u9762\u7f16\u5199\u4e0a\u9762\u8fd9\u56db\u4e2a\u65b9\u6cd5\uff1f<\/p>\n<ul>\n<li>\u5f53\u7136\u662f\u9075\u5b88UITableViewDataSource\u534f\u8bae\u7684\u7c7b\u91cc\u9762<\/li>\n<\/ul>\n<p>\u8fd9\u5c31\u53ef\u4ee5\u901a\u8fc7lookin\u5de5\u5177\uff0c\u5728\u754c\u9762\u7684tableview\u4e2d\u6253\u5f00\u63a7\u5236\u53f0\uff0c\u8f93\u5165dataSource\uff0c\u67e5\u770b\u5176\u6570\u636e\u6e90\u5728\u54ea\u4e2a\u7c7b\u4e2d\u5373\u53ef<img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201126_5fbfaaf1b83aa.jpg\" alt=\"\u5e94\u7528\u5185\u96c6\u6210\u63d2\u4ef6\u8bbe\u7f6e\u9879-         iPhone XS\" \/><\/p>\n<p>\u5728\u4eca\u65e5\u5934\u67617.0.9\u7248\u672c\u4e2d\uff0c\u201d\u6211\u7684\u201c\u754c\u9762\u7684\u6570\u636e\u6e90\u7c7b\u4e3aTTProfileViewController<\/p>\n<p>\u90a3\u4e48\u4ee3\u7801\u4e3a:<\/p>\n<ul>\n<p>@interface TTProfileFunctionCell : UITableViewCell<\/p>\n<p>@end<\/p>\n<p>@class TTProfileFunctionCell;<\/p>\n<\/ul>\n<p>\u5728\u6700\u540e\u4e00\u884c\u589e\u52a0\u4e00\u7ec4\uff0c\u8be5\u7ec4\u53ea\u5305\u542b\u4e00\u884c\u5185\u5bb9<\/p>\n<ul>\n<p>%hook TTProfileViewController<\/p>\n<p>\/\/ \/\/\u6709\u51e0\u7ec4<\/p>\n<p>&#8211; (long long)numberOfSectionsInTableView:(UITableView *)tableView<\/p>\n<p>{<\/p>\n<p>\u00a0 \u00a0 return %orig+1; \u00a0\/\/\u5728\u539f\u6765\u7684\u57fa\u7840\u4e0a\u589e\u52a0\u4e00\u7ec4<\/p>\n<p>}<\/p>\n<p>\/\/\u6bcf\u7ec4\u6709\u591a\u5c11\u884c<\/p>\n<p>&#8211; (long long)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section<\/p>\n<p>{<\/p>\n<p>\u00a0 \u00a0 if(section == [self numberOfSectionsInTableView:tableView] &#8211; 1)<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 return 1; \u00a0\/\/\u7ec4\u53f7\u662f\u4ece0\u5f00\u59cb\u8ba1\u6570\u7684\uff0c\u7b2c\u5341\u7ec4\u7684\u7ec4\u53f7\u5f53\u7136\u662f\u4e5d<\/p>\n<p>\u00a0 \u00a0 else<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 return %orig;<\/p>\n<p>}<\/p>\n<\/p>\n<\/ul>\n<p>\u6839\u636e\u6b63\u5411\u7684\u77e5\u8bc6\uff0c\u521b\u5efacell\u4e00\u822c\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<ul>\n<p>static NSString *ID = @&#34;cell&#34;;<\/p>\n<p>UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];<\/p>\n<p>if(!cell)<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];<\/p>\n<\/ul>\n<p>\u4f46\u6700\u597d\u4e0d\u8981\u76f4\u63a5\u7528UITableViewCell\u6765\u521b\u5efa\uff0c\u800c\u662f\u7528\u548c\u539f\u751f\u4e00\u6837\u7684cell\u7c7b\u6765\u521b\u5efa\uff0c\u597d\u5904\u5c31\u662f\u517c\u5bb9\u6027\u5f3a\uff0c\u4e0d\u5bb9\u6613\u5d29\u6e83\uff0c\u66f4\u52a0\u7f8e\u89c2\u3002\u8fd9\u91cc\u7684tableviewcell\u53eb\u505aTTProfileFunctionCell\uff08\u770b\u6700\u4e0a\u9762\u7684\u622a\u56fe\uff09<\/p>\n<ul>\n<p>\/\/\u6bcf\u884c\u8981\u663e\u793a\u7684\u5185\u5bb9\u662f\u4ec0\u4e48<\/p>\n<p>&#8211; (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath<\/p>\n<p>{<\/p>\n<p>\u00a0 \u00a0 if ([indexPath section] != [self numberOfSectionsInTableView:tableView] &#8211; 1)<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 return %orig;<\/p>\n<p>\u00a0 \u00a0 else<\/p>\n<p>\u00a0 \u00a0 {<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 static NSString *ID = @&#34;qscell&#34;;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 TTProfileFunctionCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 if(!cell)<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 cell = [[%c(TTProfileFunctionCell) alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];<\/p>\n<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 UIView *tempView = [[UIView alloc] init];<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 tempView.backgroundColor = [UIColor whiteColor];<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 [cell setBackgroundView:tempView];<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 cell.textLabel.text = @&#34;\u6e05\u723d\u4eca\u65e5\u5934\u6761&#34;;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 if([appVersion isEqualToString:@&#34;7.0.9&#34;])<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 cell.textLabel.font = [UIFont systemFontOfSize:16];<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 else<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 cell.textLabel.font = [UIFont boldSystemFontOfSize:16]; \/\/\u65b0\u7248\u5934\u6761\u7684\u529f\u80fd\u9009\u9879\u5c31\u662f\u52a0\u7c97\u7684<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 return cell;<\/p>\n<p>\u00a0 \u00a0 }<\/p>\n<p>}<\/p>\n<\/ul>\n<p>\u70b9\u51fbcell\uff0ccell\u8981\u54cd\u5e94\u4f60\u7684\u70b9\u51fb\uff0c\u9700\u8981hook\u70b9\u51fb\u4e8b\u4ef6\u7684\u4ee3\u7406\u65b9\u6cd5\u3002\u8fd9\u91cc\u6211\u81ea\u5df1\u4ee5\u7eaf\u4ee3\u7801\u7684\u65b9\u5f0f\u5199\u4e86\u4e00\u4e2aViewController\uff0c\u5f53\u70b9\u51fb\u8fd9\u4e2acell\u7684\u65f6\u5019\uff0c\u8f6c\u79fb\u81f3\u8fd9\u4e2aview<\/p>\n<ul>\n<p>\/\/\u70b9\u51fbcell\u7684\u4e8b\u4ef6<\/p>\n<p>&#8211; (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(id)indexPath<\/p>\n<p>{<\/p>\n<p>\u00a0 \u00a0 if ([indexPath section] != [self numberOfSectionsInTableView:tableView] &#8211; 1)<\/p>\n<p>\u00a0 \u00a0 {<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 %orig;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 return;<\/p>\n<p>\u00a0 \u00a0 }<\/p>\n<p>\u00a0 \u00a0 [tableView deselectRowAtIndexPath:indexPath animated:YES];<\/p>\n<\/p>\n<p>\u00a0 \u00a0 ViewController *vc = [[ViewController alloc] init];<\/p>\n<p>\u00a0 \u00a0 [self.navigationController pushViewController:vc animated:YES];<\/p>\n<p>}<\/p>\n<p>&#8211; (double)tableView:(id)arg1 heightForRowAtIndexPath:(id)arg2<\/p>\n<p>{<\/p>\n<p>\u00a0 \u00a0 if ([arg2 section] != [self numberOfSectionsInTableView:arg1] &#8211; 1)<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 return %orig;<\/p>\n<p>\u00a0 \u00a0\u00a0<\/p>\n<p>\u00a0 \u00a0 return 44; \/\/\u65e7\u7248\u5934\u6761\u4e0d\u9700\u8981\u8fd4\u56de\u9ad8\u5ea6\uff0c\u65b0\u7248\u7531\u4e8e\u9ed8\u8ba4\u9ad8\u5ea6\u95ee\u9898\uff0c\u5fc5\u987b\u7ed9\u4e00\u4e2a\u9ad8\u5ea6\uff0c\u5426\u5219\u4e0d\u663e\u793a<\/p>\n<p>}<\/p>\n<p>%end<\/p>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201126_5fbfaaf4f2283.jpg\" alt=\"\u5e94\u7528\u5185\u96c6\u6210\u63d2\u4ef6\u8bbe\u7f6e\u9879-         iPhone XS\" \/><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201126_5fbfaaf7de031.jpg\" alt=\"\u5e94\u7528\u5185\u96c6\u6210\u63d2\u4ef6\u8bbe\u7f6e\u9879-         iPhone XS\" \/><\/p>\n<\/p>\n<\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p>\n<\/div>\n<\/div>\n<ul>\n<li data-pid=\"3224277\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : \u6db5\u6db5\u7c91\u7c91 <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>\n<p>\u4e0d\u660e\u89c9\u5389\uff0c\u5927\u4f6c\u725b\u903c\u3002<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/li>\n<li data-pid=\"3224278\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yzSD <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>\n<p>\u770b\u4e0d\u61c2\uff0c\u544a\u8f9e<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/li>\n<li data-pid=\"3224279\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Hislove <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>\n<p>\u867d\u7136\u770b\u4e0d\u61c2\uff0c\u4f46\u662f\u5f88\u5389\u5bb3\u7684\u6837\u5b50<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/li>\n<li data-pid=\"3224280\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : calastan <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>                                                             \u4e0d\u660e\u89c9\u5389\u54c7                                                            <\/div>\n<\/p>\n<\/div>\n<\/li>\n<li data-pid=\"3224281\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : \u5c0f\u84dd\u5b81 <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>\n<p>\u4e00\u8138\u832b\u7136\uff0c\u544a\u8f9e<img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/005-9.gif\" alt=\"\u5e94\u7528\u5185\u96c6\u6210\u63d2\u4ef6\u8bbe\u7f6e\u9879-         iPhone XS\" \/><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/li>\n<li data-pid=\"3224282\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Tao_Andy <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>\n<p>\u5a01\u950b\u5927\u795e\u7cd6\u918b\u6392\u9aa8\u786e\u5b9e\u725b\u6279\uff0c\u7136\u800c\u5e76\u6ca1\u6709\u5375\u7528\uff0c\u4e00\u8138\u61f5\u903c\u7684\u8fdb\u6765\uff0c\u4e00\u8138\u61f5\u903c\u7684\u51fa\u53bb\u3002<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/li>\n<li data-pid=\"3224283\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : \u7537\u795e123456 <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>\n<p>\u5c41\u90fd\u6ca1\u7528<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/li>\n<li data-pid=\"3224284\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Blank_Love <\/span> <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i> <span> <\/span> <\/div>\n<\/p>\n<\/div>\n<div>\n<p>\u770b\u4e0d\u61c2\uff0c<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5e94\u7528\u5185\u96c6\u6210\u63d2\u4ef6\u8bbe\u7f6e\u9879- iPhon&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/205734"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=205734"}],"version-history":[{"count":1,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/205734\/revisions"}],"predecessor-version":[{"id":205736,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/205734\/revisions\/205736"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=205734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=205734"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=205734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}