1

アプリケーションがあり、編集モードのときにフォルダー作成ボタンをカスタマイズしたいと考えています。

私はそれを行うために次のコードを使用しました:

UIBarButtonItem * addButton;
addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(createFolder)];
[addButton setTitleTextAttributes:dictionaryOfTitleTextAttributes forState:UIControlStateNormal];
[addButton setBackgroundImage:[[UIImage imageWithCGImage:[UIImage imageNamed:@"List/newfolder-normal.png"].CGImage scale:2 orientation:UIImageOrientationDown] resizableImageWithCapInsets:UIEdgeInsetsMake(4, 14, 4, 14)] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[addButton setBackgroundImage:[[UIImage imageWithCGImage:[UIImage imageNamed:@"List/newfolder-touched.png"].CGImage scale:2 orientation:UIImageOrientationDown] resizableImageWithCapInsets:UIEdgeInsetsMake(4,14,4,14)] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];

しかし、新しいフォルダーの作成ボタンのプラス記号を削除できず、アプリは次のように見えました

ここに画像の説明を入力

プラス記号を削除するにはどうすればよいですか?

4

1 に答える 1