{"id":2698,"date":"2011-12-26T14:37:29","date_gmt":"2011-12-26T05:37:29","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/archives\/2698"},"modified":"2011-12-26T14:38:07","modified_gmt":"2011-12-26T05:38:07","slug":"%e5%b0%8f%ef%bc%91%e3%81%ae%e5%ae%bf%e9%a1%8c%e3%82%92%e6%89%8b%e6%97%a9%e3%81%8f%e6%b8%88%e3%81%be%e3%81%99%e3%81%9f%e3%82%81%e3%81%ae-iphone-%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92%e4%bd%9c%e3%81%a3","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/2698","title":{"rendered":"\u5c0f\uff11\u306e\u5bbf\u984c\u3092\u624b\u65e9\u304f\u6e08\u307e\u3059\u305f\u3081\u306e iPhone \u30a2\u30d7\u30ea\u3092\u4f5c\u3063\u3066\u307f\u305f\u304c"},"content":{"rendered":"<p>\n\u5c0f\u5b66\u4e00\u5e74\u751f\u306e\u51ac\u4f11\u307f\u306e\u5bbf\u984c\u3067\u3001\u7b97\u6570\u306e\u7e70\u308a\u4e0a\u304c\u308a\uff0f\u7e70\u308a\u4e0b\u304c\u308a\u306e\u30ab\u30fc\u30c9\u304c\u3042\u308b\u3002<br \/>\n\u3053\u308c\u3092\u6bce\u65e5\u3084\u308b\u306e\u304c\u5bbf\u984c\u306a\u306e\u3060\u3051\u3069\u3001\n<\/p>\n<ol>\n<li>\u89aa\u304c\u30ab\u30fc\u30c9\u304c\u6372\u3063\u3066<\/li>\n<li>\u5b50\u4f9b\u304c\u7b54\u3048\u308b<\/li>\n<li>\u9593\u9055\u3048\u3066\u3044\u305f\u3089\u3001\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u3084\u308a\u76f4\u3057\u3002<\/li>\n<\/ol>\n<p>\n\u3068\u3044\u3046\u624b\u9806\u306b\u306a\u3063\u3066\u3044\u308b\u3002\n<\/p>\n<p>\n2\u306e\u300c\u89aa\u304c\u6372\u308b\u300d\u306e\u304c\u9762\u5012\u306a\u306e\u3067\u3001\u6570\u3092\u8db3\u3059\u7df4\u7fd2\u3050\u3089\u3044\u306a\u3089\u3070\u300c\u81ea\u5206\u3067\u3067\u304d\u308b\u300d\u307b\u3046\u304c\u826f\u304b\u308d\u3046\u3001\u3068\u601d\u3063\u3066 iPhone \u30a2\u30d7\u30ea\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002\n<\/p>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/12\/wpid-dworkblogimage20111226_02org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2011\/12\/wpid-dworkblogimage20111226_02thum.jpg'\/><\/a><\/p>\n<p>\n\u4f8b\u306b\u3088\u3063\u3066\u3001\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u306e\u753b\u9762\u306f\u3072\u3069\u304f\u30c1\u30fc\u30d7\u3067\u3059\u3002<br \/>\n\u305d\u3057\u3066\u3001\u30ed\u30b8\u30c3\u30af\u306f\u3001\u3070\u304b\u3070\u304b\u3057\u3044\u307b\u3069\u7c21\u5358\u306b\u3002\n<\/p>\n<pre class=\"brush: objc; title: ; notranslate\" title=\"\">\n#import &quot;KidCalcViewController.h&quot;\n\n@implementation KidCalcViewController\n\n- (void)didReceiveMemoryWarning\n{\n    &#x5B;super didReceiveMemoryWarning];\n    \/\/ Release any cached data, images, etc that aren't in use.\n}\n\n#pragma mark - View lifecycle\n\nint num1, num2, ans;\nvoid nextQuest()\n{\n    \n    num1 = rand() % 9 + 1;\n    num2 = rand() % num1 + (10-num1);\n    ans  = num1 + num2;\n}\n\n\n- (void)viewDidLoad\n{\n    &#x5B;super viewDidLoad];\n\t\/\/ Do any additional setup after loading the view, typically from a nib.\n    srand(time(NULL));\n    nextQuest();\n    labelCalc.text = &#x5B;NSString stringWithFormat:@&quot;%d + %d = &quot;, num1, num2 ];\n    labelAns.text = &#x5B;NSString stringWithFormat:@&quot;%d&quot;, ans ];\n    labelAns.hidden = YES;\n}\n\n- (void)viewDidUnload\n{\n    &#x5B;super viewDidUnload];\n    \/\/ Release any retained subviews of the main view.\n    \/\/ e.g. self.myOutlet = nil;\n}\n\n- (void)viewWillAppear:(BOOL)animated\n{\n    &#x5B;super viewWillAppear:animated];\n}\n\n- (void)viewDidAppear:(BOOL)animated\n{\n    &#x5B;super viewDidAppear:animated];\n}\n\n- (void)viewWillDisappear:(BOOL)animated\n{\n\t&#x5B;super viewWillDisappear:animated];\n}\n\n- (void)viewDidDisappear:(BOOL)animated\n{\n\t&#x5B;super viewDidDisappear:animated];\n}\n\n- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation\n{\n    \/\/ Return YES for supported orientations\n    if (&#x5B;&#x5B;UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {\n        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);\n    } else {\n        return YES;\n    }\n}\n\n-(IBAction)buttonCalcClick:(id)sender\n{\n    labelAns.hidden = NO;\n}\n-(IBAction)buttonNextClick:(id)sender\n{\n    nextQuest();\n    labelCalc.text = &#x5B;NSString stringWithFormat:@&quot;%d + %d = &quot;, num1, num2 ];\n    labelAns.text = &#x5B;NSString stringWithFormat:@&quot;%d&quot;, ans ];\n    labelAns.hidden = YES;\n}\n@end\n<\/pre>\n<p>\n\u5a18\u306b\u898b\u305b\u3066\u3001\u307e\u3041\u8a55\u5224\u304c\u826f\u304b\u3063\u305f\u3089\u3001\u753b\u50cf\u306a\u308a\u8272\u306a\u308a\u3092\u4ed8\u3051\u3066\u30ea\u30ea\u30fc\u30b9\u3059\u308c\u3070\u3001\u3053\u306e\u51ac\u300c\u76f8\u624b\u3092\u3057\u306a\u304f\u3066\u3088\u3044\u304b\u300d\u3068\u753b\u7b56\u3057\u305f\u306e\u3060\u304c\u3001\u5a18\u66f0\u304f\n<\/p>\n<p>\n\u300c\u81ea\u5206\u3067\u3084\u3063\u3066\u3001\u81ea\u5206\u3067\u7b54\u3048\u3092\u307f\u308b\u3068\u3001\u300e\u3042\u3042\u3001\u305d\u3046\u304b\u300f\u3060\u3051\u3067\u8a70\u307e\u3089\u306a\u3044\u300d<br \/>\n\u300c\u89aa\u3068\u3084\u308a\u3068\u308a\u3057\u3066\u3044\u308b\u306e\u304c\u697d\u3057\u3044\u300d\n<\/p>\n<p>\n\u306e\u3060\u305d\u3046\u3060\u3002\n<\/p>\n<p>\n\u307e\u3041\u3001\u305d\u308a\u3083\u305d\u3046\u3060\u308d\u3046\u306a\u3002\u81ea\u5206\u3067\u3084\u3063\u3066\u307f\u3066\u3082\u300c\u3072\u3069\u304f\u9762\u767d\u304f\u306a\u304b\u3063\u305f\u300d\u306e\u3067\u3002IT \u304c\u57cb\u3081\u3089\u308c\u306a\u3044\u3082\u306e\uff08\u304b\u306a\uff1f\uff09\u304c\u5176\u51e6\u306b\u3042\u308b\u3001\u3068\u3044\u3046\u8a71\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0f\u5b66\u4e00\u5e74\u751f\u306e\u51ac\u4f11\u307f\u306e\u5bbf\u984c\u3067\u3001\u7b97\u6570\u306e\u7e70\u308a\u4e0a\u304c\u308a\uff0f\u7e70\u308a\u4e0b\u304c\u308a\u306e\u30ab\u30fc\u30c9\u304c\u3042\u308b\u3002 \u3053\u308c\u3092\u6bce\u65e5\u3084\u308b\u306e\u304c\u5bbf\u984c\u306a\u306e\u3060\u3051\u3069\u3001 \u89aa\u304c\u30ab\u30fc\u30c9\u304c\u6372\u3063\u3066 \u5b50\u4f9b\u304c\u7b54\u3048\u308b \u9593\u9055\u3048\u3066\u3044\u305f\u3089\u3001\u5f8c\u3067\u3082\u3046\u4e00\u5ea6\u3084\u308a\u76f4\u3057\u3002 \u3068\u3044\u3046\u624b\u9806\u306b\u306a\u3063\u3066\u3044\u308b\u3002 2\u306e\u300c\u89aa\u304c &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/2698\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,28],"tags":[],"class_list":["post-2698","post","type-post","status-publish","format-standard","hentry","category-etc","category-objc"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=2698"}],"version-history":[{"count":1,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2698\/revisions"}],"predecessor-version":[{"id":2699,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/2698\/revisions\/2699"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=2698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=2698"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=2698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}