I created a view Called ProgrammaView that appears when a ro开发者_运维百科w of a table is clicked.
This view has a UILabel, a UIImageView and a UITextView.
Now. ProgrammaView's Outlets have to be changed by the parameter passed to a method of the view called iniz.
in this image there is first the ProgrammaView.h and then the method iniz.
The problem is that the label and other stuff doesn't change! I checked 3 million times that everything between the xib file and the controller is linked.
The trick to call iniz in the other viewcontrollers works well in other part of the program so i think is not that the problem. Thank you in advance!
You need to call setNeedsDisplay
to indicate that the view should be redrawn.
My understanding is that you start up and show view after that you update the values and expect the view to display new values.
You need to call setNeedsDisplay
to indicate that the view should be redrawn. Try to add it at the end of your iniz
method.
See apple doc.
精彩评论