我正在尝试将 a 添加到被调用UIButton
的实例中。我在子类中为 the 创建了一个插座,并在 Interface Builder 中添加了操作,但我似乎无法让事情正常工作。UICollectionViewCell
MyCollectionViewCell
UIButton
@protocol loadbackgroundDelegate <NSObject>
-(void)loadthebackground:(id)sender;
@end
@interface MyCollectionViewCell : UICollectionViewCell
@property (weak, nonatomic) IBOutlet UIButton *BuyButton;
@property (weak, nonatomic) IBOutlet UIButton *LoadButton;
@property (strong, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) id<loadbackgroundDelegate> delegate;
- (IBAction)Loadbackground:(id)sender;
- (IBAction)Buybackground:(id)sender;
@end
以前有没有人实现UIButton
过UICollectionViewcell
,有没有示例代码?
谢谢