以下のコードを実行してもボタンのタイトルが表示されない。
self.customButton = [BarButton buttonWithType:UIButtonTypeCustom]; self.customButton.titleLabel.text = @"編集";
困っていろいろ調べたら、タイトルは専用のメソッドを使って設定するらしい。
正しくは以下。
self.customButton = [BarButton buttonWithType:UIButtonTypeCustom]; [self.customButton setTitle:@"編集" forState:UIControlStateNormal];
あーそういえばあったなこういうメソッド。。
てかこのインタフェースは良くないと思います!(キリッ)