{"id":4984,"date":"2014-03-30T17:28:24","date_gmt":"2014-03-30T17:28:24","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/cant-navigate-to-nib-iphone-sdk-collection-of-common-programming-errors\/"},"modified":"2014-03-30T17:28:24","modified_gmt":"2014-03-30T17:28:24","slug":"cant-navigate-to-nib-iphone-sdk-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/cant-navigate-to-nib-iphone-sdk-collection-of-common-programming-errors\/","title":{"rendered":"Cant&#39; navigate to nib iphone sdk-Collection of common programming errors"},"content":{"rendered":"<p>This is my code to navigate to another nib,<\/p>\n<pre><code>  MaintenanceViewController *maintenance = [[MaintenanceViewController alloc] initWithNibName:@\"MaintenanceViewController\" bundle:nil];\n\n    CGRect theFrame = maintenance.view.frame;\n\n    theFrame.origin = CGPointMake(self.view.frame.size.width, 0);\n\n    maintenance.view.frame = theFrame;\n\n    theFrame.origin = CGPointMake(0,0);\n\n    [UIView beginAnimations:nil context:nil];\n\n    [UIView setAnimationDuration:0.6f];\n\n    maintenance.view.frame = theFrame;\n\n    [UIView commitAnimations];\n\n    [self.view addSubview:maintenance.view];\n<\/code><\/pre>\n<p>note that I am not using navigation controller and also I dont want to as my app is not based on navigation.<\/p>\n<p>When This method is called on second line i.e. getting frame(theframe) the app got crashed with error <code>Exec_bad_access code=2 address = 0xbf7ffffc<\/code>.<\/p>\n<p>So nib couldn&#8217;t loaded.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is my code to navigate to another nib, MaintenanceViewController *maintenance = [[MaintenanceViewController alloc] initWithNibName:@&#8221;MaintenanceViewController&#8221; bundle:nil]; CGRect theFrame = maintenance.view.frame; theFrame.origin = CGPointMake(self.view.frame.size.width, 0); maintenance.view.frame = theFrame; theFrame.origin = CGPointMake(0,0); [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.6f]; maintenance.view.frame = theFrame; [UIView commitAnimations]; [self.view addSubview:maintenance.view]; note that I am not using navigation controller and also I dont want [&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-4984","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4984","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=4984"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4984\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}