2015-09-27 5 views
7

アプリでは、主な色として白を使用します。ユーザーがUIActivityViewControllerを開くと、コントローラーの色合いを標準のiOSブルーに設定します。これはアクティビティビュー自体には効果的ですが、メールを送信する場合は、色合いは青色ではなく白です。UIActivityViewController:提示されたビューコントローラの色合い

提示されたビューの色合いを設定する方法があるとよいでしょう。 1つはありますか?

MFMailComposeViewControllerを開くと青色に着色カラーを設定することもMFMailComposeViewControllerUIActivityViewController内から開かれていないので、もし表示UIActionSheet、上の効果を有します。 http://i.imgur.com/OggykJF.png

編集:初期化した後が、提示する前に、あなたのUIActivityViewControllerにtintColor設定し

UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:activities]; activityController.view.tintColor = [UIColor blueColor]; [self presentViewController:activityController animated:YES completion:nil];

+0

解決方法はありますか? – wsidell

答えて

-1

:これはティントUIActivityViewControllerに色を追加するために、私は何をすべきかです

ことは明確化のためのスクリーンショットを参照してください。 。あなたは何ができるか

UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:activities]; 

//Set the tint color on just the activity controller as needed here before presenting 
[activityController.view setTintColor:[UIColor blueColor]]; 

[self presentViewController:activityController animated:YES completion:nil]; 
+0

あなたの答えをありがとう!もちろん、これはまさに私がやっていることです。したがって、それは私を助けません。 – triplejberger

1

最高のは、あなたがそれを提示する直前にシステム青またはあなたがUIActivityViewControllerに望む任意の色合いの色に、ウィンドウの色合いの色を設定して、あなたはそれを却下する直前に元に戻し、ウィンドウの色合いの色を変更することです。それは動作します。これは私がそれを行う方法です。

UIApplication.shared.keyWindow?.tintColor = Styles.color.systemBlue 

、その後

UIApplication.shared.keyWindow?.tintColor = Styles.color.tint 
0

私はこれがすべてで仕事を得るために管理していませんでしたが、あなたは、代替を考えた - 白いテキストを残すと変更しますnavbarの背景色が表示されます。 with:

UINavigationBar.appearance().backgroundColor = .black 

これは、メールとTwitterの共有画面用のNavbarのボタンで機能するようです。

関連する問題