{"id":156350,"date":"2020-09-17T13:05:30","date_gmt":"2020-09-17T05:05:30","guid":{"rendered":"http:\/\/4563.org\/?p=156350"},"modified":"2020-09-17T13:05:30","modified_gmt":"2020-09-17T05:05:30","slug":"ios-%e4%b8%a4%e4%b8%aa-viewcontroller-%e8%b7%b3%e8%bd%ac%e7%9b%b8%e5%85%b3%e9%97%ae%e9%a2%98%e5%92%a8%e8%af%a2","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=156350","title":{"rendered":"ios \u4e24\u4e2a ViewController \u8df3\u8f6c\u76f8\u5173\u95ee\u9898\u54a8\u8be2"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  ios \u4e24\u4e2a ViewController \u8df3\u8f6c\u76f8\u5173\u95ee\u9898\u54a8\u8be2               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u4f7f\u7528 oc \u5199\u4e86\u4e24\u4e2a ViewController \u754c\u9762\uff0c\u4ece AViewController \u8df3\u8f6c\u5230 BViewController \u4f7f\u7528\u4e86[self presentViewController:bVC animated:YES completion:nil]; \u4f46\u662f\u6211\u60f3\u8df3\u8f6c\u7684\u540c\u65f6\u628a AViewController \u9500\u6bc1\u6389\uff0c\u4f7f\u7528[self dismissViewControllerAnimated:YES completion:nil];\u4e5f\u65e0\u6cd5\u5b9e\u73b0\uff0c\u8fd8\u6709\u4ec0\u4e48\u6bd4\u8f83\u597d\u7684\u65b9\u6cd5\u5417<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>37<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3324127\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Android activity \u8df3\u8f6c\u53ea\u9700\u8981 finsh \u5c31\u597d\u4e86\uff0c\u56e0\u4e3a\u4e0d\u600e\u4e48\u719f\u6089 ios\uff0cGoogle \u4e86\u4e00\u5929\uff0c\u4e5f\u627e\u4e0d\u5230\u6bd4\u8f83\u597d\u7684\u65b9\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324128\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xayoung <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u6837\u505a\u7684\u76ee\u7684\u662f\u4ec0\u4e48\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324129\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xayoung \u767b\u5f55\u754c\u9762\u6709\u624b\u673a\u9a8c\u8bc1\u7801\u548c\u5bc6\u7801\u767b\u5f55\u754c\u9762\uff0c\u8df3\u8f6c\u5230\u5bc6\u7801\u767b\u5f55\u754c\u9762\u7684\u65f6\u5019\u628a\u624b\u673a\u9a8c\u8bc1\u7801\u754c\u9762\u5173\u95ed\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324130\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Lin0936 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             push \u5230 B \u7136\u540e\u628a root \u66ff\u6362\u6210 B                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324131\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Lin0936 \u6211\u8bd5\u8bd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324132\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : baijiahei <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 push \u554a present \u662f\u4e00\u4e9b\u4e34\u65f6\u5c55\u793a\u7684\u6216\u8005\u4e34\u65f6\u8bbe\u7f6e\u754c\u9762\u624d\u7528\u8fd9\u4e2a\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324133\" 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>                                                             \u5148 dismissA \u518d presentB                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324134\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @CommandZi \u4e0d\u884c\uff0c\u8fd9\u4e2a\u8bd5\u8fc7\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324135\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @baijiahei \u4f7f\u7528 NavigationController \u624d\u53ef\u4ee5\u4f7f\u7528 push\uff0c\u76ee\u524d\u6211\u6ca1\u6709\u4f7f\u7528 NavigationController                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324136\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : EggmanQ <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7236 VC: VC                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324137\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : EggmanQ <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u9760, \u6309\u9519\u4e86,                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324138\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kera0a <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 push <br \/>\u73b0\u5728 nav \u7684 viewControllers \u91cc\u6709 [root,A]<br \/>\u7136\u540e nav.serViewController([root,B])<\/p>\n<p>push \u80fd\u81ea\u5b9a\u4e49\u8df3\u8f6c\u52a8\u753b\uff0c\u6709\u4e2a\u9875\u9762\u6808\u6570\u7ec4\uff0c\u53ef\u4ee5\u968f\u610f\u8c03\u6574                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324139\" 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>                                                             @MrLQX \u80af\u5b9a\u59ff\u52bf\u9519\u4e86\uff0c\u4e0d\u8981\u7528 A presentB\uff0c\u7528 A \u7684\u4e0a\u4e00\u7ea7                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324140\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : EggmanQ <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fde\u7eed\u6309\u9519, \u6211\u89c9\u5f97\u601d\u8def\u53ef\u4ee5\u8fd9\u6837<\/p>\n<p>\u7236 VC addChildVC: AVC, BVC<\/p>\n<p>\u7236 VC.view addSubView: AVC.view, BVC.view<\/p>\n<p>\u7136\u540e\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5904\u7406\u4e24\u4e2a View \u7684\u663e\u793a\u548c\u52a8\u753b, \u6570\u636e\u548c\u9a8c\u8bc1\u903b\u8f91\u53ef\u4ee5\u7ed9\u5230\u7236 VC \u5904\u7406                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324141\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frqk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             bVC \u7684\u5b9e\u4f8b\u662f\u5728 aVC \u521b\u5efa\u7684\u8bdd\uff0c\u4e0d\u80fd\u5728 bVC \u79fb\u9664 aVC \u5427\u3002<br \/>\u8981\u662f aVC \u548c bVC \u662f\u5728\u67d0\u4e2a VC \u4e0a\u7684\u8bdd\uff0c\u5728 bVC \u91cc delegate \u7ed9\u90a3\u4e2a VC \u8ba9\u4ed6\u628a aVC \u79fb\u9664\u4e86\u5e94\u8be5\u662f\u53ef\u4ee5\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324142\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codeisjobs <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u8981\u9500\u6bc1 a \u754c\u9762\u3002\u7b49\u767b\u5f55\u6210\u529f\u540e\u91cd\u65b0\u8bbe\u7f6e uiapplication \u7684 keywindow.rootviewcontroller \u7684\u65f6\u5019\u518d dismiss a \u754c\u9762                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324143\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codeisjobs <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u4e0d\u60f3\u5728 b \u754c\u9762\u53ef\u4ee5\u8fd4\u56de\u7684\u8bdd\uff0c\u5c31\u4e0d\u8bbe\u7f6e\u5de6\u4fa7\u8fd4\u56de\u6309\u94ae\uff0c\u7136\u540e\u8bbe\u7f6e\u5168\u5c4f\u663e\u793a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324144\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @codeisjobs \u6211\u8fd9\u8fb9 a \u754c\u9762\u53f3\u4e0b\u89d2\u6709\u4e2a\u5207\u6362\u6309\u94ae\uff0c\u70b9\u51fb\u8fd9\u4e2a\u6309\u94ae\u53ef\u4ee5\u8df3\u8f6c\u5230 b \u754c\u9762                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324145\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @codeisjobs \u4e3b\u8981\u662f\u8fd9\u4e2a\u6309\u94ae\u8df3\u8f6c\u7684\u5b9e\u73b0\uff0ca \u8df3\u8f6c\u5230 b \u7684\u65f6\u5019\uff0c\u9500\u6bc1 a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324146\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BabyYuuki <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u5728 bVC \u9000\u51fa\u7684\u65f6\u5019\uff0c\u7528 present AViewController \u754c\u9762\u7684\u90a3\u4e2a\u63a7\u5236\u5668\u8c03\u7528 dismissViewControllerAnimated \u65b9\u6cd5\u8bd5\u8bd5\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324147\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codeisjobs <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @MrLQX \u770b\u4f60\u600e\u4e48\u8df3\u7684\uff0cpresent \u65b9\u6cd5\u7684\u8bdd\uff0c\u4e0d\u597d dismiss\uff0c\u9664\u975e\u662f\u7528 rootviewcontroller \u65b9\u5f0f\u8df3\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324148\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codeisjobs <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @MrLQX \u63a8\u8350\u4f60 a \u5168\u5c4f present b\uff0c\u7136\u540e\u767b\u5f55\u5b8c\u6210\u540e\uff0c\u91cd\u65b0\u8bbe\u7f6e rootvc\uff0c\u540c\u65f6 b \u91cc\u9762 dismiss                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324149\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Elethom <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4eb2\u4eb2\uff0c\u8fd9\u8fb9\u5efa\u8bae\u60a8\u8f6c\u884c\u5462\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324150\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : isRealLeven <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4eb2\u4eb2\uff0c\u8fd9\u8fb9\u5efa\u8bae\u60a8\u8f6c\u884c\u5462\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324151\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MrStark <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5176\u5b9e\u4f60\u53ef\u4ee5\u628a A \u548c B \u90fd\u4f5c\u4e3a\u5b50\u63a7\u5236\u5668\u653e\u5728\u540c\u4e00\u4e2a\u63a7\u5236\u5668\u4e0b\u8fdb\u884c\u5207\u6362\u64cd\u4f5c\u7684\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u81ea\u7531\u64cd\u4f5c A \u548c B \u7684\u663e\u793a\u4e0e\u91ca\u653e\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324152\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : MrLQX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u611f\u8c22\u5404\u4f4d\u5927\u4f6c\uff0c\u6211\u4e3b\u8981\u662f Android \u5f00\u53d1\uff0cios \u53ea\u662f\u88ab\u62c9\u8fc7\u6765\u5199\u7684\u70b9\u4e1c\u897f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324153\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sjsurf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u53ef\u4ee5\u8003\u8651\u628a A \u548c B \u8c01 present \u98a0\u5012\u4e00\u4e0b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324154\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sjsurf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u521a\u624d\u7406\u89e3\u9519\u8bef\u4f60\u7684\u9700\u6c42\u4e86\u3002 \u5982\u679c\u4f60\u7684\u9700\u6c42\u662f A \u6216\u8005 B \u7684\u5173\u7cfb\u7684\u8bdd \u5e94\u8be5\u7528 subViewController \u7136\u540e\u6539 view \u7684\u8f6c\u573a\u52a8\u753b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324155\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yu5121199 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4eb2\u4eb2\uff0c\u8fd9\u8fb9\u5efa\u8bae\u60a8\u8f6c\u884c\u5462\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324156\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : superpeaser <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd9\u6837\u8bbe\u8ba1\u5c31\u4e0d\u5408\u7406\u5462\uff0c\u5efa\u8bae\u4f60\u770b\u770b\u4e3b\u6d41\u7684 app \u5173\u4e8e\u9a8c\u8bc1\u7801\u548c\u5bc6\u7801\u767b\u5f55\u5207\u6362\u7684\u903b\u8f91\u662f\u600e\u4e48\u8bbe\u8ba1\u7684\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324157\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : salor <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             VC \u9875\u9762\u8df3\u8f6c\u5b50\u7ea7\u4e0d\u80fd\u9500\u6bc1\u7236\u7ea7\u3002\u4f60\u53ef\u4ee5\u628a\u4e24\u79cd\u9a8c\u8bc1\u65b9\u5f0f\u4f5c\u4e3a\u4e24\u4e2a\u89c6\u56fe\uff0c\u505a\u597d\u52a8\u753b\u6548\u679c\u5c31\u884c\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324158\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vincentxue <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd9\u4e2a\u662f\u5b89\u5353\u7684\u601d\u7ef4\uff0ciOS \u7684\u4e16\u754c\u4e0d\u662f\u8fd9\u6837\u641e\u3002\u767b\u5f55\u6ce8\u518c\u8f6c\u4e3b\u9875\u662f\u4e00\u4e2a\u5f88\u5e38\u89c1\u7684\u903b\u8f91\uff0cA present \u5230 B\uff0c\u5728 B \u91cc\u9762\u5b8c\u6210\u4e4b\u540e\u5728 dismiss \u7684\u540c\u65f6\u53d1\u4e2a\u901a\u77e5\u628a rootVC \u7ed9\u6362\u6389\u5c31\u884c\u4e86\uff0c\u8fd9\u662f\u6700\u7b80\u5355\u7684\u505a\u6cd5\u3002\u8fd9\u6837 B \u5728 dissmiss \u4e4b\u540e\u5c31\u9500\u6bc1\u4e86\uff0cA \u5728 root \u88ab\u6362\u4e86\u4e4b\u540e\u6ca1\u6709\u5f15\u7528\u4e5f\u81ea\u5df1\u9500\u6bc1\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324159\" 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>                                                             \u5c06 AVC \u4f5c\u4e3a\u5b50\u63a7\u5236\u5668\u6dfb\u52a0\u5230\u4e3b\u63a7\u5236\u5668\u4e0a\uff0c\u5c31\u53ef\u4ee5 present BVC \u540e\u9500\u6bc1\u6389 AVC \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324160\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : canxden <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4ee3\u7801\u4e0a b push a\uff0c\u7136\u540e\u4e0d\u8981\u52a8\u753b\uff0c\u767b\u5f55\u5b8c\u6bd5\uff0ca diss \u8981\u52a8\u753b\u5c31\u597d\u4e86\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324161\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : canxden <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u4e00\u5b9a\u8981 a \u5230 b\uff0c\u518d\u628a b \u9500\u6bc1\uff0c\u5c31\u5207\u6362 appdelegte \u7684 windows \u7684 rootvc\uff0c\u4f46\u662f a \u548c b \u4e0d\u80fd\u662f\u516c\u7528\u4e00\u4e2a\u5bfc\u822a\u680f\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324162\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : laucenmi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             appDelegate.window?.rootViewController = newVC<br \/>oldVC \u4f1a\u81ea\u5df1\u9500\u6bc1\uff0c\u76f4\u63a5\u8d4b\u503c\u6ca1\u52a8\u753b\u6548\u679c\uff0c\u6709\u9700\u8981\u53ef\u4ee5\u81ea\u5df1\u52a0\u4e0a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3324163\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MarginK <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u4ece A present B \u5f53\u7136\u4e0d\u53ef\u80fd\u9500\u6bc1 A\uff0c\u56e0\u4e3a\u53ea\u8981 B \u7684\u89c6\u56fe\u5c42\u7ea7\u6ca1\u53d8\uff0cA \u5c31\u6c38\u8fdc\u90fd\u662f B \u7684 presentedViewController\uff0c\u4f60\u751a\u81f3\u8fd8\u80fd\u4ece A.presentedViewController \u83b7\u53d6\u5230 B<\/p>\n<p>\u8fd8\u6709\uff0ciOS \u5c31\u4e0d\u8981\u53bb\u60f3\u7740\u624b\u52a8\u9500\u6bc1\u9875\u9762\u7684\u601d\u7ef4\u4e86\uff0c\u5982\u679c\u9875\u9762\u6ca1\u6709\u81ea\u52a8 dealloc \u8981\u4e48\u662f\u4f60\u5bf9\u4f7f\u7528\u7684\u7406\u89e3\u4e0d\u5bf9\uff0c\u8981\u4e48\u662f\u8be5 VC \u4e2d\u6709\u4e1c\u897f\u91ca\u653e\u4e0d\u6389\uff0c\u8bf7\u81ea\u5df1\u68c0\u67e5\u4ee3\u7801\u54e6\u3002<\/p>\n<p>\u4e3b\u4e0d\u60f3\u81ea\u5df1\u5b9e\u73b0 present \u52a8\u753b\u7684\u8bdd\uff0c\u5c31\u6362\u4e00\u4e2a\u65b9\u5f0f\u8f6c\u573a\u5427\uff0c\u4e0a\u8bf4\u7684\u76f4\u63a5\u8bbe\u7f6e window \u7684\u8ddf\u89c6\u56fe\u5c31\u662f\u53bb\u4e86\u4e9b\u52a8\u753b\uff0c\u4f46\u80fd\u6ee1\u8db3\u4f60\u7684\u9700\u6c42                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>ios \u4e24\u4e2a ViewContro&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\/156350"}],"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=156350"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156350\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=156350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=156350"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=156350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}