{"id":1234,"date":"2012-01-30T13:37:14","date_gmt":"2012-01-30T20:37:14","guid":{"rendered":"http:\/\/xiehang.com\/blog\/?p=1234"},"modified":"2012-01-30T13:52:04","modified_gmt":"2012-01-30T20:52:04","slug":"ios-development-tips-2","status":"publish","type":"post","link":"https:\/\/xiehang.com\/blog\/2012\/01\/30\/ios-development-tips-2\/","title":{"rendered":"ios development tips #2"},"content":{"rendered":"

Here comes the second part of ios development tips which follows first part<\/a>, I’m starting over the number now so to ease my life.<\/p>\n

1. How to navigate to a view in another view
\n – original post is here:
\n *
dealing with views in a storyboard based application<\/a>
\n * some other helpful discussions are here:
manually switch view controllers in storyboard<\/a>, and another similar topic<\/a>
\n – idea
\n * actually the basic idea is pretty simple and straightforward – you create a new view (the one you want to display), and push it to the top of the navigationcontroller (which actually is a stack), that’s it …
\n * tricky part #1: this cannot be done in a viewDidLoad event as view was not fully loaded at that time so you can nothing, the place I found that is workable is viewDidAppear event
\n * tricky part #2: ViewController’s initWithNibName does not work … I haven’t figure out the exact reason yet but you have to use instantiateViewControllerWithIdentifier comes from storyboard
\n * tricky part #3: nibname … gave me QUITE A LOT headache, it should be “UIViewController-“, you can get the object ID from Interface Builder, in the identity inspector tab<\/p>\n","protected":false},"excerpt":{"rendered":"

Here comes the second part of ios development tips which follows first part, I’m starting over the number now so to ease my life. 1. How to navigate to a view in another view – original post is here: * dealing with views in a storyboard based application * some other helpful discussions are here: […]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[47,252,280],"_links":{"self":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1234"}],"collection":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/comments?post=1234"}],"version-history":[{"count":2,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1234\/revisions"}],"predecessor-version":[{"id":1236,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1234\/revisions\/1236"}],"wp:attachment":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/media?parent=1234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/categories?post=1234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/tags?post=1234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}