为什么在Objective-C中没有显示这个变量?

时间:2015-03-09 14:14:18

标签: xcode swift

我有一个在Swift中定义的类:

protocol CaptureCheckDelegate {
    func checkImageCaptured(image:UIImage)
}

class CaptureCheckController:UIViewController {
    @IBOutlet weak var imageView: UIImageView!
    @IBOutlet weak var useButton: UIButton!
    @IBOutlet weak var retakeButton: UIButton!
    @IBOutlet weak var cancelButton: UIButton!
    @IBOutlet weak var instructions: UILabel!
    @IBOutlet weak var shutterButton: UIButton!

    var existingImage: UIImage?
    var delegate:CaptureCheckDelegate?
    var captureSession: AVCaptureSession?
    var stillImageOutput: AVCaptureStillImageOutput?
    var previewLayer: AVCaptureVideoPreviewLayer?

    //MARK: - User Actions
    @IBAction func useTapped(sender: AnyObject) {
    }

    @IBAction func retakeTapped(sender: AnyObject) {
    }

    @IBAction func cancelTapped(sender: AnyObject) {
    }

    @IBAction func shutterTapped(sender: AnyObject) {
    }
}

然而,这是Objective-C的类定义:

SWIFT_CLASS("_TtC11Fundraising22CaptureCheckController")
@interface CaptureCheckController : UIViewController
@property (nonatomic, weak) IBOutlet UIImageView * imageView;
@property (nonatomic, weak) IBOutlet UIButton * useButton;
@property (nonatomic, weak) IBOutlet UIButton * retakeButton;
@property (nonatomic, weak) IBOutlet UIButton * cancelButton;
@property (nonatomic, weak) IBOutlet UILabel * instructions;
@property (nonatomic, weak) IBOutlet UIButton * shutterButton;
@property (nonatomic) UIImage * existingImage;
@property (nonatomic) AVCaptureSession * captureSession;
@property (nonatomic) AVCaptureStillImageOutput * stillImageOutput;
@property (nonatomic) AVCaptureVideoPreviewLayer * previewLayer;
- (IBAction)useTapped:(id)sender;
- (IBAction)retakeTapped:(id)sender;
- (IBAction)cancelTapped:(id)sender;
- (IBAction)shutterTapped:(id)sender;
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
- (instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (instancetype)initWithCoder:(NSCoder *)aDecoder OBJC_DESIGNATED_INITIALIZER;
@end

请注意缺少的委托属性。为什么缺少?我尝试重命名它,做一个干净,干净的构建文件夹,并删除DerivedData文件夹。这些操作都不会使该属性显示为Objective-C。

我做错了什么?如何显示此属性?

Xcode 6.1.1制作。

0 个答案:

没有答案