uiactivity

iOS 8 custom UIActivity image black background color

夙愿已清 提交于 2019-12-09 11:46:36
问题 I am trying to add a custom UIActivity of type UIActivityCategoryAction to UIActivityController . But in iOS 8, all of them are appearing with a black background. Is there a way to change this? 回答1: There are 3 things to note here: image background, image opaqueness, image size. iOS 7 Image background : Image background should be transparent. image opaqueness The "visible part" of the icon should be non transparent aka opaque. Note that any color information won't be preserved : image size

UIActivity activityViewController not dismissing on iPad

邮差的信 提交于 2019-12-08 15:57:10
问题 I have a UIActivity subclass that creates its own activityViewController : - (UIViewController *)activityViewController { WSLInProgressViewController* progressView = [[[WSLInProgressViewController alloc] init] autorelease]; progressView.message = [NSString stringWithFormat:NSLocalizedString(@"Posting to %@...",@"Posting to..."), self.activityType]; return progressView; } I've add a full repro on GitHub. According to the documentation, you aren't supposed to dismiss this manually. Instead, the

HTML email message body with UIActivityViewController

为君一笑 提交于 2019-12-08 09:08:34
问题 Without subclassing UIActivity, is it possible to use UIActivityViewController (UIActivityTypeMessage) to share a html message via the Mail app? When I passed the HTML as NSString, the body shows the html tags (e.g. ) in the message body which is not what I want. 回答1: Make sure the string you pass into the activity includes <html . UIKit's internal UIMailActivity class explicitly checks for the presence of <html to determine if the message is HTML or plain text. [r12 rangeOfString:@"<html"

UIActivityViewController not dismissing

徘徊边缘 提交于 2019-12-08 06:11:27
问题 I'm trying to add a custom UIActivity to a UIActivityController . When I click on the item, it presents the view controller I want it to, but when I finish with that view controller, the original UIActivityViewController is still there. My question is, how and where do I dismiss the activity view controller? This is the code in my custom UIActivity. - (BOOL)canPerformWithActivityItems:(NSArray *)activityItems{ self.activityTitle = @"Text Editor"; self.activityType = @"TextEdit"; self

UIActivity with no settings for Facebook

早过忘川 提交于 2019-12-06 19:43:36
问题 Is it possible to show Facebook UIActivity in UIActivityViewController if there's no settings for facebook account in default iOS settings? For now if I enter some fb account - I see fb in UIActivityViewController , if no - not see. Any ideas? 回答1: No it's not possible... If Facebook is not set up in Settings > Facebook , then the UIActivityViewController will not show Facebook as an option to share. 回答2: It's possible with another view controller called OWActivityViewController https:/

UIActivityViewController thinks my jpg is video when share by file URL

江枫思渺然 提交于 2019-12-06 17:35:11
问题 I have jpg files saved in the Documents directory that can be shared from a standard UIActivityViewController. All activity items (including Save Image) work as expected, but when Save Image is tapped, the following error shows in the console, despite the fact that the jpg does actually get saved to the camera roll. Is this a bug in iOS, or do I have to somehow specify that my file is a jpg (and not a video) in the file URL? 2015-07-29 06:46:58.317 AppName[4658:893408] Video /var/mobile

HTML email message body with UIActivityViewController

霸气de小男生 提交于 2019-12-06 15:14:52
Without subclassing UIActivity, is it possible to use UIActivityViewController (UIActivityTypeMessage) to share a html message via the Mail app? When I passed the HTML as NSString, the body shows the html tags (e.g. ) in the message body which is not what I want. Make sure the string you pass into the activity includes <html . UIKit's internal UIMailActivity class explicitly checks for the presence of <html to determine if the message is HTML or plain text. [r12 rangeOfString:@"<html" options:NSCaseInsensitiveSearch range:0x0]; Note that while UIActivity is documented that it can send HTML

iOS 7 custom UIActivity as popover

谁说我不能喝 提交于 2019-12-06 04:17:31
This is my first question on StackOverflow, so please be patient with me... Here's the problem: I have created a custom Activity for adding bookmarks, which is opened from the UIActivityViewController . On iPhone it is opened as a modal, which is ok. But on iPad I open the UIActivity in a Popover, and I want the custom BookmarkActivity also to be opened in this Popover. The method -(UIViewController *)activityViewController in my UIActivity subclass looks like this: - (UIViewController *)activityViewController { if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {

UIActivityViewController on iOS 8 show “more” button with custom activities

拟墨画扇 提交于 2019-12-05 03:31:36
Now XCode 6 with iOS 8 SDK is out, we can talk about stuff. I tried to use custom activities with UIActivityViewController on iOS 7, everything worked fine. But on iOS 8, when custom activities are shown, there is "more" button sitting next to them and clicking on this button show exactly the same custom activities. Did anyone find a workaround to remove this button? I couldn't find any solution yet. There is nothing to workaround. The "More..." button lets the user reorder the icons. This is now standard in iOS 8. 来源: https://stackoverflow.com/questions/25904740/uiactivityviewcontroller-on

UIActivity with no settings for Facebook

感情迁移 提交于 2019-12-05 01:11:56
Is it possible to show Facebook UIActivity in UIActivityViewController if there's no settings for facebook account in default iOS settings? For now if I enter some fb account - I see fb in UIActivityViewController , if no - not see. Any ideas? No it's not possible... If Facebook is not set up in Settings > Facebook , then the UIActivityViewController will not show Facebook as an option to share. It's possible with another view controller called OWActivityViewController https://github.com/brantyoung/OWActivityViewController It works for me! 来源: https://stackoverflow.com/questions/12899142