How should I pass a string to the view controller that gets pushed when a tableviewcell is selected.
Should I create a custom init method in the view controller? eg [[myvc alloc]initWithURL:...]
Set a property? eg [myvc setURL:...] or myvc.url = ...
or just create a custom method? [myvc setLoadingURL:...]
How should I pass a string to the view controller that gets pushed when
Share
We’ve actually done this both ways (with an init and a property). I found the property the best method because the custom init method may not be called if the ViewController is created by InterfaceBuilder. With the property, you are always forced to set it if you desire to use it.
Just $0.02,
-dan