{"id":6404,"date":"2023-01-04T16:33:01","date_gmt":"2023-01-04T08:33:01","guid":{"rendered":"http:\/\/1989lifejourney.com\/2023\/01\/04\/ios-swift-message-dispatch\/"},"modified":"2023-01-04T17:09:32","modified_gmt":"2023-01-04T09:09:32","slug":"ios-swift-message-dispatch","status":"publish","type":"post","link":"https:\/\/1989lifejourney.com\/?p=6404","title":{"rendered":"IOS Swift message dispatch"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<style>.gist table { margin-bottom: 0; }<\/style><div style=\"tab-size: 8\" id=\"gist120114511\" class=\"gist\">\n    <div class=\"gist-file\" translate=\"no\" data-color-mode=\"light\" data-light-theme=\"light\">\n      <div class=\"gist-data\">\n        \n<div class=\"js-gist-file-update-container js-task-list-container\">\n      <div id=\"file-ios_swift_message_dispatch-swift\" class=\"file my-2\">\n    \n    <div itemprop=\"text\"\n      class=\"Box-body p-0 blob-wrapper data type-swift  \"\n      style=\"overflow: auto\" tabindex=\"0\" role=\"region\"\n      aria-label=\"IOS_Swift_Message_Dispatch.swift content, created by tgnivekucn on 08:32AM on January 04, 2023.\"\n    >\n\n        \n<div class=\"js-check-hidden-unicode js-blob-code-container blob-code-content\">\n\n  <template class=\"js-file-alert-template\">\n  <div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n  <svg aria-hidden=\"true\" data-component=\"Octicon\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n    <span>\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n      <a class=\"Link--inTextBlock\" href=\"https:\/\/github.co\/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a>\n    <\/span>\n\n\n  <div data-view-component=\"true\" class=\"flash-action\">        <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\">    Show hidden characters\n<\/a>\n<\/div>\n<\/div><\/template>\n<template class=\"js-line-alert-template\">\n  <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\">\n    <svg aria-hidden=\"true\" data-component=\"Octicon\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n<\/span><\/template>\n\n  <table data-hpc class=\"highlight tab-size js-file-line-container\" data-tab-size=\"4\" data-paste-markdown-skip data-tagsearch-path=\"IOS_Swift_Message_Dispatch.swift\">\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L1\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC1\" class=\"blob-code blob-code-inner js-file-line\">import Foundation<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L2\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"2\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC2\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L3\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"3\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC3\" class=\"blob-code blob-code-inner js-file-line\">class CustomClass: NSObject {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L4\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"4\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC4\" class=\"blob-code blob-code-inner js-file-line\">    @objc func getValue(_ arg: Int) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L5\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"5\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC5\" class=\"blob-code blob-code-inner js-file-line\">        print(&quot;val is: 100&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L6\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"6\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC6\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L7\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"7\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC7\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L8\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"8\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC8\" class=\"blob-code blob-code-inner js-file-line\">    @objc func getValue2() {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L9\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"9\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC9\" class=\"blob-code blob-code-inner js-file-line\">        print(&quot;val is: 2&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L10\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"10\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC10\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L11\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"11\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC11\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L12\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"12\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC12\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L13\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"13\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC13\" class=\"blob-code blob-code-inner js-file-line\">private func executeAction(className: String, methodName: String, arg: Any?) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L14\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"14\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC14\" class=\"blob-code blob-code-inner js-file-line\">    let cla: AnyClass? = NSClassFromString(className)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L15\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"15\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC15\" class=\"blob-code blob-code-inner js-file-line\">    if let cla = cla as? NSObject.Type {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L16\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"16\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC16\" class=\"blob-code blob-code-inner js-file-line\">        let selector: Selector = Selector(methodName)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L17\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"17\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC17\" class=\"blob-code blob-code-inner js-file-line\">        let instance = cla.init()<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L18\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"18\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC18\" class=\"blob-code blob-code-inner js-file-line\">        if (instance.responds(to: selector)) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L19\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"19\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC19\" class=\"blob-code blob-code-inner js-file-line\">            if let arg = arg {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L20\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"20\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC20\" class=\"blob-code blob-code-inner js-file-line\">                instance.perform(selector, with: arg)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L21\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"21\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC21\" class=\"blob-code blob-code-inner js-file-line\">            } else {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L22\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"22\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC22\" class=\"blob-code blob-code-inner js-file-line\">                instance.perform(selector)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L23\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"23\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC23\" class=\"blob-code blob-code-inner js-file-line\">            }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L24\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"24\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC24\" class=\"blob-code blob-code-inner js-file-line\">        } else {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L25\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"25\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC25\" class=\"blob-code blob-code-inner js-file-line\">            print(&quot;method not found&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L26\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"26\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC26\" class=\"blob-code blob-code-inner js-file-line\">        }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L27\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"27\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC27\" class=\"blob-code blob-code-inner js-file-line\">    } else {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L28\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"28\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC28\" class=\"blob-code blob-code-inner js-file-line\">        print(&quot;class not found&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L29\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"29\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC29\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L30\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"30\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC30\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L31\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"31\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC31\" class=\"blob-code blob-code-inner js-file-line\">    <\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L32\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"32\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC32\" class=\"blob-code blob-code-inner js-file-line\">executeAction(className: &quot;YourProjectName.CustomClass&quot;, methodName: &quot;getValue:&quot;, arg: 100)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L33\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"33\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC33\" class=\"blob-code blob-code-inner js-file-line\">executeAction(className: &quot;YourProjectName.CustomClass&quot;, methodName: &quot;getValue2&quot;, arg: nil)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch-swift-L34\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"34\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch-swift-LC34\" class=\"blob-code blob-code-inner js-file-line\">      <\/td>\n        <\/tr>\n  <\/table>\n<\/div>\n\n\n    <\/div>\n\n  <\/div>\n\n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https:\/\/gist.github.com\/tgnivekucn\/256a78ea85e1c9187c4235ce96665c09\/raw\/4f513ebbd5e6e4ff25f3da1d4748cc4f55525fc3\/IOS_Swift_Message_Dispatch.swift\" style=\"float:right\" class=\"Link--inTextBlock\">view raw<\/a>\n        <a href=\"https:\/\/gist.github.com\/tgnivekucn\/256a78ea85e1c9187c4235ce96665c09#file-ios_swift_message_dispatch-swift\" class=\"Link--inTextBlock\">\n          IOS_Swift_Message_Dispatch.swift\n        <\/a>\n        hosted with &#10084; by <a class=\"Link--inTextBlock\" href=\"https:\/\/github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<style>.gist table { margin-bottom: 0; }<\/style><div style=\"tab-size: 8\" id=\"gist120114903\" class=\"gist\">\n    <div class=\"gist-file\" translate=\"no\" data-color-mode=\"light\" data-light-theme=\"light\">\n      <div class=\"gist-data\">\n        \n<div class=\"js-gist-file-update-container js-task-list-container\">\n      <div id=\"file-ios_swift_message_dispatch_with_closure-swift\" class=\"file my-2\">\n    \n    <div itemprop=\"text\"\n      class=\"Box-body p-0 blob-wrapper data type-swift  \"\n      style=\"overflow: auto\" tabindex=\"0\" role=\"region\"\n      aria-label=\"IOS_Swift_Message_Dispatch_with_closure.swift content, created by tgnivekucn on 09:08AM on January 04, 2023.\"\n    >\n\n        \n<div class=\"js-check-hidden-unicode js-blob-code-container blob-code-content\">\n\n  <template class=\"js-file-alert-template\">\n  <div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n  <svg aria-hidden=\"true\" data-component=\"Octicon\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n    <span>\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n      <a class=\"Link--inTextBlock\" href=\"https:\/\/github.co\/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a>\n    <\/span>\n\n\n  <div data-view-component=\"true\" class=\"flash-action\">        <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\">    Show hidden characters\n<\/a>\n<\/div>\n<\/div><\/template>\n<template class=\"js-line-alert-template\">\n  <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\">\n    <svg aria-hidden=\"true\" data-component=\"Octicon\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg>\n<\/span><\/template>\n\n  <table data-hpc class=\"highlight tab-size js-file-line-container\" data-tab-size=\"4\" data-paste-markdown-skip data-tagsearch-path=\"IOS_Swift_Message_Dispatch_with_closure.swift\">\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L1\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC1\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L2\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"2\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC2\" class=\"blob-code blob-code-inner js-file-line\">class DataModel: NSObject {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L3\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"3\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC3\" class=\"blob-code blob-code-inner js-file-line\">    var data = 1<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L4\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"4\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC4\" class=\"blob-code blob-code-inner js-file-line\">    var callback: ((Any?) -&gt; Unmanaged&lt;AnyObject&gt;?)?<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L5\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"5\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC5\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L6\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"6\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC6\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L7\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"7\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC7\" class=\"blob-code blob-code-inner js-file-line\">class CustomClass: NSObject {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L8\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"8\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC8\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L9\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"9\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC9\" class=\"blob-code blob-code-inner js-file-line\">    @objc func getValue(_ model: DataModel, completion callback: Any!) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L10\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"10\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC10\" class=\"blob-code blob-code-inner js-file-line\">        print(&quot;get Value for CustomClass&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L11\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"11\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC11\" class=\"blob-code blob-code-inner js-file-line\">        if let callback = callback as? ((Any?) -&gt; Unmanaged&lt;AnyObject&gt;?) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L12\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"12\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC12\" class=\"blob-code blob-code-inner js-file-line\">            print(&quot;closure is not nil&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L13\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"13\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC13\" class=\"blob-code blob-code-inner js-file-line\">            _ = callback(model.data)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L14\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"14\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC14\" class=\"blob-code blob-code-inner js-file-line\">        }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L15\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"15\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC15\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L16\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"16\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC16\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L17\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"17\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC17\" class=\"blob-code blob-code-inner js-file-line\">    @objc func setValue(_ model: DataModel, completion callback: Any!) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L18\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"18\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC18\" class=\"blob-code blob-code-inner js-file-line\">        print(&quot;test11 set Value for CustomClass, val is: \\(model.data)&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L19\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"19\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC19\" class=\"blob-code blob-code-inner js-file-line\">        if let callback = callback as? ((Any?) -&gt; Unmanaged&lt;AnyObject&gt;?) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L20\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"20\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC20\" class=\"blob-code blob-code-inner js-file-line\">            print(&quot;test11 closure is not nil&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L21\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"21\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC21\" class=\"blob-code blob-code-inner js-file-line\">            _ = callback(model.data)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L22\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"22\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC22\" class=\"blob-code blob-code-inner js-file-line\">        }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L23\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"23\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC23\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L24\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"24\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC24\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L25\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"25\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC25\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L26\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"26\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC26\" class=\"blob-code blob-code-inner js-file-line\">class ViewController: UIViewController {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L27\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"27\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC27\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L28\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"28\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC28\" class=\"blob-code blob-code-inner js-file-line\">    override func viewDidLoad() {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L29\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"29\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC29\" class=\"blob-code blob-code-inner js-file-line\">        super.viewDidLoad()<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L30\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"30\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC30\" class=\"blob-code blob-code-inner js-file-line\">        let dataModel = DataModel()<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L31\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"31\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC31\" class=\"blob-code blob-code-inner js-file-line\">        executeAction(className: &quot;TestProject2.CustomClass&quot;, methodName: &quot;setValue:completion:&quot;, arg: dataModel) { result in<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L32\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"32\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC32\" class=\"blob-code blob-code-inner js-file-line\">            print(&quot;test11 execute setValue callback complete!!, result: \\(String(describing: result))&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L33\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"33\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC33\" class=\"blob-code blob-code-inner js-file-line\">            return nil<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L34\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"34\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC34\" class=\"blob-code blob-code-inner js-file-line\">        }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L35\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"35\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC35\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L36\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"36\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC36\" class=\"blob-code blob-code-inner js-file-line\">\n<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L37\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"37\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC37\" class=\"blob-code blob-code-inner js-file-line\">    private func executeAction(className: String, methodName: String, arg: Any?, callback: ((Any?) -&gt; Unmanaged&lt;AnyObject&gt;?)? = nil) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L38\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"38\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC38\" class=\"blob-code blob-code-inner js-file-line\">        let cla: AnyClass? = NSClassFromString(className)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L39\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"39\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC39\" class=\"blob-code blob-code-inner js-file-line\">        if let cla = cla as? NSObject.Type {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L40\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"40\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC40\" class=\"blob-code blob-code-inner js-file-line\">            let selector: Selector = Selector(methodName)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L41\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"41\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC41\" class=\"blob-code blob-code-inner js-file-line\">            let instance = cla.init()<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L42\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"42\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC42\" class=\"blob-code blob-code-inner js-file-line\">            if (instance.responds(to: selector)) {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L43\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"43\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC43\" class=\"blob-code blob-code-inner js-file-line\">                if let arg = arg,<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L44\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"44\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC44\" class=\"blob-code blob-code-inner js-file-line\">                   let callback = callback {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L45\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"45\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC45\" class=\"blob-code blob-code-inner js-file-line\">                    instance.perform(selector, with: arg, with: callback)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L46\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"46\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC46\" class=\"blob-code blob-code-inner js-file-line\">                } else if let arg = arg {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L47\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"47\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC47\" class=\"blob-code blob-code-inner js-file-line\">                    instance.perform(selector, with: arg)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L48\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"48\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC48\" class=\"blob-code blob-code-inner js-file-line\">                } else {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L49\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"49\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC49\" class=\"blob-code blob-code-inner js-file-line\">                    instance.perform(selector)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L50\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"50\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC50\" class=\"blob-code blob-code-inner js-file-line\">                }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L51\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"51\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC51\" class=\"blob-code blob-code-inner js-file-line\">            } else {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L52\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"52\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC52\" class=\"blob-code blob-code-inner js-file-line\">                print(&quot;method not found&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L53\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"53\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC53\" class=\"blob-code blob-code-inner js-file-line\">            }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L54\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"54\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC54\" class=\"blob-code blob-code-inner js-file-line\">        } else {<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L55\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"55\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC55\" class=\"blob-code blob-code-inner js-file-line\">            print(&quot;class not found&quot;)<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L56\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"56\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC56\" class=\"blob-code blob-code-inner js-file-line\">        }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L57\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"57\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC57\" class=\"blob-code blob-code-inner js-file-line\">    }<\/td>\n        <\/tr>\n        <tr>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-L58\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"58\"><\/td>\n          <td id=\"file-ios_swift_message_dispatch_with_closure-swift-LC58\" class=\"blob-code blob-code-inner js-file-line\">}<\/td>\n        <\/tr>\n  <\/table>\n<\/div>\n\n\n    <\/div>\n\n  <\/div>\n\n<\/div>\n\n      <\/div>\n      <div class=\"gist-meta\">\n        <a href=\"https:\/\/gist.github.com\/tgnivekucn\/0e19721eed0e0b23073378ad0b33b7d6\/raw\/6447aecb1baba379203788e2e8a7c80cc72a1683\/IOS_Swift_Message_Dispatch_with_closure.swift\" style=\"float:right\" class=\"Link--inTextBlock\">view raw<\/a>\n        <a href=\"https:\/\/gist.github.com\/tgnivekucn\/0e19721eed0e0b23073378ad0b33b7d6#file-ios_swift_message_dispatch_with_closure-swift\" class=\"Link--inTextBlock\">\n          IOS_Swift_Message_Dispatch_with_closure.swift\n        <\/a>\n        hosted with &#10084; by <a class=\"Link--inTextBlock\" href=\"https:\/\/github.com\">GitHub<\/a>\n      <\/div>\n    <\/div>\n<\/div>\n\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":139426785,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_postgate_lock_override":"inherit","_postgate_lock_mode":"inherit","_postgate_preview_mode":"inherit","_postgate_preview_limit":0,"_postgate_product_ids":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","jetpack_seo_llms_txt_always_include":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[37324612,596263,1],"tags":[],"post_folder":[],"class_list":["post-6404","post","type-post","status-publish","format-standard","hentry","category-ios-development","category-swift","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paR5vw-1Fi","jetpack-related-posts":[{"id":3988,"url":"https:\/\/1989lifejourney.com\/?p=3988","url_meta":{"origin":6404,"position":0},"title":"Understanding Swift Copy-on-Write mechanisms","author":"Kevin","date":"28 12 \u6708, 2021","format":false,"excerpt":"https:\/\/gist.github.com\/tgnivekucn\/7085e6009baa321\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9022,"url":"https:\/\/1989lifejourney.com\/?p=9022","url_meta":{"origin":6404,"position":1},"title":"IOS Swift Opaque type","author":"Kevin","date":"7 11 \u6708, 2023","format":false,"excerpt":"Prerequisite The Problem That Opaque Types Solve O\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5915,"url":"https:\/\/1989lifejourney.com\/?p=5915","url_meta":{"origin":6404,"position":2},"title":"Write stream to file by Swift","author":"Kevin","date":"17 10 \u6708, 2022","format":false,"excerpt":"Original version in objective-c: https:\/\/gist.gith\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3909,"url":"https:\/\/1989lifejourney.com\/?p=3909","url_meta":{"origin":6404,"position":3},"title":"Swift optional type implementation","author":"Kevin","date":"8 12 \u6708, 2021","format":false,"excerpt":"Swift optional type\u662f\u7528enum\u53bb\u5be6\u4f5c\uff0c\u4ee5\u4e0b\u70baOptional type\u7684\u90e8\u5206so\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8115,"url":"https:\/\/1989lifejourney.com\/?p=8115","url_meta":{"origin":6404,"position":4},"title":"IOS Swift Date String convert to date with specific timezone &amp; locale issue","author":"Kevin","date":"2 5 \u6708, 2023","format":false,"excerpt":"\"Handle the issue of getting unexpected values fro\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6403,"url":"https:\/\/1989lifejourney.com\/?p=6403","url_meta":{"origin":6404,"position":5},"title":"IOS &#8211; \u6a21\u64ecRxSwift","author":"Kevin","date":"4 1 \u6708, 2023","format":false,"excerpt":"https:\/\/gist.github.com\/tgnivekucn\/fec1fa455b42299\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/6404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/users\/139426785"}],"replies":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6404"}],"version-history":[{"count":1,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/6404\/revisions"}],"predecessor-version":[{"id":6405,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/6404\/revisions\/6405"}],"wp:attachment":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6404"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fpost_folder&post=6404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}