以下の内容はhttps://anton0825.hatenablog.com/entry/20120915/1348046118より取得しました。


UIButtonのtitleが表示されなくて困った

以下のコードを実行してもボタンのタイトルが表示されない。

        self.customButton = [BarButton buttonWithType:UIButtonTypeCustom];
        self.customButton.titleLabel.text = @"編集";

困っていろいろ調べたら、タイトルは専用のメソッドを使って設定するらしい。
正しくは以下。

        self.customButton = [BarButton buttonWithType:UIButtonTypeCustom];
        [self.customButton setTitle:@"編集" forState:UIControlStateNormal];

あーそういえばあったなこういうメソッド。。
てかこのインタフェースは良くないと思います!(キリッ)




以上の内容はhttps://anton0825.hatenablog.com/entry/20120915/1348046118より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14