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,
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,
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,
SLComposeServiceViewController
and SLComposeSheetConfigurationItem
to look like this??SLComposeServiceViewController
be customized at all?? or should I go with a UIViewController
subclass to do my own UI.UIViewController
subclass to duplicate the behavior or using SLComposeServiceViewController
( I am not sure whether to ask this but I want 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With