2017-12-09 20 views
1

UIButtonカスタムを作成しようとしています。ここに私の.hクラスは次のとおりです。

@interface RadioUIButton : UIButton 

@property (strong) NSString* stringTag; 

@end 

私はFeedbackViewController.mからクラスにアクセスしようとすると、私はこのエラーを取得:

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_RadioUIButton", referenced from: objc-class-ref in FeedbackViewController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

私がこれまで試したん持っているもの:

Enable Bitcode: set to NO

Build Active Architecture only: set to NO

なし上記の作業のそれ以外に何ができますか?

@property (nonatomic, copy) NSString* stringTag;

または

@property (nonatomic, strong) NSString* stringTag; 
+0

このクラスの.mファイルはどのように見えますか?あなたの目標のメンバーですか? – uliwitness

+0

何もしません。はい、メンバーです。 – student

+0

ビルド設定で「Valid Architectures」の項目をチェックしてください。そこでは、arm64を有効にする必要があります。 –

答えて

1

そのクラスに対して[Target Membership]が選択されているかどうかを確認します。あなたのプロジェクトではRadioUIButton.mファイルを選択してチェックしてください。

enter image description here

0

変更

@property (strong) NSString* stringTag; 

このフェーズは、それをコンパイルするためにRadioUIButton.mが含まれている必要がありますコンパイルバンドルのリソースを確認してください。 enter image description here

関連する問題