Note that there are some explanatory texts on larger screens.

plurals
  1. POMethod is not getting called twice in IOS
    primarykey
    data
    text
    <p>I am working on Instagram integration in IOS.Every thing goes well.I am geting the feeds of the user and displaying them on tableview and also in scroll view.Here the user is allowed to refresh the page.While refreshing the method is not getting called and its getting crashed because of zero objects in array.I had used the following code to call the method.</p> <pre><code>-(IBAction)loginAction:(id)sender { AppDelegate* appDelegate_new = (AppDelegate*)[UIApplication sharedApplication].delegate; [appDelegate_new.instagram authorize:[NSArray arrayWithObjects:@"comments", @"likes", nil]]; if ([appDelegate.instagram isSessionValid]) { // NSLog(@"ViewDidLoad Session Valid"); loginView.hidden=YES; crossButton.hidden=YES; settingsButton.hidden=NO; noticeView.hidden=YES; [self.view addSubview:feedsView]; // [self.logOutView removeFromSuperview]; self.feedsView.frame=CGRectMake(0, 0, 240, 300); NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"users/self/feed", @"method", nil]; [appDelegate.instagram requestWithParams:params delegate:self]; } } </code></pre> <p>The called method was like this</p> <pre><code> - (void)request:(IGRequest *)request didLoad:(id)result { [self performSelector:@selector(startspinner) withObject:nil afterDelay:0.1]; self.data = (NSMutableArray *)[result objectForKey:@"data"]; // NSLog(@"Data Count is %@",[self.data description]); createdArray=[[NSMutableArray alloc]init]; //*****Here I am performing Json Parsing******// } </code></pre> <p>I am calling the above request method again while refreshing</p> <pre><code> - (void)dropViewDidBeginRefreshing:(ODRefreshControl *)refreshControl { [createdArray removeAllObjects]; NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"users/self/feed", @"method", nil]; [appDelegate.instagram requestWithParams:params delegate:self]; [self performSelector:@selector(refreshData) withObject:nil afterDelay:5.0]; } </code></pre> <p>Please tell me where I am going wrong.Correction appreciated.Thanks in advance. </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.
 

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