iOS 8 modify "asset Remove Alert" with Xcode - ios

In iOS 8 you're allowed to easily delete assets from Camera Roll.
I already use this function in my App but I wan't to change the text of the alert, which is visible.
Image:
Now I want to change the title of the alert.
Did everybody know, what I have to do that i can change the title of the alert?
I use Objective-C in Xcode.

Related

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.

iOS 8.3: UIActivityViewController shows extraneous row

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

Is there an iOS equivalent of NSRunAlertPanel?

I am trying to, when a button is pressed, a small menu comes up, like NSRunAlertPanel in Cocoa. It is like in iOS, when you press reset, it gives you options to continue, or go back. Image:
How do I do this?
As noted above, the answer to this is UIActionSheet in iOS < 8 and UIAlertController for iOS >= 8. Easier to grab a library that's abstracted that away for you; these look good.
Objective-C: MSAlertController for iOS
Swift: SimpleAlert for iOS

Accessing and Enable/disable UIViewalert Button in ios 7 and earlier

I am stuck on Accessing uialertview buttons in ios 7 . when googling i read ios 7 did not allow to customize or chenging the uialert view button .
I want to do these functionality in my project my deployment target is 5.0-
->I want to disable AlertView first button disable for 15 second with its title like this
OK(15),OK(14)......OK(0),OK(with user enable). After completion 15 seconds user can tap to the ok button to dismiss the alert view .
please suggest me how to do this.
Can i get the ok (fist button) of alert view and can change its title as i write above .
Or
i have to use custom alert view .
I want to show the default looking UIAlert which match with IOS 7 and earlier version Ui
Thanks .

Is it possible to customize application icon badge: Xcode?

This may be a foolish question. But I'm asking it because of my curiosity. Is there is any possible way to customize an iOS application icon badge image(as below:)..?
Thanks in advance...
Not possible at all. You have to use Default. After the app launch you can show custom badge icon of the UITabbar.
All the best !!!
If you mean the badge number that can be shown on an app icon, in white text over a red circle, then no, it cannot be set to a custom image. You can only control the number that is shown. It is set using the -[UIApplication setApplicationIconBadgeNumber:] method, i.e., the applicationIconBadgeNumber property on UIApplication:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:99];
I have a possible solution, instead of using the OS to add a badge, what if you programmatically replace the app icon with a version that has the badge built into it.
You can use libraries such as:
https://github.com/skb1129/react-native-change-icon
The only question is, does anyone know if Apple would have any objections?

Resources