Note that there are some explanatory texts on larger screens.

plurals
  1. POArray not showing in Table View
    primarykey
    data
    text
    <p>Can anyone tell me why my code isn't showing any results in my table view. Here is my code. I already tried to change the @"@" into indexPath.row without any luck. I 'm looking for any answer into the right direction. I'm fairly new to xcode and objective-c. I would really appreciate any help. </p> <pre><code>-(void)waitAndFillPlaylistPool { // arrPlaylist -&gt; mutablearray which stores the value of loaded playlist in order to use it later [SPAsyncLoading waitUntilLoaded:[SPSession sharedSession] timeout:kSPAsyncLoadingDefaultTimeout then:^(NSArray *loadedession, NSArray *notLoadedSession) { // The session is logged in and loaded — now wait for the userPlaylists to load. NSLog(@"[%@ %@]: %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), @"Session loaded."); [SPAsyncLoading waitUntilLoaded:[SPSession sharedSession].userPlaylists timeout:kSPAsyncLoadingDefaultTimeout then:^(NSArray *loadedContainers, NSArray *notLoadedContainers) { // User playlists are loaded — wait for playlists to load their metadata. NSLog(@"[%@ %@]: %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), @"Container loaded."); NSMutableArray *playlists = [NSMutableArray array]; [playlists addObject:[SPSession sharedSession].starredPlaylist]; [playlists addObject:[SPSession sharedSession].inboxPlaylist]; [playlists addObjectsFromArray:[SPSession sharedSession].userPlaylists.flattenedPlaylists]; [SPAsyncLoading waitUntilLoaded:playlists timeout:kSPAsyncLoadingDefaultTimeout then:^(NSArray *loadedPlaylists, NSArray *notLoadedPlaylists) { // All of our playlists have loaded their metadata — wait for all tracks to load their metadata. NSLog(@"[%@ %@]: %@ of %@ playlists loaded.", NSStringFromClass([self class]), NSStringFromSelector(_cmd), [NSNumber numberWithInteger:loadedPlaylists.count], [NSNumber numberWithInteger:loadedPlaylists.count + notLoadedPlaylists.count]); NSLog(@"loadedPlaylists &gt;&gt; %@",loadedPlaylists); arrPlaylist = [[NSMutableArray alloc] initWithArray:loadedPlaylists]; NSLog(@"arrPlaylist &gt;&gt; %@",arrPlaylist); }]; }]; }]; } - (NSInteger) tableView:(UITableView *) tableView numberOfRowsInSection:(NSInteger)section { return [arrPlaylist count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } cell.textLabel.text = [arrPlaylist objectAtIndex:indexPath.row]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } </code></pre>
    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.
 

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