代码之家  ›  专栏  ›  技术社区  ›  Dan Ray

为什么我看不到我的行动?

  •  3
  • Dan Ray  · 技术社区  · 14 年前

    -(IBAction)slideDirections . 我现在愿意公开发帖,觉得自己很愚蠢。所以让我们扯开。

    #import <UIKit/UIKit.h>
    #import <MapKit/MapKit.h>
    
    @interface PulseDetailController : UIViewController {
        NSDictionary *pulse;
        IBOutlet MKMapView *map;
        IBOutlet UIWebView *directions;
        IBOutlet UIView *directionsSlider;
        BOOL directionsExtended;
        IBOutlet UILabel *vendor;
        IBOutlet UILabel *offer;
        IBOutlet UILabel *offerText;
        IBOutlet UILabel *hours;
        IBOutlet UILabel *minutes;
        IBOutlet UILabel *seconds;
        IBOutlet UILabel *distance
    }
    @property (nonatomic, retain) NSDictionary *pulse;
    @property (nonatomic, retain) MKMapView *map;
    @property (nonatomic, retain) UIWebView *directions;
    @property (nonatomic, retain) UIView *directionsSlider;
    @property (nonatomic) BOOL directionsExtended;
    @property (nonatomic, retain) UILabel *vendor;
    @property (nonatomic, retain) UILabel *offer;
    @property (nonatomic, retain) UILabel *offerText;
    @property (nonatomic, retain) UILabel *hours;
    @property (nonatomic, retain) UILabel *minutes;
    @property (nonatomic, retain) UILabel *seconds;
    @property (nonatomic, retain) UILabel *distance;
    
    -(IBAction)slideDirections;
    
    @end
    
    3 回复  |  直到 14 年前
        1
  •  3
  •   gotosleep    14 年前

    有时接口生成器似乎与Xcode中的类不同步。您是否尝试过强制interface builder重新读取PulseDetailController头文件( File -> Read Class Files... -> Select 'PulseDetailController.h' ). 这将迫使界面生成器看到您的新操作。

        2
  •  6
  •   pgb    14 年前

    IBAction 有发送方参数吗? 比如:

    -(IBAction)slideDirections:(id)sender;
    
        3
  •  0
  •   falconcreek    14 年前

    您正在尝试连接哪些对象? 从标题中,逻辑选择是 UIView *directionsSlider directionsSlider 对于“File's Owner”对象,请确保“File's Owner”中的类设置为 PulseDetailController .