Adding an "Open In..." menu [closed] - iphone

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
My iOS app handles PDF files and I want to be able to open my file in another application so I want to add the "Open In..." menu (Seen here). How could I do this?

The menu is called UIDocumentInteractionController. Docs are here:
http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDocumentInteractionController_class/Reference/Reference.html
You'll want it as a property (otherwise, it will get released before you even get to present it)
#property (nonatomic, strong) UIDocumentInteractionController *documentInteractionController;
To display it:
self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:myPDFPath]];
[self.documentInteractionController presentOpenInMenuFromBarButtonItem:self.actionButton animated:YES];

To offer the PDF to other apps, look at using UIActivityViewController or UIDocumentInteractionController with a URL which links to the PDF file.
To allow other apps to pass PDF files to your app you need to configure it as a viewer / editor of PDF files in the info.plist (CFBundleDocumentTypes) and handle the supplied information when the app is launched.

Related

Anyone find that UIDatePicker is not showing under iOS 14? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I am trying to display date picker on button click. In iOS 13 that is working fine but when run on iOS 14 it is not showing.
I had the same issue. Go on your Storyboard and click on your calendar after go to Preferred Style attribute and change from Automatic (default value set by iOS 14) to Wheels. Now your calendar will show up again.

Xcode 10.1 textField secureTextEntry [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
StoryBoard textField checked secureTextEntry, other textField all textFields are asking faceRecognition in iphone X, other lower version of iphones are working fine. Is that iphone x, bug or xcode bug ?
it's not a bug. you are going somewhere wrong.
in your viewDidLoad write this code:
MyTextField.isSecureTextEntry = true
or you can use attributes inspector -> Text Input Traits -> Secure Text Entry
it working fine on iPhone x.
Sorry guys i found solution. The problem is not xCode. iPhone x or greater iPhone
included feature of face recognition users have password auto fill settings. if enabled that settings that page textfield type password, secure textFiled entry and webView input type="password" that all page keyboard not showing language globe button. I think it was problem if username field is required Cyrillic.

Top Layout Guide deprecated since iOS 11 - unable to find view [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I am getting the following errors:
But i am unable to find the view which occurs that warnings. When ill delete all views in the Storyboard, and perform a "Clean" - the warnings are still present.
Any ideas how to find that view?
Any ideas how to find that view?
It's not a "view"; it's the storyboard itself. Edit the storyboard and check Use Safe Area Layout Guides:
Also you might need to quit Xcode and clean out the DerivedData folder so as to get a completely clean build.
let guide = view.safeAreaLayoutGuide
//put the code like this
view.topAnchor.constraint(equalTo: guide.topAnchor).isActive = true

Click desktop icon and doc item From transparent borderless window [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a borderless and transparent (alpha value is .5) NSwindow as shown in the image below. Now i have to click doc and desktop item from this window
i researched on google and can't find related to it
Can anybody tell me how can i achieve this.
below code is for creating NSWindow .
NSRect screenRect = [[NSScreen mainScreen]frame];
captureItFullWindow = [[CapTureFullWindow alloc] initWithContentRect:screenRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO ];
[captureItFullWindow setLevel:NSScreenSaverWindowLevel];
[captureItFullWindow makeKeyAndOrderFront:self];
[captureItFullWindow setOpaque:NO]; //Tells the window manager that the window might have transparent parts.
[captureItFullWindow setBackgroundColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.3]];
its too easy when i got the answer
only i have to set window mouse ignoring property
[self setIgnoresMouseEvents:YES];

How to add bookmark feature when using UIPageViewController to open PDF file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Created pdfscrollview and added it to the viewcontroller. Using uipageviewcontroller datasource methods to turn pages forward and backward
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController
Want to add bookmark feature to this loaded and opened pdf file like if user bookmarks any page then next time when user opens pdf file it should open right from that bookmarked page.
Anyone knows how to code for adding bookmark feature to pdf file.
If you need to add fetures to your pdf viewer don't start from scratch, you will not get that help, there are some awesome helpful libraries on github which you can use:
Reader
FastPdfKit
And if you are looking for really advance features you can check PSPDFKit, by the way it is commercial.
Plus check this question.