I have some code that instantiates a number of things. This code needs to be added to a view. I therefore need to be able to call a function with a view parameter and then set my code to that view in the method body.
What are my options for doing this? I’ve read that you can use delegates? But not really sure how.
If you want to add a
UIViewas a subview to another view you do:[view addSubview:subview]. If you want to create a method to take a view you can write it like: