IB为什么看不到我的IBAction?

编程入门 行业动态 更新时间:2024-10-26 08:28:33
本文介绍了IB为什么看不到我的IBAction?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我盯着这个眼睛已经太久了.

I've been staring at this for way too long.

这里没有任何花哨的事情发生,我已经做了数十次,但是Interface Builder坚决拒绝为我提供-(IBAction)slideDirections的操作目标.我正处于愿意公开发布并感到愚蠢的地步.所以,让我们撕裂.

There's nothing fancy happening here, and I've done this dozens of times, yet Interface Builder steadfastly refuses to provide me an action target for -(IBAction)slideDirections. I'm at the point where I'm willing to post publicly and feel stupid. So let 'er rip.

这是我的.h:

#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

推荐答案

有时Interface Builder似乎与Xcode中的类不同步.您是否尝试过强迫接口构建器重新读取PulseDetailController头文件? (File -> Read Class Files... -> Select 'PulseDetailController.h').这将强制Interface Builder查看您的新操作.

Sometimes Interface Builder seems to get out of sync with classes in Xcode. Have you tried forcing interface builder to reread your PulseDetailController header file? (File -> Read Class Files... -> Select 'PulseDetailController.h'). This should force Interface Builder to see your new action.

更多推荐

IB为什么看不到我的IBAction?

本文发布于:2023-10-16 05:19:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1496616.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:IB   IBAction

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!