{"id":5856,"date":"2022-09-01T15:41:16","date_gmt":"2022-09-01T07:41:16","guid":{"rendered":"http:\/\/1989lifejourney.com\/2022\/09\/01\/ios-unsafe-pointer\/"},"modified":"2022-09-01T15:41:16","modified_gmt":"2022-09-01T07:41:16","slug":"ios-unsafe-pointer","status":"publish","type":"post","link":"https:\/\/1989lifejourney.com\/?p=5856","title":{"rendered":"IOS unsafe pointer"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">var val: [Int] = [40, 30, 20]<br>let ptr: UnsafePointer = UnsafePointer(&amp;val)<br>print(ptr.pointee)<br>print(ptr[0])<br>print(ptr[1])<br>print(ptr[2])<br>let offsetPointer = ptr + 1<br>print(offsetPointer.pointee)<br>let offsetPointer2 = ptr + 2<br>print(offsetPointer2.pointee)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>var val: [Int] = [40, 30, 20]let ptr: UnsafePointer = U [&hellip;]<\/p>\n","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_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_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,55138170,1],"tags":[],"post_folder":[],"class_list":["post-5856","post","type-post","status-publish","format-standard","hentry","category-ios-development","category-technology-sharing","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paR5vw-1ws","jetpack-related-posts":[{"id":4080,"url":"https:\/\/1989lifejourney.com\/?p=4080","url_meta":{"origin":5856,"position":0},"title":"Depth-First Search","author":"Kevin","date":"16 1 \u6708, 2022","format":false,"excerpt":"Depth-first search\u00a0(DFS) is an\u00a0algorithm\u00a0for trave\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":4083,"url":"https:\/\/1989lifejourney.com\/?p=4083","url_meta":{"origin":5856,"position":1},"title":"Breadth-First Search","author":"Kevin","date":"16 1 \u6708, 2022","format":false,"excerpt":"Breadth-first search\u00a0(BFS) is an\u00a0algorithm\u00a0for sea\u2026","rel":"","context":"\u985e\u4f3c\u6587\u7ae0","block_context":{"text":"\u985e\u4f3c\u6587\u7ae0","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4982,"url":"https:\/\/1989lifejourney.com\/?p=4982","url_meta":{"origin":5856,"position":2},"title":"Difference between value type and a reference type in iOS swift\ufffc","author":"Kevin","date":"29 3 \u6708, 2022","format":false,"excerpt":"\u4ee5\u4e0b\u8cc7\u6599\u7686\u53c3\u8003\u81eaRef1\uff0c\u9019\u88e1\u50c5\u4f5c\u500b\u4eba\u5b78\u7fd2\u6574\u7406: Definition of Value type \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":4087,"url":"https:\/\/1989lifejourney.com\/?p=4087","url_meta":{"origin":5856,"position":3},"title":"Swift Initialization","author":"Kevin","date":"25 1 \u6708, 2022","format":false,"excerpt":"DefinitionRelationships between designated and con\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/docs.swift.org\/swift-book\/_images\/initializerDelegation01_2x.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/docs.swift.org\/swift-book\/_images\/initializerDelegation01_2x.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/docs.swift.org\/swift-book\/_images\/initializerDelegation01_2x.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4774,"url":"https:\/\/1989lifejourney.com\/?p=4774","url_meta":{"origin":5856,"position":4},"title":"IOS DispatchGroup","author":"Kevin","date":"11 3 \u6708, 2022","format":false,"excerpt":"DispatchGroup A group of tasks that you monitor as\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":4074,"url":"https:\/\/1989lifejourney.com\/?p=4074","url_meta":{"origin":5856,"position":5},"title":"KMP algorithm","author":"Kevin","date":"16 1 \u6708, 2022","format":false,"excerpt":"\u5b57\u4e32\u6bd4\u5c0d\u554f\u984c: \u7d66\u5b9a\u4e00\u500b\u5b57\u4e32(txt)\u548c\u53e6\u4e00\u500b\u5b57\u4e32(pattern)\uff0c\u78ba\u8a8dpattern\u5b57\u4e32\u662f\u5426\u5b58\u5728\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/V5-7GzOfADQ\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/5856","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=5856"}],"version-history":[{"count":0,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/5856\/revisions"}],"wp:attachment":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5856"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fpost_folder&post=5856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}