{"id":4433,"date":"2014-03-30T10:57:32","date_gmt":"2014-03-30T10:57:32","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-use-an-iboutletcollection-of-switches-collection-of-common-programming-errors\/"},"modified":"2014-03-30T10:57:32","modified_gmt":"2014-03-30T10:57:32","slug":"how-to-use-an-iboutletcollection-of-switches-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-to-use-an-iboutletcollection-of-switches-collection-of-common-programming-errors\/","title":{"rendered":"How to use an IBOutletCollection of switches?-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m using an IBOutletCollection of switches to set them disabled. After create the IBOutletCollection, I made a for cycle to set them disabled:<\/p>\n<pre><code>for (arraySwitchCounter = 0; arraySwitchCounter &lt; _switchCollection.count; arraySwitchCounter ++) {\n    UISwitch * disabledSwitch = [ _switchCollection objectAtIndex: arraySwitchCounter ];\n    [disabledSwitch setEnabled: NO]; }\n<\/code><\/pre>\n<p>but it crash on startup, I think trouble is on second row but I don&#8217;t know what&#8230;how can I solve? Thank you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m using an IBOutletCollection of switches to set them disabled. After create the IBOutletCollection, I made a for cycle to set them disabled: for (arraySwitchCounter = 0; arraySwitchCounter &lt; _switchCollection.count; arraySwitchCounter ++) { UISwitch * disabledSwitch = [ _switchCollection objectAtIndex: arraySwitchCounter ]; [disabledSwitch setEnabled: NO]; } but it crash on startup, I think trouble is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4433","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4433"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4433\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}