سؤال

I want to dynamically assign a string url value in ViewA then press a button in ViewA and have ViewB tableview update with the text of the url from ViewA.

What is the best method to accomplish this without using storyboards?

Thanks

هل كانت مفيدة؟

المحلول

I think, by viewA/viewB you mean viewControllerA / B (VCA / VCB)

Set a public property 'let said url' in VCB

in VCA, alloc/init a new VCB, set VCB.url, present VCB.

Did you need Objective-c code, or this pseudo code will be enough to start ?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top