{"id":352215,"date":"2021-02-12T14:45:08","date_gmt":"2021-02-12T06:45:08","guid":{"rendered":"http:\/\/4563.org\/?p=352215"},"modified":"2021-02-12T14:45:08","modified_gmt":"2021-02-12T06:45:08","slug":"%e8%af%b7%e9%97%ae%e4%b8%80%e4%b8%aa-ios-%e5%bc%80%e5%8f%91%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%8c%e5%8a%a8%e6%80%81%e4%bf%ae%e6%94%b9-pageviewcontroller-%e7%9a%84%e9%ab%98%e5%ba%a6%ef%bc%88-swift","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=352215","title":{"rendered":"\u8bf7\u95ee\u4e00\u4e2a IOS \u5f00\u53d1\u7684\u95ee\u9898\uff0c\u52a8\u6001\u4fee\u6539 PageViewController \u7684\u9ad8\u5ea6\uff08 Swift \u5f00\u53d1\uff09\u6216\u8005 PageViewController \u5982\u4f55\u6839\u636e\u6bcf\u4e00\u9875\u7684\u5185\u5bb9\u9ad8\u5ea6\u81ea\u52a8\u53d8\u5316"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u95ee\u4e00\u4e2a IOS \u5f00\u53d1\u7684\u95ee\u9898\uff0c\u52a8\u6001\u4fee\u6539 PageViewController \u7684\u9ad8\u5ea6\uff08 Swift \u5f00\u53d1\uff09\u6216\u8005 PageViewController \u5982\u4f55\u6839\u636e\u6bcf\u4e00\u9875\u7684\u5185\u5bb9\u9ad8\u5ea6\u81ea\u52a8\u53d8\u5316               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Xcution <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u6211\u4f7f\u7528 PageViewController\uff0c\u4f46\u662f PageViewController \u53c8\u4e0d\u80fd\u76f4\u63a5\u5230\u5c4f\u5e55\u5e95\u90e8\uff0c\u5b83\u7684\u4e0b\u65b9\u8fd8\u8981\u663e\u793a\u5176\u4ed6\u5185\u5bb9\uff0c\u7531\u4e8e\u6bcf\u4e00\u9875\u5185\u5bb9\u9ad8\u5ea6\u4e0d\u76f8\u540c\uff0c\u5982\u679c\u6211\u76f4\u63a5\u5b9a\u6b7b\u9ad8\u5ea6\u7684\u8bdd\uff0c\u8981\u4e48\u4f1a\u906e\u6321\u8981\u4e48\u5c31\u662f\u4f1a\u663e\u793a\u591a\u4f59\u7684\u7a7a\u767d\u5185\u5bb9\uff0c\u6211\u5c31\u60f3\u5728\u6ed1\u52a8\u7684\u65f6\u5019\u6839\u636e\u5185\u5bb9\u7684\u9ad8\u5ea6\u52a8\u6001\u4fee\u6539 PageViewController \u7684\u9ad8\u5ea6\uff0c\u4f46\u662f\u8bbe\u7f6e\u597d\u50cf\u4e0d\u884c\uff0c\u6c38\u8fdc\u90fd\u662f\u663e\u793a\u7684\u7b2c\u4e00\u6b21\u663e\u793a\u7684\u9ad8\u5ea6\u3002\u6211\u53c8\u4e0d\u77e5\u9053\u6211\u8fd9\u79cd\u5199\u6cd5\u5230\u5e95\u5bf9\u4e0d\u5bf9\uff0c\u6309\u7406\u8bf4 PageViewController \u7684\u9ad8\u5ea6\u4f1a\u6839\u636e\u5185\u5bb9\u81ea\u52a8\u9002\u5e94\u5e94\u8be5\u624d\u662f\u6700\u597d\u7684\uff0c\u4f46\u662f\u6211\u627e\u4e86\u5f88\u4e45\u90fd\u6ca1\u627e\u5230\uff0c\u5c31\u53ea\u6709\u60f3\u81ea\u5df1\u52a8\u6001\u8bbe\u7f6e\u9ad8\u5ea6\uff0c\u4f46\u662f\u597d\u50cf\u8fd8\u662f\u4e0d\u884c\uff0c\u56e0\u4e3a\u521a\u521a\u63a5\u89e6 IOS \u5f00\u53d1\uff0c\u5bf9\u8fd9\u4e2a\u5185\u5bb9\u81ea\u9002\u5e94\u8fd9\u5757\u6709\u70b9\u8499\uff0c\u5b89\u5353\u7684\u8bdd\u76f4\u63a5\u4e00\u4e2a\u5c5e\u6027\u5c31\u641e\u5b9a\u4e86\uff0c\u597d\u50cf IOS \u4e5f\u6ca1\u6709\uff0c\u5934\u75bc\uff0c\u8fd9\u95ee\u9898\u641e\u4e86\u51e0\u5929\u4e86\uff0c\u8fd8\u662f\u6ca1\u6cd5\u89e3\u51b3\uff0c\u6c42\u5404\u4f4d\u5927\u4f6c\u6307\u70b9\u4e00\u4e0b      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5326473\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : massacreformash <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             PageViewController \u7684\u5751\u592a\u591a\u4e86\uff0c\u4e00\u822c\u90fd\u662f\u8003\u8651\u81ea\u5df1\u9020\u4e2a\u8f6e\u5b50\u6765\u7528<br \/>\u597d\u4e45\u4e0d\u505a iOS \u4e86\uff0c\u6211\u8bb0\u5f97\u5e94\u8be5\u662f\u7528 UIScrollView \u5957 UIScrollView \u5c31\u53ef\u4ee5\u5b9e\u73b0\uff0c\u7b97\u597d\u5404\u79cd Offset \u5c31\u53ef\u4ee5\u4e86<br \/>\u8fd9\u6837\u7684\u8bdd\uff0c\u53ef\u4ee5\u81ea\u5df1\u5728\u70b9\u51fb\u5207\u6362 page \u7684\u65f6\u5019\uff0c\u5404\u79cd\u9b54\u6539\u60f3\u8981\u7684\u6548\u679c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326474\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Xcution <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @massacreformash \u4f7f\u7528 UIScrollView \u786e\u5b9e\u4e5f\u53ef\u4ee5\u5b9e\u73b0 PageViewController \u7684\u529f\u80fd\uff0c\u5c31\u60f3\u7740\u6709\u4e86\u73b0\u6210\u7684\u4e86\uff0c\u5c31\u6ca1\u6709\u81ea\u5df1\u518d\u5199\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326475\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : massacreformash <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Xcution \u6211\u6709\u70b9\u513f\u5fd8\u4e86\u5728 iOS \u7684\u54ea\u4e2a\u7248\u672c\u91cc\u9762 PageViewController \u6709\u5751\u4e86\uff0c\u4f1a\u5728\u7279\u5b9a\u60c5\u51b5\u4e0b\u4e22 ViewController \u7684\u5f15\u7528\u5bfc\u81f4\u5d29\u6e83\uff0c\u800c\u4e14\u4e00\u76f4\u6ca1\u4fee\u590d\u3002\u4e0d\u77e5\u9053\u73b0\u5728\u4fee\u4e86\u6ca1\u6709\u3002<br \/>\u6211\u4e2a\u4eba\u8fd8\u662f\u5efa\u8bae\u5f04\u4e2a\u81ea\u5b9a\u4e49\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326476\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : CommandZi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u592a\u660e\u767d\u4f60\u8bf4\u7684\u6548\u679c\uff0c\u6309\u7406\u8bf4 Autolayout \u5df2\u7ecf\u80fd\u5b9e\u73b0\u81ea\u9002\u5e94                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326477\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Building <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e00\u822c\u6765\u8bf4\u5b98\u65b9\u63d0\u4f9b\u7684\u63a7\u4ef6\uff0c\u5c31\u662f\u8fd9\u4e48\u6b7b\u677f\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326478\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ai277014717 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u770b\u4e86\u4e0b\u6587\u6863\u3002PageViewController delegate \u4e2d\u6ca1\u6709\u8c03\u8282 height \u7684\u51fd\u6570\u3002\u53ef\u4ee5\u901a\u8fc7\u52a8\u6001\u7684\u4fee\u6539 PageViewController \u4e2d view \u7684 height \u6216\u8005\u76f8\u5173\u7ea6\u675f\u6765\u8fbe\u5230\u76ee\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326479\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leon0918 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528\u4ee3\u7406\u81ea\u5df1\u7b97\u9ad8\u5ea6\uff0c\u8d4b\u503c\u3002\u662f\u5f88\u9ebb\u70e6\u7684\uff0c\u5148\u627e\u627e github\uff0c\u4e0d\u884c\u81ea\u5df1\u5c01\u88c5\u4e00\u4e2a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326480\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ihwbunny <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u79cd\u7eaf\u6280\u672f\u7684\u8ba8\u8bba\uff0c\u7ed9\u575b\u5b50\u589e\u8f89\u4e0d\u5c11                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5326481\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JHExp <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u7684\u6bcf\u4e00\u9875\u5185\u5bb9\u90fd\u662f uiscrollview \u7684\u5b50\u7c7b\u7684\u8bdd \u56fa\u5b9a\u9ad8\u5ea6\u4e5f\u80fd\u6ed1\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u95ee\u4e00\u4e2a IOS \u5f00\u53d1\u7684\u95ee\u9898\uff0c\u52a8\u6001&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\/352215"}],"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=352215"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/352215\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=352215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=352215"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=352215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}