{"id":88,"date":"2024-09-13T11:25:23","date_gmt":"2024-09-13T11:25:23","guid":{"rendered":"https:\/\/xcode15.shimayugu.jp\/?p=88"},"modified":"2024-12-29T06:32:53","modified_gmt":"2024-12-28T21:32:53","slug":"%e6%96%b0swift%e3%81%a7%e8%a1%8c%e3%81%93%e3%81%86-%e7%ac%ac%ef%bc%91%ef%bc%90%e5%9b%9e%e3%80%8c%e9%9b%bb%e5%ad%90%e3%82%b5%e3%82%a4%e3%82%b3%e3%83%ad%e3%80%8d%e3%80%80%e7%94%b0%e9%83%a8%e4%ba%95","status":"publish","type":"post","link":"https:\/\/xcode15.shimayugu.jp\/?p=88","title":{"rendered":"\u65b0Swift\u3067\u884c\u3053\u3046&#8230;\u7b2c\uff11\uff10\u56de\u300c\u96fb\u5b50\u30b5\u30a4\u30b3\u30ed\u300d\u3000\u7530\u90e8\u4e95\u4fdd"},"content":{"rendered":"\n<p><a href=\"https:\/\/shimayugu.sakura.ne.jp\/?p=2298\"><\/a><a href=\"https:\/\/shimayugu.sakura.ne.jp\/?p=2473\">\u76ee\u6b21<\/a>\u3000<a href=\"https:\/\/xcode15.shimayugu.jp\/?p=545\">\u89e3\u8aac\u7de8<\/a><\/p>\n\n\n\n<p>\u3000\u96fb\u5b50\u30b5\u30a4\u30b3\u30ed\u3001\u7686\u3055\u3093\u51fa\u6765\u305f\u3067\u3057\u3087\u3046\u304b\u3002\u4e00\u3064\u306e\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u30e9\u30d9\u30eb\u3068\u30dc\u30bf\u30f3\u3092\u914d\u7f6e\u3057\u3001\u30e9\u30d9\u30eb\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u547c\u3079\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u6642(TouchDown)\u30b5\u30a4\u30b3\u30ed\u3092\u632f\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000Int.random(in: 1 &#8230; 6)\u3067\uff11\u301c\uff16\u306e\u6570\u5024\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002\u5f8c\u306f\u3053\u308c\u3092\u30e9\u30d9\u30eb\u306b\u8868\u793a\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"622\" src=\"https:\/\/xcode15.shimayugu.jp\/wp-content\/uploads\/2024\/09\/image-1-1024x622.png\" alt=\"\" class=\"wp-image-89\" srcset=\"https:\/\/xcode15.shimayugu.jp\/wp-content\/uploads\/2024\/09\/image-1-1024x622.png 1024w, https:\/\/xcode15.shimayugu.jp\/wp-content\/uploads\/2024\/09\/image-1-300x182.png 300w, https:\/\/xcode15.shimayugu.jp\/wp-content\/uploads\/2024\/09\/image-1-768x467.png 768w, https:\/\/xcode15.shimayugu.jp\/wp-content\/uploads\/2024\/09\/image-1-1536x934.png 1536w, https:\/\/xcode15.shimayugu.jp\/wp-content\/uploads\/2024\/09\/image-1-2048x1245.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-swift\" data-lang=\"Swift\" data-show-lang=\"1\"><code>\/\/\n\/\/  ViewController.swift\n\/\/  Dice\n\/\/\n\/\/  Created by \u4fdd Tabei on 2024\/09\/01.\n\/\/\n\nimport UIKit\n\nclass ViewController: UIViewController {\n    @IBOutlet weak var Dice: UILabel!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \/\/ Do any additional setup after loading the view.\n    }\n\n    @IBAction func Go(_ sender: Any) {\n        let dice = Int.random(in: 1 ... 6)\n        Dice.text = dice.description\n    }\n    \n}<\/code><\/pre><\/div>\n\n\n\n<p>\u3000\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\uff11\u301c\uff16\u306e\u6570\u5024\u304c\u30e9\u30f3\u30c0\u30e0\u306b\u51fa\u529b\u3055\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u3069\u3046\u3067\u3057\u3087\u3046\u3002\u300c\u30cf\u30a4\u30a2\u30f3\u30c9\u30ed\u30fc\u30b2\u30fc\u30e0\u300d\u306e\u77e5\u8b58\u3067\u7d50\u69cb\u4f5c\u308c\u305f\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n\n\n\n<p>\u3000\u3055\u3066\u3001\u7d9a\u3044\u3066\u30c8\u30e9\u30f3\u30d7\u30b2\u30fc\u30e0\u306b\u5165\u3063\u3066\u884c\u304d\u307e\u3059\u3002\u307e\u305a\u306f\u57fa\u672c\u3067\u3001\u30c8\u30e9\u30f3\u30d7\uff15\uff12\u679a(\u3068\u308a\u3042\u3048\u305a\u30b8\u30e7\u30fc\u30ab\u30fc\u306f\u629c\u304f)\u306e\u4e2d\u304b\u3089\uff11\u679a\u3092\u8868\u793a\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002\u30af\u30e9\u30d6\u2663\ufe0f\u30c0\u30a4\u30e4\u2666\ufe0f\u30cf\u30fc\u30c8\u2764\ufe0f\u30b9\u30da\u30fc\u30c9\u2660\ufe0f\u3068\u6587\u5b57\u3067\u30de\u30fc\u30af\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002\u6570\u5b57\u306e\u90e8\u5206\u306f\u201dA23456789TJQK\u201d\u3067\u51fa\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/shimayugu.sakura.ne.jp\/?p=2298\"><\/a><a href=\"https:\/\/shimayugu.sakura.ne.jp\/?p=2473\">\u76ee\u6b21<\/a>\u3000<a href=\"https:\/\/xcode15.shimayugu.jp\/?p=545\">\u89e3\u8aac\u7de8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6b21\u3000\u89e3\u8aac\u7de8 \u3000\u96fb\u5b50\u30b5\u30a4\u30b3\u30ed\u3001\u7686\u3055\u3093\u51fa\u6765\u305f\u3067\u3057\u3087\u3046\u304b\u3002\u4e00\u3064\u306e\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002 \u3000\u30e9\u30d9\u30eb\u3068\u30dc\u30bf\u30f3\u3092\u914d\u7f6e\u3057\u3001\u30e9\u30d9\u30eb\u3092\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u547c\u3079\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u6642(TouchDown)\u30b5\u30a4\u30b3\u30ed\u3092\u632f\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-swift"],"_links":{"self":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88"}],"version-history":[{"count":8,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":999,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions\/999"}],"wp:attachment":[{"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xcode15.shimayugu.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}