Note that there are some explanatory texts on larger screens.

plurals
  1. POadding an uiviewcontroller who's uilabel is not changing
    primarykey
    data
    text
    <p>I'm adding a UIViewController which has only an UILabel to the main UIView. I create it like this:</p> <pre><code>WEPopoverLabel *contentViewController = [[WEPopoverLabel alloc] init]; [contentViewController setContents:@"aaa"]; </code></pre> <p>(The hole code .m):</p> <pre><code>if (!self.popoverController) { WEPopoverLabel *contentViewController = [[WEPopoverLabel alloc] init]; [contentViewController setContents:@"aaa"]; contentViewController.lContent.text=@"aaarrr"; self.popoverController = [[[popoverClass alloc] initWithContentViewController:contentViewController] autorelease]; self.popoverController.delegate = self; self.popoverController.popoverContentSize = CGSizeMake(50.0f, 20.0f); self.popoverController.passthroughViews = [NSArray arrayWithObject:sender]; CGRect rectForPopover = [self.view convertRect:sender.bounds fromView:sender]; [self.popoverController presentPopoverFromRect:rectForPopover inView:self.view permittedArrowDirections:(UIPopoverArrowDirectionUp|UIPopoverArrowDirectionDown) animated:YES]; [contentViewController release]; } </code></pre> <p>Well, WEPopoverLabel is being created because it shows up in my window and also executes setContents because I've got a NSLog which is printing in my console.</p> <p>However, the label is not being changed. This is the content of WEPopoverLabel:</p> <pre><code>@interface WEPopoverLabel : UIViewController{ IBOutlet UILabel * lContent; } -(void)setContents:(NSString *) theContent; </code></pre> <p>and .m</p> <pre><code>@implementation WEPopoverLabel -(void)setContents:(NSString *) theContent{ lContent.text = theContent; NSLog(@"texto fijado"); } </code></pre> <p>In the .xib, I've connected the lContent to File's owner.</p> <p>Why is not being updated the text of UILabel?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload