Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing SLComposeSheetConfigurationItem's tint color/text color

So for the last two weeks I have been working on my GitHub repo https://github.com/satheeshwaran/iOS-8-Features-Demo where in I tried to demo the Share extension introduced in iOS 8. I got to know the way in which I could add SLComposeSheetConfigurationItem to a SLComposeServiceViewController but I was not able to figure out how to change the tint color or the text color of a SLComposeSheetConfigurationItem.

What I have did so far,

enter image description here

See in the above figure I would like to set the description and the My First Share to some color of my choice, also may be I would like to customize the font or something. I dug into the SocialFramework a bit but was not able to get anything out of it.

I saw Evernote's share extension on my iPad and it looks like this, enter image description here

If you see at the bottom there is an icon and also the text color etc matches the theme of the navigation bar.

Quoting the WWDC 2014 presentation on extension programming,

SLComposeServiceViewController for standard UI
UI/NSViewController for custom UI Coming to my question,

  1. Can I customize SLComposeServiceViewController and SLComposeSheetConfigurationItem to look like this??
  2. The second question is about the quote, can the default SLComposeServiceViewController be customized at all?? or should I go with a UIViewController subclass to do my own UI.
  3. How would have Evernote done it custom UIViewController subclass to duplicate the behavior or using SLComposeServiceViewController ( I am not sure whether to ask this but I want answers)
like image 389
Satheesh Avatar asked Dec 19 '22 11:12

Satheesh


1 Answers

For customizing the navigation bar. The normal, non-dot notation methods work fine for me.

[[[self navigationController] navigationBar] setTintColor:[UIColor whiteColor]];
[[[self navigationController] navigationBar] setBackgroundColor:[UIColor redColor]];
[[self navigationItem] setTitleView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"elephant.png"]]];

For the SLComposeSheetConfigurationItem that does look like a custom subclass given the icon.

The only public methods for configuration on SLComposeSheetConfigurationItem @property (nonatomic, copy) NSString *title; // The displayed name of the option. @property (nonatomic, copy) NSString *value; // The current value/setting of the option. @property (nonatomic, assign) BOOL valuePending; // Default is NO. set to YES to show a progress indicator. Can be used with a value too.

like image 96
m00sey Avatar answered Dec 22 '22 00:12

m00sey