iOS 8.3: UIActivityViewController shows extraneous row - ios

I have a UIActivityViewController for which I have excluded (using excludedActivityTypes) all the UIActivityCategoryAction activity types.
In iOS 8.2, the UIActivityViewController would only show one line, for the UIActivityCategoryShare activity types.
In iOS 8.3, I get an empty line for UIActivityCategoryAction. See the screenshot below where the second line just has "More".
How can I remove the UIActivityCategoryAction in a UIActivityViewController in iOS 8.3?

In iOS 8, UIActivityViewController is still an API that only provides custom functions, but not custom UI. You can't change the way it looks. The only part of the visual style you can change is the icon of your custom UIActivity subclasses. (ref)
This is how Apple implements this, and it cannot be changed as of 8.3. If you really want to avoid the extra row and the "More" button, you can implement a UIActivityViewController replacement. Here are a couple that have been recently maintained:
OvershareKit
URBNShareKit
References:
UIActivityViewController Hide More from Actions
UIActivityViewController on iOS 8 show "more" button with custom activities
Can I exclude "More" Button in UIActivityViewController?
http://getnotebox.com/developer/uiactivityviewcontroller-ios-8/

This is by-design so that users can add back system and third-party actions that they've hidden.

The More is system default. that is used to reordering the application. and for extension(introduce in IOS 8), More button is used to reorder the app as well add application in dialogue. we don't have any control over it.
Hope this help you.

I find a away to remove the UIActivityCategoryAction .
Like that:
demo
As the UIActivityCategoryAction is the second section of a CollectionView ,
You can find collectionView's dataSource and change the implement of the "numberOfSectionsInCollectionView:" by method swizzling.
here is the demo:enter link description here

UIActivityCategoryAction is the second section of a UIColletionView , change the number of section equal to 1 ,and the UIActivityCategoryAction will disappear.
Here is the demo

Related

How to add Today Widget Chevron

I am working on an app with a Today Widget extension. I've seen some widgets, including a sample app from Apple, that display a chevron in the top right to take the user to the app. I've looked through the documentation and sample code and can't figure out how this is added.
The sample app that's downloaded from here has it, but there isn't any information about how to enable it. https://developer.apple.com/documentation/notificationcenter/building_a_simple_widget_for_the_today_view
Does anyone know how to enable this?
You can add the chevron button to your widget by setting the widgetLargestAvailableDisplayMode of your extension context to .expanded:
extensionContext?.widgetLargestAvailableDisplayMode = .expanded
(Note that the chevron button does not take you to the app, but rather it toggles between expanded/compact sizes of your widget.)

Nativescript iOS Action Bar Subtitle

I'm attempting to put a subtitle under a title in the action bar on iOS. While there is this solution for Android it doesn't work on iOS at all. Is there any way to do this on iOS?
<ActionBar [title]="This works" [subTitle]="I want a subtitle here"></ActionBar>
iOS doesn't have a subtitle option. But you could use a custom title view and wrap two labels one below another.
iOS has some sort of subtitle, but it is named as prompt (for more detail, you can see the doc for UINavigationBar).
Unfortunately, you can't set its value from XML, so you need to use some handler - I create simple playground to demonstrate prompt property.

How to implement the behavior of image tapping like what the Notes app does in iOS 9.x?

I am practicing a notes app, in which I use NSAttributedString to store the words and photo inputted in this app.
Now I am trying to implement the image tapping behavior like what the Notes app does in iOS 9.x, in which if the added photo is tapped, the screen turns to another mode, like the screenshots below.
screenshots of the Notes App in iOS 9.x
After searching Google and Stackoverflow, I found the textView:shouldInteractWithTextAttachment:inRange: method of NSAttributedString may be used to catch the tapping image behavior. However, this results in the words and photo not editable because it is necessary to make self.myTextField.editable = NO in order to enable the method above. Maybe it is possible to make a button to switch betweenself.myTextField.editable = NO and self.myTextField.editable = YES, but I'm still hope to implement what the notes app (in which there is no such a switch button) does in iOS 9.x.

What type of UI component is this?

I see this type of action sheet on iOS devices using the Google Drive application.
I want to know if it is already supported on iOS SDK or if it is a custom UI?
If it is already a standard component, what's name of it?
It was called UIActionSheet before iOS8 and after you can find this UI component under the UIAlerController. You can use this component to make some UI like this but development target should be more that iOS8.
You can check here for documentation.
I'm not aware of any custom components, but it looks to me like a standard UIAlertController with a ActionSheet style. As the alert controller extends UIViewController, you may add subviews to it.
The screenshots indicate that they added a UITableView as a subview to the alert controller:
Ok, got it. It's only for iOS 8 and later. It's named UIDocumentPickerExtensionViewController.

UIButton appears different on runtime

I just added a button to the storyboard, but when I run the simulator it appears like in the following picture:
Can someone explain me why this is happening ? For the record I am using Google+ Platform for IOS sdk.
Is kinda weird. Did you set it up programmatically on your view controller class? if not, try adding it programmatically.
The problem is that if you include GooglePlus.bundle in your project, the button will appear like that. It includes the GPPSignIn button.

Resources