UITableView inside blurry UIView like Siri - ios

I'm trying to reproduce a similar view like the one Siri uses, specifically when she's showing some content, which looks like a "blurry-ier" content over an already blurry view.
Something like this, here you can clearly see the difference between the background and the content (like in the wiki/twitter view) that Siri is showing
I need this solution to be compatible with iOS 7 and I know iOS 8 allows to blur stuff easily but can't use that solution.
I already have the UIView with a blurry background, but I don't know how to highlight the content like Siri does so it's easier for the user to see what is part of the table and what is not.

Related

Action Extension with UI without covering whole screen?

I am currently trying trying to implement an Action Extension that transforms content on a Safari web page through Google's Translation API.
My issue is that I would like to display some UI on the screen without covering the whole screen, but no matter what I do that doesn't seem to work.
I have tried the following:
Setting this in the info.plist
<key>NSExtensionActionWantsFullScreenPresentation</key>
<false/>
Trying to change the content size in the interface builder to the following
https://imgur.com/a/gfYvFiD (Uploading images through stack isn't working for some reason)
Giving the UI a clear background color (always ends up being grey after the presentation is complete)
Setting the presentation style to be over current context.
Now i have seen a similar question where the accepted response was that it cannot be done due to Apple restrictions (https://stackoverflow.com/a/38764183/10058854), but I have seen some apps that seem to do it.
For example, iTranslate:
https://imgur.com/a/QpFo5St
The above 2 images clearly show that they have created an Action Extension and that the added UI is just the bar at the bottom of the web view.
Any help would be much appreciated, and thank you for reading this.

Take screenshots programmatically of entire scrollable area of another app in iOS

Currently it is cumbersome for the user to repeatedly scroll and take a screenshot if they want to capture more than what can fit on the screen at a time.
I would like to implement functionality such that at the request of a user (e.g. via tapping a special button on a custom keyboard), screenshots of the entire scrollable area of the currently opened app are automatically taken and stitched together.
Is this possible? And if so, how?
To clarify, the application containing the scrollable area is a third party application over which I have no control, e.g. iMessage or Facebook.
Edit: I am aware of answers like this one and this one that are about taking screenshots within an app that I control. As far as I can tell, these are not applicable in my situation. Please correct me if I am wrong about this.
This is not possible. Each app is contained in a protected sandbox that no other apps have access to.
You could make a custom keyboard, but you still wouldn't have access to any of the views in the app that you don't control.

Does tvOS have any UIViewController subclasses I can use instead of replicating standard functionality?

I've started developing for tvOS recently, and discovered that while TVML isn't ideal for our use case, we'd still like to display a number of screens that display the same types of content as I've seen in existing Apple apps, and which I know can be created with TVML.
As an example, I want to display a page of terms, the same way that the Apple TV displays information as a scrollable page of text.
I could do this custom, where I place my own textView on a UIViewController, and setup the width and positioning myself. But it's scenarios like this, where I'm wondering if there's some already existing standard control for it, such as a UIViewController subclass already setup for displaying Terms? Is there a set of these I could be looking at?
UIAlertController should solve what you're looking for. You configure the text, buttons, and then present it.
More info in the docs:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAlertController_class/

Change font, font size of toast in iOS

I'm have used Toast before in Android. Is there a way to customize the font or font size of Toast on an UIView in iOS?
I am aware of the makeToast function, which seems to only have optional parameters for duration, position, image, and title. Or is there another messaging/notification system I should be using instead?
I already found this answer for Android.
Turns out toast is not native to obj-C like I originally thought? Growl/toast style notifications library for iOS
It looks like the github project was already included in some of the legacy code I've been going through... but adding such custom features would not be an iOS issue like I thought, it'd be working on the github project.
Also, turns out that there's a native iOS library message system: UIAlertView
There is no Toast-like in iOS, but you can use something similar called popover.
Popovers are from the documentations:
is used to manage the presentation of content in a popover. You use
popovers to present information temporarily. The popover content is
layered on top of your existing content and the background is dimmed
automatically. The popover remains visible until the user taps outside
of the popover window or you explicitly dismiss it. Popover
controllers are for use exclusively on iPad devices. Attempting to
create one on other devices results in an exception. However popovers
only available in iPads.
I would recommend the following control for you to use on iPhone and iPad, very easy to use and implement.
https://github.com/50pixels/FPPopover

The Correct Way to do Custom Keyboards in iOS?

I am looking to implement a custom toolbar that sits above my keyboard for a text field with some custom values. I've found a ton of tutorials online but this question is for asking what's the best way to do this.
This tutorial here http://blog.carbonfive.com/2012/03/12/customizing-the-ios-keyboard/ provides the most common way I can see across many tutorials, with creating a new subclass of UIView and using delegates to get that information across.
That's the commonality. However, I came across this tutorial which in the view controller itself just creates the toolbar, assigns it to the textField inputAccessory and it's good to go. In fact, I tried out the code and without any effort, I have now a custom keyboard.
http://easyplace.wordpress.com/2013/03/29/adding-custom-buttons-to-ios-keyboard/
This just seems a bit too easy to me though and I'd think the proper, Apple recommended way would be to create that UIView subclass and use delegates so that the view controller with the text fields acts as that delegate.
I'm specifically targeting iOS 7 in my app.
What are people's thoughts on this? If the second easier link is supported and is likely to pass Apple's guidelines, it's a good starting point but if delegates are the way to go, I'd rather look into that from the start.
Your thoughts will be appreciated.
There is no 'Apple Approved' way to do this, and its hard to believe anything you do here would get your app rejected. The custom keyboard you reference in your post has the iOS6 look and will appear outdated in an iOS6 app. I'll mention some iOS7 suggestions shortly, but the constant danger of mimicking what the System looks like today is guaranteed to look outdated later. In Mac/Cocoa development, Apple use to say at the WWDC that if you did something custom, make it look custom, don't take a standard Apple widget and try to duplicate it. But that advice is mostly ignored.
For iOS 7, you can create buttons that appear just like the system ones do (not pressed), but of course when someone presses them, they won't act like system buttons (i.e. animate up and "balloon" out.
I'm currently using a fantastic add-on keyboard, my fork of KOKeyboard (which uses the buttons above). This is such a cool addition. While the buttons look like iPad buttons, each one has 5 keys in it. By dragging to a corner you select one of the four, and tapping in the middle gives you that key. This might be overkill for your app, but it really helped me with mine. It looks like this:
(the Key / Value is in the under laying view.) The center control lets you move the cursor - its like a joy stick - and can be used to both move and select text. Amazing class, I wish I'd invented it!
Also, for any solution, you want to use a UIToolbar as the view holding the keys, for the reason that it supports blur of the view it overlays, just like the keyboard does. You can use the UIToolbar with no bar button items in it (if you want), and just add subviews. This is a "trick" I learned here, as there is no other way to get blur!
David's KOKeyboard (er…, the one he used - see David's comment below) looks nice. I suspect that he is using the official Apple mechanism:
inputAccessoryView
Typically, you'd set that value on a UITextView, but it can be any class that allows itself to become the first responder.
The provided view will be placed above the default apple keyboard.
It is correct that there is no official mechanism (and it is suggested against) to modify any system provided keyboard. You can add to it, as above. You can also entirely replace it for with your own mechanism. Apply will forgo the keyboard setting on your view and use a custom input mechanism if you set
inputView
set it to any view - Apple will still manage its appearance and dismissal as it does the custom keyboards.
Edit: Of course, iOS 8.x added significant access to keyboards. (not mentioned here)

Resources