このコードスニペットは正常に見えるが(私は私のヘッダファイルに#IMPORTんでした)。あなたは "forwardActionButton"スタイルをどこで宣言していますか?私が知っている限り、それは既存のTTStyleの3 20ではありません。任意のカスタムスタイルは、スタイルシートクラスである必要があり、そのように、アプリデリゲートにロードする必要があります:「toolbarForwardButton:」
[TTStyleSheet setGlobalStyleSheet:[[[StyleSheet alloc] init] autorelease]];
あなたはまたのような、既存のTTStyleでそれを試すことができますし、それが作品をだかどうかを確認します。
ここTTButtonを使用して、ボタンのターゲットとして機能セレクターの設定に関する作業例を示します。
TTButton* storyButton = [TTButton buttonWithStyle:@"toolbarRoundButton:" title:@"Open Full Story"];
storyButton.font = [UIFont boldSystemFontOfSize:18];
storyButton.frame = CGRectMake(100, 100, 200, 50);
[storyButton addTarget:self action:@selector(presentFullStory) forControlEvents:UIControlEventTouchUpInside];
[storyButton sizeToFit];
[self.view addSubview:storyButton];
ありがとうaporat。できます! –