Note that there are some explanatory texts on larger screens.

plurals
  1. PODelegate doesn't work
    text
    copied!<p>Hi in this code the protocol <code>RefreshLibraryDropBoxDelegate</code> doesn't work, doesn't call the method refreshLibrary in the <code>WVdALibraryDocumentViewController</code>. Why?</p> <p><code>WVdADropboxViewController.h</code>:</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import &lt;DropboxSDK/DropboxSDK.h&gt; @protocol RefreshLibraryDropBoxDelegate &lt;NSObject&gt; @optional -(void)refreshLibrary; @end @interface WVdADropboxViewController : UIViewController &lt;DBRestClientDelegate, UITableViewDataSource, UITableViewDelegate&gt; { id &lt;RefreshLibraryDropBoxDelegate&gt; delegate; } //delegate @property (assign) id &lt;RefreshLibraryDropBoxDelegate&gt; delegate; </code></pre> <p>WVdADropboxViewController.m:</p> <pre><code>- (void)restClient:(DBRestClient *)client loadedFile:(NSString *)destPath { NSLog(@"upload complete"); [self.delegate refreshLibrary]; [[self navigationController] popViewControllerAnimated:YES]; } </code></pre> <p>WVdALibraryDocumentViewController.h:</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import "WVdACustomCell.h" #import "WVdAViewController.h" #import &lt;QuartzCore/QuartzCore.h&gt; #import "WVdADropboxViewController.h" @interface WVdALibraryDocumentViewController : UIViewController &lt;UICollectionViewDataSource, UICollectionViewDelegate, RefreshLibraryDropBoxDelegate&gt; -(void)refreshLibrary; </code></pre> <p>WVdALibraryDocumentViewController.m:</p> <pre><code>// REFRESH LIBRARY // -(void)refreshLibrary { NSLog(@"refresh"); [self getDataArrayDocumentFiles]; } </code></pre>
 

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