delegates - IOS Xcode 6 protocol warning makes no sense -


Text after "

In PSPoemsViewController.h I have declared a protocol as:

  @protocol PSPoemsViewControllerDelegate & LT; NSObject & gt; - (Zero) Save POM: (Poem *) Text with POM: (PSTSTStorage *) Text; @end  

and .m file in my declaration:

  - (zero) savePoem: (poem *) thePoem withText: (PSTextStorage * ) This lesson; {...}  

I have PSVersionViewController.h in:

  @interface PSVersionViewController: UIPageViewController & LT; PSPoemsViewControllerDelegate, UIPageViewControllerDataSource & gt;  

When I compile this compiler warns:

/ users / Keith / document / my projects / poem shade / poem shade / PSVersionViewController.m: 28: 17: Method 'savePoem: withText:' Protocol does not apply 'PSPoemsViewControllerDelegate'

The code executes the code and finds the method that disappears. But there is a strange problem - it sometimes breaks down on the method even if no breaks are set, and then it crashes. It suggests some sort of corruption I have tried to make a clean, remove the method and put it back, but nothing changes the warning. I'm using Xcode 6.1 (also failed on beta copies)

@protocol PSPoemsViewControllerDelegate & lt; NSObject & gt; - (Zero) Save POM: (Poem *) Text with POM: (PSTSTStorage *) Text; @end @interfaces PSPOemsViewController: UIViewController @property (weak) ID & lt; PSPoemsViewControllerDelegate & gt; Representative; @end

Then PSPoemsViewController.m when you want to call the call in this process:

  // Check that the rep is set and It is that if the law has implemented ([self.delegate respondsToSelector: @selector (savePoem: withText :)) [self.delegate savePoem: YOUR_POEM withText: @ "];  

Then, in the class that corresponds to this, you must add the representative in your PSVersionViewController so you set the representative too

  PSPoemsViewController * anInstanceofPoemsViewController = ..... [AnIntanceOfPoemsViewController set Delegate: ... self];  

Then add method:

  - (zero) savePoem: (poem *) thePoem withText: (PSTextStorage *) TheText; {.. ..}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -