iphone - Initializing Detail View from nib with parameters passed from Root View -


When callout is clicked, I have got a map view with several annotations on it, I need DetailViewController to pass several parameters Please, try to do this through the creator. I've debunked a bit and have found that the logic is passing correctly and getting received in the required form within the constructor, but for some reason whenever I try to change the values ​​of IBotlets, an effect .

  DetailViewController * dvc = [[To get the URL, DetailViewController alloc] initWithNibName: @ "DetailViewController" bundle: zero header: headerText]; [Self. Navigation Controller Push ViewController: Animated Dcc: Yes];  

Now my creator's message:

  - (id) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil header: (UILabel * ) HeaderLabel {if ((self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil])) {self.headerTextView = headerLabel; NSLog (@ "Header:% @", HeaderLabel.Text); } Healthy return; }  

Once again, the problem is that headerLabel.text is properly printed in the console, but the line self.headerTextView = headerLabel; is not doing what I want to do.

Thank you! Edit:

View controller header in detail:

  #import & lt; UIKit / UIKit.h & gt; # Import "Truck H" @Instief Widget Controller: UIViewController {IBOutlet UITextView * informationTextView; IBotlet UIImageView * imageView; IBOutlet UIWebView * twitterFeedView; IBotlet UILb * Headertextwews; NSString * imageURL; } @property (non-constructive, retaining) NSString * imageURL; @property (nanatomic, retten) UILBL * headertextview; @protecti (nonatomic, persistent) UITXviewview * notifytextview; @property (nontomic, retten) UIImageView * imageView; @protecti (nanatomic, write) UIWebView * twitterFeedView; - (DetailViewController *) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil header: (UILabel *) headerLabel; @end  

Related Extender Visualizer Implementation:

  @ View the synthesis image, Notificationtv, Twitter FeedView, HeaderTadView, Image URL; // Override the named initializer If you want to optimize the controller program that is created and is not suitable for visibility DIDLoad - (id) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil header: (UILabel *) header label {if ((self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]) {self.headerTextView = headerLabel; NSLog (@ "R% @", Header Labels. Text); } Healthy return; }  

To get rid of that warning, you have to make sure that the method To define your header file in the next bit, I'm not sure what you want to achieve with yourself. HeaderTextView = headerLabel; How have you defined the heteractextview of the property? Can you give us the property code? Did you modify it? In fact, if we can see the entire header file it can help.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -