{"id":7525,"date":"2016-08-04T08:35:31","date_gmt":"2016-08-03T23:35:31","guid":{"rendered":"http:\/\/www.gesource.jp\/weblog\/?p=7525"},"modified":"2017-09-29T18:25:05","modified_gmt":"2017-09-29T09:25:05","slug":"delphi%e3%81%a7ios%e3%81%ae%e7%ab%af%e6%9c%ab%e3%81%ae%e6%83%85%e5%a0%b1%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.gesource.jp\/weblog\/?p=7525","title":{"rendered":"Delphi\u3067iOS\u306e\u7aef\u672b\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b"},"content":{"rendered":"<h2>\u5b9f\u884c\u4e2d\u306e\u7aef\u672b\u304ciPhone\u3068iPad\u306e\u3069\u3061\u3089\u3067\u3042\u308b\u304b\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>FMX.Helpers.iOS\u30e6\u30cb\u30c3\u30c8\u306b\u3042\u308bIsPhone\u95a2\u6570\u3068IsPad\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre><code>uses\n  FMX.Helpers.iOS;\n\nprocedure TForm1.Button1Click(Sender: TObject);\nbegin\n  if IsPhone then\n    ShowMessage('iPhone\u3067\u3059');\n  if IsPad then\n    ShowMessage('iPad\u3067\u3059');\nend;\n<\/code><\/pre>\n<p><a href=\"\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.13.25.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.13.25-300x169.png\" alt=\"Simulator Screen Shot 2016.06.18 23.13.25\" width=\"300\" height=\"169\" class=\"alignnone size-medium wp-image-7528\" srcset=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.13.25.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.13.25.png?w=568&amp;ssl=1 568w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.17.50.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.17.50-300x225.png\" alt=\"Simulator Screen Shot 2016.06.18 23.17.50\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-7526\" srcset=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.17.50.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.17.50.png?resize=768%2C576&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.17.50.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.18-23.17.50.png?resize=730%2C548&amp;ssl=1 730w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>\u30e2\u30c7\u30eb(\u6a5f\u7a2e\u540d)\u3084\u540d\u524d\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>TUIDevice\u3067\u7aef\u672b\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>uses\n  iOSapi.UIKit;\n\nprocedure TForm1.Button1Click(Sender: TObject);\nvar\n  Model, Name, LocalizedModel, SystemName, SystemVersion: string;\nbegin\n  \/\/ \u30c7\u30d0\u30a4\u30b9\u306e\u30e2\u30c7\u30eb\n  Model := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).model.UTF8String);\n  Memo1.Lines.Add('Model=' + Model);\n\n  \/\/ \u30c7\u30d0\u30a4\u30b9\u306e\u540d\u524d\n  Name := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).name.UTF8String);\n  Memo1.Lines.Add('Name=' + Name);\n\n  \/\/ \u30c7\u30d0\u30a4\u30b9\u306e\u30ed\u30fc\u30ab\u30eb\u30d0\u30fc\u30b8\u30e7\u30f3\n  LocalizedModel := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).localizedModel.UTF8String);\n  Memo1.Lines.Add('LocalizedModel=' + LocalizedModel);\n\n  \/\/ OS\u540d\n  SystemName := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).systemName.UTF8String);\n  Memo1.Lines.Add('SystemName=' + SystemName);\n\n  \/\/ OS\u540d\n  SystemVersion := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).systemVersion.UTF8String);\n  Memo1.Lines.Add('SystemVersion=' + SystemVersion);\nend;\n<\/code><\/pre>\n<p>\u53d6\u5f97\u51fa\u6765\u308b\u30e2\u30c7\u30eb\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>iPhone<\/li>\n<li>iPod touch<\/li>\n<li>iPad<\/li>\n<li>iPhone Simulator <\/li>\n<\/ul>\n<p><a href=\"\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.19-11.30.05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.19-11.30.05-300x169.png\" alt=\"Simulator Screen Shot 2016.06.19 11.30.05\" width=\"300\" height=\"169\" class=\"alignnone size-medium wp-image-7527\" srcset=\"https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.19-11.30.05.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.gesource.jp\/weblog\/wp-content\/uploads\/2016\/06\/Simulator-Screen-Shot-2016.06.19-11.30.05.png?w=568&amp;ssl=1 568w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><iframe src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=FFFFFF&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=gesource-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=487783401X\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9f\u884c\u4e2d\u306e\u7aef\u672b\u304ciPhone\u3068iPad\u306e\u3069\u3061\u3089\u3067\u3042\u308b\u304b\u3092\u53d6\u5f97\u3059\u308b FMX.Helpers.iOS\u30e6\u30cb\u30c3\u30c8\u306b\u3042\u308bIsPhone\u95a2\u6570\u3068IsPad\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 uses FMX.Helpers.iOS; procedure T &#8230;<\/p>\n<p><a href=\"https:\/\/www.gesource.jp\/weblog\/?p=7525\" class=\"more-link\">Continue reading &lsquo;Delphi\u3067iOS\u306e\u7aef\u672b\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[48],"tags":[162,164,156,118,131],"class_list":["post-7525","post","type-post","status-publish","format-standard","hentry","category-delphi","tag-delphi-10-seattle","tag-delphi-10-1-berlin","tag-delphi","tag-firemonkey","tag-ios"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/7525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7525"}],"version-history":[{"count":0,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/7525\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}