SORU
25 Mart 2012, Pazar


;' uyumsuz tip 'ViewController gt 'ıd<Temsilci atama&*const_strong'

Benim app boyunca, ViewController.delegate = self Hiç anlam sorunu uyarılar alıyorum. Aranan ve benzer mesajlar buldum ama hiçbiri sorunumu çözmek için başardık.

ViewController.m:

GameAddViewController *gameAddViewContoller = [[navigationController viewControllers] objectAtIndex:0];
gameAddViewContoller.delegate=self;

.delegate=self ayarlama yaparken hata mesajı alıyorum.

GameAddViewController.h:

@protocol GameAddViewControllerDelegate <NSObject>

- (void)gameAddViewControllerDidCancel:(GameAddViewController *)controller;
- (void)gameAddViewController:(GameAddViewController *)controller didAddGame:(Game *) game;

@end

@interface GameAddViewController : UITableViewController <GameAddViewControllerDelegate>
{
sqlite3         *pitchcountDB;
NSString        *dbPath;
}
@property (nonatomic, strong) id <GameAddViewControllerDelegate> delegate;
...
@end

ViewController.h:

#import "GameAddViewController.h"

@class ViewController;
@protocol ViewControllerDelegate <NSObject>
- (void)ViewControllerDidCancel:(ViewController *)controller;

@end
@interface ViewController : UIViewController <ViewControllerDelegate>
-(void) checkAndCreateFile;
@end

Herkes doğru yönde bana gelin uyarı mesajları çözmek için?

CEVAP
25 Mart 2012, Pazar


Bu satır :

gameAddViewContoller.delegate=self; 

Öz GameAddViewController protokol uymayan ViewController türü olduğuna dikkat edin.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • ICON

    ICON

    19 EKİM 2011
  • KliptOut KwazeeKilla

    KliptOut Kwa

    24 ŞUBAT 2010
  • snookie77

    snookie77

    2 Mart 2006