Note that there are some explanatory texts on larger screens.

plurals
  1. POAccess Delegate Data
    primarykey
    data
    text
    <p>Hello i'm trying to make a simple ios app with tabs and navigation .</p> <p>in the delegate i have the following type:</p> <pre><code>BlogRss * _currentlySelectedBlogItem; </code></pre> <p>with this property:</p> <pre><code>@property (readwrite,retain) BlogRss * currentlySelectedBlogItem; </code></pre> <p>and i'm trying to get his data with two other classes, one is a table view with the data and the other will show the data; in both classes i have declared the following:</p> <pre><code>@class NewsAppDelegate; NewsAppDelegate * _appDelegate; @property (nonatomic, retain) IBOutlet _NewsAppDelegate * appDelegate; @synthesize appDelegate = _appDelegate; </code></pre> <p>ofter "touching" the cell in the table view i wrote this:</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [[self appDelegate] setCurrentlySelectedBlogItem:[[[self rssParser]rssItems]objectAtIndex:indexPath.row]]; // Navigation logic may go here. Create and push another view controller. // [[self appDelegate] loadNewsDetails]; NewsDetailViewController *detailViewController = [[NewsDetailViewController alloc] initWithNibName:@"NewsDetailViewController" bundle:nil]; // ... // Pass the selected object to the new view controller. [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; </code></pre> <p>}</p> <p>when i'm writing in the other class:</p> <pre><code>NSLog(@"%@",self.appDelegate.currentlySelectedBlogItem); </code></pre> <p>i'm getting null.</p> <p>clearly i'm doing something wrong, but i don't know what...</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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