google drive options is not visible in UIDocumentMenuViewController in IOS10 - ios

We have developed chat application and in that app there is one feature of file sharing like whatsapp, Its all working fine in up to iOS9.x, but when I test it in iOS10, google drive option immediately disappear.
That is what I am trying to describe in the case
Tried to send a file,but the google drive dissapear before I even get to select it.
Here is the steps taken before the bug happens :-
•On chat
•Select "Send File"
•Select "More"
•Able to see "Google Drive" for half second before it dissapear(See Attached photo) Options
But up to iOS9.x we there a option of google drive. I search lot on google and on Stackoverflow but Can't find any solution about iOS specific.
we write following code for this:
UIDocumentMenuViewController *documentProviderMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:#[(NSString*)kUTTypeCompositeContent] inMode:UIDocumentPickerModeImport];
documentProviderMenu.delegate = self;
documentProviderMenu.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:documentProviderMenu animated:YES completion:nil];
new edit:
I get one thing, its hide by UIDocumentMenuViewController because see in second image, if I drag row upside then its appear and google drive available in row number -1. If I re arrange it then I can get it in second row, but first row is disappear by default (not displaying in the screen).
I apply following things but not succeeded.
http://www.openradar.me/radar?id=5065803028234240
http://openradar.appspot.com/19385063
http://www.openradar.me/radar?id=6144449704886272
http://openradar.appspot.com/radar?id=6144449704886272
Please any one tell me what is the issue? Thanks in advance...

I have also faced the same issue. I was able to solve the issue by making navigation bar translucent. You may also use
UINavigationBar.appearance().isTranslucent = true
This appears to be a bug and there is also a similar issue reported here http://www.openradar.me/24564847

Related

App crashes on return from some share plugins of activityViewController

I've got a TableViewController with static table; one of it's cells houses an UIView named graphArea. The view renders a chart, it's background and an axis line - all inside it's drawRect(). There are also two another views (sunView & markerView), that are made with Interface Builder and used for chart dynamics (moving marker line and point on touch events).
All worked buttery smooth until I've implemented and tried to test a share button, that employs the ordinary activityViewController mechanism.
The magic begins, when one from a couple of share activities, whose share plugin window takes the full screen, is finished (no matter whether sharing succeeded or cancelled). The app crashes.
Discovery using debugger made apparent to me, that the crash happens, because some views, including graphArea, sunView, markerView are nil after return from sharing screen.
Only some of fullscreen share plugins (like preinstalled Mail and Messages, or, in my case, "Download to DropBox" action) lead app to crash. Other fullscreen share plugins do not (tested Telegram, WhatsApp, Skype). No one of those non-fullscreen plugins has ever caused crash (Evernote, Twitter, 2Do etc.).
It looks like graphArea, sunView, markerView are deallocated from memory when "malicious" share plugins take full screen. I haven't figured out, why.
Here's some debug info:
The traceback and assembly of fatalErrorMessage.
The next screenshot shows a part of controller code and properties, that are nil on return from share plugin (gray selection). And yes, they were all non-nil before.
Please, help me! Thank you in advance!
Thank you, Palpatim. My friend also pointed me at the same thing: I've put graphArea.removeFromSuperview() in viewDidDisappear(), and this caused the exception after share plugins, that have .presentationStyle = fullScreen. So at the point, when the app is to show again, there is no more graphArea in on the tableView.

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.

Unable to configure launch screen appearance using view controller file

I have a LaunchScreen.storyboard which serves as the launch screen file. In this storyboard is a view controller with the class LaunchViewController.
In my LaunchViewController.m file I changed the view's background color and added a label with the FB shimmering effect (https://github.com/facebook/Shimmer).
_shimmeringView = [[FBShimmeringView alloc] init];
_shimmeringView.shimmering = YES;
_shimmeringView.shimmeringBeginFadeDuration = 0.3;
_shimmeringView.shimmeringOpacity = 0.3;
[self.view addSubview:_shimmeringView];
_logoLabel = [[UILabel alloc] initWithFrame:_shimmeringView.bounds];
_logoLabel.text = #"Shimmer";
_logoLabel.font = [UIFont fontWithName:#"HelveticaNeue-UltraLight" size:60.0];
_logoLabel.textColor = [UIColor whiteColor];
_logoLabel.textAlignment = NSTextAlignmentCenter;
_logoLabel.backgroundColor = [UIColor clearColor];
_shimmeringView.contentView = _logoLabel;
But when I ran it there's only an empty white background displayed as the launch screen. Also I find that he LaunchViewController looks fine when used as a regular view controller. How to make it display the same effect when used as launch screen?
You can't use code inside a launch view controller nib. Whether it is a storyboard or a separate nib. The code is not executed. The only thing that works is what is in InterfaceBuilder like auto layout and stuff. No code is loaded. This would defeat the purpose of using a launch file. The launcfile is loaded before the app has had chance to load.
No app, no code. Only the launch file.
I've had similar problems, and based on your code, it may be similar to mine. First off, I don't understand your question as much as I would like to. You said, "The LaunchViewController works fine when not used as launch screen." Does that mean that it looks the way you want it to look like when viewing on Xcode, but not on the simulator? I will try to provide possible solutions, and some trouble-shooting tips.
It could be something as simple as your background(or something) is at the front of the screen, blocking the rest. If so, you have to reconfigure the order of your items on your launch screen in your xib file in your application.
It could be an error on your part. Some of my programmer friends develop their launch screens using the Xcode interface: I find that easier to use, and it may have less errors.
It could be an issue with the iOS simulator. This is not likely to be true, but it could be. Try running the app on your device and see if it is fine there.
Troubleshooting: In order to trouble shoot your code, comment out your code, and load in all the elements of your launch screen one at a time, checking the iOS simulator and the console in between. You will eventually find the problematic code, and be able to fix it. From looking at your code, I don't see anything wrong (but don't take my word on it, I'm not familiar with coding the launchscreen/storyboard in swift. Good luck, and I hope my tips work. Also, if your launch screen is appearing fine inside Xcode, it is a programming error or an error on the iOS simulator. A picture or a description of your launch screen could also help future people who will answer this question.

iOS error message tooltip

I need to show error message as a tooltip in iOS 8 but i don't know how to do it. What I want is something similar to the one shown in below image (I'm referring to the tooltip with messages Select and Select All):
There is a great collection of libraries which already target your problem.
For example have a look at: AMPopTip.
Then you could show the popover like:
self.popTip = [AMPopTip popTip];
[self.popTip showText:errorMessage direction:AMPopTipDirectionUp maxWidth:200 inView:self.view fromFrame:textField.frame];
and hide it:
[self.popTip hide];
Have a look at the github repo there are more examples for customizing this control.
You can find more which might suit your needs better here: cocoacontrols.com
I had a similar problem and wrote my own custom tooltip.
You can init with your custom view (i assume you write some delegations to detect actions within.) and present from anywhere.
Maybe not the best replacement of UIPopoverController but still works great. And a lifesaver for iPhone. Also highly customisable.
https://github.com/akeara/AKETooltip
Hope this helps.

ABNewPersonViewController broken in iOS 7

My app allows the user to link other people within the app to entries in the contact book, and if one doesn't exist add a new one. I accomplish this by presenting an ABPeoplePickerNavigationController with an added button on the top for "Add Contact" which pushes an ABNewPersonViewController.
The problem I have is this functionality works perfectly in iOS 6, but completely fails to work properly in iOS 7. Clicking the "Done" button does absolutely nothing, and clicking "Cancel" simply stops the fields from being editable.
Has anyone encountered something like this and know how to fix it? Is this a known issue (Google search returned nothing useful"
Same problem for me.
My code was as follows,
ABNewPersonViewController *npvc = [[ABNewPersonViewController alloc] init];
npvc.view.backgroundColor = [UIColor colorWithRed:0.188 green:0.545 blue:0.016 alpha:1.0];
After I removed “npvc.view.backgroundColor =…”, it works fine.
Probably the structure of ABNewPersonViewController underneath has changed, so we are not allowed to set its background color.

Resources